[IMP] account_invoice_constraint_chronology: black, isort, prettier

This commit is contained in:
Alexey Pelykh
2021-04-05 16:26:59 +02:00
parent 7c09b6304a
commit 585318bc94
5 changed files with 132 additions and 102 deletions

View File

@@ -1,18 +1,16 @@
# 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
from odoo import api, fields, models
class AccountJournal(models.Model):
_inherit = ['account.journal']
_inherit = ["account.journal"]
check_chronology = fields.Boolean(
default=False,
)
check_chronology = fields.Boolean(default=False,)
@api.onchange('type')
@api.onchange("type")
def _onchange_type(self):
self.ensure_one()
if self.type not in ['sale', 'purchase']:
if self.type not in ["sale", "purchase"]:
self.check_chronology = False