Skip to content

Commit

Permalink
[FIX] contract: product is also required in contract line tree view
Browse files Browse the repository at this point in the history
The Product is a mandatory field in the contract line form view

https://github.com/OCA/contract/blob/14.0/contract/views/abstract_contract_line.xml#L23

but it's not set as mandatory in the embedded tree view of the
contract line. This commit fixes this inconsistency.

This causes problems in particular with module contract_sale_generation,
since, unlike invoices, it's mandatory
to have a product on a Sales Order line.
  • Loading branch information
aleuffre committed Jul 11, 2024
1 parent 1b67695 commit 2568648
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion contract/views/contract_line.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,11 @@
decoration-info="create_invoice_visibility and not is_canceled"
>
<field name="sequence" widget="handle" />
<field name="product_id" />
<field name="display_type" invisible="1" />
<field
name="product_id"
attrs="{'required': [('display_type', '=', False)]}"
/>
<field name="name" />
<field
name="analytic_account_id"
Expand Down

0 comments on commit 2568648

Please sign in to comment.