Merge lp://staging/~therp-nl/new-report-intrastat/8.0-update-l10n_nl_intrastat into lp://staging/new-report-intrastat

Proposed by Ronald Portier (Therp)
Status: Merged
Merged at revision: 99
Proposed branch: lp://staging/~therp-nl/new-report-intrastat/8.0-update-l10n_nl_intrastat
Merge into: lp://staging/new-report-intrastat
Diff against target: 495 lines (+214/-181)
2 files modified
intrastat_base/intrastat_common.py (+14/-4)
l10n_nl_intrastat/model/l10n_nl_intrastat.py (+200/-177)
To merge this branch: bzr merge lp://staging/~therp-nl/new-report-intrastat/8.0-update-l10n_nl_intrastat
Reviewer Review Type Date Requested Status
New report intrastat commiters Pending
Review via email: mp+249620@code.staging.launchpad.net

This proposal supersedes a proposal from 2015-02-13.

Description of the change

Update dutch intrastat report to 8.0

One change to base module:

- In _check_generate_lines: check currency on company object directly.

Maybe the check on currency should be replaced by an another check altoghether.
Not all EU countries use the Euro as currency. For instance: UK.

Of course, for the moment we only have modules for France and the Netherlands, that do use the Euro.
But this might change.

To post a comment you must log in.
Revision history for this message
Alexis de Lattre (alexis-via) wrote : Posted in a previous version of this 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
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_*

Revision history for this message
Ronald Portier (Therp) (rportier1962) wrote : Posted in a previous version of this proposal

@Alexis I made a refreshed proposal taking most of your remarks into account.

The default supplying methods indeed work withouth @api.model decorator. This decorator is also not in the example for a default method on the new api documentation.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches