c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #09355
[Bug 693344] Re: Incorrect XML view parsing
** Branch linked: lp:openobject-server
--
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/693344
Title:
Incorrect XML view parsing
Status in OpenObject Server:
Fix Released
Bug description:
When a module is uploaded or updated, putting a comment right after the <field name="arch" type="xml"> results in a parsing error. This bug has been shared with Jay (OpenERP) - Dec 2010.
The resulting tree view is loaded up (incorrectly) as follow:
<?xml version="1.0"?>
<data><!--XXX HERE XXX Editable attribute allows the list view to have a blank row for adding new record. -->
<tree string="Academies" editable="top" colors="blue:category=='science'">
<!--Editable attribute allows the list view to have a blank row for adding new record. -->
<!--colors attribute will highlight the record if the condition is met -->
<!--Conditions can be a complex (multi field) expression -->
<field name="name"/>
<field name="date_estd"/>
<field name="address_id"/>
<field name="no_of_employees"/>
<field name="rating"/>
<field name="category"/>
</tree>
</data>
Sample view XML file:
<record id="view_list_academy" model="ir.ui.view">
<field name="name">List view of Academy</field>
<!-- model notation is read as follow....the openacademy class (2nd) of openacademy module (1st) -->
<field name="model">openacademy.openacademy</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<!--XXX HERE XXX Editable attribute allows the list view to have a blank row for adding new record. -->
<tree string="Academies" editable="top" colors="blue:category=='science'">
<!--Editable attribute allows the list view to have a blank row for adding new record. -->
<!--colors attribute will highlight the record if the condition is met -->
<!--Conditions can be a complex (multi field) expression -->
<field name="name"/>
<field name="date_estd"/>
<field name="address_id"/>
<field name="no_of_employees"/>
<field name="rating"/>
<field name="category"/>
</tree>
</field>
</record>
The resulting error message in GTK client:
Traceback (most recent call last):
File "/home/heryatmadja/workspace/openerp-training/6.0/trunk/openobject-client/bin/modules/gui/window/tree.py", line 208, in sig_open
if not self.sig_action(widget, 'tree_but_open', warning=False):
File "/home/heryatmadja/workspace/openerp-training/6.0/trunk/openobject-client/bin/modules/gui/window/tree.py", line 202, in sig_action
warning=warning)
File "/home/heryatmadja/workspace/openerp-training/6.0/trunk/openobject-client/bin/modules/action/main.py", line 199, in exec_keyword
self._exec_action(action, data, context=context)
File "/home/heryatmadja/workspace/openerp-training/6.0/trunk/openobject-client/bin/modules/action/main.py", line 143, in _exec_action
limit=datas['limit'], auto_refresh=datas['auto_refresh'], auto_search = datas['auto_search'], search_view = datas['search_view'])
File "/home/heryatmadja/workspace/openerp-training/6.0/trunk/openobject-client/bin/modules/gui/window/__init__.py", line 49, in create
auto_refresh=auto_refresh, auto_search=auto_search, search_view=search_view)
File "/home/heryatmadja/workspace/openerp-training/6.0/trunk/openobject-client/bin/modules/gui/window/form.py", line 73, in __init__
show_search=True, window=self.window, limit=limit, readonly=bool(auto_refresh), auto_search=auto_search, search_view=search_view)
File "/home/heryatmadja/workspace/openerp-training/6.0/trunk/openobject-client/bin/widget/screen/screen.py", line 129, in __init__
view = self.add_view_id(view_id, view_type[0], help=help)
File "/home/heryatmadja/workspace/openerp-training/6.0/trunk/openobject-client/bin/widget/screen/screen.py", line 604, in add_view_id
toolbar=view.get('toolbar', False), submenu=view.get('submenu', False), context=context)
File "/home/heryatmadja/workspace/openerp-training/6.0/trunk/openobject-client/bin/widget/screen/screen.py", line 645, in add_view
view = parser.parse(self, root_node, self.fields, toolbar=toolbar, submenu=submenu, help=help)
File "/home/heryatmadja/workspace/openerp-training/6.0/trunk/openobject-client/bin/widget/view/widget_parse.py", line 53, in parse
raise Exception(_("This type (%s) is not supported by the GTK client !") % node.tag)
Exception: This type (data) is not supported by the GTK client !
References