trytond-patches/issue5881002_1.diff

24 lines
779 B
Diff

# HG changeset patch
# User Guillem Barba <guillembarba@gmail.com>
Allow to change the carrier until the shipment is done
issue4413
review5881002
Index: modules/sale_shipment_cost/stock.py
===================================================================
--- .a/trytond/trytond/modules/sale_shipment_cost/stock.py
+++ .b/trytond/trytond/modules/sale_shipment_cost/stock.py
@@ -12,7 +12,8 @@
class ShipmentOut:
__name__ = 'stock.shipment.out'
carrier = fields.Many2One('carrier', 'Carrier', states={
- 'readonly': Eval('state') != 'draft',
+ 'readonly': ~Eval('state').in_(['draft', 'waiting', 'assigned',
+ 'packed']),
},
depends=['state'])
cost_currency = fields.Many2One('currency.currency',