From 718aa5306f08a6c73a4932f1a641bc1b5c7c5b0a Mon Sep 17 00:00:00 2001 From: Iryna Vyshnevska Date: Tue, 19 Oct 2021 21:16:56 +0700 Subject: [PATCH 01/10] [ADD] module l10n_ch_adr_report --- l10n_ch_adr_report/README.rst | 87 ++++ l10n_ch_adr_report/__init__.py | 3 + l10n_ch_adr_report/__manifest__.py | 18 + l10n_ch_adr_report/i18n/de.po | 153 ++++++ l10n_ch_adr_report/i18n/fr.pot | 178 +++++++ .../i18n/l10n_ch_adr_report.pot | 190 ++++++++ l10n_ch_adr_report/readme/AUTHORS.rst | 1 + l10n_ch_adr_report/readme/CONTRIBUTORS.rst | 9 + l10n_ch_adr_report/readme/CREDITS.rst | 1 + l10n_ch_adr_report/readme/DESCRIPTION.rst | 2 + .../report/DG_ch_delivery_report.xml | 245 ++++++++++ l10n_ch_adr_report/report/__init__.py | 1 + .../report/dangerous_delivery_report.py | 135 ++++++ .../static/description/index.html | 445 ++++++++++++++++++ .../static/src/scss/adr_report.scss | 39 ++ l10n_ch_adr_report/views/assets.xml | 16 + 16 files changed, 1523 insertions(+) create mode 100644 l10n_ch_adr_report/README.rst create mode 100644 l10n_ch_adr_report/__init__.py create mode 100644 l10n_ch_adr_report/__manifest__.py create mode 100644 l10n_ch_adr_report/i18n/de.po create mode 100644 l10n_ch_adr_report/i18n/fr.pot create mode 100644 l10n_ch_adr_report/i18n/l10n_ch_adr_report.pot create mode 100644 l10n_ch_adr_report/readme/AUTHORS.rst create mode 100644 l10n_ch_adr_report/readme/CONTRIBUTORS.rst create mode 100644 l10n_ch_adr_report/readme/CREDITS.rst create mode 100644 l10n_ch_adr_report/readme/DESCRIPTION.rst create mode 100644 l10n_ch_adr_report/report/DG_ch_delivery_report.xml create mode 100644 l10n_ch_adr_report/report/__init__.py create mode 100644 l10n_ch_adr_report/report/dangerous_delivery_report.py create mode 100644 l10n_ch_adr_report/static/description/index.html create mode 100644 l10n_ch_adr_report/static/src/scss/adr_report.scss create mode 100644 l10n_ch_adr_report/views/assets.xml diff --git a/l10n_ch_adr_report/README.rst b/l10n_ch_adr_report/README.rst new file mode 100644 index 000000000..f44fb91d4 --- /dev/null +++ b/l10n_ch_adr_report/README.rst @@ -0,0 +1,87 @@ +========================= +ADR Products Swiss Report +========================= + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fl10n--switzerland-lightgray.png?logo=github + :target: https://github.com/OCA/l10n-switzerland/tree/14.0/l10n_ch_adr_report + :alt: OCA/l10n-switzerland +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/l10n-switzerland-14-0/l10n-switzerland-14-0-l10n_ch_adr_report + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/125/14.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + +Report for delivery of dangerous goods. We assume that product can be defined +on product and it will be the only dangerous good/(waste) on product + +**Table of contents** + +.. contents:: + :local: + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* Camptocamp + +Contributors +~~~~~~~~~~~~ + +* `Camptocamp `_: + * Iryna Vyshnevska + * Carlos Serra-Toro + * Iryna Vyshnevska + * Matthieu Méquignon + * Sébastien Alix + * Thierry Ducrest +* `Trobz `_: + * Son Ho + +Other credits +~~~~~~~~~~~~~ + +The development of this module was financially supported by Camptocamp + +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +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. + +This module is part of the `OCA/l10n-switzerland `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/l10n_ch_adr_report/__init__.py b/l10n_ch_adr_report/__init__.py new file mode 100644 index 000000000..58c42015c --- /dev/null +++ b/l10n_ch_adr_report/__init__.py @@ -0,0 +1,3 @@ +# Copyright 2021 Camptocamp SA +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl) +from . import report diff --git a/l10n_ch_adr_report/__manifest__.py b/l10n_ch_adr_report/__manifest__.py new file mode 100644 index 000000000..1109649cc --- /dev/null +++ b/l10n_ch_adr_report/__manifest__.py @@ -0,0 +1,18 @@ +# Copyright 2020 Camptocamp SA +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl) +{ + "name": "ADR Products Swiss Report", + "summary": "Print Delivery report to ADR swiss configuration", + "version": "14.0.1.0.0", + "category": "Product", + "website": "https://github.com/OCA/l10n-switzerland", + "author": "Camptocamp, Odoo Community Association (OCA)", + "license": "AGPL-3", + "application": False, + "installable": True, + "depends": ["l10n_eu_product_adr", "stock", "delivery"], + "data": [ + "report/DG_ch_delivery_report.xml", + "views/assets.xml", + ], +} diff --git a/l10n_ch_adr_report/i18n/de.po b/l10n_ch_adr_report/i18n/de.po new file mode 100644 index 000000000..0f92fff12 --- /dev/null +++ b/l10n_ch_adr_report/i18n/de.po @@ -0,0 +1,153 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * l10n_ch_adr_report +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0+e\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-08-06 10:55+0000\n" +"PO-Revision-Date: 2020-08-06 10:55+0000\n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: l10n_ch_adr_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_adr_report.report_dg_swiss_partner_block +msgid "Address" +msgstr "Adresse" + +#. module: l10n_ch_adr_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_adr_report.report_dg_swiss_product_block +msgid "Article (order according to 5.4.1.1.1 ADR)" +msgstr "Artikel (Reihenfolge gem. 5.4.1.1.1 ADR)" + +#. module: l10n_ch_adr_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_adr_report.report_dg_swiss_partner_block +msgid "Company name" +msgstr "Unternehmensname" + +#. module: l10n_ch_adr_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_adr_report.report_dg_swiss_partner_block +msgid "Contact person" +msgstr "Konatktperson" + +#. module: l10n_ch_adr_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_adr_report.report_dg_swiss_product_block +msgid "Container / packaging" +msgstr "Gebinde / Verpackung" + +#. module: l10n_ch_adr_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_adr_report.report_dg_swiss_product_block +msgid "Content / Pack." +msgstr "Inhalt Verpackung" + +#. module: l10n_ch_adr_report +#: model:ir.model,name:l10n_ch_adr_report.model_report_l10n_ch_adr_report_report_dg_l10n_ch +msgid "Dangerous Delivery Report ADR" +msgstr "" + +#. module: l10n_ch_adr_report +#: model:ir.model.fields,field_description:l10n_ch_adr_report.field_product_product__dangerous_good +#: model:ir.model.fields,field_description:l10n_ch_adr_report.field_product_template__dangerous_good +msgid "Dangerous Good" +msgstr "Gefahrgut" + +#. module: l10n_ch_adr_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_adr_report.report_dg_swiss_footer +#: model_terms:ir.ui.view,arch_db:l10n_ch_adr_report.report_dg_swiss_partner_block +msgid "Date" +msgstr "Datum" + +#. module: l10n_ch_adr_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_adr_report.report_dg_swiss_partner_block +msgid "Delivery note no." +msgstr "Lieferschein Nr." + +#. module: l10n_ch_adr_report +#: model:ir.model.fields,field_description:l10n_ch_adr_report.field_report_l10n_ch_adr_report_report_dg_l10n_ch__display_name +msgid "Display Name" +msgstr "" + +#. module: l10n_ch_adr_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_adr_report.report_dg_swiss_product_block +msgid "Factor" +msgstr "Multiplikationsfaktor " + +#. module: l10n_ch_adr_report +#: model:ir.model.fields,field_description:l10n_ch_adr_report.field_report_l10n_ch_adr_report_report_dg_l10n_ch__id +msgid "ID" +msgstr "" + +#. module: l10n_ch_adr_report +#: model:ir.model.fields,field_description:l10n_ch_adr_report.field_report_l10n_ch_adr_report_report_dg_l10n_ch____last_update +msgid "Last Modified on" +msgstr "" + +#. module: l10n_ch_adr_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_adr_report.report_dg_swiss_product_block +msgid "Number" +msgstr "Anzahl" + +#. module: l10n_ch_adr_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_adr_report.report_dg_swiss_product_block +msgid "Points per transportation category" +msgstr "Massenpunkte (MP) pro Beförderungskategorie" + +#. module: l10n_ch_adr_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_adr_report.report_dg_swiss_partner_block +msgid "Postcode / town" +msgstr "PLZ / Ort" + +#. module: l10n_ch_adr_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_adr_report.report_dg_swiss_product_block +msgid "Calculation 1000 points rule, ADR 1.1.3.6.3" +msgstr "Kalkulation 1000 Punkte Regel, ADR 1.1.3.6.3" + +#. module: l10n_ch_adr_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_adr_report.report_dg_swiss_footer +msgid "Received listed goods in good physical condition" +msgstr "Aufgelistete Güter in äusserlich einwandfreiem Zustand erhalten." + +#. module: l10n_ch_adr_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_adr_report.report_dg_swiss_partner_block +msgid "Recipient address" +msgstr "Empfangsadresse" + +#. module: l10n_ch_adr_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_adr_report.report_dg_swiss_partner_block +msgid "Sender address" +msgstr "Absederadresse" + +#. module: l10n_ch_adr_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_adr_report.report_dg_swiss_footer +msgid "Signature:" +msgstr "Unterschrift:" + +#. module: l10n_ch_adr_report +#: model:ir.actions.report,name:l10n_ch_adr_report.action_report_dg_l10n_ch +msgid "Swiss Dangerous Goods Report" +msgstr "" + +#. module: l10n_ch_adr_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_adr_report.report_dg_swiss_product_block +msgid "Total Points" +msgstr "Total Punkte:" + +#. module: l10n_ch_adr_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_adr_report.report_dg_swiss_product_block +msgid "Total of transported units" +msgstr "Summe der beförderten Mengen " + +#. module: l10n_ch_adr_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_adr_report.report_dg_swiss_product_block +msgid "Transport category (BK)" +msgstr "Beförderungskategorie (BK)" + +#. module: l10n_ch_adr_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_adr_report.report_dg_swiss_partner_block +msgid "Transportation paper" +msgstr "ADR Transportpapier" diff --git a/l10n_ch_adr_report/i18n/fr.pot b/l10n_ch_adr_report/i18n/fr.pot new file mode 100644 index 000000000..5a18f8af5 --- /dev/null +++ b/l10n_ch_adr_report/i18n/fr.pot @@ -0,0 +1,178 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * l10n_ch_adr_report +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0+e\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-03-23 11:10+0000\n" +"PO-Revision-Date: 2021-03-23 11:10+0000\n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: l10n_ch_adr_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_adr_report.report_dg_swiss_partner_block +msgid "Address" +msgstr "" + +#. module: l10n_ch_adr_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_adr_report.report_dg_swiss_product_block +msgid "Article (order according to 5.4.1.1.1 ADR)" +msgstr "" + +#. module: l10n_ch_adr_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_adr_report.report_dg_swiss_product_block +msgid "Calculation 1000 points rule, ADR 1.1.3.6.3" +msgstr "" + +#. module: l10n_ch_adr_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_adr_report.report_dg_swiss_partner_block +msgid "Company name" +msgstr "" + +#. module: l10n_ch_adr_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_adr_report.report_dg_swiss_partner_block +msgid "Contact person" +msgstr "" + +#. module: l10n_ch_adr_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_adr_report.report_dg_swiss_product_block +msgid "Container / packaging" +msgstr "" + +#. module: l10n_ch_adr_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_adr_report.report_dg_swiss_product_block +msgid "Content / Pack." +msgstr "" + +#. module: l10n_ch_adr_report +#: model:ir.model.fields.selection,name:l10n_ch_adr_report.selection__product_template__dangerous_good__dg +msgid "DG" +msgstr "" + +#. module: l10n_ch_adr_report +#: model:ir.model,name:l10n_ch_adr_report.model_report_l10n_ch_adr_report_report_dg_l10n_ch +msgid "Dangerous Delivery Report ADR" +msgstr "" + +#. module: l10n_ch_adr_report +#: model:ir.model.fields,field_description:l10n_ch_adr_report.field_product_product__dangerous_good +#: model:ir.model.fields,field_description:l10n_ch_adr_report.field_product_template__dangerous_good +msgid "Dangerous Good" +msgstr "Produit dangereux" + +#. module: l10n_ch_adr_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_adr_report.product_variant_easy_edit_view +msgid "Dangerous attributes" +msgstr "" + +#. module: l10n_ch_adr_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_adr_report.report_dg_swiss_footer +#: model_terms:ir.ui.view,arch_db:l10n_ch_adr_report.report_dg_swiss_partner_block +msgid "Date" +msgstr "" + +#. module: l10n_ch_adr_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_adr_report.report_dg_swiss_partner_block +msgid "Delivery note no." +msgstr "" + +#. module: l10n_ch_adr_report +#: model:ir.model.fields,field_description:l10n_ch_adr_report.field_report_l10n_ch_adr_report_report_dg_l10n_ch__display_name +msgid "Display Name" +msgstr "" + +#. module: l10n_ch_adr_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_adr_report.report_dg_swiss_product_block +msgid "Factor" +msgstr "" + +#. module: l10n_ch_adr_report +#: model:ir.model.fields,field_description:l10n_ch_adr_report.field_report_l10n_ch_adr_report_report_dg_l10n_ch__id +msgid "ID" +msgstr "" + +#. module: l10n_ch_adr_report +#: model:ir.model.fields.selection,name:l10n_ch_adr_report.selection__product_template__dangerous_good__lq +msgid "LQ" +msgstr "" + +#. module: l10n_ch_adr_report +#: model:ir.model.fields,field_description:l10n_ch_adr_report.field_report_l10n_ch_adr_report_report_dg_l10n_ch____last_update +msgid "Last Modified on" +msgstr "" + +#. module: l10n_ch_adr_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_adr_report.report_dg_swiss_product_block +msgid "Number" +msgstr "" + +#. module: l10n_ch_adr_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_adr_report.report_dg_swiss_product_block +msgid "Points per transportation category" +msgstr "" + +#. module: l10n_ch_adr_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_adr_report.report_dg_swiss_partner_block +msgid "Postcode / town" +msgstr "" + +#. module: l10n_ch_adr_report +#: model:ir.model,name:l10n_ch_adr_report.model_product_product +msgid "Product" +msgstr "" + +#. module: l10n_ch_adr_report +#: model:ir.model,name:l10n_ch_adr_report.model_product_template +msgid "Product Template" +msgstr "" + +#. module: l10n_ch_adr_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_adr_report.report_dg_swiss_footer +msgid "Received listed goods in good physical condition" +msgstr "" + +#. module: l10n_ch_adr_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_adr_report.report_dg_swiss_partner_block +msgid "Recipient address" +msgstr "" + +#. module: l10n_ch_adr_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_adr_report.report_dg_swiss_partner_block +msgid "Sender address" +msgstr "" + +#. module: l10n_ch_adr_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_adr_report.report_dg_swiss_footer +msgid "Signature:" +msgstr "" + +#. module: l10n_ch_adr_report +#: model:ir.actions.report,name:l10n_ch_adr_report.action_report_dg_l10n_ch +msgid "Swiss Dangerous Goods Report" +msgstr "" + +#. module: l10n_ch_adr_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_adr_report.report_dg_swiss_product_block +msgid "Total Points" +msgstr "" + +#. module: l10n_ch_adr_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_adr_report.report_dg_swiss_product_block +msgid "Total of transported units" +msgstr "" + +#. module: l10n_ch_adr_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_adr_report.report_dg_swiss_product_block +msgid "Transport category (BK)" +msgstr "" + +#. module: l10n_ch_adr_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_adr_report.report_dg_swiss_partner_block +msgid "Transportation paper" +msgstr "" diff --git a/l10n_ch_adr_report/i18n/l10n_ch_adr_report.pot b/l10n_ch_adr_report/i18n/l10n_ch_adr_report.pot new file mode 100644 index 000000000..329b39bcd --- /dev/null +++ b/l10n_ch_adr_report/i18n/l10n_ch_adr_report.pot @@ -0,0 +1,190 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * l10n_ch_adr_report +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0+e\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-03-23 11:10+0000\n" +"PO-Revision-Date: 2021-03-23 11:10+0000\n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: l10n_ch_adr_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_adr_report.report_dg_swiss_partner_block +msgid "Address" +msgstr "" + +#. module: l10n_ch_adr_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_adr_report.report_dg_swiss_product_block +msgid "Article (order according to 5.4.1.1.1 ADR)" +msgstr "" + +#. module: l10n_ch_adr_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_adr_report.report_dg_swiss_product_block +msgid "Calculation 1000 points rule, ADR 1.1.3.6.3" +msgstr "" + +#. module: l10n_ch_adr_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_adr_report.report_dg_swiss_partner_block +msgid "Company name" +msgstr "" + +#. module: l10n_ch_adr_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_adr_report.report_dg_swiss_partner_block +msgid "Contact person" +msgstr "" + +#. module: l10n_ch_adr_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_adr_report.report_dg_swiss_product_block +msgid "Container / packaging" +msgstr "" + +#. module: l10n_ch_adr_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_adr_report.report_dg_swiss_product_block +msgid "Content / Pack." +msgstr "" + +#. module: l10n_ch_adr_report +#: model:ir.model.fields,field_description:l10n_ch_adr_report.field_product_product__product_content_package +#: model:ir.model.fields,field_description:l10n_ch_adr_report.field_product_template__product_content_package +msgid "Content Packaging" +msgstr "" + +#. module: l10n_ch_adr_report +#: model:ir.model.fields,field_description:l10n_ch_adr_report.field_product_product__content_package +#: model:ir.model.fields,field_description:l10n_ch_adr_report.field_product_template__content_package +msgid "Content Packaging - unused" +msgstr "" + +#. module: l10n_ch_adr_report +#: model:ir.model.fields.selection,name:l10n_ch_adr_report.selection__product_template__dangerous_good__dg +msgid "DG" +msgstr "" + +#. module: l10n_ch_adr_report +#: model:ir.model,name:l10n_ch_adr_report.model_report_l10n_ch_adr_report_report_dg_l10n_ch +msgid "Dangerous Delivery Report ADR" +msgstr "" + +#. module: l10n_ch_adr_report +#: model:ir.model.fields,field_description:l10n_ch_adr_report.field_product_product__dangerous_good +#: model:ir.model.fields,field_description:l10n_ch_adr_report.field_product_template__dangerous_good +msgid "Dangerous Good" +msgstr "" + +#. module: l10n_ch_adr_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_adr_report.product_variant_easy_edit_view +msgid "Dangerous attributes" +msgstr "" + +#. module: l10n_ch_adr_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_adr_report.report_dg_swiss_footer +#: model_terms:ir.ui.view,arch_db:l10n_ch_adr_report.report_dg_swiss_partner_block +msgid "Date" +msgstr "" + +#. module: l10n_ch_adr_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_adr_report.report_dg_swiss_partner_block +msgid "Delivery note no." +msgstr "" + +#. module: l10n_ch_adr_report +#: model:ir.model.fields,field_description:l10n_ch_adr_report.field_report_l10n_ch_adr_report_report_dg_l10n_ch__display_name +msgid "Display Name" +msgstr "" + +#. module: l10n_ch_adr_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_adr_report.report_dg_swiss_product_block +msgid "Factor" +msgstr "" + +#. module: l10n_ch_adr_report +#: model:ir.model.fields,field_description:l10n_ch_adr_report.field_report_l10n_ch_adr_report_report_dg_l10n_ch__id +msgid "ID" +msgstr "" + +#. module: l10n_ch_adr_report +#: model:ir.model.fields.selection,name:l10n_ch_adr_report.selection__product_template__dangerous_good__lg +msgid "LQ" +msgstr "" + +#. module: l10n_ch_adr_report +#: model:ir.model.fields,field_description:l10n_ch_adr_report.field_report_l10n_ch_adr_report_report_dg_l10n_ch____last_update +msgid "Last Modified on" +msgstr "" + +#. module: l10n_ch_adr_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_adr_report.report_dg_swiss_product_block +msgid "Number" +msgstr "" + +#. module: l10n_ch_adr_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_adr_report.report_dg_swiss_product_block +msgid "Points per transportation category" +msgstr "" + +#. module: l10n_ch_adr_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_adr_report.report_dg_swiss_partner_block +msgid "Postcode / town" +msgstr "" + +#. module: l10n_ch_adr_report +#: model:ir.model,name:l10n_ch_adr_report.model_product_product +msgid "Product" +msgstr "" + +#. module: l10n_ch_adr_report +#: model:ir.model,name:l10n_ch_adr_report.model_product_template +msgid "Product Template" +msgstr "" + +#. module: l10n_ch_adr_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_adr_report.report_dg_swiss_footer +msgid "Received listed goods in good physical condition" +msgstr "" + +#. module: l10n_ch_adr_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_adr_report.report_dg_swiss_partner_block +msgid "Recipient address" +msgstr "" + +#. module: l10n_ch_adr_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_adr_report.report_dg_swiss_partner_block +msgid "Sender address" +msgstr "" + +#. module: l10n_ch_adr_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_adr_report.report_dg_swiss_footer +msgid "Signature:" +msgstr "" + +#. module: l10n_ch_adr_report +#: model:ir.actions.report,name:l10n_ch_adr_report.action_report_dg_l10n_ch +msgid "Swiss Dangerous Goods Report" +msgstr "" + +#. module: l10n_ch_adr_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_adr_report.report_dg_swiss_product_block +msgid "Total Points" +msgstr "" + +#. module: l10n_ch_adr_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_adr_report.report_dg_swiss_product_block +msgid "Total of transported units" +msgstr "" + +#. module: l10n_ch_adr_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_adr_report.report_dg_swiss_product_block +msgid "Transport category (BK)" +msgstr "" + +#. module: l10n_ch_adr_report +#: model_terms:ir.ui.view,arch_db:l10n_ch_adr_report.report_dg_swiss_partner_block +msgid "Transportation paper" +msgstr "" diff --git a/l10n_ch_adr_report/readme/AUTHORS.rst b/l10n_ch_adr_report/readme/AUTHORS.rst new file mode 100644 index 000000000..68cc39492 --- /dev/null +++ b/l10n_ch_adr_report/readme/AUTHORS.rst @@ -0,0 +1 @@ +* Iryna Vyshnevska diff --git a/l10n_ch_adr_report/readme/CONTRIBUTORS.rst b/l10n_ch_adr_report/readme/CONTRIBUTORS.rst new file mode 100644 index 000000000..d63c78f53 --- /dev/null +++ b/l10n_ch_adr_report/readme/CONTRIBUTORS.rst @@ -0,0 +1,9 @@ +* `Camptocamp `_: + * Iryna Vyshnevska + * Carlos Serra-Toro + * Iryna Vyshnevska + * Matthieu Méquignon + * Sébastien Alix + * Thierry Ducrest +* `Trobz `_: + * Son Ho diff --git a/l10n_ch_adr_report/readme/CREDITS.rst b/l10n_ch_adr_report/readme/CREDITS.rst new file mode 100644 index 000000000..876f0f6ff --- /dev/null +++ b/l10n_ch_adr_report/readme/CREDITS.rst @@ -0,0 +1 @@ +The development of this module was financially supported by Camptocamp diff --git a/l10n_ch_adr_report/readme/DESCRIPTION.rst b/l10n_ch_adr_report/readme/DESCRIPTION.rst new file mode 100644 index 000000000..138a15944 --- /dev/null +++ b/l10n_ch_adr_report/readme/DESCRIPTION.rst @@ -0,0 +1,2 @@ +Report for delivery of dangerous goods. We assume that product can be defined +on product and it will be the only dangerous good/(waste) on product diff --git a/l10n_ch_adr_report/report/DG_ch_delivery_report.xml b/l10n_ch_adr_report/report/DG_ch_delivery_report.xml new file mode 100644 index 000000000..efe0f3cb2 --- /dev/null +++ b/l10n_ch_adr_report/report/DG_ch_delivery_report.xml @@ -0,0 +1,245 @@ + + + + Swiss Dangerous Goods Report + stock.picking + qweb-pdf + l10n_ch_adr_report.report_dg_l10n_ch + l10n_ch_adr_report.report_dg_l10n_ch + + + + + + + + + + + + + + diff --git a/l10n_ch_adr_report/report/__init__.py b/l10n_ch_adr_report/report/__init__.py new file mode 100644 index 000000000..442f56de8 --- /dev/null +++ b/l10n_ch_adr_report/report/__init__.py @@ -0,0 +1 @@ +from . import dangerous_delivery_report diff --git a/l10n_ch_adr_report/report/dangerous_delivery_report.py b/l10n_ch_adr_report/report/dangerous_delivery_report.py new file mode 100644 index 000000000..9e6195974 --- /dev/null +++ b/l10n_ch_adr_report/report/dangerous_delivery_report.py @@ -0,0 +1,135 @@ +# Copyright 2019 Iryna Vyshnevska (Camptocamp) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) +from itertools import groupby + +from odoo import models + + +class DangerousDeliverCHADR(models.AbstractModel): + _name = "report.l10n_ch_adr_report.report_dg_l10n_ch" + _description = "Dangerous Delivery Report ADR" + + def _get_report_values(self, docids, data=None): + docs = self.env["stock.picking"] + data = data or {} + docs = self.env["stock.picking"].browse(docids) + dg_data = self.prepare_DG_data(docs) + docargs = { + "doc_ids": docs.ids, + "doc_model": "stock.picking", + "docs": docs, + "data": data.get("form", False), + "DG_data": dg_data, + } + return docargs + + def prepare_DG_data(self, picking_ids): + """ + Result is lines for dangerous products + :return: dict + {'dg_lines':[{ + 'product': product.product(40,), + 'class': 'UN UN Number, ... + 'packaging_type': adr_packing_instruction_ids(6,), + 'qty_amount': 100.0, + 'product_weight': 10.0, + 'column_index': '3', + 'dangerous_amount': 1000.0 + }], + 'total_section':{ + 'total_units': {'1': 0, '2': 0, '3': 1000.0, '4': 0, '5': 0}, + 'factor': {'1': 0.0, '2': 50.0, '3': 3.0, '4': 1.0, '5': 0.0}, + 'mass_points': {'1': 0.0, '2': 0.0, '3': 3000.0, '4': 0.0, '5': 0.0}, + 'total_points': 3000.0, + 'warn': True + } + } + """ + + vals = { + "dg_lines": [], + "total_section": {}, + } + for pick in picking_ids: + if pick.state == "done": + moves = pick.move_lines.filtered(lambda l: l.state == "done") + else: + moves = pick.move_lines + dangerous_moves = moves.filtered(lambda self: self.product_id.is_dangerous) + grouped_moves = groupby( + sorted(dangerous_moves, key=lambda l: l.product_id), + lambda r: r.product_id, + ) + vals["dg_lines"] += self._get_DG_move_line_vals(grouped_moves) + + vals["total_section"] = self._compute_points_per_product(vals["dg_lines"]) + vals["total_section"]["total_points"] = self._compute_total_points( + vals["total_section"] + ) + vals["total_section"]["warn"] = self._is_limit_exceeded(vals["total_section"]) + return vals + + def _compute_points_per_product(self, vals): + index = {}.fromkeys(["1", "2", "3", "4", "5"], 0.0) + total_vals = { + "total_units": index.copy(), + "factor": index.copy(), + "mass_points": index.copy(), + "total_points": 0.0, + } + self._init_total_vals(total_vals) + + for k in index.keys(): + total_vals["total_units"][k] = self._sum_values(vals, "dangerous_amount", k) + total_vals["mass_points"][k] = self._apply_rounding( + total_vals["total_units"][k] * total_vals["factor"][k] + ) + return total_vals + + def _sum_values(self, vals, field, index): + return sum([item[field] for item in vals if item["column_index"] == index]) + + def _compute_total_points(self, vals): + return self._apply_rounding(sum(vals["mass_points"].values())) + + def _apply_rounding(self, amount): + # should follow precision on product + return round(amount, 1) + + def _is_limit_exceeded(self, vals): + if vals["total_points"] > 1000.0: + return True + return False + + def _init_total_vals(self, vals): + vals["factor"]["1"] = 0.0 + vals["factor"]["2"] = 50.0 + vals["factor"]["3"] = 3.0 + vals["factor"]["4"] = 1.0 + vals["factor"]["5"] = 0.0 + + def _get_DG_move_line_vals(self, moves): + # unit measurement on stock is not considered + result = [] + for product, move_lines in moves: + qty = 0 + for rec in move_lines: + if rec.state == "done": + qty += rec.quantity_done + else: + qty += rec.product_uom_qty + result.append( + { + "product": product, + "class": product.adr_goods_id.name, + "packaging_type": product.adr_packing_instruction_ids.mapped( + "code" + ), + "qty_amount": qty, + "product_weight": product.weight, + "column_index": str(product.adr_transport_category), + "dangerous_amount": qty * product.weight, + } + ) + + return result diff --git a/l10n_ch_adr_report/static/description/index.html b/l10n_ch_adr_report/static/description/index.html new file mode 100644 index 000000000..2c4f91946 --- /dev/null +++ b/l10n_ch_adr_report/static/description/index.html @@ -0,0 +1,445 @@ + + + + + + +ADR Products Swiss Report + + + +
+

ADR Products Swiss Report

+ + +

Beta License: AGPL-3 OCA/l10n-switzerland Translate me on Weblate Try me on Runbot

+

Report for delivery of dangerous goods. We assume that product can be defined +on product and it will be the only dangerous good/(waste) on product

+

Table of contents

+ +
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Camptocamp
  • +
+
+
+

Contributors

+ +
+
+

Other credits

+

The development of this module was financially supported by Camptocamp

+
+
+

Maintainers

+

This module is maintained by the OCA.

+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.

+

This module is part of the OCA/l10n-switzerland project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/l10n_ch_adr_report/static/src/scss/adr_report.scss b/l10n_ch_adr_report/static/src/scss/adr_report.scss new file mode 100644 index 000000000..e4c58b76d --- /dev/null +++ b/l10n_ch_adr_report/static/src/scss/adr_report.scss @@ -0,0 +1,39 @@ +.dg-report { + .dg_header { + table-layout: fixed; + } + table, + th, + td { + border: 1px solid grey !important; + padding: 0.25rem; + min-width: 50px; + } + table { + margin-bottom: 0px; + } + .table-clean { + border: none !important; + td { + border-collapse: collapse; + border: none !important; + } + } + .uppercase { + text-transform: uppercase; + } + .dg-green { + text-align: center; + background-color: #32e038; + color: white; + } + .dg-red { + background-color: #ff0000; + } + .emphatic { + font-weight: bold; + } + .text-right { + text-align: right; + } +} diff --git a/l10n_ch_adr_report/views/assets.xml b/l10n_ch_adr_report/views/assets.xml new file mode 100644 index 000000000..ba6d7fd62 --- /dev/null +++ b/l10n_ch_adr_report/views/assets.xml @@ -0,0 +1,16 @@ + + + + From 754301ee85b85ca50df36cd39ae5e1174071b61b Mon Sep 17 00:00:00 2001 From: Thierry Ducrest Date: Tue, 24 Aug 2021 12:56:33 +0200 Subject: [PATCH 02/10] [ADD] adr product hook to filter move for report By default all moves related to dangerous product are used to generate the report. This PR adds a hook that allow to customize the filtering. --- l10n_ch_adr_report/report/dangerous_delivery_report.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/l10n_ch_adr_report/report/dangerous_delivery_report.py b/l10n_ch_adr_report/report/dangerous_delivery_report.py index 9e6195974..eb8e6034d 100644 --- a/l10n_ch_adr_report/report/dangerous_delivery_report.py +++ b/l10n_ch_adr_report/report/dangerous_delivery_report.py @@ -55,7 +55,7 @@ def prepare_DG_data(self, picking_ids): moves = pick.move_lines.filtered(lambda l: l.state == "done") else: moves = pick.move_lines - dangerous_moves = moves.filtered(lambda self: self.product_id.is_dangerous) + dangerous_moves = self._filter_dangerous_move(moves) grouped_moves = groupby( sorted(dangerous_moves, key=lambda l: l.product_id), lambda r: r.product_id, @@ -69,6 +69,10 @@ def prepare_DG_data(self, picking_ids): vals["total_section"]["warn"] = self._is_limit_exceeded(vals["total_section"]) return vals + def _filter_dangerous_move(self, moves): + """Filter the moves to use for the report.""" + return moves.filtered(lambda move: move.product_id.is_dangerous) + def _compute_points_per_product(self, vals): index = {}.fromkeys(["1", "2", "3", "4", "5"], 0.0) total_vals = { From f4ca171d4f338407f100e57e01d3257bc3f6fe1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthieu=20M=C3=A9quignon?= Date: Mon, 24 Jan 2022 18:19:21 +0100 Subject: [PATCH 03/10] Fix l10n_ch_adr_report --- l10n_ch_adr_report/__init__.py | 1 + l10n_ch_adr_report/__manifest__.py | 2 +- l10n_ch_adr_report/models/__init__.py | 1 + l10n_ch_adr_report/models/product_product.py | 54 +++++++++++++++++++ .../report/DG_ch_delivery_report.xml | 20 +++---- .../report/dangerous_delivery_report.py | 36 +++++++------ 6 files changed, 88 insertions(+), 26 deletions(-) create mode 100644 l10n_ch_adr_report/models/__init__.py create mode 100644 l10n_ch_adr_report/models/product_product.py diff --git a/l10n_ch_adr_report/__init__.py b/l10n_ch_adr_report/__init__.py index 58c42015c..afe94a82d 100644 --- a/l10n_ch_adr_report/__init__.py +++ b/l10n_ch_adr_report/__init__.py @@ -1,3 +1,4 @@ # Copyright 2021 Camptocamp SA # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl) from . import report +from . import models diff --git a/l10n_ch_adr_report/__manifest__.py b/l10n_ch_adr_report/__manifest__.py index 1109649cc..d7190741c 100644 --- a/l10n_ch_adr_report/__manifest__.py +++ b/l10n_ch_adr_report/__manifest__.py @@ -10,7 +10,7 @@ "license": "AGPL-3", "application": False, "installable": True, - "depends": ["l10n_eu_product_adr", "stock", "delivery"], + "depends": ["l10n_eu_product_adr_dangerous_goods", "stock", "delivery"], "data": [ "report/DG_ch_delivery_report.xml", "views/assets.xml", diff --git a/l10n_ch_adr_report/models/__init__.py b/l10n_ch_adr_report/models/__init__.py new file mode 100644 index 000000000..5c74c8c30 --- /dev/null +++ b/l10n_ch_adr_report/models/__init__.py @@ -0,0 +1 @@ +from . import product_product diff --git a/l10n_ch_adr_report/models/product_product.py b/l10n_ch_adr_report/models/product_product.py new file mode 100644 index 000000000..9a995c81d --- /dev/null +++ b/l10n_ch_adr_report/models/product_product.py @@ -0,0 +1,54 @@ +# Copyright 2022 Camptocamp SA +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) + +from odoo import _, fields, models + + +class ProductProduct(models.Model): + + _inherit = "product.product" + + adr_report_class_display_name = fields.Char( + "Name, as required for the DG report", + compute="_compute_adr_report_class_display_name", + ) + + def _compute_adr_report_class_display_name(self): + for record in self: + adr_good = record.adr_goods_id + res = _("UN") + res += " {}, {}".format(adr_good.un_number, adr_good.name) + if record.nag: + res += _(", N.A.G ({})").format(record.nag) + + if record.label_first: + res += ", {}".format(record._get_name_from_selection("label_first")) + + if record.label_second and record.label_third: + res += ", ({}, {})".format( + record._get_name_from_selection("label_second"), + record._get_name_from_selection("label_third"), + ) + elif record.label_second: + res += ", ({})".format(record._get_name_from_selection("label_second")) + + if record.packaging_group: + res += ", {}".format(record._get_name_from_selection("packaging_group")) + + if adr_good.tunnel_restriction_code: + res += ", ({})".format( + record._get_name_from_selection("adr_tunnel_restriction_code") + ) + + if record.envir_hazardous == "yes": + res += ", {}".format(_("Environmentally hazardous")) + + record.adr_report_class_display_name = res + + def _get_name_from_selection(self, field_name): + selection = self._fields[field_name].selection + if isinstance(selection, list): + temp_dict = dict(selection) + else: + temp_dict = dict(selection(self)) + return temp_dict.get(getattr(self, field_name)) diff --git a/l10n_ch_adr_report/report/DG_ch_delivery_report.xml b/l10n_ch_adr_report/report/DG_ch_delivery_report.xml index efe0f3cb2..db0f5501b 100644 --- a/l10n_ch_adr_report/report/DG_ch_delivery_report.xml +++ b/l10n_ch_adr_report/report/DG_ch_delivery_report.xml @@ -102,9 +102,9 @@ - + @@ -112,27 +112,27 @@ t-field="line['product'].adr_transport_category" /> - + - + - + - + - + @@ -151,30 +151,30 @@ class="text-left font-weight-bold" colspan="5" >Total of transported units + - Factor + - Points per transportation category + - diff --git a/l10n_ch_adr_report/report/dangerous_delivery_report.py b/l10n_ch_adr_report/report/dangerous_delivery_report.py index eb8e6034d..590ba976c 100644 --- a/l10n_ch_adr_report/report/dangerous_delivery_report.py +++ b/l10n_ch_adr_report/report/dangerous_delivery_report.py @@ -37,9 +37,9 @@ def prepare_DG_data(self, picking_ids): 'dangerous_amount': 1000.0 }], 'total_section':{ - 'total_units': {'1': 0, '2': 0, '3': 1000.0, '4': 0, '5': 0}, - 'factor': {'1': 0.0, '2': 50.0, '3': 3.0, '4': 1.0, '5': 0.0}, - 'mass_points': {'1': 0.0, '2': 0.0, '3': 3000.0, '4': 0.0, '5': 0.0}, + 'total_units': {'0': 0, '1': 0, '2': 1000.0, '3': 0, '4': 0}, + 'factor': {'0': 0.0, '1': 50.0, '2': 3.0, '3': 1.0, '4': 0.0}, + 'mass_points': {'0': 0.0, '1': 0.0, '2': 3000.0, '3': 0.0, '4': 0.0}, 'total_points': 3000.0, 'warn': True } @@ -74,7 +74,7 @@ def _filter_dangerous_move(self, moves): return moves.filtered(lambda move: move.product_id.is_dangerous) def _compute_points_per_product(self, vals): - index = {}.fromkeys(["1", "2", "3", "4", "5"], 0.0) + index = {}.fromkeys(["0", "1", "2", "3", "4"], 0.0) total_vals = { "total_units": index.copy(), "factor": index.copy(), @@ -106,11 +106,11 @@ def _is_limit_exceeded(self, vals): return False def _init_total_vals(self, vals): - vals["factor"]["1"] = 0.0 - vals["factor"]["2"] = 50.0 - vals["factor"]["3"] = 3.0 - vals["factor"]["4"] = 1.0 - vals["factor"]["5"] = 0.0 + vals["factor"]["0"] = 0.0 + vals["factor"]["1"] = 50.0 + vals["factor"]["2"] = 3.0 + vals["factor"]["3"] = 1.0 + vals["factor"]["4"] = 0.0 def _get_DG_move_line_vals(self, moves): # unit measurement on stock is not considered @@ -122,17 +122,23 @@ def _get_DG_move_line_vals(self, moves): qty += rec.quantity_done else: qty += rec.product_uom_qty + full_class_name = product.adr_report_class_display_name + ( + ", {}, {}, {}, {}".format( + qty, + product.packaging_type_id.name, + qty * product.content_package, + product.dg_unit.name, + ) + ) result.append( { "product": product, - "class": product.adr_goods_id.name, - "packaging_type": product.adr_packing_instruction_ids.mapped( - "code" - ), + "class": full_class_name, + "packaging_type": product.packaging_type_id, "qty_amount": qty, - "product_weight": product.weight, + "product_weight": product.content_package, "column_index": str(product.adr_transport_category), - "dangerous_amount": qty * product.weight, + "dangerous_amount": qty * product.content_package, } ) From 85c87f604e9ee7fd7835f66a2623571227521095 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthieu=20M=C3=A9quignon?= Date: Wed, 2 Mar 2022 17:55:08 +0100 Subject: [PATCH 04/10] l10n_ch_adr_report: Remove duplicated NAG reference --- l10n_ch_adr_report/README.rst | 15 +++++--- l10n_ch_adr_report/models/product_product.py | 2 +- .../static/description/index.html | 37 ++++++++++--------- 3 files changed, 29 insertions(+), 25 deletions(-) diff --git a/l10n_ch_adr_report/README.rst b/l10n_ch_adr_report/README.rst index f44fb91d4..2da80a971 100644 --- a/l10n_ch_adr_report/README.rst +++ b/l10n_ch_adr_report/README.rst @@ -2,10 +2,13 @@ ADR Products Swiss Report ========================= -.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:f413c71599be495d2419b6a665ebe1ae5f63de78610b15d222574d6908ba5c5a + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png :target: https://odoo-community.org/page/development-status @@ -19,11 +22,11 @@ ADR Products Swiss Report .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png :target: https://translation.odoo-community.org/projects/l10n-switzerland-14-0/l10n-switzerland-14-0-l10n_ch_adr_report :alt: Translate me on Weblate -.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/125/14.0 - :alt: Try me on Runbot +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/l10n-switzerland&target_branch=14.0 + :alt: Try me on Runboat -|badge1| |badge2| |badge3| |badge4| |badge5| +|badge1| |badge2| |badge3| |badge4| |badge5| Report for delivery of dangerous goods. We assume that product can be defined on product and it will be the only dangerous good/(waste) on product @@ -38,7 +41,7 @@ Bug Tracker Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. -If you spotted it first, help us smashing it by providing a detailed and welcomed +If you spotted it first, help us to smash it by providing a detailed and welcomed `feedback `_. Do not contact contributors directly about support or help with technical issues. diff --git a/l10n_ch_adr_report/models/product_product.py b/l10n_ch_adr_report/models/product_product.py index 9a995c81d..5e8064fbb 100644 --- a/l10n_ch_adr_report/models/product_product.py +++ b/l10n_ch_adr_report/models/product_product.py @@ -19,7 +19,7 @@ def _compute_adr_report_class_display_name(self): res = _("UN") res += " {}, {}".format(adr_good.un_number, adr_good.name) if record.nag: - res += _(", N.A.G ({})").format(record.nag) + res += _(" {}").format(record.nag) if record.label_first: res += ", {}".format(record._get_name_from_selection("label_first")) diff --git a/l10n_ch_adr_report/static/description/index.html b/l10n_ch_adr_report/static/description/index.html index 2c4f91946..4b90334e9 100644 --- a/l10n_ch_adr_report/static/description/index.html +++ b/l10n_ch_adr_report/static/description/index.html @@ -1,20 +1,19 @@ - - + ADR Products Swiss Report