From a68a36e7b0b22471f9fa1d690e27a76d56074682 Mon Sep 17 00:00:00 2001 From: Dorin Hongu Date: Mon, 23 Dec 2024 18:12:37 +0200 Subject: [PATCH] Add second Declaration of Conformity report template Updated module to include a second report template with associated XML, translations, and manifest entry. Fixed a minor XML closing tag issue in expenses report and adjusted logic for stock picking move lines from `move_lines` to `move_ids`. --- deltatech_dc/__manifest__.py | 3 +- deltatech_dc/i18n/ro.po | 171 ++++++++++++++++++- deltatech_dc/report/report_dc.py | 2 +- deltatech_dc/views/deltatech_dc_report.xml | 12 ++ deltatech_dc/views/report_dc_second_form.xml | 156 +++++++++++++++++ deltatech_expenses/views/report_expenses.xml | 4 +- 6 files changed, 338 insertions(+), 10 deletions(-) create mode 100644 deltatech_dc/views/report_dc_second_form.xml diff --git a/deltatech_dc/__manifest__.py b/deltatech_dc/__manifest__.py index 2ac85722ab..7e70aa3588 100644 --- a/deltatech_dc/__manifest__.py +++ b/deltatech_dc/__manifest__.py @@ -5,7 +5,7 @@ { "name": "Declaration of Conformity", "summary": "Print Declaration of Conformity", - "version": "17.0.1.0.4", + "version": "17.0.1.0.5", "author": "Terrabit, Dorin Hongu", "website": "https://www.terrabit.ro", "license": "OPL-1", @@ -23,6 +23,7 @@ "views/production_lot_view.xml", "views/deltatech_dc_view.xml", "views/deltatech_dc_report.xml", + "views/report_dc_second_form.xml", "views/report_dc.xml", "security/ir.model.access.csv", "security/security.xml", diff --git a/deltatech_dc/i18n/ro.po b/deltatech_dc/i18n/ro.po index b55abdac16..880ddcce81 100644 --- a/deltatech_dc/i18n/ro.po +++ b/deltatech_dc/i18n/ro.po @@ -15,6 +15,61 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: \n" +#. module: deltatech_dc +#: model_terms:ir.ui.view,arch_db:deltatech_dc.report_dc_form_2 +msgid ", NRC:" +msgstr ", CIF:" + +#. module: deltatech_dc +#: model_terms:ir.ui.view,arch_db:deltatech_dc.report_dc_form_2 +msgid "" +", do not endanger the life, health and safety of consumers and comply with\n" +" the\n" +" internal technical specifications of the products and with the sanitary-veterinary legislation and\n" +" for food safety in force. We guarantee the quality of the products provided that the storage and\n" +" transport parameters specified in the table and on the packaging are respected." +msgstr "" +", nu pun în pericol viața, sănătatea și siguranța consumatorilor și respectă\n" +" specificațiile tehnice interne ale produselor și cu legislația sanitar-veterinară și\n" +" pentru siguranța alimentelor în vigoare. Garantăm calitatea produselor cu condiția respectării parametrilor de depozitare și\n" +" transport specificați în tabel și pe ambalaj." + +#. module: deltatech_dc +#: model_terms:ir.ui.view,arch_db:deltatech_dc.report_dc_form_2 +msgid ", with headquarters in" +msgstr ", cu sediul în mun. " + +#. module: deltatech_dc +#: model_terms:ir.ui.view,arch_db:deltatech_dc.report_dc_form_2 +msgid "" +"; we declare, ensure and guarantee on our\n" +" own\n" +" responsibility that the products delivered to the customer, according to the invoice/notice no." +msgstr "" +"; declarăm, asigurăm și garantăm pe propria noastră\n" +" răspundere că produsele livrate clientului, conform facturii/avizului nr." + +#. module: deltatech_dc +#: model_terms:ir.ui.view,arch_db:deltatech_dc.report_dc_form_2 +msgid "" +"
\n" +"
\n" +" \n" +" Responsible Person:\n" +"
\n" +"
\n" +" Signature:\n" +"
" +msgstr "" +"
\n" +"
\n" +" \n" +" Responsabil calitate:\n" +"
\n" +"
\n" +" Semnătură:\n" +"
" + #. module: deltatech_dc #: model_terms:ir.ui.view,arch_db:deltatech_dc.report_dc msgid ", declare that the product:" @@ -32,8 +87,9 @@ msgstr ", cu sediul în localitatea" #. module: deltatech_dc #: model_terms:ir.ui.view,arch_db:deltatech_dc.report_dc +#: model_terms:ir.ui.view,arch_db:deltatech_dc.report_dc_form_2 msgid "Declaration of Conformity:" -msgstr "Declarație de conformitate:Declarație de conformitate:" #. module: deltatech_dc #: model_terms:ir.ui.view,arch_db:deltatech_dc.report_dc @@ -118,6 +174,7 @@ msgstr "Data Declarație" #: model:ir.actions.report,name:deltatech_dc.action_report_dc #: model:ir.actions.report,name:deltatech_dc.action_report_dc_invoice #: model:ir.actions.report,name:deltatech_dc.action_report_dc_lot +#: model:ir.actions.report,name:deltatech_dc.action_report_dc_picking #: model:ir.model,name:deltatech_dc.model_deltatech_dc #: model:ir.ui.menu,name:deltatech_dc.menu_deltatech_dc #: model_terms:ir.ui.view,arch_db:deltatech_dc.view_deltatech_dc_type_form @@ -125,11 +182,21 @@ msgstr "Data Declarație" msgid "Declaration of Conformity" msgstr "Declarație de conformitate" +#. module: deltatech_dc +#: model:ir.actions.report,name:deltatech_dc.action_report_dc_picking_form_2 +msgid "Declaration of Conformity 2" +msgstr "Declarație de conformitate 2" + #. module: deltatech_dc #: model:ir.model.fields,field_description:deltatech_dc.field_deltatech_dc__display_name msgid "Display Name" msgstr "Nume afișat" +#. module: deltatech_dc +#: model_terms:ir.ui.view,arch_db:deltatech_dc.report_dc_form_2 +msgid "Expiration Date" +msgstr "Data expirarii" + #. module: deltatech_dc #: model_terms:ir.ui.view,arch_db:deltatech_dc.report_dc msgid "F(PP 7.5/4.4.6-01)03" @@ -155,34 +222,89 @@ msgstr "Ultima actualizare făcută de" msgid "Last Updated on" msgstr "Ultima actualizare pe" +#. module: deltatech_dc +#: model:ir.model.fields,field_description:deltatech_dc.field_deltatech_dc__lot_id +msgid "Lot" +msgstr "" + +#. module: deltatech_dc +#: model_terms:ir.ui.view,arch_db:deltatech_dc.report_dc_form_2 +msgid "Lot Number" +msgstr "Numar lot" + +#. module: deltatech_dc +#: model:ir.model,name:deltatech_dc.model_stock_lot +msgid "Lot/Serial" +msgstr "" + +#. module: deltatech_dc +#: model_terms:ir.ui.view,arch_db:deltatech_dc.report_dc_form_2 +msgid "Name of products and services" +msgstr "Denumirea produselor si serviciilor" + +#. module: deltatech_dc +#. odoo-python +#: code:addons/deltatech_dc/models/deltatech_dc.py:0 +#: code:addons/deltatech_dc/models/deltatech_dc.py:0 +#: code:addons/deltatech_dc/models/deltatech_dc.py:0 +#, python-format +msgid "New" +msgstr "Nou" + +#. module: deltatech_dc +#: model_terms:ir.ui.view,arch_db:deltatech_dc.report_dc_form_2 +msgid "Nr." +msgstr "Nr. crt." + #. module: deltatech_dc #: model:ir.model.fields,field_description:deltatech_dc.field_deltatech_dc__name msgid "Number" msgstr "Număr" #. module: deltatech_dc -#: model:ir.model,name:deltatech_dc.model_product_product +#: model:ir.model,name:deltatech_dc.model_product_template #: model:ir.model.fields,field_description:deltatech_dc.field_deltatech_dc__product_id msgid "Product" msgstr "Produs" #. module: deltatech_dc -#: model:ir.model,name:deltatech_dc.model_product_template -msgid "Product Template" -msgstr "Șablon produs" +#: model:ir.model,name:deltatech_dc.model_product_product +msgid "Product Variant" +msgstr "Produs" + +#. module: deltatech_dc +#: model:ir.model.fields,field_description:deltatech_dc.field_stock_lot__production_date +msgid "Production Date" +msgstr "Data producere" #. module: deltatech_dc #: model_terms:ir.ui.view,arch_db:deltatech_dc.product_template_form_view msgid "Quality Control" msgstr "Control calitate" +#. module: deltatech_dc +#: model_terms:ir.ui.view,arch_db:deltatech_dc.report_dc_form_2 +msgid "Quantity" +msgstr "Cantitate" + +#. module: deltatech_dc +#: model_terms:ir.ui.view,arch_db:deltatech_dc.report_dc_form_2 +msgid "Registration Nr." +msgstr "Nr. Inreg" + #. module: deltatech_dc #: model:ir.model,name:deltatech_dc.model_report_deltatech_dc_report_dc #: model:ir.model,name:deltatech_dc.model_report_deltatech_dc_report_dc_invoice #: model:ir.model,name:deltatech_dc.model_report_deltatech_dc_report_dc_lot +#: model:ir.model,name:deltatech_dc.model_report_deltatech_dc_report_dc_picking msgid "ReportDCPrint" msgstr "" +#. module: deltatech_dc +#: model_terms:ir.ui.view,arch_db:deltatech_dc.report_dc_form_2 +msgid "Sale Order:" +msgstr "Comanda:" + #. module: deltatech_dc #: model_terms:ir.ui.view,arch_db:deltatech_dc.report_dc msgid "Signature," @@ -202,6 +324,11 @@ msgstr "Standardul de firmă" msgid "Standards" msgstr "Standarde" +#. module: deltatech_dc +#: model_terms:ir.ui.view,arch_db:deltatech_dc.report_dc_form_2 +msgid "Storage Conditions" +msgstr "Conditii de pastrare si transport" + #. module: deltatech_dc #: model:ir.model.fields,field_description:deltatech_dc.field_deltatech_dc__technical_specification #: model:ir.model.fields,field_description:deltatech_dc.field_product_product__technical_specification @@ -209,6 +336,11 @@ msgstr "Standarde" msgid "Technical Specification" msgstr "Specificație tehnică" +#. module: deltatech_dc +#: model_terms:ir.ui.view,arch_db:deltatech_dc.report_dc_form_2 +msgid "The document belongs to the" +msgstr "Documentul apartine" + #. module: deltatech_dc #: model_terms:ir.ui.view,arch_db:deltatech_dc.report_dc msgid "" @@ -222,4 +354,31 @@ msgstr "" "sănătatea securitatea muncii utilizatorilor și nu este toxic pentru mediul " "înconjurător dacă este folosit în conformitate cu destinația pentru care a " "fost produs respectând depozitarea, manipularea din fișa cu date de " -"securitate. " +"securitate." + +#. module: deltatech_dc +#: model_terms:ir.ui.view,arch_db:deltatech_dc.report_dc_form_2 +msgid "We," +msgstr "Noi," + +#. module: deltatech_dc +#: model_terms:ir.ui.view,arch_db:deltatech_dc.report_dc_form_2 +msgid "" +"and cannot be made\n" +" public without the council's approval." +msgstr "și nu poate fi făcut public fără acordul consiliului." + +#. module: deltatech_dc +#: model_terms:ir.ui.view,arch_db:deltatech_dc.report_dc_form_2 +msgid "county, VAT:" +msgstr "județ, CUI:" + +#. module: deltatech_dc +#: model_terms:ir.ui.view,arch_db:deltatech_dc.report_dc_form_2 +msgid "county, work point located in" +msgstr "județ, punct de lucru situat în" + +#. module: deltatech_dc +#: model_terms:ir.ui.view,arch_db:deltatech_dc.report_dc_form_2 +msgid "from" +msgstr "din" diff --git a/deltatech_dc/report/report_dc.py b/deltatech_dc/report/report_dc.py index 485a8be043..51ae929384 100644 --- a/deltatech_dc/report/report_dc.py +++ b/deltatech_dc/report/report_dc.py @@ -127,7 +127,7 @@ def _get_report_values(self, docids, data=None): product_with_lots = self.env["product.product"] for picking in pickings: - for move in picking.move_lines: + for move in picking.move_ids: for move_line in move.move_line_ids: lot = move_line.lot_id if not lot: diff --git a/deltatech_dc/views/deltatech_dc_report.xml b/deltatech_dc/views/deltatech_dc_report.xml index d5bba6dbc2..04d349193d 100644 --- a/deltatech_dc/views/deltatech_dc_report.xml +++ b/deltatech_dc/views/deltatech_dc_report.xml @@ -54,6 +54,18 @@ + + Declaration of Conformity 2 + stock.picking + qweb-pdf + deltatech_dc.report_dc_form_2 + deltatech_dc.report_dc_form_2 + report + form + + + + diff --git a/deltatech_dc/views/report_dc_second_form.xml b/deltatech_dc/views/report_dc_second_form.xml new file mode 100644 index 0000000000..c944993a73 --- /dev/null +++ b/deltatech_dc/views/report_dc_second_form.xml @@ -0,0 +1,156 @@ + + + + + diff --git a/deltatech_expenses/views/report_expenses.xml b/deltatech_expenses/views/report_expenses.xml index 4b54bb6456..537b889a0f 100644 --- a/deltatech_expenses/views/report_expenses.xml +++ b/deltatech_expenses/views/report_expenses.xml @@ -50,8 +50,8 @@
Din care diurna * = + t-field="o.total_diem" + />