Skip to content

Commit

Permalink
[FIX] sale_commission_agent_restrict: Lines access for agents
Browse files Browse the repository at this point in the history
  • Loading branch information
SirAionTech committed Dec 10, 2024
1 parent 6ad15f0 commit 63e882d
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions sale_commission_agent_restrict/views/sale_order_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,21 @@
<odoo>

<record model="ir.ui.view" id="view_sale_order_line_tree_mod">
<field name="name">Agent lines for user displaying only own commissions</field>
<field name="model">sale.order.line.agent</field>
<field name="priority">100</field>
<field
name="name"
>Sale Order line for user displaying only own commissions</field>
<field name="model">sale.order.line</field>
<field name="mode">primary</field>
<field name="inherit_id" ref="sale_commission.view_sale_order_line_tree" />
<field name="inherit_id" ref="commission.view_commission_mixin_agent_only" />
<field name="arch" type="xml">
<tree position="replace">
<tree create="false" edit="false" delete="false" editable="bottom">
<field name="agent_ids" position="inside">
<tree
no_open="True"
create="false"
edit="false"
delete="false"
editable="bottom"
>
<field
name="agent_id"
context="{'default_agent': True, 'default_customer': False, 'default_supplier': True}"
Expand All @@ -22,7 +29,7 @@
<field name="commission_id" readonly="1" />
<field name="amount" readonly="1" />
</tree>
</tree>
</field>
</field>
</record>

Expand Down

0 comments on commit 63e882d

Please sign in to comment.