2
0

[IMP] Use new API on account_invoice_constraint_chronology for account.py

This commit is contained in:
Adrien Peiffer 2014-08-14 09:52:19 +02:00 committed by Zina Rasoamanana
parent c52963bf27
commit 2ceb475c80

View File

@ -27,19 +27,16 @@
#
#
from openerp.osv import orm, fields
from openerp import models, fields, api
class account_jounrnal(orm.Model):
_inherit = "account.journal"
_columns = {
'check_chronology': fields.boolean('Check Chronology'),
}
_defaults = {
'check_chronology': False,
}
class account_jounrnal(models.Model):
_inherit = ['account.journal']
def on_change_type(self, cr, uid, ids, type_journal, context=None):
check_chronology = fields.Boolean(string='Check Chronology', default=False)
@api.multi
def on_change_type(self, type_journal, context=None):
value = {}
if type_journal not in ['sale', 'purchase', 'sale_refund',
'purchase_refund']: