Code review comment for lp://staging/~therp-nl/new-report-intrastat/8.0-update-l10n_nl_intrastat

Revision history for this message
Alexis de Lattre (alexis-via) wrote :

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