mirror of
https://github.com/OCA/account-financial-tools.git
synced 2025-02-02 12:47:26 +02:00
[FIX] Invoice cost center readonly if not draft
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2015-2018 Onestein (<http://www.onestein.eu>)
|
||||
# Copyright 2015-2019 Onestein (<http://www.onestein.eu>)
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import api, fields, models
|
||||
@@ -11,7 +11,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
|
||||
|
||||
Reference in New Issue
Block a user