← Back to team overview

openerp-india team mailing list archive

[Bug 1093784] Re: 7.0 must not allow loading incorrect xpath expression

 

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'
2012-12-26 12:03:22,634 10902 ERROR test_25 openerp.tools.convert: Parse error in /home/gass/OpenERP/7.0/server/openerp/addons/c2c_stock_accounting/stock_view.xml:5: 
<record model="ir.ui.view" id="picking_values_view">
      <field name="name">view_picking_values.view</field>
      <field name="model">stock.picking</field>
      <field name="inherit_id" ref="stock.view_picking_form"/>
      <field name="arch" type="xml">
        <xpath expr="/form/notebook/page[@string='Products']/field[@name='move_lines']/form[@string='Stock Moves']" position="inside">
          <group colspan="2" col="2" groups="c2c_stock_accounting.group_c2c_stock_accounting_accountant">
            <separator string="Values" colspan="2"/>
            <field name="move_value_cost" groups="c2c_stock_accounting.group_c2c_stock_accounting_accountant"/>
            <field name="move_value_sale" groups="c2c_stock_accounting.group_c2c_stock_accounting_accountant"/>
            <field name="period_id"/>
          </group>
        </xpath>
      </field>
    </record>

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Server.
https://bugs.launchpad.net/bugs/1093784

Title:
  7.0  must not allow loading incorrect xpath expression

Status in OpenERP Server:
  New

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="/form/notebook/page[@string='Cash Transactions']/field/form/group/field[@name='account_id']" position="replace">
  +        <xpath expr="/form/sheet/notebook/page[@string='Cash Transactions']/field/form/group/field[@name='account_id']" position="replace">

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-server/+bug/1093784/+subscriptions


References