mirror of
https://github.com/OCA/account-financial-tools.git
synced 2025-02-02 12:47:26 +02:00
[IMP] Use new API on account_invoice_constraint_chronology for account.py
This commit is contained in:
committed by
Zina Rasoamanana
parent
c52963bf27
commit
2ceb475c80
@@ -27,19 +27,16 @@
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
from openerp.osv import orm, fields
|
from openerp import models, fields, api
|
||||||
|
|
||||||
|
|
||||||
class account_jounrnal(orm.Model):
|
class account_jounrnal(models.Model):
|
||||||
_inherit = "account.journal"
|
_inherit = ['account.journal']
|
||||||
_columns = {
|
|
||||||
'check_chronology': fields.boolean('Check Chronology'),
|
|
||||||
}
|
|
||||||
_defaults = {
|
|
||||||
'check_chronology': False,
|
|
||||||
}
|
|
||||||
|
|
||||||
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 = {}
|
value = {}
|
||||||
if type_journal not in ['sale', 'purchase', 'sale_refund',
|
if type_journal not in ['sale', 'purchase', 'sale_refund',
|
||||||
'purchase_refund']:
|
'purchase_refund']:
|
||||||
|
|||||||
Reference in New Issue
Block a user