From dd6520e5b70a91c4d225adb26aff03e4f31d09ec Mon Sep 17 00:00:00 2001 From: Sergio Bustamante Date: Fri, 8 Nov 2024 14:27:15 +0100 Subject: [PATCH] [IMP] l10n_es_product_plastic_tax: Add cip field to res_company --- l10n_es_product_plastic_tax/__manifest__.py | 3 ++- l10n_es_product_plastic_tax/i18n/es.po | 23 +++++++++++++++---- .../models/__init__.py | 1 + .../models/res_company.py | 9 ++++++++ .../views/res_company_views.xml | 18 +++++++++++++++ 5 files changed, 48 insertions(+), 6 deletions(-) create mode 100644 l10n_es_product_plastic_tax/models/res_company.py create mode 100644 l10n_es_product_plastic_tax/views/res_company_views.xml diff --git a/l10n_es_product_plastic_tax/__manifest__.py b/l10n_es_product_plastic_tax/__manifest__.py index 4f11d53d343..1a86583e0d0 100644 --- a/l10n_es_product_plastic_tax/__manifest__.py +++ b/l10n_es_product_plastic_tax/__manifest__.py @@ -9,10 +9,11 @@ "category": "Product", "author": "FactorLibre, Odoo Community Association (OCA)", "license": "AGPL-3", - "depends": ["product"], + "depends": ["product", "l10n_es_aeat"], "website": "https://github.com/OCA/l10n-spain", "data": [ "views/product_template_views.xml", + "views/res_company_views.xml", ], "installable": True, "application": False, diff --git a/l10n_es_product_plastic_tax/i18n/es.po b/l10n_es_product_plastic_tax/i18n/es.po index 97f461c2864..b081aec3429 100644 --- a/l10n_es_product_plastic_tax/i18n/es.po +++ b/l10n_es_product_plastic_tax/i18n/es.po @@ -6,16 +6,14 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 16.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-10-09 11:59+0000\n" -"PO-Revision-Date: 2023-10-09 14:01+0200\n" +"POT-Creation-Date: 2024-11-08 13:13+0000\n" +"PO-Revision-Date: 2024-11-08 13:13+0000\n" "Last-Translator: \n" "Language-Team: \n" -"Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" +"Content-Transfer-Encoding: \n" "Plural-Forms: \n" -"X-Generator: Poedit 3.0.1\n" #. module: l10n_es_product_plastic_tax #: model_terms:ir.ui.view,arch_db:l10n_es_product_plastic_tax.view_template_property_form_inherit_plastic_tax @@ -46,6 +44,16 @@ msgstr "" "C - Productos que contengan plástico destinados a permitir el cierre, la " "comercialización u otros de envases no reutilizables" +#. module: l10n_es_product_plastic_tax +#: model:ir.model.fields,field_description:l10n_es_product_plastic_tax.field_res_company__cip +msgid "CIP" +msgstr "CIP" + +#. module: l10n_es_product_plastic_tax +#: model:ir.model,name:l10n_es_product_plastic_tax.model_res_company +msgid "Companies" +msgstr "Compañías" + #. module: l10n_es_product_plastic_tax #: model:ir.model.fields,field_description:l10n_es_product_plastic_tax.field_product_product__non_reusable_plastic_weight #: model:ir.model.fields,field_description:l10n_es_product_plastic_tax.field_product_template__non_reusable_plastic_weight @@ -67,6 +75,11 @@ msgstr "" msgid "Plastic" msgstr "Plástico" +#. module: l10n_es_product_plastic_tax +#: model:ir.model.fields,help:l10n_es_product_plastic_tax.field_res_company__cip +msgid "Plastic Identification Code" +msgstr "Código de identificación del plástico" + #. module: l10n_es_product_plastic_tax #: model:ir.model.fields,field_description:l10n_es_product_plastic_tax.field_product_product__plastic_tax_product_code #: model:ir.model.fields,field_description:l10n_es_product_plastic_tax.field_product_template__plastic_tax_product_code diff --git a/l10n_es_product_plastic_tax/models/__init__.py b/l10n_es_product_plastic_tax/models/__init__.py index 4b2ba20a66f..c256d6d7d27 100644 --- a/l10n_es_product_plastic_tax/models/__init__.py +++ b/l10n_es_product_plastic_tax/models/__init__.py @@ -2,3 +2,4 @@ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from . import product_template from . import product +from . import res_company diff --git a/l10n_es_product_plastic_tax/models/res_company.py b/l10n_es_product_plastic_tax/models/res_company.py new file mode 100644 index 00000000000..8f06b391137 --- /dev/null +++ b/l10n_es_product_plastic_tax/models/res_company.py @@ -0,0 +1,9 @@ +# © 2024 FactorLibre - Sergio Bustamante +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +from odoo import fields, models + + +class ResCompany(models.Model): + _inherit = "res.company" + + cip = fields.Char(string="CIP", help="Plastic Identification Code", size=13) diff --git a/l10n_es_product_plastic_tax/views/res_company_views.xml b/l10n_es_product_plastic_tax/views/res_company_views.xml new file mode 100644 index 00000000000..b943114b605 --- /dev/null +++ b/l10n_es_product_plastic_tax/views/res_company_views.xml @@ -0,0 +1,18 @@ + + + + + res.company.cip.form + res.company + + + + + + + +