Skip to content

Commit

Permalink
[15.0][FIX]product_contract There was no label for the is_contract fi…
Browse files Browse the repository at this point in the history
…eld in the sales order line form view.
  • Loading branch information
Adasat committed Nov 20, 2023
1 parent 0946d60 commit 2019937
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion product_contract/models/contract_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class ContractLine(models.Model):
)

def _prepare_invoice_line(self, move_form):
res = super(ContractLine, self)._prepare_invoice_line(move_form)
res = super()._prepare_invoice_line(move_form)
if self.sale_order_line_id and res:
res["sale_line_ids"] = [(6, 0, [self.sale_order_line_id.id])]
return res
Expand Down
2 changes: 1 addition & 1 deletion product_contract/models/sale_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def action_create_contract(self):
raise ValidationError(
_(
"You must specify a contract "
"template for '{}' product in '{}' company."
"template for '{0}' product in '{1}' company."
).format(order_line.product_id.name, rec.company_id.name)
)
contract_templates |= contract_template
Expand Down
9 changes: 7 additions & 2 deletions product_contract/views/sale_order.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@
</button>
</xpath>
<xpath expr="//field[@name='order_line']" position="before">
<field name="is_contract" attrs="{'invisible': []}" />

<field name="is_contract" invisible="1" />


</xpath>
<xpath
expr="//field[@name='order_line']/form//field[@name='product_id']"
Expand Down Expand Up @@ -59,7 +62,9 @@
expr="//field[@name='order_line']/form//field[@name='tax_id']/parent::group"
position="after"
>
<field name="is_contract" attrs="{'invisible': []}" />
<group>
<field name="is_contract" />
</group>
<separator
colspan="4"
string="Recurrence Invoicing"
Expand Down

0 comments on commit 2019937

Please sign in to comment.