7.0 must not allow loading xml without check
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Server (MOVED TO GITHUB) |
New
|
Undecided
|
Unassigned |
Bug Description
Hello
it seems to be possible to load invalid xpath expressions, which are only validated during next update BEFORE the new correct xpath is loaded.
the only way to fix this is to delete the view definition manually in the UI.
the error messages is a bit miss leading - it mentions the wrong xpath line, but then it shows the first view definition of the file regardless if this one is the one causing the problem or not.
Example
- <xpath expr="/
+ <xpath expr="/
summary: |
- 7.0 must not allow loading incorrect xpath expression + 7.0 must not allow loading xml without check |
another Example
the attribute error comes from another view
AttributeError: View definition error for inherited view 'stock_ get_name_ qty.picking_ location_ context_ view' on model 'stock.picking': Element '<xpath expr="/ form/notebook/ page[@string= 'Products' ]/field[ @name=' move_lines' ]/form[ @string= 'Stock Moves'] /group/ field[@ name='location_ id']">' not found in parent view 'stock. view_picking_ form' tools.convert: Parse error in /home/gass/ OpenERP/ 7.0/server/ openerp/ addons/ c2c_stock_ accounting/ stock_view. xml:5: values_ view"> >view_picking_ values. view</field> >stock. picking< /field> view_picking_ form"/> form/notebook/ page[@string= 'Products' ]/field[ @name=' move_lines' ]/form[ @string= 'Stock Moves']" position="inside"> "c2c_stock_ accounting. group_c2c_ stock_accountin g_accountant" >
<separator string="Values" colspan="2"/> value_cost" groups= "c2c_stock_ accounting. group_c2c_ stock_accountin g_accountant" /> value_sale" groups= "c2c_stock_ accounting. group_c2c_ stock_accountin g_accountant" />
2012-12-26 12:03:22,634 10902 ERROR test_25 openerp.
<record model="ir.ui.view" id="picking_
<field name="name"
<field name="model"
<field name="inherit_id" ref="stock.
<field name="arch" type="xml">
<xpath expr="/
<group colspan="2" col="2" groups=
<field name="move_
<field name="move_
<field name="period_id"/>
</group>
</xpath>
</field>
</record>