[7.0/trunk] Inherited views XML parsing problems -> introduce UPDATE tests?!

Bug #1181466 reported by Wolfgang Taferner (TaPo-IT)
24
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
New
Undecided
Unassigned
Odoo Server (MOVED TO GITHUB)
New
Undecided
Unassigned

Bug Description

There seems to be problems with updating modules which use/used inherited views.

It is the second time that updates were blocked from working, although the solution was simple...

i.e.: Install all modules in revision 9134 (Addons) and then update to revision 9135 (Addons) and run the update all routine....

You will probably run into this error/blocker:

2013-05-18 05:04:48,158 10472 INFO DB openerp.modules.loading: module portal_hr_employees: loading hr_employee_view.xml
2013-05-18 05:04:48,209 10472 ERROR DB openerp.addons.base.ir.ir_ui_view: <string>:32:0:ERROR:RELAXNGV:RELAXNG_ERR_ELEMWRONG: Did not expect element field there
2013-05-18 05:04:48,213 10472 ERROR DB openerp.tools.convert: Parse error in PATH/addons/portal_hr_employees/hr_employee_view.xml:35:

This issue can be resolved by commenting out the corresponding view and run the update (the view will therefore be deleted), uncomment the view and update again (the view will be recreated)

I think that there are no update tests which might be good to introduce at some point in the future to fix these kind of problems...

The other issue I had and fixed for inherited views...there was a key error when updating attributes, so I made a check to overcome this one...

=== modified file 'openerp/osv/orm.py'
--- openerp/osv/orm.py 2013-04-19 14:54:17 +0000
+++ openerp/osv/orm.py 2013-05-10 19:27:14 +0000
@@ -2148,7 +2148,8 @@
                             if attribute[1]:
                                 node.set(attribute[0], attribute[1])
                             else:
- del(node.attrib[attribute[0]])
+ if attribute[0] in node.attrib:
+ del(node.attrib[attribute[0]])
                     else:
                         sib = node.getnext()
                         for child in spec:

Revision history for this message
Amit Parik (amit-parik) wrote :

Hello Wolfgang My friend,

Thanks for the reporting!

This issue was generated due to half fixed of lp:1179349 or we can say it was a regression of https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-1179349-nco this branch with revision 9135.

But thanks to @Juanjo who is instantly answered on the bug and let us know about the problem also thanks to *The Olivier* who meanwhile fix the issue on revision#9182 see the comment#3 and #4.

So would you please update the revision and this issue has been resolved already. That's why I am making this as a duplicate of lp:1179349.

Thanks again!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.