diff options
| author | Yannick Tivisse <yti@odoo.com> | 2017-05-23 13:04:15 +0200 |
|---|---|---|
| committer | Yannick Tivisse <yti@odoo.com> | 2017-06-02 15:31:47 +0200 |
| commit | 83608995e1856b175c1cc1773c40201843392888 (patch) | |
| tree | 03d2407411645aac6977dd23fe030a17fc570fdc /odoo | |
| parent | e50571ca257a332a53f12a77b34ccf1b5a4e09a6 (diff) | |
[IMP] base: Add 'active' attribute on menuitem tag
This attribute will be used in the next commit to hide by default account menuitems in the account module to finally display them in the account_invoicing module.
Without this attribute, we should create the menuitems with the <menuitem> tag and after that make them inactive by using a <record> tag
Diffstat (limited to 'odoo')
| -rw-r--r-- | odoo/import_xml.rng | 1 | ||||
| -rw-r--r-- | odoo/tools/convert.py | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/odoo/import_xml.rng b/odoo/import_xml.rng index 36546c39946..a343a3133af 100644 --- a/odoo/import_xml.rng +++ b/odoo/import_xml.rng @@ -239,6 +239,7 @@ <rng:optional> <rng:attribute name="action"/> </rng:optional> <rng:optional> <rng:attribute name="sequence"/> </rng:optional> <rng:optional> <rng:attribute name="groups"/> </rng:optional> + <rng:optional> <rng:attribute name="active"/> </rng:optional> <!-- TODO: remove icon stuff --> <rng:optional> <rng:attribute name="icon"/> </rng:optional> <rng:optional> <rng:attribute name="web_icon"/> </rng:optional> diff --git a/odoo/tools/convert.py b/odoo/tools/convert.py index 6997a2e1b30..6c0ed8e59bc 100644 --- a/odoo/tools/convert.py +++ b/odoo/tools/convert.py @@ -516,6 +516,8 @@ form: module.record_id""" % (xml_id,) if rec.get('sequence'): values['sequence'] = int(rec.get('sequence')) + values['active'] = self.nodeattr2bool(rec, 'active', default=True) + if rec.get('groups'): g_names = rec.get('groups','').split(',') groups_value = [] |
