If the OCA module product_net_weight from
https://github.com/OCA/product-attribute is installed, use the field
net_weight added by this module instead of the native weight field
Add a third step "confirmed" between "draft" and "done". It is necessary
to have error messages of XML file generation that refer to declaration
lines.
Add line_number on declaration line, to be used in error message when
generating XML file.
note field moved from fields.Text to fields.Html
Improve display_name of intrastat.product.declaration
Add store=True on 3 computed fields (reporting_level on
declaration, src_dest_country_code and product_origin_country_code on
computation lines). It fixes a bug on src_dest_country_code and
product_origin_country_code on computation lines, when you could not set
manually a country code while leaving the m2o field empty.
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
Add support for post-Brexit VAT numbers with latest python-stdnum version
Remove use of country_id.intrastat
Add 'vat' field on computation and declaration lines with a simple validity check
Add 'partner_id' field on computation lines
Prevent back to draft when an XML export is present
Remove the universal constaint applied to the hs_codes for countries in the "Europe" list, as discussed in https://github.com/OCA/intrastat-extrastat/pull/116#discussion_r569735555
Co-authored-by: Alexis de Lattre <alexis.delattre@akretion.com>
Rename field type to declaration_type
Use the new intrastat boolean of fiscal position, following issue #110
Co-authored-by: Alexis de Lattre <alexis.delattre@akretion.com>
intrastat_product: add mail.activity.mixin and widget in form view
product_harmonized_system: remove archive button (use Action menu)
All modules:
- use super() instead of super(class, self)
- Update domain_force in multi-company ir.rule to v13 standard