从视图中删除 groups_id
remove groups_id from view
这是原图,有group_id添加<field name="groups_id" eval="[(4, ref('account.group_account_invoice'))]"/>
因此只有具有会计访问权限的用户才能看到此选项卡,但如何才能让所有用户都看到此选项卡?
<record id="view_partner_property_form" model="ir.ui.view">
<field name="name">res.partner.property.form.inherit</field>
<field name="model">res.partner</field>
<field name="priority">2</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="groups_id" eval="[(4, ref('account.group_account_invoice'))]"/>
<field name="arch" type="xml">
<page name="sales_purchases" position="after">
<page string="Accounting" name="accounting" attrs="{'invisible': [('is_company','=',False),('parent_id','!=',False)]}">
解决方法是
<record id="account.view_partner_property_form" model="ir.ui.view">
<field name="groups_id" eval="[(6, 0, [])]"/>
</record>
这是原图,有group_id添加<field name="groups_id" eval="[(4, ref('account.group_account_invoice'))]"/>
因此只有具有会计访问权限的用户才能看到此选项卡,但如何才能让所有用户都看到此选项卡?
<record id="view_partner_property_form" model="ir.ui.view">
<field name="name">res.partner.property.form.inherit</field>
<field name="model">res.partner</field>
<field name="priority">2</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="groups_id" eval="[(4, ref('account.group_account_invoice'))]"/>
<field name="arch" type="xml">
<page name="sales_purchases" position="after">
<page string="Accounting" name="accounting" attrs="{'invisible': [('is_company','=',False),('parent_id','!=',False)]}">
解决方法是
<record id="account.view_partner_property_form" model="ir.ui.view">
<field name="groups_id" eval="[(6, 0, [])]"/>
</record>