Skip to Content
Menu
This question has been flagged
3 Replies
3628 Views

Hello,

i've been Trying to add some new Tabs with 'Sales & Purchasing' and 'internal note' but no luck.i kept getting invalid view definition.

Here's my xml FIle:

<openerp>

<data>

<record model="ir.ui.view" id="view_partner_odepo_form">

<field name="name">res.partner.form.inherit1</field>

<field name="model">res.partner</field>

<field name="inherit_id" ref="base.view_partner_form"/>

<field name="arch" type="xml">

<field name="phone" position="after">

<field name="phone2"/>

</field>

<field name="mobile" position="after">

<field name="mobile2"/>

</field>

<field name="email" position="after">

<field name="email2"/>

</field>

<field name="title" position="after">

<field name="meet"/>

</field>

<field name="email2" position="after">

<field name="skype"/>

</field>

<field name="website" position="after">

<field name="customer"/>

</field>

<!-- Rename Customer to Acheteur -->

<xpath expr="//field[@name='customer']" position="attributes">

<attribute name="string">Acheteur</attribute>

</xpath>

<field name="customer" position="after">

<field name="seller"/>

</field>

<field name="seller" position="after">

<field name="supplier"/>

</field>

<field name="supplier" position="after">

<field name="backOffice"/>

</field>

<field name="backOffice" position="after">

<field name="active"/>

</field>

<field name="active" position="after">

<field name="verifiedDate"/>

</field>

<!--

<field name="verifiedDate" position="after">

<field name="verifiedBy"/>

</field>

<xpath expr="//page[@string='internal_notes']" position="after">

<page name="dependance" string="Dépendances">

</page>

</xpath>-->

<!--

<xpath expr="//page[@string='sales_purchases']" position="after">

<page name="acheteur" string="Acheteur">

</page>

</xpath>

<xpath expr="//page[@string='sales_purchases']" position="after">

<page name="vendeur" string="Vendeur">

</page>

</xpath>

<xpath expr="//page[@string='sales_purchases']" position="after">

<page name="fournisseur" string="Fournisseur">

</page>

</xpath>

-->

</field>

</record>

</data>

</openerp>


Avatar
Discard

please include error too.

Best Answer

Problem is "sales_purchases" is a name not a string. Do like...

<xpath expr="//page[@name='sales_purchases']" position="after">
<page name="fournisseur" string="Fournisseur">
</page>
</xpath>
Avatar
Discard
Best Answer

You can put fields togather which you want after active field don't write twise you can add field like this:

<field name="active" position="after">

<field name="verifiedDate"/>

<field name="verifiedBy"/>

</field>

and please paste your error.

Avatar
Discard
Related Posts Replies Views Activity
6
Sep 17
6350
0
Apr 16
3718
2
Mar 15
8359
1
Mar 15
3135
1
Mar 15
4711