[FIX] product: supplier pricelist field in partner form

This is related to revision 73432ffe9f.

The inherited view adding
the purchase pricelist field on the partner form
no longer worked for user being in the purchase pricelist group
but not in the sale pricelist group, since the field was added
after the sale pricelist field, which was no longer in the view
for these users.

This revision partially revert the above revision, but
add the purchase pricelist group in the groups of the view,
so the view is loaded only if the user is part of one group
or the other.

opw-639685
This commit is contained in:
Denis Ledoux 2015-05-13 11:52:52 +02:00
parent 71b3861a54
commit 3e14a4ee5e
1 changed files with 3 additions and 3 deletions

View File

@ -5,14 +5,14 @@
<field name="name">res.partner.product.property.form.inherit</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="groups_id" eval="[(4, ref('product.group_sale_pricelist'))]"/>
<field name="groups_id" eval="[(4, ref('product.group_sale_pricelist')), (4, ref('product.group_purchase_pricelist'))]"/>
<field name="arch" type="xml">
<page string="Sales &amp; Purchases" position="inside">
<group>
<group name="pricelists" attrs="{'invisible': [('is_company','=',False),('parent_id','!=',False)]}">
<field name="property_product_pricelist"/>
<field name="property_product_pricelist" groups="product.group_sale_pricelist"/>
</group>
<div name="parent_pricelists" attrs="{'invisible': ['|',('is_company','=',True),('parent_id','=',False)]}">
<div name="parent_pricelists" groups="product.group_sale_pricelist" attrs="{'invisible': ['|',('is_company','=',True),('parent_id','=',False)]}">
<p>Pricelists are managed on <button name="open_commercial_entity" type="object" string="the parent company" class="oe_link"/></p>
</div>
</group>