account_cutoff_prepaid XML error conflicts with inherited view in addons/purchase_analytic_plans/purchase_analytic_plans_view.xml

Bug #1305174 reported by Stephan Levenhagen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Account - Closing
New
Undecided
Unassigned

Bug Description

when attempting to install account_cutoff_prepaid
error
ValidateError

Error occurred while validating the field(s) arch: Invalid XML for View Architecture!

error traceback:

AttributeError: View definition error for inherited view '' on model 'account.invoice': Element '<xpath expr="//field[@name='invoice_lin$
2014-04-09 15:58:11,031 31087 ERROR DI_dev openerp.tools.convert: Parse error in /opt/openerp/DI_dev/addons-di/account_cutoff_prepaid/ac$
<record id="invoice_supplier_form" model="ir.ui.view">
    <field name="name">prepaid.cutoff.invoice_supplier_form</field>
    <field name="model">account.invoice</field>
    <field name="inherit_id" ref="account.invoice_supplier_form"/>
    <field name="arch" type="xml">
        <xpath expr="//field[@name='invoice_line']/tree/field[@name='account_analytic_id']" position="after">
            <field name="start_date"/>
            <field name="end_date"/>
        </xpath>
    </field>
</record>

Error occurs only when purchase analytic plans installed

Seems the xpath is looking for field replaced possibly in inherited view for module purchase_analytic_plans in file purchase_analytic_plans_view.xml

purchase_analytic_plans_view.xml code listed below:

<?xml version="1.0"?>
<openerp>
<data>

    <record model="ir.ui.view" id="purchase_order_line_form_inherit">
        <field name="name">purchase.order.line.form.inherit</field>
        <field name="model">purchase.order.line</field>
        <field name="inherit_id" ref="purchase.purchase_order_line_form"/>
        <field name="arch" type="xml">
            <field name="account_analytic_id" position="replace">
                <field name="analytics_id" context="{'journal_id':parent.journal_id}" domain="[('plan_id','&lt;&gt;',False)]"/>
            </field>
        </field>
    </record>

    <record model="ir.ui.view" id="purchase_order_form_analytic_inherit">
        <field name="name">purchase.order.form.analytic.inherit</field>
        <field name="model">purchase.order</field>
        <field name="inherit_id" ref="purchase.purchase_order_form"/>
        <field name="arch" type="xml">
            <field name="account_analytic_id" position="replace">
                <field name="analytics_id" context="{'journal_id':parent.journal_id}" domain="[('plan_id','&lt;&gt;',False)]"/>
            </field>
        </field>
    </record>

    <!-- inherited view to make the purchase order lines list in the form non-editable
             for the members of some usability groups -->
    <record id="view_purchase_order_form_editable_list" model="ir.ui.view">
        <field name="name">purchase.order.form.editable.list</field>
        <field name="model">purchase.order</field>
        <field name="inherit_id" ref="purchase.purchase_order_form"/>
        <field name="groups_id" eval="[(6, 0, [ref('product.group_uom'), ref('purchase.group_analytic_accounting')])]"/>
        <field name="arch" type="xml">
            <xpath expr="//field[@name='order_line']/tree" position="attributes">
                <attribute name="editable"/>
            </xpath>
        </field>
    </record>

    <!-- Replace analytic_id with analytics_id in account.invoice.line -->

    <record model="ir.ui.view" id="invoice_supplier_form_inherit">
        <field name="name">account.invoice.supplier.form.inherit</field>
        <field name="model">account.invoice</field>
        <field name="inherit_id" ref="account.invoice_supplier_form"/>
        <field name="priority">2</field>
        <field name="arch" type="xml">
            <field name="account_analytic_id" position="replace">
                <field name="analytics_id" domain="[('plan_id','&lt;&gt;',False)]" context="{'journal_id':parent.journal_id}" groups="analytic.group_analytic_accounting"/>
            </field>
        </field>
    </record>
</data>
</openerp>

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.