Do not enforce empty shipment cost method for draft sale

As draft sale can be created by other modules, we must put such constraint
when quoting the sale.

Closes #11900
This commit is contained in:
Cédric Krier committed 2023-01-03 11:23:03 +01:00
1 parent f832c45b51
commit 3e4311eb5e
1 file changed
+1 -1
+1 -1
View File
@@ -98,7 +98,7 @@ class Sale(metaclass=PoolMeta):
('shipment', "On Shipment"),
], "Shipment Cost Method",
domain=[
If(~Eval('carrier'),
If(~Eval('carrier') & (Eval('state') != 'draft'),
('shipment_cost_method', '=', None),
()),
],