From a719c793dd47c6c2f5de2575c01f47d83397b655 Mon Sep 17 00:00:00 2001 From: docker-odoo Date: Wed, 3 Jan 2024 21:23:02 +0000 Subject: [PATCH] [ADD] product_brand_report: new module for print brand in reports closes ingadhoc/product#566 Signed-off-by: Bruno Zanotti --- product_brand_report/README.rst | 75 +++++++++++++++++++ product_brand_report/__init__.py | 5 ++ product_brand_report/__manifest__.py | 40 ++++++++++ product_brand_report/i18n/es_AR.po | 51 +++++++++++++ product_brand_report/models/__init__.py | 5 ++ .../models/res_config_settings.py | 18 +++++ .../reports/report_invoice_document.xml | 12 +++ .../reports/report_saleorder_document.xml | 12 +++ .../views/res_config_settings_view.xml | 38 ++++++++++ 9 files changed, 256 insertions(+) create mode 100644 product_brand_report/README.rst create mode 100644 product_brand_report/__init__.py create mode 100644 product_brand_report/__manifest__.py create mode 100644 product_brand_report/i18n/es_AR.po create mode 100644 product_brand_report/models/__init__.py create mode 100644 product_brand_report/models/res_config_settings.py create mode 100644 product_brand_report/reports/report_invoice_document.xml create mode 100644 product_brand_report/reports/report_saleorder_document.xml create mode 100644 product_brand_report/views/res_config_settings_view.xml diff --git a/product_brand_report/README.rst b/product_brand_report/README.rst new file mode 100644 index 000000000..a3da6c0b9 --- /dev/null +++ b/product_brand_report/README.rst @@ -0,0 +1,75 @@ +.. |company| replace:: ADHOC SA + +.. |company_logo| image:: https://raw.githubusercontent.com/ingadhoc/maintainer-tools/master/resources/adhoc-logo.png + :alt: ADHOC SA + :target: https://www.adhoc.com.ar + +.. |icon| image:: https://raw.githubusercontent.com/ingadhoc/maintainer-tools/master/resources/adhoc-icon.png + +.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png + :target: https://www.gnu.org/licenses/agpl + :alt: License: AGPL-3 + +==================== +Product Brand Report +==================== + +* This module incorporates the possibility of displaying the products brand in the Quotations, Sale Orders and Invoices. + + +Installation +============ + +To install this module, you need to: + +#. Just install this module. + + +Configuration +============= + +#. To configure this module, you need to: + +1. Install the module +2. Go to Settings - Invoicing and check the option "Show product brand on invoices" +3. Go to Settings - Sales and check the option "Show product brand on quotations & sale orders" + + +Usage +===== + +To use this module, you need to: + +#. No usage needed. + +.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas + :alt: Try me on Runbot + :target: http://runbot.adhoc.com.ar/ + +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. + +Credits +======= + +Images +------ + +* |company| |icon| + +Contributors +------------ + +Maintainer +---------- + +|company_logo| + +This module is maintained by the |company|. + +To contribute to this module, please visit https://www.adhoc.com.ar. diff --git a/product_brand_report/__init__.py b/product_brand_report/__init__.py new file mode 100644 index 000000000..d03377692 --- /dev/null +++ b/product_brand_report/__init__.py @@ -0,0 +1,5 @@ +############################################################################## +# For copyright and license notices, see __manifest__.py file in module root +# directory +############################################################################## +from . import models diff --git a/product_brand_report/__manifest__.py b/product_brand_report/__manifest__.py new file mode 100644 index 000000000..e0618488c --- /dev/null +++ b/product_brand_report/__manifest__.py @@ -0,0 +1,40 @@ +############################################################################## +# +# Copyright (C) 2015 ADHOC SA (http://www.adhoc.com.ar) +# All Rights Reserved. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## +{ + 'name': 'Product Brand Report', + 'version': "16.0.1.0.0", + 'category': 'Product', + 'author': 'ADHOC SA', + 'website': 'www.adhoc.com.ar', + 'license': 'AGPL-3', + 'depends': [ + 'product_brand', + ], + 'demo': [ + ], + 'data': [ + 'reports/report_saleorder_document.xml', + 'reports/report_invoice_document.xml', + 'views/res_config_settings_view.xml' + ], + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/product_brand_report/i18n/es_AR.po b/product_brand_report/i18n/es_AR.po new file mode 100644 index 000000000..66758d242 --- /dev/null +++ b/product_brand_report/i18n/es_AR.po @@ -0,0 +1,51 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_brand_report +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0+e\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-01-03 21:18+0000\n" +"PO-Revision-Date: 2024-01-03 21:18+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: product_brand_report +#: model_terms:ir.ui.view,arch_db:product_brand_report.report_invoice_document +#: model_terms:ir.ui.view,arch_db:product_brand_report.report_saleorder +msgid "Brand" +msgstr "Marca" + +#. module: product_brand_report +#: model:ir.model,name:product_brand_report.model_res_config_settings +msgid "Config Settings" +msgstr "Opciones de configuración" + +#. module: product_brand_report +#: model:ir.model,name:product_brand_report.model_account_move +msgid "Journal Entry" +msgstr "Asiento contable" + +#. module: product_brand_report +#: model:ir.model,name:product_brand_report.model_sale_order +msgid "Sales Order" +msgstr "Pedido de venta" + +#. module: product_brand_report +#: model:ir.model.fields,field_description:product_brand_report.field_account_bank_statement_line__show_brand +#: model:ir.model.fields,field_description:product_brand_report.field_account_move__show_brand +#: model:ir.model.fields,field_description:product_brand_report.field_account_payment__show_brand +#: model:ir.model.fields,field_description:product_brand_report.field_res_config_settings__show_brand_invoice_report +msgid "Show product brand on invoices" +msgstr "Mostrar marca de productos en facturas" + +#. module: product_brand_report +#: model:ir.model.fields,field_description:product_brand_report.field_res_config_settings__show_brand_sales_report +#: model:ir.model.fields,field_description:product_brand_report.field_sale_order__show_brand +msgid "Show product brand on quotations & sale orders" +msgstr "Mostrar marca de productos en presupuestos y órdenes de venta" diff --git a/product_brand_report/models/__init__.py b/product_brand_report/models/__init__.py new file mode 100644 index 000000000..6be8fae8f --- /dev/null +++ b/product_brand_report/models/__init__.py @@ -0,0 +1,5 @@ +############################################################################## +# For copyright and license notices, see __manifest__.py file in module root +# directory +############################################################################## +from . import res_config_settings \ No newline at end of file diff --git a/product_brand_report/models/res_config_settings.py b/product_brand_report/models/res_config_settings.py new file mode 100644 index 000000000..70bffa28d --- /dev/null +++ b/product_brand_report/models/res_config_settings.py @@ -0,0 +1,18 @@ +############################################################################## +# For copyright and license notices, see __manifest__.py file in module root +# directory +############################################################################## +from odoo import models, fields + + +class ResConfigSettings(models.TransientModel): + _inherit = 'res.config.settings' + + show_brand_invoice_report = fields.Boolean( + "Show product brand on invoices", + config_parameter='product_brand_report.show_brand_invoice_report' + ) + show_brand_sales_report = fields.Boolean( + "Show product brand on quotations & sale orders", + config_parameter='product_brand_report.show_brand_sales_report' + ) diff --git a/product_brand_report/reports/report_invoice_document.xml b/product_brand_report/reports/report_invoice_document.xml new file mode 100644 index 000000000..f9aff355d --- /dev/null +++ b/product_brand_report/reports/report_invoice_document.xml @@ -0,0 +1,12 @@ + + + diff --git a/product_brand_report/reports/report_saleorder_document.xml b/product_brand_report/reports/report_saleorder_document.xml new file mode 100644 index 000000000..120cf4cdc --- /dev/null +++ b/product_brand_report/reports/report_saleorder_document.xml @@ -0,0 +1,12 @@ + + + diff --git a/product_brand_report/views/res_config_settings_view.xml b/product_brand_report/views/res_config_settings_view.xml new file mode 100644 index 000000000..3f4d69bfb --- /dev/null +++ b/product_brand_report/views/res_config_settings_view.xml @@ -0,0 +1,38 @@ + + + + res.config.settings.form.inherit.sale + res.config.settings + + + +
+
+ +
+
+
+
+
+
+
+ + + res.config.settings.form.inherit.account + res.config.settings + + + +
+
+ +
+
+
+
+
+
+
+