3
0
Fork 0

[ADD] Fields declaration in manifest and renamed the module.

7.0
Augustin Cisterne-Kaas 2014-04-11 11:01:14 +08:00
parent d5e4988657
commit 55de8b6962
3 changed files with 11 additions and 5 deletions

View File

@ -19,8 +19,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
# #
############################################################################## ##############################################################################
{'name': 'Web Polymorphic', {'name': 'Web Polymorphic Many2One',
'version': '0.1', 'version': '0.2',
'category': 'Web', 'category': 'Web',
'depends': ['web'], 'depends': ['web'],
'author': 'Elico Corp', 'author': 'Elico Corp',
@ -31,10 +31,16 @@ Add a new widget named "polymorphic"
The polymorphic field allow to dynamically store an id linked to any model in The polymorphic field allow to dynamically store an id linked to any model in
OpenERP instead of the usual fixed one in the view definition OpenERP instead of the usual fixed one in the view definition
E.g:
<field name="model" invisible="1" /> Python fields declaration:
<field name="object_id" widget="polymorphic" polymorphic="model" />
'model': fields.many2one('ir.model', string='Model'),
'object_id': fields.integer("Resource")
XML fields declaration:
<field name="model" invisible="1" />
<field name="object_id" widget="polymorphic" polymorphic="model" />
""", """,
'js': [ 'js': [
'static/src/js/view_form.js' 'static/src/js/view_form.js'