Browse Source

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

pull/4/head
Augustin Cisterne-Kaas 10 years ago
parent
commit
55de8b6962
  1. 0
      web_polymorphic_many2one/__init__.py
  2. 16
      web_polymorphic_many2one/__openerp__.py
  3. 0
      web_polymorphic_many2one/static/src/js/view_form.js

0
web_many2one_polymorphic/__init__.py → web_polymorphic_many2one/__init__.py

16
web_many2one_polymorphic/__openerp__.py → web_polymorphic_many2one/__openerp__.py

@ -19,8 +19,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
{'name': 'Web Polymorphic',
'version': '0.1',
{'name': 'Web Polymorphic Many2One',
'version': '0.2',
'category': 'Web',
'depends': ['web'],
'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
OpenERP instead of the usual fixed one in the view definition
E.g:
<field name="model" invisible="1" />
<field name="object_id" widget="polymorphic" polymorphic="model" />
Python fields declaration:
'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': [
'static/src/js/view_form.js'

0
web_many2one_polymorphic/static/src/js/view_form.js → web_polymorphic_many2one/static/src/js/view_form.js

Loading…
Cancel
Save