Allow to update cost also in waiting state

(transplanted from 929e81dc3752a69f0e3e0e671cf822093c84bf53)
This commit is contained in:
Cédric Krier committed 2011-12-23 17:48:10 +01:00
1 parent 9e49c6a374
commit 7b2f59b30f
1 file changed
+4 -2
+4 -2
View File
@@ -19,7 +19,8 @@ class ShipmentOut(ModelWorkflow, ModelSQL, ModelView):
'Cost Currency', states={
'invisible': ~Eval('carrier'),
'required': Bool(Eval('carrier')),
'readonly': ~Eval('state').in_(['draft', 'assigned', 'packed']),
'readonly': ~Eval('state').in_(['draft', 'waiting', 'assigned',
'packed']),
}, depends=['carrier', 'state'])
cost_currency_digits = fields.Function(fields.Integer(
'Cost Currency Digits', on_change_with=['currency']),
@@ -27,7 +28,8 @@ class ShipmentOut(ModelWorkflow, ModelSQL, ModelView):
cost = fields.Numeric('Cost',
digits=(16, Eval('cost_currency_digits', 2)), states={
'invisible': ~Eval('carrier'),
'readonly': ~Eval('state').in_(['draft', 'assigned', 'packed']),
'readonly': ~Eval('state').in_(['draft', 'waiting', 'assigned',
'packed']),
}, depends=['carrier', 'state', 'cost_currency_digits'])
cost_invoice_line = fields.Many2One('account.invoice.line',
'Cost Invoice Line', readonly=True)