diff --git a/l10n_fr_intrastat_product/__manifest__.py b/l10n_fr_intrastat_product/__manifest__.py index 9b3b65138..dd5bf0acc 100644 --- a/l10n_fr_intrastat_product/__manifest__.py +++ b/l10n_fr_intrastat_product/__manifest__.py @@ -4,7 +4,7 @@ { "name": "EMEBI", - "version": "16.0.1.3.0", + "version": "17.0.1.0.0", "category": "Localisation/Report Intrastat", "license": "AGPL-3", "summary": "EMEBI (ex-DEB) for France", @@ -18,7 +18,6 @@ ], "data": [ "security/ir.model.access.csv", - "data/account_fiscal_position_template.xml", "data/intrastat_fr_regime.xml", "views/intrastat_product_declaration.xml", "views/intrastat_fr_regime.xml", diff --git a/l10n_fr_intrastat_product/data/account_fiscal_position_template.xml b/l10n_fr_intrastat_product/data/account_fiscal_position_template.xml deleted file mode 100644 index 2f31e0896..000000000 --- a/l10n_fr_intrastat_product/data/account_fiscal_position_template.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - b2b - - - b2c - - diff --git a/l10n_fr_intrastat_product/migrations/14.0.1.0.0/pre-migration.py b/l10n_fr_intrastat_product/migrations/14.0.1.0.0/pre-migration.py deleted file mode 100644 index cc47d4ffe..000000000 --- a/l10n_fr_intrastat_product/migrations/14.0.1.0.0/pre-migration.py +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright 2022 Akretion France (http://www.akretion.com/) -# @author: Alexis de Lattre -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). - - -def migrate(cr, version): - if not version: - return - - cr.execute( - 'ALTER TABLE "l10n_fr_intrastat_product_declaration" RENAME "type" ' - 'TO "declaration_type"' - ) diff --git a/l10n_fr_intrastat_product/models/intrastat_fr_regime.py b/l10n_fr_intrastat_product/models/intrastat_fr_regime.py index 8fca1dd76..799a5d6b7 100644 --- a/l10n_fr_intrastat_product/models/intrastat_fr_regime.py +++ b/l10n_fr_intrastat_product/models/intrastat_fr_regime.py @@ -36,9 +36,6 @@ class IntrastatFrRegime(models.Model): ] @api.depends("code", "name") - def name_get(self): - res = [] + def _compute_display_name(self): for rec in self: - name = "%s. %s" % (rec.code, rec.name) - res.append((rec.id, name)) - return res + rec.display_name = f"{rec.code}. {rec.name}" diff --git a/l10n_fr_intrastat_product/models/intrastat_product_declaration.py b/l10n_fr_intrastat_product/models/intrastat_product_declaration.py index dc06b765d..0447cba40 100644 --- a/l10n_fr_intrastat_product/models/intrastat_product_declaration.py +++ b/l10n_fr_intrastat_product/models/intrastat_product_declaration.py @@ -50,7 +50,8 @@ def _check_fr_declaration(self): ): raise ValidationError( _( - "In France, an arrival EMEBI cannot have a 'standard' reporting level." + "In France, an arrival EMEBI cannot have a 'standard' " + "reporting level." ) ) @@ -428,7 +429,8 @@ def _generate_xml_line(self, parent_node, eu_countries): if not self.src_dest_country_code: raise UserError( _( - "Missing country code of origin/destination on declaration line %d." + "Missing country code of origin/destination on " + "declaration line %d." ) % self.line_number ) diff --git a/l10n_fr_intrastat_product/post_install.py b/l10n_fr_intrastat_product/post_install.py index c71f304b9..c412ab9a7 100644 --- a/l10n_fr_intrastat_product/post_install.py +++ b/l10n_fr_intrastat_product/post_install.py @@ -4,13 +4,10 @@ import logging -from odoo import SUPERUSER_ID, api - logger = logging.getLogger(__name__) -def set_fr_company_intrastat(cr, registry): - env = api.Environment(cr, SUPERUSER_ID, {}) +def set_fr_company_intrastat(env): imdo = env["ir.model.data"] afpo = env["account.fiscal.position"] fr_id = env.ref("base.fr").id diff --git a/l10n_fr_intrastat_product/static/description/index.html b/l10n_fr_intrastat_product/static/description/index.html index 2aea01162..436a32a4d 100644 --- a/l10n_fr_intrastat_product/static/description/index.html +++ b/l10n_fr_intrastat_product/static/description/index.html @@ -1,4 +1,3 @@ - @@ -9,10 +8,11 @@ /* :Author: David Goodger (goodger@python.org) -:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $ +:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $ :Copyright: This stylesheet has been placed in the public domain. Default cascading style sheet for the HTML output of Docutils. +Despite the name, some widely supported CSS2 features are used. See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to customize this style sheet. @@ -275,7 +275,7 @@ margin-left: 2em ; margin-right: 2em } -pre.code .ln { color: grey; } /* line numbers */ +pre.code .ln { color: gray; } /* line numbers */ pre.code, code { background-color: #eeeeee } pre.code .comment, code .comment { color: #5C6576 } pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold } @@ -301,7 +301,7 @@ span.pre { white-space: pre } -span.problematic { +span.problematic, pre.problematic { color: red } span.section-subtitle { @@ -444,7 +444,9 @@

Contributors

Maintainers

This module is maintained by the OCA.

-Odoo Community Association + +Odoo Community Association +

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

diff --git a/l10n_fr_intrastat_product/views/intrastat_fr_regime.xml b/l10n_fr_intrastat_product/views/intrastat_fr_regime.xml index ebbeb526d..d11305c57 100644 --- a/l10n_fr_intrastat_product/views/intrastat_fr_regime.xml +++ b/l10n_fr_intrastat_product/views/intrastat_fr_regime.xml @@ -15,7 +15,7 @@ name="web_ribbon" title="Archived" bg_color="bg-danger" - attrs="{'invisible': [('active', '=', True)]}" + invisible="active" />