From cdfbc6bfc71da9b98eac76b59a9df8770f7cc6c0 Mon Sep 17 00:00:00 2001 From: Benjamin Henquet Date: Wed, 11 Mar 2020 17:25:52 +0100 Subject: [PATCH] [13.0][FIX] 'number' for invoice does not exist anymore the account.move has attribute 'name' --- intrastat_product/__manifest__.py | 2 +- .../data/intrastat_transport_mode.xml | 63 +- intrastat_product/data/intrastat_unit.xml | 127 ++-- intrastat_product/demo/intrastat_demo.xml | 31 +- .../models/intrastat_product_declaration.py | 10 +- .../security/intrastat_security.xml | 30 +- intrastat_product/views/account_move.xml | 34 +- intrastat_product/views/hs_code.xml | 41 +- .../views/intrastat_product_declaration.xml | 591 ++++++++++-------- intrastat_product/views/intrastat_region.xml | 67 +- .../views/intrastat_transaction.xml | 91 +-- .../views/intrastat_transport_mode.xml | 80 ++- intrastat_product/views/intrastat_unit.xml | 58 +- .../views/res_config_settings.xml | 176 +++--- intrastat_product/views/sale_order.xml | 32 +- intrastat_product/views/stock_warehouse.xml | 18 +- 16 files changed, 787 insertions(+), 664 deletions(-) diff --git a/intrastat_product/__manifest__.py b/intrastat_product/__manifest__.py index 8b79805..641b8eb 100644 --- a/intrastat_product/__manifest__.py +++ b/intrastat_product/__manifest__.py @@ -7,7 +7,7 @@ { "name": "Intrastat Product", - "version": "13.0.1.0.0", + "version": "13.0.1.0.1", "category": "Intrastat", "license": "AGPL-3", "summary": "Base module for Intrastat Product", diff --git a/intrastat_product/data/intrastat_transport_mode.xml b/intrastat_product/data/intrastat_transport_mode.xml index bfab36e..002a1f1 100644 --- a/intrastat_product/data/intrastat_transport_mode.xml +++ b/intrastat_product/data/intrastat_transport_mode.xml @@ -1,50 +1,55 @@ - + - - 1 - Sea - Sea Transport (including wagons, motor vehicles, trailers, semi-trailers and lighters on board of a ship) + 1 + Sea + Sea Transport (including wagons, motor vehicles, trailers, semi-trailers and lighters on board of a ship) - 2 - Rail - Railway transport (including lorries on railway wagons) + 2 + Rail + Railway transport (including lorries on railway wagons) - 3 - Road - Road Transport + 3 + Road + Road Transport - 4 - Air - Air Transport + 4 + Air + Air Transport - 5 - Post - Postal consignments + 5 + Post + Postal consignments - 7 - Fixed installations - Fixed transport installations (e.g. pipelines, high-tension cables) + 7 + Fixed installations + Fixed transport installations (e.g. pipelines, high-tension cables) - 8 - Inland waterway - Inland waterway transport + 8 + Inland waterway + Inland waterway transport - 9 - Own propulsion - Own propulsion (imported or exported means of transport crossing the border under their own power, e.g. aircraft, lorries, boats, etc.) + 9 + Own propulsion + Own propulsion (imported or exported means of transport crossing the border under their own power, e.g. aircraft, lorries, boats, etc.) - - + - diff --git a/intrastat_product/data/intrastat_unit.xml b/intrastat_product/data/intrastat_unit.xml index 6d54164..bf67d39 100644 --- a/intrastat_product/data/intrastat_unit.xml +++ b/intrastat_product/data/intrastat_unit.xml @@ -1,123 +1,122 @@ - + - - - c/k - Carats - 1 metric carat = 2 × 10exp(–4) kg + c/k + Carats - 1 metric carat = 2 × 10exp(–4) kg - ce/el - Number of cells + ce/el + Number of cells - ct/l - Carrying capacity in tonnes + ct/l + Carrying capacity in tonnes - g - Gram - + g + Gram + - gi F/S - Gram of fissile isotopes + gi F/S + Gram of fissile isotopes - kg H2O2 - Kilogram of hydrogen peroxide + kg H2O2 + Kilogram of hydrogen peroxide - kg K2O - Kilogram of potassium oxide + kg K2O + Kilogram of potassium oxide - kg KOH - Kilogram of potassium hydroxide (caustic potash) + kg KOH + Kilogram of potassium hydroxide (caustic potash) - kg met.am. - Kilogram of methylamines + kg met.am. + Kilogram of methylamines - kg N - Kilogram of nitrogen + kg N + Kilogram of nitrogen - kg NaOH - Kilogram of sodium hydroxide (caustic soda) + kg NaOH + Kilogram of sodium hydroxide (caustic soda) - kg/net eda - Kilogram drained net weight + kg/net eda + Kilogram drained net weight - kg P2O5 - Kilogram of diphosphorus pentaoxide + kg P2O5 + Kilogram of diphosphorus pentaoxide - kg 90 pct sdt - Kilogram of substance 90 % dry + kg 90 pct sdt + Kilogram of substance 90 % dry - kg U - Kilogram of uranium + kg U + Kilogram of uranium - 1000 kWh - Thousand kilowatt hours + 1000 kWh + Thousand kilowatt hours - l - Litre - + l + Litre + - 1000 l - Thousand litres + 1000 l + Thousand litres - l alc. 100 pct - Litre pure (100 %) alcohol + l alc. 100 pct + Litre pure (100 %) alcohol - m - Metre - + m + Metre + - m2 - Square metre + m2 + Square metre - m3 - Cubic metre + m3 + Cubic metre - 1000 m3 - Thousand cubic metres + 1000 m3 + Thousand cubic metres - pa - Number of pairs + pa + Number of pairs - items - Number of items - + items + Number of items + - 100 items - Hundred items + 100 items + Hundred items - 1000 items - Thousand items + 1000 items + Thousand items - TJ - Terajoule (gross calorific value) + TJ + Terajoule (gross calorific value) - diff --git a/intrastat_product/demo/intrastat_demo.xml b/intrastat_product/demo/intrastat_demo.xml index dd85dae..7d51ef5 100644 --- a/intrastat_product/demo/intrastat_demo.xml +++ b/intrastat_product/demo/intrastat_demo.xml @@ -1,25 +1,20 @@ - + - - - - - - - - - - - - extended - extended - - - - + + + + + + + + extended + extended + + + diff --git a/intrastat_product/models/intrastat_product_declaration.py b/intrastat_product/models/intrastat_product_declaration.py index 7661389..3423077 100644 --- a/intrastat_product/models/intrastat_product_declaration.py +++ b/intrastat_product/models/intrastat_product_declaration.py @@ -275,7 +275,7 @@ class IntrastatProductDeclaration(models.Model): note = "\n" + _( "Missing unit of measure on the line with %d " "product(s) '%s' on invoice '%s'." - ) % (line_qty, product.name_get()[0][1], invoice.number) + ) % (line_qty, product.name_get()[0][1], invoice.name) note += "\n" + _("Please adjust this line manually.") self._note += note return weight, suppl_unit_qty @@ -546,7 +546,7 @@ class IntrastatProductDeclaration(models.Model): _logger.info( "Skipping invoice line %s qty %s " "of invoice %s. Reason: qty = 0" - % (inv_line.name, inv_line.quantity, invoice.number) + % (inv_line.name, inv_line.quantity, invoice.name) ) continue @@ -555,7 +555,7 @@ class IntrastatProductDeclaration(models.Model): _logger.info( "Skipping invoice line %s qty %s " "of invoice %s. Reason: no partner_country" - % (inv_line.name, inv_line.quantity, invoice.number) + % (inv_line.name, inv_line.quantity, invoice.name) ) continue @@ -566,7 +566,7 @@ class IntrastatProductDeclaration(models.Model): "Skipping invoice line %s " "qty %s of invoice %s. Reason: " "tax.exclude_from_intrastat_if_present" - % (inv_line.name, inv_line.quantity, invoice.number) + % (inv_line.name, inv_line.quantity, invoice.name) ) continue @@ -588,7 +588,7 @@ class IntrastatProductDeclaration(models.Model): _logger.info( "Skipping invoice line %s qty %s " "of invoice %s. Reason: no product nor hs_code" - % (inv_line.name, inv_line.quantity, invoice.number) + % (inv_line.name, inv_line.quantity, invoice.name) ) continue diff --git a/intrastat_product/security/intrastat_security.xml b/intrastat_product/security/intrastat_security.xml index edae4dd..f4c714a 100644 --- a/intrastat_product/security/intrastat_security.xml +++ b/intrastat_product/security/intrastat_security.xml @@ -1,22 +1,24 @@ - + - - Intrastat Transaction Company rule - - ['|', ('company_id', '=', False), ('company_id', 'child_of', [user.company_id.id])] + Intrastat Transaction Company rule + + ['|', ('company_id', '=', False), ('company_id', 'child_of', [user.company_id.id])] - - Intrastat Region Company rule - - ['|', ('company_id', '=', False), ('company_id', 'child_of', [user.company_id.id])] + Intrastat Region Company rule + + ['|', ('company_id', '=', False), ('company_id', 'child_of', [user.company_id.id])] - - Intrastat Product Declaration Company rule - - ['|', ('company_id', '=', False), ('company_id', 'child_of', [user.company_id.id])] + Intrastat Product Declaration Company rule + + ['|', ('company_id', '=', False), ('company_id', 'child_of', [user.company_id.id])] - diff --git a/intrastat_product/views/account_move.xml b/intrastat_product/views/account_move.xml index 9f28158..3d2bd59 100644 --- a/intrastat_product/views/account_move.xml +++ b/intrastat_product/views/account_move.xml @@ -1,24 +1,30 @@ - + - intrastat.invoice.form account.move - + - - - - - - + + + + + + - - + + - diff --git a/intrastat_product/views/hs_code.xml b/intrastat_product/views/hs_code.xml index a48d6c1..59d3165 100644 --- a/intrastat_product/views/hs_code.xml +++ b/intrastat_product/views/hs_code.xml @@ -1,4 +1,4 @@ - + - - - - + sequence="10" + /> - intrastat.hs.code.tree - hs.code - - - - + intrastat.hs.code.tree + hs.code + + + + + - - - intrastat.hs.code.form - hs.code - - - - + intrastat.hs.code.form + hs.code + + + + + - - diff --git a/intrastat_product/views/intrastat_product_declaration.xml b/intrastat_product/views/intrastat_product_declaration.xml index 095f14d..0a75377 100644 --- a/intrastat_product/views/intrastat_product_declaration.xml +++ b/intrastat_product/views/intrastat_product_declaration.xml @@ -1,277 +1,364 @@ - + - - intrastat.product.declaration.form - intrastat.product.declaration - -
-
-
- -
-

- Intrastat Product Declaration - -

-
- - - - - - - - - - - - - - - - - - - + intrastat.product.declaration.form + intrastat.product.declaration + +
-
- - - -
- -
-
- - - -
- - - -
-
-
- - -
-
-
+ +
+

+ Intrastat Product Declaration + +

+
+ + + + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+
+ + + +
+ + + +
+
+
+ + +
+ +
- - intrastat.product.declaration.tree - intrastat.product.declaration - - - - - - - - - - - + intrastat.product.declaration.tree + intrastat.product.declaration + + + + + + + + + + + - - intrastat.product.declaration.search - intrastat.product.declaration - - - - - - - - - - - - + intrastat.product.declaration.search + intrastat.product.declaration + + + + + + + + + + + + - - intrastat.product.declaration.graph - intrastat.product.declaration - - - - - - - + intrastat.product.declaration.graph + intrastat.product.declaration + + + + + + + - - intrastat.product.declaration.pivot - intrastat.product.declaration - - - - - - - + intrastat.product.declaration.pivot + intrastat.product.declaration + + + + + + + - - - - intrastat.product.computation.line.form - intrastat.product.computation.line - -
- - - - - - - - - -