Title says it all...
I'm inheriting the view base.view_partner_form and i'm trying to hide <page string="Sales & Purchases"></page> from a group called 'ajuste_did.group_did_del_sales'.
Right know I tried with
<xpath expr="/form/notebook/page[@string='Sales & Purchases']" position="replace">
<page string="Sales & Purchases" groups_id="[(3,reg('ajuste_did.group_did_del_saes'))]">
...
</page>
</xpath>
But with no positive result... Any suggestion?
Thanks
EDIT:
Now i'm having an 'Error occurred while validating the field(s) arch: Invalid XML for View Architecture!'
This is my partner.py file:
class res_partner(osv.osv):
_name = "res.partner"
_inherit = ['res.partner']
_columns = {
'hide': fields.boolean('Hide'),
}
_defaults = {
'hide': True,
}...
And this is my res_partner_view.xml file:
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_partner_form" model="ir.ui.view">
<field name="name">base.partner.form.inherit</field>
<field name="model">res.partner</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.view_partner_form" />
<field name="arch" type="xml">
<data>
<field name="image" position="after">
<field name="hide" invisible="1" />
<field name="contrato_promocional" invisible="1" />
<button name="generate_recurring_orders_agreement" string="Generar contrato" type="object" groups="base.group_sale_manager,base.group_sale_salesman" attrs="{'invisible': [('contrato_promocional','=', True)]}"/>
</field>
<field name="property_account_receivable" position="replace">
<field name="property_account_receivable" groups="account.group_account_invoice,ajuste_did.group_did_del_sales" />
</field>
<field name="property_account_payable" position="replace">
<field name="property_account_payable" groups="account.group_account_invoice,ajuste_did.group_did_del_sales" />
</field>
<xpath expr="//form//sheet//notebook//spage[@string='Sales & Purchases']" position="attributes">
<attribute name="invisible">[('hide','=',true)]</attribute>
</xpath>
</data>
</field>
</record>
</data>
</openerp>
'Hide' get's by default 'True' value because i'm just checking the functionality... But it gives me the error I mentioned.