summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Dony <odo@openerp.com>2012-08-22 16:49:46 +0200
committerOlivier Dony <odo@openerp.com>2012-08-22 16:49:46 +0200
commita337ca201d7d72b485c0e330c433afc50bef458a (patch)
tree9838432314c887f7029cf908be59f64b9b9afece
parentf7a5eb5d6ce1806e8eb4a20c8aa68074648e7ec7 (diff)
[IMP] rng: forbid redundant @type for menuitem, now inferred from the action type + minor cleanup
bzr revid: odo@openerp.com-20120822144946-fdsw9ee1ia3nfe86
-rw-r--r--openerp/import_xml.rng1
-rw-r--r--openerp/tools/convert.py6
2 files changed, 3 insertions, 4 deletions
diff --git a/openerp/import_xml.rng b/openerp/import_xml.rng
index bf5a9e1800e..5dd789c6e95 100644
--- a/openerp/import_xml.rng
+++ b/openerp/import_xml.rng
@@ -185,7 +185,6 @@
<rng:optional> <rng:attribute name="string"/> </rng:optional>
<rng:optional> <rng:attribute name="sequence"/> </rng:optional>
<rng:optional> <rng:attribute name="groups"/> </rng:optional>
- <rng:optional> <rng:attribute name="type"/> </rng:optional>
<rng:optional> <rng:attribute name="menu"/> </rng:optional>
<rng:empty />
</rng:element>
diff --git a/openerp/tools/convert.py b/openerp/tools/convert.py
index 5fd88889602..8269fa5d7ff 100644
--- a/openerp/tools/convert.py
+++ b/openerp/tools/convert.py
@@ -593,11 +593,11 @@ form: module.record_id""" % (xml_id,)
a_action = rec.get('action','').encode('utf8')
# determine the type of action
- if ('.' in a_action):
- # this is an action refering to another module: extract this module's name
+ if '.' in a_action:
+ # action referring to another module
a_action_module, a_action_name = a_action.split('.')
else:
- # this is a local action: fetch the current module's name
+ # local action: use current module
a_action_module = self.module
a_action_name = a_action