[7.0] account_default_draft_move - XML xpath expr error in invoice view on invoice_cancel button

Bug #1160251 reported by Yannick Vaucher @ Camptocamp on 2013-03-26
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Account - Financial Tools
Yannick Vaucher @ Camptocamp

Bug Description

Trying to install the module will lead to:

2013-03-26 08:58:12,340 10635 ERROR openerp_trunk_doremi openerp.addons.base.ir.ir_ui_view: Can't render view account_default_draft_move.invoice_form_supplier_group_invoice for model: account.invoice
Traceback (most recent call last):
  File "...server/openerp/addons/base/ir/ir_ui_view.py", line 125, in _check_render_view
    fvg = self.pool.get(view.model).fields_view_get(cr, uid, view_id=view.id, view_type=view.type, context=context)
  File "...addons/account/account_invoice.py", line 330, in fields_view_get
    res = super(account_invoice,self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar, submenu=submenu)
  File "...server/openerp/osv/orm.py", line 2235, in fields_view_get
    arch=apply_view_inheritance(cr, user, source, sql_res['id']),
  File "...server/openerp/osv/orm.py", line 2193, in apply_view_inheritance
    source = apply_inheritance_specs(source, view_arch, view_id)
  File "...server/openerp/osv/orm.py", line 2177, in apply_inheritance_specs
    raise_view_error("Element '%s' not found in parent view '%%(parent_xml_id)s'" % tag, inherit_id)
  File "...server/openerp/osv/orm.py", line 2070, in raise_view_error
    % (child_view.xml_id, self._name, error_msg))
AttributeError: View definition error for inherited view 'account_default_draft_move.invoice_form_supplier_group_invoice' on model 'account.invoice': Element '<xpath expr="//button[@name='invoice_cancel' and @states='sale,open']">' not found in parent view 'account.invoice_supplier_form'
2013-03-26 08:58:12,341 10635 ERROR openerp_trunk_doremi openerp.tools.convert: Parse error in ...account-financial-tools/account_default_draft_move/invoice_view.xml:17:
<record id="invoice_form_supplier_group_invoice" model="ir.ui.view">
      <field name="name">Show Cancel invoice button</field>
      <field name="model">account.invoice</field>
      <field name="inherit_id" ref="account.invoice_supplier_form"/>
      <field name="type">form</field>
      <field name="arch" type="xml">
        <xpath expr="//button[@name='invoice_cancel' and @states='sale,open']" position="attributes">
          <attribute name="groups" eval="account.group_account_invoice"/>
Traceback (most recent call last):
  File "...server/openerp/tools/convert.py", line 847, in parse
    self._tags[rec.tag](self.cr, rec, n)
  File "...server/openerp/tools/convert.py", line 814, in _tag_record
    id = self.pool.get('ir.model.data')._update(cr, self.uid, rec_model, self.module, res, rec_id or False, not self.isnoupdate(data_node), noupdate=self.isnoupdate(data_node), mode=self.mode, context=rec_context )
  File "...server/openerp/addons/base/ir/ir_model.py", line 937, in _update
    model_obj.write(cr, uid, [res_id], values, context=context)
  File "...server/openerp/addons/base/ir/ir_ui_view.py", line 207, in write
    return super(view, self).write(cr, uid, ids, vals, context)
  File "...server/openerp/osv/orm.py", line 4201, in write
    self._validate(cr, user, ids, context)
  File "...server/openerp/osv/orm.py", line 1544, in _validate
    raise except_orm('ValidateError', '\n'.join(error_msgs))
except_orm: ('ValidateError', u'Une erreur est apparue lors de la validation du/des champ(s) arch: Invalid XML for View

The 2nd button has been removed in addons at revision :
revno: 8845.1.1
revision-id: <email address hidden>
parent: launchpad_translations_on_behalf_of_openerp-20130313045907-qk0bmylr4b75nwiq
committer: Chris Biersbach <email address hidden>
branch nick: 7.0-opw-589784-cbi
timestamp: Wed 2013-03-13 13:43:17 +0100
  account: [FIX] Removes the unneeded second cancel button on supplier invoices

Related branches

Changed in account-financial-tools:
assignee: nobody → Yannick Vaucher @ Camptocamp (yvaucher-c2c)
Changed in account-financial-tools:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers