[FIX] Invoice cost center readonly if not draft

This commit is contained in:
Andrea
2019-05-22 12:24:54 +02:00
parent f8d353fa49
commit 78e353ea94

View File

@@ -10,7 +10,9 @@ class AccountInvoice(models.Model):
cost_center_id = fields.Many2one(
'account.cost.center',
string='Cost Center',
help='Default Cost Center'
readonly=True,
states={'draft': [('readonly', False)]},
help='Default Cost Center',
)
@api.model