There is now a single XLSX export that has 2 tabs:
1) computation lines
2) declaration lines
The declaration type is now mentionned in the XLSX export.
Ability to export several declarations in 1 XLSX file.
This migration has been made from the v14 branch akretion/14-brexit-simplification-and-type-on-fp and the changes of v15 has been re-integrated.
As discussed on https://github.com/OCA/intrastat-extrastat/issues/194
the intrastat transaction codes are now integrated in the module intrastat_product
The default value for transaction_id depending on the move_type of the
invoice have been dropped on fiscal position and company: Odoo sets 11
when fiscal position is B2B and 12 when fiscal position is B2C.
As a consequence: intrastat.transaction: company_id = False by default
Use textwrap for name_get() of intrastat.transaction
partner_id on computation line is not a related field any more: it allows
to auto-fill VAT from partner_id when creating a line manually.
computation and declaration line tree view: display transaction code
instead of transaction_id to save space
This is completely new implementation of the messages that are displayed
in the warning pop-up:
- no double messages
- messages are grouped by section and record
- nice HTML display insead of raw text
Odoo uses, by order of priority:
1) intrastat transaction of the invoice
2) default intrastat transaction of the fiscal position of the invoice
3) default intrastat transaction of the company
This commit aims at removing the over-complexity of intrastat modules
while increasing simplicity/usability for users.
- Move default intrastat transaction from res.company to account.fiscal.position to add su
pport for B2C (and not just B2B)
- improve usability: auto-generate declaration lines and XML export when
going from draft to done. Auto-delete declaration lines and XML export
when going from done to draft (and add confirmation pop-up).
- declaration lines are now readonly. Only computation lines can be created/edited manuall
y
- add field region_code on computation lines and declaration lines.
Remove region_id on declaration lines. This change allows big
simplification in some localization modules such as
l10n_fr_intrastat_product.
- simplify Brexit implementation. Northern Ireland is important, but we
can't afford to have so many lines of code and add a field on
product.template (origin_state_id) for a territory of 1.9 million
inhabitants! This is too costly to maintain and too complex for users.
- improve default visibility of fields when reporting_level = 'standard'
- add support for weight calculation from uom categories other than
units and weight, supposing that the 'weight' field on product.template
is the weight per uom of the product
- add EU companies from several different countries in demo data with valid VAT numbers