[FIX] purchase_analytic_plans: apply purchase analytic group on analytic account.
When the Purchase analytic plans module is not installed, the analytic account field in the lines of the purchase order is available only for the group `Analytic Accounting for Purchases` It should be the same for the field of the analytic distribution plan. Otherwise, it will lead to an access error if you don't, as you do not have access to the required model. opw-647606
This commit is contained in:
parent
cadbf1526b
commit
edd0141ca4
|
@ -8,7 +8,7 @@
|
|||
<field name="inherit_id" ref="purchase.purchase_order_line_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="account_analytic_id" position="replace">
|
||||
<field name="analytics_id" context="{'journal_id':parent.journal_id, 'model': 'purchase_order'}" domain="[('plan_id','<>',False)]"/>
|
||||
<field name="analytics_id" groups="purchase.group_analytic_accounting" context="{'journal_id':parent.journal_id, 'model': 'purchase_order'}" domain="[('plan_id','<>',False)]"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -19,7 +19,7 @@
|
|||
<field name="inherit_id" ref="purchase.purchase_order_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="account_analytic_id" position="replace">
|
||||
<field name="analytics_id" context="{'journal_id':parent.journal_id}" domain="[('plan_id','<>',False)]"/>
|
||||
<field name="analytics_id" groups="purchase.group_analytic_accounting" context="{'journal_id':parent.journal_id}" domain="[('plan_id','<>',False)]"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
|
Loading…
Reference in New Issue