Skip to content
Snippets Groups Projects
Commit edd0141c authored by Denis Ledoux's avatar Denis Ledoux
Browse files

[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
parent cadbf152
No related branches found
No related tags found
No related merge requests found
......@@ -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','&lt;&gt;',False)]"/>
<field name="analytics_id" groups="purchase.group_analytic_accounting" context="{'journal_id':parent.journal_id, 'model': 'purchase_order'}" domain="[('plan_id','&lt;&gt;',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','&lt;&gt;',False)]"/>
<field name="analytics_id" groups="purchase.group_analytic_accounting" context="{'journal_id':parent.journal_id}" domain="[('plan_id','&lt;&gt;',False)]"/>
</field>
</field>
</record>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment