details: https://code.tryton.org/tryton/commit/e83d269d3f80
branch: default
user: Cédric Krier <[email protected]>
date: Thu Oct 30 00:59:07 2025 +0100
description:
Use line's movable property to require incoterm
Closes #14332
diffstat:
modules/incoterm/purchase.py | 2 +-
modules/incoterm/sale.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diffs (24 lines):
diff -r a157b66bb2d4 -r e83d269d3f80 modules/incoterm/purchase.py
--- a/modules/incoterm/purchase.py Tue Oct 28 17:19:38 2025 +0100
+++ b/modules/incoterm/purchase.py Thu Oct 30 00:59:07 2025 +0100
@@ -32,7 +32,7 @@
super().check_for_quotation()
if not self.incoterm and self._incoterm_required:
for line in self.lines:
- if line.product and line.product.type in {'goods', 'assets'}:
+ if line.movable:
raise PurchaseQuotationError(
gettext('incoterm'
'.msg_purchase_incoterm_required_for_quotation',
diff -r a157b66bb2d4 -r e83d269d3f80 modules/incoterm/sale.py
--- a/modules/incoterm/sale.py Tue Oct 28 17:19:38 2025 +0100
+++ b/modules/incoterm/sale.py Thu Oct 30 00:59:07 2025 +0100
@@ -65,7 +65,7 @@
super().check_for_quotation()
if not self.incoterm and self._incoterm_required:
for line in self.lines:
- if line.product and line.product.type in {'goods', 'assets'}:
+ if line.movable:
raise SaleQuotationError(
gettext('incoterm'
'.msg_sale_incoterm_required_for_quotation',