hello,I want a "prototype inheritance " of customer billing view from accounting model to another custom module that i called test!but it doesn't work!!can anybody help me please!this is my code:
class test_test(models.Model):
_name = 'test.test'
_inherit = 'account.invoice'
de = fields.Text(string='Des', required=True)
and the xml :
<record id="invoice_tree" model="ir.ui.view">
<field name="name">module.name.account.invoice.tree</field>
<field name="model">test.test</field>
<field name="inherit_id" ref="account.invoice_tree" />
<field name="arch" type="xml">
<field name="state" position="after">
<field name="de" /> </field> </field> </record>
help please!!!i get this erreur:
ParseError: "ValidateError
Field(s) `arch` failed against a constraint: Invalid view definition
Error details:
Field `de` does not exist
Error context:
View `account.invoice.form.inherit`
[view_id: 1092, xml_id: test.view_account_invoice_inherit_form, model: account.invoice, parent_id: 638]" while parsing file:///C:/Workspace/Odoov8/odoo/addons/test/views/dimo_view.xml:27, near
<record model="ir.ui.view" id="view_account_invoice_inherit_form">
<field name="name">account.invoice.form.inherit</field>
<field name="model">account.invoice</field> <!------ ----- ---- --- -- - -->
<field name="type">form</field>
<field name="inherit_id" ref="account.invoice_form"/>
<field name="arch" type="xml">
<field name="partner_id" position="after">
<field name="de"/>
</field>
</field>
</record>