2017-03-13 14:18:36 +01:00
|
|
|
# Copyright 2015-2017 ACSONE SA/NV (<http://acsone.eu>)
|
2017-12-19 17:28:44 +01:00
|
|
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
2014-08-07 12:58:07 +02:00
|
|
|
|
2017-03-13 14:18:36 +01:00
|
|
|
from odoo import models, fields, api
|
2014-08-07 12:58:07 +02:00
|
|
|
|
|
|
|
|
2017-03-14 19:09:03 +01:00
|
|
|
class AccountJournal(models.Model):
|
2014-08-14 09:52:19 +02:00
|
|
|
_inherit = ['account.journal']
|
2014-08-07 12:58:07 +02:00
|
|
|
|
2017-05-29 16:25:41 +02:00
|
|
|
check_chronology = fields.Boolean(default=False)
|
2014-08-14 09:52:19 +02:00
|
|
|
|
2014-08-18 11:06:23 +02:00
|
|
|
@api.onchange('type')
|
2017-05-29 13:21:20 +02:00
|
|
|
def _onchange_type(self):
|
|
|
|
if self.type not in ['sale', 'purchase']:
|
|
|
|
self.check_chronology = False
|