[IMP] rng: forbid redundant @type for menuitem, now inferred from the action type...
authorOlivier Dony <odo@openerp.com>
Wed, 22 Aug 2012 14:49:46 +0000 (16:49 +0200)
committerOlivier Dony <odo@openerp.com>
Wed, 22 Aug 2012 14:49:46 +0000 (16:49 +0200)
bzr revid: odo@openerp.com-20120822144946-fdsw9ee1ia3nfe86

openerp/import_xml.rng
openerp/tools/convert.py

index bf5a9e1..5dd789c 100644 (file)
             <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>
index 5fd8888..8269fa5 100644 (file)
@@ -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