Thanks for this great work ! It's one step towards the transition to github/OCA
I think that, with the new API, you are not supposed to use digits_compute=dp.get_precision('Account')
It should be : digits=dp.get_precision('Account')
By the way, why not use
from openerp.exceptions import Warning
and then: raise Warning( _('Cannot generate reports lines in a non-draft state'))
I would also remove from openerp.tools.translate import _
and update the line: from openerp import api, models, fields, _
I would also expect @api.model decorators on the methods that set default values... but maybe it works without it ! :)
I'll merge this MP in the main branch and then I'll adapt my MP with the new API for intrastat_base + l10n_fr_*
« Back to merge proposal
Thanks for this great work ! It's one step towards the transition to github/OCA
I think that, with the new API, you are not supposed to use compute= dp.get_ precision( 'Account' )
digits_
It should be : dp.get_ precision( 'Account' )
digits=
By the way, why not use
from openerp.exceptions import Warning
and then:
raise Warning(
_('Cannot generate reports lines in a non-draft state'))
I would also remove tools.translate import _
from openerp.
and update the line:
from openerp import api, models, fields, _
I would also expect @api.model decorators on the methods that set default values... but maybe it works without it ! :)
I'll merge this MP in the main branch and then I'll adapt my MP with the new API for intrastat_base + l10n_fr_*