diff --git a/product_pricelist_direct_print_xlsx/README.rst b/product_pricelist_direct_print_xlsx/README.rst new file mode 100644 index 00000000000..b66690ecf55 --- /dev/null +++ b/product_pricelist_direct_print_xlsx/README.rst @@ -0,0 +1,98 @@ +.. image:: https://odoo-community.org/readme-banner-image + :target: https://odoo-community.org/get-involved?utm_source=readme + :alt: Odoo Community Association + +===================================== +Product Pricelist Direct Print (XLSX) +===================================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:f5d143bf38101ee72a0a6201b25371ba95f402ee42c819011556a69473d202bf + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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/license-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%2Fproduct--attribute-lightgray.png?logo=github + :target: https://github.com/OCA/product-attribute/tree/18.0/product_pricelist_direct_print_xlsx + :alt: OCA/product-attribute +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/product-attribute-18-0/product-attribute-18-0-product_pricelist_direct_print_xlsx + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/product-attribute&target_branch=18.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module is based on the OCA module +``product_pricelist_direct_print`` and add the possibility to export +price list in XLSX format. + +**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 to smash it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +------- + +* Tecnativa +* GRAP + +Contributors +------------ + +- `Tecnativa `__: + + - Carlos Dauden + - David Vidal + - Sergio Teruel + - João Marques + - Carlos Roca + +- `CorporateHub `__: + + - Alexey Pelykh + +- `GRAP `__: + + - Sylvain LE GAL + <`https://twitter.com/legalsylvain\\> >`__ + +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/product-attribute `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/product_pricelist_direct_print_xlsx/__init__.py b/product_pricelist_direct_print_xlsx/__init__.py new file mode 100644 index 00000000000..5f9d18631d8 --- /dev/null +++ b/product_pricelist_direct_print_xlsx/__init__.py @@ -0,0 +1,2 @@ +from . import report +from . import wizards diff --git a/product_pricelist_direct_print_xlsx/__manifest__.py b/product_pricelist_direct_print_xlsx/__manifest__.py new file mode 100644 index 00000000000..dc35fd72142 --- /dev/null +++ b/product_pricelist_direct_print_xlsx/__manifest__.py @@ -0,0 +1,18 @@ +# Copyright 2017 Tecnativa - Carlos Dauden +# Copyright 2020 Tecnativa - João Marques +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). +{ + "name": "Product Pricelist Direct Print (XLSX)", + "summary": "Print price list in XLSX format", + "version": "19.0.1.0.0", + "category": "Product", + "website": "https://github.com/OCA/product-attribute", + "author": "Tecnativa, GRAP, Odoo Community Association (OCA)", + "license": "AGPL-3", + "depends": ["product_pricelist_direct_print", "report_xlsx"], + "data": [ + "security/ir.model.access.csv", + "report/product_pricelist_xlsx.xml", + "wizards/product_pricelist_print_view.xml", + ], +} diff --git a/product_pricelist_direct_print_xlsx/i18n/es.po b/product_pricelist_direct_print_xlsx/i18n/es.po new file mode 100644 index 00000000000..43b71d3b99f --- /dev/null +++ b/product_pricelist_direct_print_xlsx/i18n/es.po @@ -0,0 +1,135 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_pricelist_direct_print_xlsx +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2023-08-29 08:31+0000\n" +"Last-Translator: Ivorra78 \n" +"Language-Team: none\n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.17\n" + +#. module: product_pricelist_direct_print_xlsx +#: model:ir.model,name:product_pricelist_direct_print_xlsx.model_report_product_pricelist_direct_print_xlsx_report +msgid "Abstract model to export as xlsx the product pricelist" +msgstr "" +"Modelo abstracto para exportar como xlsx la lista de precios de los productos" + +#. module: product_pricelist_direct_print_xlsx +#. odoo-python +#: code:addons/product_pricelist_direct_print_xlsx/report/product_pricelist_xlsx.py:0 +#, python-format +msgid "Cost Price" +msgstr "Precio de coste" + +#. module: product_pricelist_direct_print_xlsx +#. odoo-python +#: code:addons/product_pricelist_direct_print_xlsx/report/product_pricelist_xlsx.py:0 +#, python-format +msgid "Currency:" +msgstr "Divisa:" + +#. module: product_pricelist_direct_print_xlsx +#. odoo-python +#: code:addons/product_pricelist_direct_print_xlsx/report/product_pricelist_xlsx.py:0 +#, python-format +msgid "Date:" +msgstr "Fecha:" + +#. module: product_pricelist_direct_print_xlsx +#. odoo-python +#: code:addons/product_pricelist_direct_print_xlsx/report/product_pricelist_xlsx.py:0 +#, python-format +msgid "Description" +msgstr "Descripción" + +#. module: product_pricelist_direct_print_xlsx +#: model_terms:ir.ui.view,arch_db:product_pricelist_direct_print_xlsx.view_product_pricelist_print +msgid "Export" +msgstr "Exportación" + +#. module: product_pricelist_direct_print_xlsx +#. odoo-python +#: code:addons/product_pricelist_direct_print_xlsx/report/product_pricelist_xlsx.py:0 +#, python-format +msgid "Internal Category" +msgstr "Categoría interna" + +#. module: product_pricelist_direct_print_xlsx +#. odoo-python +#: code:addons/product_pricelist_direct_print_xlsx/report/product_pricelist_xlsx.py:0 +#, python-format +msgid "List Price" +msgstr "Lista de Precios" + +#. module: product_pricelist_direct_print_xlsx +#. odoo-python +#: code:addons/product_pricelist_direct_print_xlsx/report/product_pricelist_xlsx.py:0 +#, python-format +msgid "PRODUCTS" +msgstr "PRODUCTOS" + +#. module: product_pricelist_direct_print_xlsx +#. odoo-python +#: code:addons/product_pricelist_direct_print_xlsx/report/product_pricelist_xlsx.py:0 +#, python-format +msgid "Price List Name:" +msgstr "Nombre de la lista de precios:" + +#. module: product_pricelist_direct_print_xlsx +#: model:ir.model,name:product_pricelist_direct_print_xlsx.model_product_pricelist_print +msgid "Product Pricelist Print" +msgstr "Imprimir lista de precios de productos" + +#. module: product_pricelist_direct_print_xlsx +#: model:ir.actions.report,name:product_pricelist_direct_print_xlsx.report +msgid "Product Pricelist XLSX" +msgstr "Lista de precios XLSX de productos" + +#. module: product_pricelist_direct_print_xlsx +#. odoo-python +#: code:addons/product_pricelist_direct_print_xlsx/report/product_pricelist_xlsx.py:0 +#, python-format +msgid "Sale Price" +msgstr "Precio de Venta" + +#. module: product_pricelist_direct_print_xlsx +#: model:ir.model.fields,field_description:product_pricelist_direct_print_xlsx.field_product_pricelist_print__show_internal_category +msgid "Show internal categories" +msgstr "Mostrar categorías internas" + +#. module: product_pricelist_direct_print_xlsx +#. odoo-python +#: code:addons/product_pricelist_direct_print_xlsx/report/product_pricelist_xlsx.py:0 +#, python-format +msgid "Special Pricelist" +msgstr "Lista de precios especial" + +#. module: product_pricelist_direct_print_xlsx +#. odoo-python +#: code:addons/product_pricelist_direct_print_xlsx/report/product_pricelist_xlsx.py:0 +#, python-format +msgid "Summary:" +msgstr "Resumen:" + +#. module: product_pricelist_direct_print_xlsx +#. odoo-python +#: code:addons/product_pricelist_direct_print_xlsx/report/product_pricelist_xlsx.py:0 +#, python-format +msgid "UoM" +msgstr "UdM (Unidad De Medida)" + +#. module: product_pricelist_direct_print_xlsx +#: model_terms:ir.ui.view,arch_db:product_pricelist_direct_print_xlsx.view_product_pricelist_print +msgid "XLSX Export Options" +msgstr "Opciones de exportación XLSX" + +#~ msgid "Breakage Per Category" +#~ msgstr "Ruptura por categoría" diff --git a/product_pricelist_direct_print_xlsx/i18n/fr.po b/product_pricelist_direct_print_xlsx/i18n/fr.po new file mode 100644 index 00000000000..727a3b06927 --- /dev/null +++ b/product_pricelist_direct_print_xlsx/i18n/fr.po @@ -0,0 +1,131 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_pricelist_direct_print_xlsx +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2025-05-13 14:55+0000\n" +"Last-Translator: phuard23 \n" +"Language-Team: none\n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n > 1;\n" +"X-Generator: Weblate 5.10.4\n" + +#. module: product_pricelist_direct_print_xlsx +#: model:ir.model,name:product_pricelist_direct_print_xlsx.model_report_product_pricelist_direct_print_xlsx_report +msgid "Abstract model to export as xlsx the product pricelist" +msgstr "" + +#. module: product_pricelist_direct_print_xlsx +#. odoo-python +#: code:addons/product_pricelist_direct_print_xlsx/report/product_pricelist_xlsx.py:0 +#, python-format +msgid "Cost Price" +msgstr "Coût" + +#. module: product_pricelist_direct_print_xlsx +#. odoo-python +#: code:addons/product_pricelist_direct_print_xlsx/report/product_pricelist_xlsx.py:0 +#, python-format +msgid "Currency:" +msgstr "Devise :" + +#. module: product_pricelist_direct_print_xlsx +#. odoo-python +#: code:addons/product_pricelist_direct_print_xlsx/report/product_pricelist_xlsx.py:0 +#, python-format +msgid "Date:" +msgstr "" + +#. module: product_pricelist_direct_print_xlsx +#. odoo-python +#: code:addons/product_pricelist_direct_print_xlsx/report/product_pricelist_xlsx.py:0 +#, python-format +msgid "Description" +msgstr "" + +#. module: product_pricelist_direct_print_xlsx +#: model_terms:ir.ui.view,arch_db:product_pricelist_direct_print_xlsx.view_product_pricelist_print +msgid "Export" +msgstr "" + +#. module: product_pricelist_direct_print_xlsx +#. odoo-python +#: code:addons/product_pricelist_direct_print_xlsx/report/product_pricelist_xlsx.py:0 +#, python-format +msgid "Internal Category" +msgstr "Catégorie interne" + +#. module: product_pricelist_direct_print_xlsx +#. odoo-python +#: code:addons/product_pricelist_direct_print_xlsx/report/product_pricelist_xlsx.py:0 +#, python-format +msgid "List Price" +msgstr "Liste de prix" + +#. module: product_pricelist_direct_print_xlsx +#. odoo-python +#: code:addons/product_pricelist_direct_print_xlsx/report/product_pricelist_xlsx.py:0 +#, python-format +msgid "PRODUCTS" +msgstr "PRODUITS" + +#. module: product_pricelist_direct_print_xlsx +#. odoo-python +#: code:addons/product_pricelist_direct_print_xlsx/report/product_pricelist_xlsx.py:0 +#, python-format +msgid "Price List Name:" +msgstr "Liste de prix :" + +#. module: product_pricelist_direct_print_xlsx +#: model:ir.model,name:product_pricelist_direct_print_xlsx.model_product_pricelist_print +msgid "Product Pricelist Print" +msgstr "" + +#. module: product_pricelist_direct_print_xlsx +#: model:ir.actions.report,name:product_pricelist_direct_print_xlsx.report +msgid "Product Pricelist XLSX" +msgstr "" + +#. module: product_pricelist_direct_print_xlsx +#. odoo-python +#: code:addons/product_pricelist_direct_print_xlsx/report/product_pricelist_xlsx.py:0 +#, python-format +msgid "Sale Price" +msgstr "Prix de vente" + +#. module: product_pricelist_direct_print_xlsx +#: model:ir.model.fields,field_description:product_pricelist_direct_print_xlsx.field_product_pricelist_print__show_internal_category +msgid "Show internal categories" +msgstr "Montrer les catégories internes" + +#. module: product_pricelist_direct_print_xlsx +#. odoo-python +#: code:addons/product_pricelist_direct_print_xlsx/report/product_pricelist_xlsx.py:0 +#, python-format +msgid "Special Pricelist" +msgstr "Liste de prix spéciale" + +#. module: product_pricelist_direct_print_xlsx +#. odoo-python +#: code:addons/product_pricelist_direct_print_xlsx/report/product_pricelist_xlsx.py:0 +#, python-format +msgid "Summary:" +msgstr "Résumé :" + +#. module: product_pricelist_direct_print_xlsx +#. odoo-python +#: code:addons/product_pricelist_direct_print_xlsx/report/product_pricelist_xlsx.py:0 +#, python-format +msgid "UoM" +msgstr "UdM" + +#. module: product_pricelist_direct_print_xlsx +#: model_terms:ir.ui.view,arch_db:product_pricelist_direct_print_xlsx.view_product_pricelist_print +msgid "XLSX Export Options" +msgstr "" diff --git a/product_pricelist_direct_print_xlsx/i18n/it.po b/product_pricelist_direct_print_xlsx/i18n/it.po new file mode 100644 index 00000000000..aa5ad0a7055 --- /dev/null +++ b/product_pricelist_direct_print_xlsx/i18n/it.po @@ -0,0 +1,134 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_pricelist_direct_print_xlsx +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2023-10-31 09:38+0000\n" +"Last-Translator: mymage \n" +"Language-Team: none\n" +"Language: it\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.17\n" + +#. module: product_pricelist_direct_print_xlsx +#: model:ir.model,name:product_pricelist_direct_print_xlsx.model_report_product_pricelist_direct_print_xlsx_report +msgid "Abstract model to export as xlsx the product pricelist" +msgstr "Modello astratto per esportazione xlsx listino prezzi prodotto" + +#. module: product_pricelist_direct_print_xlsx +#. odoo-python +#: code:addons/product_pricelist_direct_print_xlsx/report/product_pricelist_xlsx.py:0 +#, python-format +msgid "Cost Price" +msgstr "Prezzo di costo" + +#. module: product_pricelist_direct_print_xlsx +#. odoo-python +#: code:addons/product_pricelist_direct_print_xlsx/report/product_pricelist_xlsx.py:0 +#, python-format +msgid "Currency:" +msgstr "Valuta:" + +#. module: product_pricelist_direct_print_xlsx +#. odoo-python +#: code:addons/product_pricelist_direct_print_xlsx/report/product_pricelist_xlsx.py:0 +#, python-format +msgid "Date:" +msgstr "Data:" + +#. module: product_pricelist_direct_print_xlsx +#. odoo-python +#: code:addons/product_pricelist_direct_print_xlsx/report/product_pricelist_xlsx.py:0 +#, python-format +msgid "Description" +msgstr "Descrizione" + +#. module: product_pricelist_direct_print_xlsx +#: model_terms:ir.ui.view,arch_db:product_pricelist_direct_print_xlsx.view_product_pricelist_print +msgid "Export" +msgstr "Esporta" + +#. module: product_pricelist_direct_print_xlsx +#. odoo-python +#: code:addons/product_pricelist_direct_print_xlsx/report/product_pricelist_xlsx.py:0 +#, python-format +msgid "Internal Category" +msgstr "Categoria interna" + +#. module: product_pricelist_direct_print_xlsx +#. odoo-python +#: code:addons/product_pricelist_direct_print_xlsx/report/product_pricelist_xlsx.py:0 +#, python-format +msgid "List Price" +msgstr "Prezzo di listino" + +#. module: product_pricelist_direct_print_xlsx +#. odoo-python +#: code:addons/product_pricelist_direct_print_xlsx/report/product_pricelist_xlsx.py:0 +#, python-format +msgid "PRODUCTS" +msgstr "PRODOTTI" + +#. module: product_pricelist_direct_print_xlsx +#. odoo-python +#: code:addons/product_pricelist_direct_print_xlsx/report/product_pricelist_xlsx.py:0 +#, python-format +msgid "Price List Name:" +msgstr "Nome listino:" + +#. module: product_pricelist_direct_print_xlsx +#: model:ir.model,name:product_pricelist_direct_print_xlsx.model_product_pricelist_print +msgid "Product Pricelist Print" +msgstr "Stampa listino prezzi prodotto" + +#. module: product_pricelist_direct_print_xlsx +#: model:ir.actions.report,name:product_pricelist_direct_print_xlsx.report +msgid "Product Pricelist XLSX" +msgstr "Listino prezzi prodotto XLSX" + +#. module: product_pricelist_direct_print_xlsx +#. odoo-python +#: code:addons/product_pricelist_direct_print_xlsx/report/product_pricelist_xlsx.py:0 +#, python-format +msgid "Sale Price" +msgstr "Prezzo di vendita" + +#. module: product_pricelist_direct_print_xlsx +#: model:ir.model.fields,field_description:product_pricelist_direct_print_xlsx.field_product_pricelist_print__show_internal_category +msgid "Show internal categories" +msgstr "Mostra categorie interne" + +#. module: product_pricelist_direct_print_xlsx +#. odoo-python +#: code:addons/product_pricelist_direct_print_xlsx/report/product_pricelist_xlsx.py:0 +#, python-format +msgid "Special Pricelist" +msgstr "Listino prezzi speciale" + +#. module: product_pricelist_direct_print_xlsx +#. odoo-python +#: code:addons/product_pricelist_direct_print_xlsx/report/product_pricelist_xlsx.py:0 +#, python-format +msgid "Summary:" +msgstr "Riepilogo:" + +#. module: product_pricelist_direct_print_xlsx +#. odoo-python +#: code:addons/product_pricelist_direct_print_xlsx/report/product_pricelist_xlsx.py:0 +#, python-format +msgid "UoM" +msgstr "UdM" + +#. module: product_pricelist_direct_print_xlsx +#: model_terms:ir.ui.view,arch_db:product_pricelist_direct_print_xlsx.view_product_pricelist_print +msgid "XLSX Export Options" +msgstr "Opzioni esportazione XLSX" + +#~ msgid "Breakage Per Category" +#~ msgstr "Suddivisione per categoria" diff --git a/product_pricelist_direct_print_xlsx/i18n/product_pricelist_direct_print_xlsx.pot b/product_pricelist_direct_print_xlsx/i18n/product_pricelist_direct_print_xlsx.pot new file mode 100644 index 00000000000..9e47d8dd757 --- /dev/null +++ b/product_pricelist_direct_print_xlsx/i18n/product_pricelist_direct_print_xlsx.pot @@ -0,0 +1,116 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_pricelist_direct_print_xlsx +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 18.0\n" +"Report-Msgid-Bugs-To: \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_pricelist_direct_print_xlsx +#: model:ir.model,name:product_pricelist_direct_print_xlsx.model_report_product_pricelist_direct_print_xlsx_report +msgid "Abstract model to export as xlsx the product pricelist" +msgstr "" + +#. module: product_pricelist_direct_print_xlsx +#. odoo-python +#: code:addons/product_pricelist_direct_print_xlsx/report/product_pricelist_xlsx.py:0 +msgid "Cost Price" +msgstr "" + +#. module: product_pricelist_direct_print_xlsx +#. odoo-python +#: code:addons/product_pricelist_direct_print_xlsx/report/product_pricelist_xlsx.py:0 +msgid "Currency:" +msgstr "" + +#. module: product_pricelist_direct_print_xlsx +#. odoo-python +#: code:addons/product_pricelist_direct_print_xlsx/report/product_pricelist_xlsx.py:0 +msgid "Date:" +msgstr "" + +#. module: product_pricelist_direct_print_xlsx +#. odoo-python +#: code:addons/product_pricelist_direct_print_xlsx/report/product_pricelist_xlsx.py:0 +msgid "Description" +msgstr "" + +#. module: product_pricelist_direct_print_xlsx +#: model_terms:ir.ui.view,arch_db:product_pricelist_direct_print_xlsx.view_product_pricelist_print +msgid "Export" +msgstr "" + +#. module: product_pricelist_direct_print_xlsx +#. odoo-python +#: code:addons/product_pricelist_direct_print_xlsx/report/product_pricelist_xlsx.py:0 +msgid "Internal Category" +msgstr "" + +#. module: product_pricelist_direct_print_xlsx +#. odoo-python +#: code:addons/product_pricelist_direct_print_xlsx/report/product_pricelist_xlsx.py:0 +msgid "List Price" +msgstr "" + +#. module: product_pricelist_direct_print_xlsx +#. odoo-python +#: code:addons/product_pricelist_direct_print_xlsx/report/product_pricelist_xlsx.py:0 +msgid "PRODUCTS" +msgstr "" + +#. module: product_pricelist_direct_print_xlsx +#. odoo-python +#: code:addons/product_pricelist_direct_print_xlsx/report/product_pricelist_xlsx.py:0 +msgid "Price List Name:" +msgstr "" + +#. module: product_pricelist_direct_print_xlsx +#: model:ir.model,name:product_pricelist_direct_print_xlsx.model_product_pricelist_print +msgid "Product Pricelist Print" +msgstr "" + +#. module: product_pricelist_direct_print_xlsx +#: model:ir.actions.report,name:product_pricelist_direct_print_xlsx.report +msgid "Product Pricelist XLSX" +msgstr "" + +#. module: product_pricelist_direct_print_xlsx +#. odoo-python +#: code:addons/product_pricelist_direct_print_xlsx/report/product_pricelist_xlsx.py:0 +msgid "Sale Price" +msgstr "" + +#. module: product_pricelist_direct_print_xlsx +#: model:ir.model.fields,field_description:product_pricelist_direct_print_xlsx.field_product_pricelist_print__show_internal_category +msgid "Show internal categories" +msgstr "" + +#. module: product_pricelist_direct_print_xlsx +#. odoo-python +#: code:addons/product_pricelist_direct_print_xlsx/report/product_pricelist_xlsx.py:0 +msgid "Special Pricelist" +msgstr "" + +#. module: product_pricelist_direct_print_xlsx +#. odoo-python +#: code:addons/product_pricelist_direct_print_xlsx/report/product_pricelist_xlsx.py:0 +msgid "Summary:" +msgstr "" + +#. module: product_pricelist_direct_print_xlsx +#. odoo-python +#: code:addons/product_pricelist_direct_print_xlsx/report/product_pricelist_xlsx.py:0 +msgid "UoM" +msgstr "" + +#. module: product_pricelist_direct_print_xlsx +#: model_terms:ir.ui.view,arch_db:product_pricelist_direct_print_xlsx.view_product_pricelist_print +msgid "XLSX Export Options" +msgstr "" diff --git a/product_pricelist_direct_print_xlsx/i18n/tr.po b/product_pricelist_direct_print_xlsx/i18n/tr.po new file mode 100644 index 00000000000..53cff7ca323 --- /dev/null +++ b/product_pricelist_direct_print_xlsx/i18n/tr.po @@ -0,0 +1,134 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_pricelist_direct_print_xlsx +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2024-03-11 08:37+0000\n" +"Last-Translator: Ömer KÜLAK \n" +"Language-Team: none\n" +"Language: tr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.17\n" + +#. module: product_pricelist_direct_print_xlsx +#: model:ir.model,name:product_pricelist_direct_print_xlsx.model_report_product_pricelist_direct_print_xlsx_report +msgid "Abstract model to export as xlsx the product pricelist" +msgstr "Ürün fiyat listesini xlsx olarak dışa aktaracak model" + +#. module: product_pricelist_direct_print_xlsx +#. odoo-python +#: code:addons/product_pricelist_direct_print_xlsx/report/product_pricelist_xlsx.py:0 +#, python-format +msgid "Cost Price" +msgstr "Maliyet" + +#. module: product_pricelist_direct_print_xlsx +#. odoo-python +#: code:addons/product_pricelist_direct_print_xlsx/report/product_pricelist_xlsx.py:0 +#, python-format +msgid "Currency:" +msgstr "Para Birimi:" + +#. module: product_pricelist_direct_print_xlsx +#. odoo-python +#: code:addons/product_pricelist_direct_print_xlsx/report/product_pricelist_xlsx.py:0 +#, python-format +msgid "Date:" +msgstr "Tarih:" + +#. module: product_pricelist_direct_print_xlsx +#. odoo-python +#: code:addons/product_pricelist_direct_print_xlsx/report/product_pricelist_xlsx.py:0 +#, python-format +msgid "Description" +msgstr "Açıklama" + +#. module: product_pricelist_direct_print_xlsx +#: model_terms:ir.ui.view,arch_db:product_pricelist_direct_print_xlsx.view_product_pricelist_print +msgid "Export" +msgstr "Dışa Aktar" + +#. module: product_pricelist_direct_print_xlsx +#. odoo-python +#: code:addons/product_pricelist_direct_print_xlsx/report/product_pricelist_xlsx.py:0 +#, python-format +msgid "Internal Category" +msgstr "İç Kategori" + +#. module: product_pricelist_direct_print_xlsx +#. odoo-python +#: code:addons/product_pricelist_direct_print_xlsx/report/product_pricelist_xlsx.py:0 +#, python-format +msgid "List Price" +msgstr "Liste Fiyatı" + +#. module: product_pricelist_direct_print_xlsx +#. odoo-python +#: code:addons/product_pricelist_direct_print_xlsx/report/product_pricelist_xlsx.py:0 +#, python-format +msgid "PRODUCTS" +msgstr "ÜRÜNLER" + +#. module: product_pricelist_direct_print_xlsx +#. odoo-python +#: code:addons/product_pricelist_direct_print_xlsx/report/product_pricelist_xlsx.py:0 +#, python-format +msgid "Price List Name:" +msgstr "Fiyat Listesi Adı:" + +#. module: product_pricelist_direct_print_xlsx +#: model:ir.model,name:product_pricelist_direct_print_xlsx.model_product_pricelist_print +msgid "Product Pricelist Print" +msgstr "Fiyat Listesini Yazdır" + +#. module: product_pricelist_direct_print_xlsx +#: model:ir.actions.report,name:product_pricelist_direct_print_xlsx.report +msgid "Product Pricelist XLSX" +msgstr "Ürün Fiyat Listesi XLSX" + +#. module: product_pricelist_direct_print_xlsx +#. odoo-python +#: code:addons/product_pricelist_direct_print_xlsx/report/product_pricelist_xlsx.py:0 +#, python-format +msgid "Sale Price" +msgstr "Satış Fiyatı" + +#. module: product_pricelist_direct_print_xlsx +#: model:ir.model.fields,field_description:product_pricelist_direct_print_xlsx.field_product_pricelist_print__show_internal_category +msgid "Show internal categories" +msgstr "İç kategorileri göster" + +#. module: product_pricelist_direct_print_xlsx +#. odoo-python +#: code:addons/product_pricelist_direct_print_xlsx/report/product_pricelist_xlsx.py:0 +#, python-format +msgid "Special Pricelist" +msgstr "Özel Fiyat Listesi" + +#. module: product_pricelist_direct_print_xlsx +#. odoo-python +#: code:addons/product_pricelist_direct_print_xlsx/report/product_pricelist_xlsx.py:0 +#, python-format +msgid "Summary:" +msgstr "Özet:" + +#. module: product_pricelist_direct_print_xlsx +#. odoo-python +#: code:addons/product_pricelist_direct_print_xlsx/report/product_pricelist_xlsx.py:0 +#, python-format +msgid "UoM" +msgstr "Birim" + +#. module: product_pricelist_direct_print_xlsx +#: model_terms:ir.ui.view,arch_db:product_pricelist_direct_print_xlsx.view_product_pricelist_print +msgid "XLSX Export Options" +msgstr "XLSX Dışa Aktarma Seçenekleri" + +#~ msgid "Breakage Per Category" +#~ msgstr "Kategori Başına Kır" diff --git a/product_pricelist_direct_print_xlsx/pyproject.toml b/product_pricelist_direct_print_xlsx/pyproject.toml new file mode 100644 index 00000000000..4231d0cccb3 --- /dev/null +++ b/product_pricelist_direct_print_xlsx/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/product_pricelist_direct_print_xlsx/readme/CONTRIBUTORS.md b/product_pricelist_direct_print_xlsx/readme/CONTRIBUTORS.md new file mode 100644 index 00000000000..139bddb5721 --- /dev/null +++ b/product_pricelist_direct_print_xlsx/readme/CONTRIBUTORS.md @@ -0,0 +1,10 @@ +- [Tecnativa](https://www.tecnativa.com): + - Carlos Dauden + - David Vidal + - Sergio Teruel + - João Marques + - Carlos Roca +- [CorporateHub](https://corporatehub.eu/): + - Alexey Pelykh \ +- [GRAP](http://www.grap.coop/): + - Sylvain LE GAL \ diff --git a/product_pricelist_direct_print_xlsx/readme/DESCRIPTION.md b/product_pricelist_direct_print_xlsx/readme/DESCRIPTION.md new file mode 100644 index 00000000000..3a1dd5efdf4 --- /dev/null +++ b/product_pricelist_direct_print_xlsx/readme/DESCRIPTION.md @@ -0,0 +1,2 @@ +This module is based on the OCA module `product_pricelist_direct_print` +and add the possibility to export price list in XLSX format. diff --git a/product_pricelist_direct_print_xlsx/report/__init__.py b/product_pricelist_direct_print_xlsx/report/__init__.py new file mode 100644 index 00000000000..2b1303f7247 --- /dev/null +++ b/product_pricelist_direct_print_xlsx/report/__init__.py @@ -0,0 +1 @@ +from . import product_pricelist_xlsx diff --git a/product_pricelist_direct_print_xlsx/report/product_pricelist_xlsx.py b/product_pricelist_direct_print_xlsx/report/product_pricelist_xlsx.py new file mode 100644 index 00000000000..5eb9298f12d --- /dev/null +++ b/product_pricelist_direct_print_xlsx/report/product_pricelist_xlsx.py @@ -0,0 +1,141 @@ +# Copyright 2021 Tecnativa - Carlos Roca +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +from odoo import models + + +class ProductPricelistXlsx(models.AbstractModel): + _name = "report.product_pricelist_direct_print_xlsx.report" + _inherit = "report.report_xlsx.abstract" + _description = "Abstract model to export as xlsx the product pricelist" + + def _get_lang(self, user_id, lang_code=False): + if not lang_code: + lang_code = self.env["res.users"].browse(user_id).lang + return self.env["res.lang"]._lang_get(lang_code) + + def _create_product_pricelist_sheet(self, workbook, book, pricelist): + title_format = workbook.add_format( + {"bold": 1, "border": 1, "align": "left", "valign": "vjustify"} + ) + header_format = workbook.add_format( + { + "bold": 1, + "border": 1, + "align": "center", + "valign": "vjustify", + "fg_color": "#F2F2F2", + } + ) + lang = self._get_lang(book.create_uid.id, lang_code=book.lang) + date_format = lang.date_format.replace("%d", "dd") + date_format = date_format.replace("%m", "mm") + date_format = date_format.replace("%Y", "YYYY") + date_format = date_format.replace("/", "-") + date_format = workbook.add_format({"num_format": date_format}) + sheet = workbook.add_worksheet(self.env._("PRODUCTS")) + sheet.set_column("A:A", 45) + sheet.set_column("B:H", 15) + # Title construction + sheet.write("A1", self.env._("Price List Name:"), title_format) + if book.show_pricelist_name: + sheet.write("A2", pricelist.name) + else: + sheet.write("A2", self.env._("Special Pricelist")) + sheet.write("B1", self.env._("Currency:"), title_format) + sheet.write("B2", pricelist.currency_id.name) + sheet.write("D1", self.env._("Date:"), title_format) + sheet.write("D2", book.date, date_format) + # Header construction + if book.partner_id: + sheet.write(4, 0, book.partner_id.name, header_format) + elif book.partner_ids: + sheet.write(4, 0, book.partner_ids[0].name, header_format) + next_col = 0 + sheet.write(5, next_col, self.env._("Description"), header_format) + next_col = self._add_extra_header(sheet, book, next_col, header_format) + if book.show_internal_category: + next_col += 1 + sheet.write(5, next_col, self.env._("Internal Category"), header_format) + if book.show_standard_price: + next_col += 1 + sheet.write(5, next_col, self.env._("Cost Price"), header_format) + if book.show_sale_price: + next_col += 1 + sheet.write(5, next_col, self.env._("Sale Price"), header_format) + next_col += 1 + sheet.write(5, next_col, self.env._("List Price"), header_format) + if book.show_product_uom: + next_col += 1 + sheet.write(5, next_col, self.env._("UoM"), header_format) + return sheet + + def _add_extra_header(self, sheet, book, next_col, header_format): + return next_col + + def _fill_data(self, workbook, sheet, book, pricelist): + bold_format = workbook.add_format({"bold": 1}) + decimal_format = workbook.add_format({"num_format": "0.00"}) + decimal_bold_format = workbook.add_format({"num_format": "0.00", "bold": 1}) + row = 6 + formats = { + "bold_format": bold_format, + "decimal_format": decimal_format, + "decimal_bold_format": decimal_bold_format, + } + for group in book.get_groups_to_print(): + if book.breakage_per_category: + sheet.write( + row, 0, book.get_group_name(group["group_name"]), bold_format + ) + row += 1 + for product_data in group["products"]: + # Get product directly from product_data or inside as a dictionary + product = ( + product_data["product"] + if isinstance(product_data, dict) + else product_data + ) + next_col = 0 + sheet.write(row, next_col, product.display_name) + next_col = self._add_extra_info( + sheet, book, product, row, next_col, **formats + ) + if book.show_internal_category: + next_col += 1 + sheet.write(row, next_col, product.categ_id.display_name) + if book.show_standard_price: + next_col += 1 + sheet.write(row, next_col, product.standard_price, decimal_format) + if book.show_sale_price: + next_col += 1 + sheet.write(row, next_col, product.list_price, decimal_format) + next_col += 1 + sheet.write( + row, + next_col, + book.with_context(product=product).product_price, + decimal_bold_format, + ) + if book.show_product_uom: + next_col += 1 + sheet.write(row, next_col, product.uom_id.name, bold_format) + row += 1 + if book.summary: + sheet.write(row, 0, self.env._("Summary:"), bold_format) + sheet.write(row + 1, 0, book.summary) + return sheet + + def _add_extra_info(self, sheet, book, product, row, next_col, **kw): + return next_col + + def generate_xlsx_report(self, workbook, data, objects): + book = objects[0].with_context( + lang=objects[0].lang + or self.env["res.users"].browse(objects[0].create_uid.id).lang + ) + self = self.with_context( + lang=book.lang or self.env["res.users"].browse(book.create_uid.id).lang + ) + pricelist = book.get_pricelist_to_print() + sheet = self._create_product_pricelist_sheet(workbook, book, pricelist) + sheet = self._fill_data(workbook, sheet, book, pricelist) diff --git a/product_pricelist_direct_print_xlsx/report/product_pricelist_xlsx.xml b/product_pricelist_direct_print_xlsx/report/product_pricelist_xlsx.xml new file mode 100644 index 00000000000..e2c7949709f --- /dev/null +++ b/product_pricelist_direct_print_xlsx/report/product_pricelist_xlsx.xml @@ -0,0 +1,10 @@ + + + + product.pricelist.print + Product Pricelist XLSX + xlsx + product_pricelist_direct_print_xlsx.report + product_pricelist_direct_print_xlsx.report + + diff --git a/product_pricelist_direct_print_xlsx/security/ir.model.access.csv b/product_pricelist_direct_print_xlsx/security/ir.model.access.csv new file mode 100644 index 00000000000..c500110070c --- /dev/null +++ b/product_pricelist_direct_print_xlsx/security/ir.model.access.csv @@ -0,0 +1,2 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_report_product_pricelist_direct_print_xlsx_report,access_report_product_pricelist_direct_print_xlsx_report,model_report_product_pricelist_direct_print_xlsx_report,base.group_user,1,1,1,1 diff --git a/product_pricelist_direct_print_xlsx/static/description/icon.png b/product_pricelist_direct_print_xlsx/static/description/icon.png new file mode 100644 index 00000000000..3a0328b516c Binary files /dev/null and b/product_pricelist_direct_print_xlsx/static/description/icon.png differ diff --git a/product_pricelist_direct_print_xlsx/static/description/index.html b/product_pricelist_direct_print_xlsx/static/description/index.html new file mode 100644 index 00000000000..dd4f4468afe --- /dev/null +++ b/product_pricelist_direct_print_xlsx/static/description/index.html @@ -0,0 +1,448 @@ + + + + + +README.rst + + + +
+ + + +Odoo Community Association + +
+

Product Pricelist Direct Print (XLSX)

+ +

Beta License: AGPL-3 OCA/product-attribute Translate me on Weblate Try me on Runboat

+

This module is based on the OCA module +product_pricelist_direct_print and add the possibility to export +price list in XLSX format.

+

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 to smash it by providing a detailed and welcomed +feedback.

+

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

+
+
+

Credits

+
+

Authors

+
    +
  • Tecnativa
  • +
  • GRAP
  • +
+
+
+

Contributors

+ +
+
+

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/product-attribute project on GitHub.

+

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

+
+
+
+
+ + diff --git a/product_pricelist_direct_print_xlsx/tests/__init__.py b/product_pricelist_direct_print_xlsx/tests/__init__.py new file mode 100644 index 00000000000..3c3fe724308 --- /dev/null +++ b/product_pricelist_direct_print_xlsx/tests/__init__.py @@ -0,0 +1 @@ +from . import test_product_pricelist_direct_print_xlsx diff --git a/product_pricelist_direct_print_xlsx/tests/test_product_pricelist_direct_print_xlsx.py b/product_pricelist_direct_print_xlsx/tests/test_product_pricelist_direct_print_xlsx.py new file mode 100644 index 00000000000..d4c0d1782d7 --- /dev/null +++ b/product_pricelist_direct_print_xlsx/tests/test_product_pricelist_direct_print_xlsx.py @@ -0,0 +1,40 @@ +# Copyright 2017 Carlos Dauden +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). +from odoo.tests.common import tagged + +from odoo.addons.base.tests.common import BaseCommon + + +@tagged("post_install", "-at_install") +class TestProductPricelistDirectPrintXLSX(BaseCommon): + @classmethod + def setUpClass(cls): + super().setUpClass() + cls.pricelist = cls.env["product.pricelist"].create( + { + "name": "Pricelist for test", + "item_ids": [ + ( + 0, + 0, + { + "applied_on": "3_global", + "percent_price": 5.00, + "compute_price": "percentage", + }, + ) + ], + } + ) + cls.wiz_obj = cls.env["product.pricelist.print"] + + def test_report(self): + wiz = self.wiz_obj.with_context( + active_model="product.pricelist", + active_id=self.pricelist.id, + ).create({}) + report_xlsx = self.env["ir.actions.report"]._render( + "product_pricelist_direct_print_xlsx.report", wiz.ids + ) + self.assertGreaterEqual(len(report_xlsx[0]), 1) + self.assertEqual(report_xlsx[1], "xlsx") diff --git a/product_pricelist_direct_print_xlsx/wizards/__init__.py b/product_pricelist_direct_print_xlsx/wizards/__init__.py new file mode 100644 index 00000000000..dfc9a481f01 --- /dev/null +++ b/product_pricelist_direct_print_xlsx/wizards/__init__.py @@ -0,0 +1 @@ +from . import product_pricelist_print diff --git a/product_pricelist_direct_print_xlsx/wizards/product_pricelist_print.py b/product_pricelist_direct_print_xlsx/wizards/product_pricelist_print.py new file mode 100644 index 00000000000..a90c0f2f39a --- /dev/null +++ b/product_pricelist_direct_print_xlsx/wizards/product_pricelist_print.py @@ -0,0 +1,18 @@ +# Copyright 2017 Tecnativa - Carlos Dauden +# Copyright 2018 Tecnativa - David Vidal +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + + +from odoo import fields, models + + +class ProductPricelistPrint(models.TransientModel): + _inherit = "product.pricelist.print" + + show_internal_category = fields.Boolean(string="Show internal categories") + + def export_xlsx(self): + self.ensure_one() + return self.env.ref("product_pricelist_direct_print_xlsx.report").report_action( + self + ) diff --git a/product_pricelist_direct_print_xlsx/wizards/product_pricelist_print_view.xml b/product_pricelist_direct_print_xlsx/wizards/product_pricelist_print_view.xml new file mode 100644 index 00000000000..2b421559e4a --- /dev/null +++ b/product_pricelist_direct_print_xlsx/wizards/product_pricelist_print_view.xml @@ -0,0 +1,32 @@ + + + + + product.pricelist.print + + + + + + + + + + + + +