[MIG] Account Invoice Constraint Chronology to 12.0

This commit is contained in:
Thomas Binsfeld
2019-01-30 14:27:00 +01:00
parent 454cfe7393
commit c51b8c0a71
63 changed files with 947 additions and 416 deletions

View File

@@ -0,0 +1,18 @@
# Copyright 2015-2019 ACSONE SA/NV (<http://acsone.eu>)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import models, fields, api
class AccountJournal(models.Model):
_inherit = ['account.journal']
check_chronology = fields.Boolean(
default=False,
)
@api.onchange('type')
def _onchange_type(self):
self.ensure_one()
if self.type not in ['sale', 'purchase']:
self.check_chronology = False