Manage readonly state on margin fields
Related to: https://bugs.tryton.org/issue5628 Now it's allowed to change the cost_price (so the margins are updated) on the quotation state also.
This commit is contained in:
parent
c292117516
commit
d5614f167f
1
sale.py
1
sale.py
|
@ -71,6 +71,7 @@ class SaleLine:
|
|||
cost_price = fields.Numeric('Cost Price', digits=price_digits,
|
||||
states={
|
||||
'invisible': Eval('type') != 'line',
|
||||
'readonly': ~Eval('sale_state').in_(['draft', 'quotation']),
|
||||
}, depends=['type'])
|
||||
margin = fields.Function(fields.Numeric('Margin',
|
||||
digits=(16, Eval('_parent_sale', {}).get('currency_digits', 2)),
|
||||
|
|
Loading…
Reference in New Issue