[FIX] sale_project: edit SOL in subtasks subtree if user is salesman

Before this commit, when the user set a subtask and wants to directly
set the SOL of that subtask in the subtree view of a task form view. He
cannot because the field is in readonly.

This commit makes the field editable if the user has access to Sales app
as it is the case for the SOL field in the form view of task.

task-3336215

closes odoo/odoo#124563

X-original-commit: 0373abdf24e1139706e6d7610873cc89ada60e74
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
This commit is contained in:
Xavier Bol (xbo)
2023-06-10 12:18:56 +02:00
parent 6b3c5370a8
commit c23e10654c
@@ -95,7 +95,14 @@
<field name="allow_billable" invisible="1"/>
</xpath>
<xpath expr="//field[@name='child_ids']/tree/field[@name='partner_id']" position="after">
<field name="sale_line_id" optional="hide" readonly="1" groups="sales_team.group_sale_salesman"/>
<field name="sale_line_id"
optional="hide"
options='{"no_create": True}'
context="{'create': False, 'edit': False, 'delete': False, 'with_price_unit': True}"
placeholder="Non-billable"
groups="sales_team.group_sale_salesman"
attrs="{'invisible': [('allow_billable', '=', False)]}"
/>
<field name="sale_line_id" optional="hide" options="{'no_open': True}" readonly="1" groups="!sales_team.group_sale_salesman"/>
<field name="allow_billable" invisible="1"/>
</xpath>