diff --git a/product_pack/README.rst b/product_pack/README.rst new file mode 100644 index 00000000..767cb24a --- /dev/null +++ b/product_pack/README.rst @@ -0,0 +1,140 @@ +============ +Product Pack +============ + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! 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%2Fproduct--pack-lightgray.png?logo=github + :target: https://github.com/OCA/product-pack/tree/15.0/product_pack + :alt: OCA/product-pack +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/product-pack-15-0/product-pack-15-0-product_pack + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/286/15.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module allows you to define a product as a *Product Pack*. Each +*Product Pack* has a list of products that are part of this pack. + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +To use this module, you need to: + +#. Go to *Sales > Products > Products*, create a product and set "Is Pack?". +#. Set *Pack Type* and *Pack component price*. +#. Then choose the products to include in the pack. + +`Product pack` is a base module for `sale_product_pack` and other modules that +needs to use packs. `Pack type` and `Pack component price` are used to define +the behavior that the packs will have when it is selected in the sales order +lines (if `sale_product_pack` module is installed). +The options of this field are the followings: + +`Pack type`: + + * Detailed: It allows you to select an option defined in + `Pack component price` field. + * Non Detailed: Will not show the components information, + only the pack product and the price will be the its price plus the sum of + all the components prices. + +`Pack component price`: + + * Detailed per component: will show each components and its prices, + including the pack product itself with its price. + * Totalized in main product: will show each component but will not show + components prices. The pack product will be the only one that has price + and this one will be its price plus the sum of all the components prices. + * Ignored: will show each components but will not show + components prices. The pack product will be the only one that has price + and this one will be the price set in the pack product. + +Known issues / Roadmap +====================== + +* It could add another *Pack Type* called maybe *merged* in *Packs*, in which + the calculation of the related sale order line *Unit Price* is equal to + *main product Pack price* + *sum of all its component* +* Make *product.pack.line* multi-company + +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 +~~~~~~~ + +* NaN·tic +* ADHOC SA +* Tecnativa + +Contributors +~~~~~~~~~~~~ + +* `ADHOC SA `_: + + * Juan José Scarafía + * Nicolas Mac Rouillon + * Katherine Zaoral +* `NaN·TIC `_ +* `Tecnativa `_: + + * Ernesto Tejeda + * Pedro M. Baeza + * Jairo Llopis + * Sergio Teruel +* `Sygel `_: + + * Manuel Regidor + +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. + +.. |maintainer-ernestotejeda| image:: https://github.com/ernestotejeda.png?size=40px + :target: https://github.com/ernestotejeda + :alt: ernestotejeda + +Current `maintainer `__: + +|maintainer-ernestotejeda| + +This module is part of the `OCA/product-pack `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/product_pack/__init__.py b/product_pack/__init__.py new file mode 100644 index 00000000..cb45f271 --- /dev/null +++ b/product_pack/__init__.py @@ -0,0 +1,2 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +from . import models diff --git a/product_pack/__manifest__.py b/product_pack/__manifest__.py new file mode 100644 index 00000000..2798db26 --- /dev/null +++ b/product_pack/__manifest__.py @@ -0,0 +1,23 @@ +# Copyright 2019 NaN (http://www.nan-tic.com) - Àngel Àlvarez +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +{ + "name": "Product Pack", + "version": "16.0.1.0.0", + "category": "Product", + "summary": "This module allows you to set a product as a Pack", + "website": "https://github.com/OCA/product-pack", + "author": "NaN·tic, ADHOC SA, Tecnativa, Odoo Community Association (OCA)", + "maintainers": ["ernestotejeda"], + "license": "AGPL-3", + "depends": ["product"], + "data": [ + "security/ir.model.access.csv", + "views/product_pack_line_views.xml", + "views/product_template_views.xml", + "views/product_product_views.xml", + ], + "demo": ["demo/product_product_demo.xml", "demo/product_pack_line_demo.xml"], + "installable": True, + "auto_install": False, + "application": False, +} diff --git a/product_pack/demo/product_pack_line_demo.xml b/product_pack/demo/product_pack_line_demo.xml new file mode 100644 index 00000000..ed0df2ae --- /dev/null +++ b/product_pack/demo/product_pack_line_demo.xml @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/product_pack/demo/product_product_demo.xml b/product_pack/demo/product_product_demo.xml new file mode 100644 index 00000000..210304fe --- /dev/null +++ b/product_pack/demo/product_product_demo.xml @@ -0,0 +1,74 @@ + + + + + Pack CPU (Detailed - Displayed Components Price) + + + detailed + detailed + 20.5 + 30.75 + service + + + Pack CPU (Detailed - Totalized Components Price) + + + detailed + totalized + 20.5 + 30.75 + service + + + Pack CPU (Detailed - Ignored Components Price) + + + detailed + ignored + 20.5 + 30.75 + service + + + Pack CPU (Non Detailed - Totalized Components Price) + + + non_detailed + 20.5 + 30.75 + service + + + Pack PC (Detailed - Displayed Components Price) + + + detailed + detailed + 20.5 + 30.75 + service + + + Pack PC (Detailed - Totalized Components Price) + + + detailed + totalized + 20.5 + 30.75 + service + + + Pack PC (Detailed - Ignored Components Price) + + + detailed + ignored + 20.5 + 30.75 + service + + diff --git a/product_pack/i18n/ca.po b/product_pack/i18n/ca.po new file mode 100644 index 00000000..2fdeb98d --- /dev/null +++ b/product_pack/i18n/ca.po @@ -0,0 +1,330 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_pack +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2022-02-28 13:17+0000\n" +"Last-Translator: Noel estudillo \n" +"Language-Team: none\n" +"Language: ca\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.3.2\n" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line__create_uid +msgid "Created by" +msgstr "Creat per" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line__create_date +msgid "Created on" +msgstr "Creat el" + +#. module: product_pack +#: model:ir.model.fields.selection,name:product_pack.selection__product_template__pack_type__detailed +msgid "Detailed" +msgstr "Detallat" + +#. module: product_pack +#: model:ir.model.fields.selection,name:product_pack.selection__product_template__pack_component_price__detailed +msgid "Detailed per component" +msgstr "Detallat per component" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line__display_name +#: model:ir.model.fields,field_description:product_pack.field_product_product__display_name +#: model:ir.model.fields,field_description:product_pack.field_product_template__display_name +msgid "Display Name" +msgstr "Nom visualitzat" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_product__used_in_pack_line_ids +#: model:ir.model.fields,field_description:product_pack.field_product_template__used_in_pack_line_ids +msgid "Found in packs" +msgstr "Es troba en packs" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line__id +#: model:ir.model.fields,field_description:product_pack.field_product_product__id +#: model:ir.model.fields,field_description:product_pack.field_product_template__id +msgid "ID" +msgstr "ID (identificació)" + +#. module: product_pack +#: model:ir.model.fields,help:product_pack.field_product_product__pack_modifiable +#: model:ir.model.fields,help:product_pack.field_product_template__pack_modifiable +msgid "" +"If you check this field yo will be able to edit sale/purchase order line " +"relate to its component" +msgstr "" +"Si marqueu aquest camp, podreu editar la línia de comanda / compra " +"relacionada amb el seu component" + +#. module: product_pack +#: model:ir.model.fields.selection,name:product_pack.selection__product_template__pack_component_price__ignored +msgid "Ignored" +msgstr "Ignorat" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_product__pack_ok +#: model:ir.model.fields,field_description:product_pack.field_product_template__pack_ok +msgid "Is Pack?" +msgstr "Es un Pack?" + +#. module: product_pack +#: model:ir.model.fields,help:product_pack.field_product_product__pack_ok +#: model:ir.model.fields,help:product_pack.field_product_template__pack_ok +msgid "Is a Product Pack?" +msgstr "¿Es un Pack de Producte?" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line____last_update +#: model:ir.model.fields,field_description:product_pack.field_product_product____last_update +#: model:ir.model.fields,field_description:product_pack.field_product_template____last_update +msgid "Last Modified on" +msgstr "Última modificació el" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line__write_uid +msgid "Last Updated by" +msgstr "Darrera actualització de" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line__write_date +msgid "Last Updated on" +msgstr "Darrera actualització el" + +#. module: product_pack +#: model:ir.model.fields.selection,name:product_pack.selection__product_template__pack_type__non_detailed +msgid "Non Detailed" +msgstr "No detallat" + +#. module: product_pack +#: model:ir.model.fields,help:product_pack.field_product_product__pack_component_price +#: model:ir.model.fields,help:product_pack.field_product_template__pack_component_price +msgid "" +"On sale orders or purchase orders:\n" +"* Detailed per component: Detail lines with prices.\n" +"* Totalized in main product: Detail lines merging lines prices on pack " +"(don't show component prices).\n" +"* Ignored: Use product pack price (ignore detail line prices)." +msgstr "" +"A les comandes de venda o comandes de compra:\n" +"* Detallat per component: Línies de detall amb preus.\n" +"* Totalitzat en el producte principal: Detalla les línies fusionant els " +"preus de les línies en el Pack (no mostren els preus dels components).\n" +"* Ignorat: utilitza el preu del Pack de producte (ignora els preus de la " +"línia de detalls)." + +#. module: product_pack +#: model:ir.model.fields,help:product_pack.field_product_product__pack_type +#: model:ir.model.fields,help:product_pack.field_product_template__pack_type +msgid "" +"On sale orders or purchase orders:\n" +"* Detailed: Display components individually in the sale order.\n" +"* Non Detailed: Do not display components individually in the sale order." +msgstr "" +"En ordres de venda o ordres de compra:\n" +"* Detallat: Mostra els components individualment en línies de la comanda de " +"venda / Comanda de compra.\n" +"* No Detallat: No mostra els components individualment en línies de la " +"comanda de Venda / Comanda de Compra." + +#. module: product_pack +#: model_terms:ir.ui.view,arch_db:product_pack.product_template_form_view +msgid "Pack" +msgstr "Pack" + +#. module: product_pack +#: model:product.product,name:product_pack.product_pack_cpu_detailed_components +#: model:product.template,name:product_pack.product_pack_cpu_detailed_components_product_template +msgid "Pack CPU (Detailed - Displayed Components Price)" +msgstr "Pack CPU (Detallat - Preu dels Components Mostrat)" + +#. module: product_pack +#: model:product.product,name:product_pack.product_pack_cpu_detailed_ignored +#: model:product.template,name:product_pack.product_pack_cpu_detailed_ignored_product_template +msgid "Pack CPU (Detailed - Ignored Components Price)" +msgstr "Pack CPU (Detallat - Preu dels Components Ignorat)" + +#. module: product_pack +#: model:product.product,name:product_pack.product_pack_cpu_detailed_totalized +#: model:product.template,name:product_pack.product_pack_cpu_detailed_totalized_product_template +msgid "Pack CPU (Detailed - Totalized Components Price)" +msgstr "Pack CPU (Detallat - Preu dels Components Totalitzat)" + +#. module: product_pack +#: model:product.product,name:product_pack.product_pack_cpu_non_detailed +#: model:product.template,name:product_pack.product_pack_cpu_non_detailed_product_template +msgid "Pack CPU (Non Detailed - Totalized Components Price)" +msgstr "Pack CPU (No Detallat - Preu dels Components Totalitzat)" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_product__pack_type +#: model:ir.model.fields,field_description:product_pack.field_product_template__pack_type +msgid "Pack Display Type" +msgstr "Tipus de pantalla de paquet" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_product__pack_modifiable +#: model:ir.model.fields,field_description:product_pack.field_product_template__pack_modifiable +msgid "Pack Modifiable" +msgstr "Pack modificable" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_product__pack_modifiable_invisible +#: model:ir.model.fields,field_description:product_pack.field_product_template__pack_modifiable_invisible +msgid "Pack Modifiable Invisible" +msgstr "" + +#. module: product_pack +#: model:product.product,name:product_pack.product_pack_pc_detailed_components +#: model:product.template,name:product_pack.product_pack_pc_detailed_components_product_template +msgid "Pack PC (Detailed - Displayed Components Price)" +msgstr "Pack PC (Detallat - Preu dels Components Mostrat)" + +#. module: product_pack +#: model:product.product,name:product_pack.product_pack_pc_detailed_ignored +#: model:product.template,name:product_pack.product_pack_pc_detailed_ignored_product_template +msgid "Pack PC (Detailed - Ignored Components Price)" +msgstr "Pack PC (Detallat - Preu dels Components Ignorat)" + +#. module: product_pack +#: model:product.product,name:product_pack.product_pack_pc_detailed_totalized +#: model:product.template,name:product_pack.product_pack_pc_detailed_totalized_product_template +msgid "Pack PC (Detailed - Totalized Components Price)" +msgstr "Pack PC (Detallat - Preu dels Components Totalitzat)" + +#. module: product_pack +#: model_terms:ir.ui.view,arch_db:product_pack.product_pack_line_form +msgid "Pack Product Line" +msgstr "Línia de producte pack" + +#. module: product_pack +#: model_terms:ir.ui.view,arch_db:product_pack.product_pack_line_tree +msgid "Pack Product Lines" +msgstr "Línies del producte pack" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_product__pack_line_ids +#: model:ir.model.fields,field_description:product_pack.field_product_template__pack_line_ids +#: model_terms:ir.ui.view,arch_db:product_pack.nan_product_pack_form +#: model_terms:ir.ui.view,arch_db:product_pack.product_template_only_form_view +msgid "Pack Products" +msgstr "Productes del pack" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_product__pack_component_price +#: model:ir.model.fields,field_description:product_pack.field_product_template__pack_component_price +msgid "Pack component price" +msgstr "Preu dels components" + +#. module: product_pack +#: code:addons/product_pack/models/product_template.py:0 +#, python-format +msgid "" +"Pack lines products company must be the same as the parent product company" +msgstr "" +"Les línies dels Packs de productes de la companyia han de ser les mateixes " +"que el producte pare de la companyia" + +#. module: product_pack +#: model:ir.model.fields,help:product_pack.field_product_product__used_in_pack_line_ids +#: model:ir.model.fields,help:product_pack.field_product_template__used_in_pack_line_ids +msgid "Packs where product is used." +msgstr "Packs on el producte és utilitzat." + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line__parent_product_id +msgid "Parent Product" +msgstr "Producte pare" + +#. module: product_pack +#: model:ir.model,name:product_pack.model_product_product +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line__product_id +msgid "Product" +msgstr "Producte" + +#. module: product_pack +#: model:ir.model,name:product_pack.model_product_template +msgid "Product Template" +msgstr "Plantilla de producte" + +#. module: product_pack +#: model:ir.model.constraint,message:product_pack.constraint_product_pack_line_product_uniq +msgid "Product must be only once on a pack!" +msgstr "¡El producte ha d'estar només una vegada en un pack!" + +#. module: product_pack +#: model:ir.model,name:product_pack.model_product_pack_line +msgid "Product pack line" +msgstr "Línia de pack" + +#. module: product_pack +#: model:ir.model.fields,help:product_pack.field_product_product__pack_line_ids +#: model:ir.model.fields,help:product_pack.field_product_template__pack_line_ids +msgid "Products that are part of this pack." +msgstr "Productes que formen part del pack." + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line__quantity +msgid "Quantity" +msgstr "Quantitat" + +#. module: product_pack +#: model:ir.model.fields,help:product_pack.field_product_product__pack_modifiable_invisible +#: model:ir.model.fields,help:product_pack.field_product_template__pack_modifiable_invisible +msgid "" +"Technical field in order to compute the availability of the Pack Modifiable " +"field" +msgstr "" + +#. module: product_pack +#: model:ir.model.fields.selection,name:product_pack.selection__product_template__pack_component_price__totalized +msgid "Totalized in main product" +msgstr "Totalitzat en el producte principal" + +#. module: product_pack +#: model:product.product,uom_name:product_pack.product_pack_cpu_detailed_components +#: model:product.product,uom_name:product_pack.product_pack_cpu_detailed_ignored +#: model:product.product,uom_name:product_pack.product_pack_cpu_detailed_totalized +#: model:product.product,uom_name:product_pack.product_pack_cpu_non_detailed +#: model:product.product,uom_name:product_pack.product_pack_pc_detailed_components +#: model:product.product,uom_name:product_pack.product_pack_pc_detailed_ignored +#: model:product.product,uom_name:product_pack.product_pack_pc_detailed_totalized +#: model:product.template,uom_name:product_pack.product_pack_cpu_detailed_components_product_template +#: model:product.template,uom_name:product_pack.product_pack_cpu_detailed_ignored_product_template +#: model:product.template,uom_name:product_pack.product_pack_cpu_detailed_totalized_product_template +#: model:product.template,uom_name:product_pack.product_pack_cpu_non_detailed_product_template +#: model:product.template,uom_name:product_pack.product_pack_pc_detailed_components_product_template +#: model:product.template,uom_name:product_pack.product_pack_pc_detailed_ignored_product_template +#: model:product.template,uom_name:product_pack.product_pack_pc_detailed_totalized_product_template +msgid "Units" +msgstr "Unitats" + +#. module: product_pack +#: code:addons/product_pack/models/product_pack_line.py:0 +#, python-format +msgid "" +"You cannot set recursive packs.\n" +"Product id: %s" +msgstr "" +"No pot establir packs recursius.\n" +"ID del producte:%s" + +#. module: product_pack +#: model_terms:ir.ui.view,arch_db:product_pack.product_template_only_form_view +msgid "You must save first to add pack lines" +msgstr "Ha de guardar primer per afegir línies de pack" + +#~ msgid "Pack Type" +#~ msgstr "Tipus de Pack" + +#~ msgid "kg" +#~ msgstr "kg" diff --git a/product_pack/i18n/es.po b/product_pack/i18n/es.po new file mode 100644 index 00000000..cc904d25 --- /dev/null +++ b/product_pack/i18n/es.po @@ -0,0 +1,342 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_pack +# +# Translators: +# Juan José Scarafía , 2019 +# Gonzalo Ruzafa , 2019 +# emiquinodoz , 2019 +# Julián García , 2019 +# Valentino Defelice , 2019 +# Santiago Crespo , 2019 +# Mariana Luz Torres , 2019 +# Nicolas Mac Rouillon , 2019 +# Katherine Zaoral , 2019 +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2019-09-30 16:02+0000\n" +"PO-Revision-Date: 2019-09-30 16:02+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line__create_uid +msgid "Created by" +msgstr "Creado por" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line__create_date +msgid "Created on" +msgstr "Creado el" + +#. module: product_pack +#: model:ir.model.fields.selection,name:product_pack.selection__product_template__pack_type__detailed +msgid "Detailed" +msgstr "Detallado" + +#. module: product_pack +#: model:ir.model.fields.selection,name:product_pack.selection__product_template__pack_component_price__detailed +msgid "Detailed per component" +msgstr "Detallado por componente" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line__display_name +#: model:ir.model.fields,field_description:product_pack.field_product_product__display_name +#: model:ir.model.fields,field_description:product_pack.field_product_template__display_name +msgid "Display Name" +msgstr "Nombre mostrado" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_product__used_in_pack_line_ids +#: model:ir.model.fields,field_description:product_pack.field_product_template__used_in_pack_line_ids +msgid "Found in packs" +msgstr "Encontrado en Packs" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line__id +#: model:ir.model.fields,field_description:product_pack.field_product_product__id +#: model:ir.model.fields,field_description:product_pack.field_product_template__id +msgid "ID" +msgstr "ID (identificación)" + +#. module: product_pack +#: model:ir.model.fields,help:product_pack.field_product_product__pack_modifiable +#: model:ir.model.fields,help:product_pack.field_product_template__pack_modifiable +msgid "" +"If you check this field yo will be able to edit sale/purchase order line " +"relate to its component" +msgstr "" +"Si marca esta casilla serás capaz de editar las lineas de órdenes de venta/" +"compra relativas a sus componentes" + +#. module: product_pack +#: model:ir.model.fields.selection,name:product_pack.selection__product_template__pack_component_price__ignored +msgid "Ignored" +msgstr "Ignorado" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_product__pack_ok +#: model:ir.model.fields,field_description:product_pack.field_product_template__pack_ok +msgid "Is Pack?" +msgstr "Es un Pack?" + +#. module: product_pack +#: model:ir.model.fields,help:product_pack.field_product_product__pack_ok +#: model:ir.model.fields,help:product_pack.field_product_template__pack_ok +msgid "Is a Product Pack?" +msgstr "¿Es un Pack de Producto?" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line____last_update +#: model:ir.model.fields,field_description:product_pack.field_product_product____last_update +#: model:ir.model.fields,field_description:product_pack.field_product_template____last_update +msgid "Last Modified on" +msgstr "Última modificación en" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line__write_uid +msgid "Last Updated by" +msgstr "Última actualización por" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line__write_date +msgid "Last Updated on" +msgstr "Última actualización el" + +#. module: product_pack +#: model:ir.model.fields.selection,name:product_pack.selection__product_template__pack_type__non_detailed +msgid "Non Detailed" +msgstr "No detallado" + +#. module: product_pack +#: model:ir.model.fields,help:product_pack.field_product_product__pack_component_price +#: model:ir.model.fields,help:product_pack.field_product_template__pack_component_price +msgid "" +"On sale orders or purchase orders:\n" +"* Detailed per component: Detail lines with prices.\n" +"* Totalized in main product: Detail lines merging lines prices on pack " +"(don't show component prices).\n" +"* Ignored: Use product pack price (ignore detail line prices)." +msgstr "" +"En órdenes de venta u órdenes de compra:\n" +"* Detallado por componente: Detalla las lineas con precios.\n" +"* Totalizado en el producto principal: Detalla las lineas mezclando sus " +"precios en el Pack (No muestra los precios de los componentes).\n" +"* Ignorado: Se usa el precio el Pack (los precios de las lineas son " +"ignorados)." + +#. module: product_pack +#: model:ir.model.fields,help:product_pack.field_product_product__pack_type +#: model:ir.model.fields,help:product_pack.field_product_template__pack_type +msgid "" +"On sale orders or purchase orders:\n" +"* Detailed: Display components individually in the sale order.\n" +"* Non Detailed: Do not display components individually in the sale order." +msgstr "" +"En órdenes de venta u órdenes de compra:\n" +"* Detallado: Muestra los componentes individualmente en lineas de la Orden " +"de Venta/Orden de Compra\n" +"* No Detallado: No muestra los componentes individualmente en lineas de la " +"Orden de Venta/Orden de Compra" + +#. module: product_pack +#: model_terms:ir.ui.view,arch_db:product_pack.product_template_form_view +msgid "Pack" +msgstr "Pack" + +#. module: product_pack +#: model:product.product,name:product_pack.product_pack_cpu_detailed_components +#: model:product.template,name:product_pack.product_pack_cpu_detailed_components_product_template +msgid "Pack CPU (Detailed - Displayed Components Price)" +msgstr "Pack CPU (Detallado - Precio de los Componentes Mostrado)" + +#. module: product_pack +#: model:product.product,name:product_pack.product_pack_cpu_detailed_ignored +#: model:product.template,name:product_pack.product_pack_cpu_detailed_ignored_product_template +msgid "Pack CPU (Detailed - Ignored Components Price)" +msgstr "Pack CPU (Detallado - Precio de los Componentes Ignorado)" + +#. module: product_pack +#: model:product.product,name:product_pack.product_pack_cpu_detailed_totalized +#: model:product.template,name:product_pack.product_pack_cpu_detailed_totalized_product_template +msgid "Pack CPU (Detailed - Totalized Components Price)" +msgstr "Pack CPU (Detallado - Precio de los Componentes Totalizado)" + +#. module: product_pack +#: model:product.product,name:product_pack.product_pack_cpu_non_detailed +#: model:product.template,name:product_pack.product_pack_cpu_non_detailed_product_template +msgid "Pack CPU (Non Detailed - Totalized Components Price)" +msgstr "Pack CPU (No Detallado - Precio de los Componentes Totalizado)" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_product__pack_type +#: model:ir.model.fields,field_description:product_pack.field_product_template__pack_type +msgid "Pack Display Type" +msgstr "" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_product__pack_modifiable +#: model:ir.model.fields,field_description:product_pack.field_product_template__pack_modifiable +msgid "Pack Modifiable" +msgstr "Pack modificable" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_product__pack_modifiable_invisible +#: model:ir.model.fields,field_description:product_pack.field_product_template__pack_modifiable_invisible +msgid "Pack Modifiable Invisible" +msgstr "" + +#. module: product_pack +#: model:product.product,name:product_pack.product_pack_pc_detailed_components +#: model:product.template,name:product_pack.product_pack_pc_detailed_components_product_template +msgid "Pack PC (Detailed - Displayed Components Price)" +msgstr "Pack PC (Detallado - Precio de los Componentes Mostrado)" + +#. module: product_pack +#: model:product.product,name:product_pack.product_pack_pc_detailed_ignored +#: model:product.template,name:product_pack.product_pack_pc_detailed_ignored_product_template +msgid "Pack PC (Detailed - Ignored Components Price)" +msgstr "Pack PC (Detallado - Precio de los Componentes Ignorado)" + +#. module: product_pack +#: model:product.product,name:product_pack.product_pack_pc_detailed_totalized +#: model:product.template,name:product_pack.product_pack_pc_detailed_totalized_product_template +msgid "Pack PC (Detailed - Totalized Components Price)" +msgstr "Pack PC (Detallado - Precio de los Componentes Totalizado)" + +#. module: product_pack +#: model_terms:ir.ui.view,arch_db:product_pack.product_pack_line_form +msgid "Pack Product Line" +msgstr "Linea de producto pack" + +#. module: product_pack +#: model_terms:ir.ui.view,arch_db:product_pack.product_pack_line_tree +msgid "Pack Product Lines" +msgstr "Lineas del producto pack" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_product__pack_line_ids +#: model:ir.model.fields,field_description:product_pack.field_product_template__pack_line_ids +#: model_terms:ir.ui.view,arch_db:product_pack.nan_product_pack_form +#: model_terms:ir.ui.view,arch_db:product_pack.product_template_only_form_view +msgid "Pack Products" +msgstr "Productos del pack" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_product__pack_component_price +#: model:ir.model.fields,field_description:product_pack.field_product_template__pack_component_price +msgid "Pack component price" +msgstr "Precio de los componentes" + +#. module: product_pack +#: code:addons/product_pack/models/product_template.py:0 +#, python-format +msgid "" +"Pack lines products company must be the same as the parent product company" +msgstr "" +"Las líneas de los Packs de productos de la compañía deben ser las mismas que " +"el producto padre de la compañía." + +#. module: product_pack +#: model:ir.model.fields,help:product_pack.field_product_product__used_in_pack_line_ids +#: model:ir.model.fields,help:product_pack.field_product_template__used_in_pack_line_ids +msgid "Packs where product is used." +msgstr "Packs donde el producto es utilizado" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line__parent_product_id +msgid "Parent Product" +msgstr "Producto padre" + +#. module: product_pack +#: model:ir.model,name:product_pack.model_product_product +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line__product_id +msgid "Product" +msgstr "Producto" + +#. module: product_pack +#: model:ir.model,name:product_pack.model_product_template +msgid "Product Template" +msgstr "Plantilla de producto" + +#. module: product_pack +#: model:ir.model.constraint,message:product_pack.constraint_product_pack_line_product_uniq +msgid "Product must be only once on a pack!" +msgstr "¡El producto debe estar solo una vez en un pack!" + +#. module: product_pack +#: model:ir.model,name:product_pack.model_product_pack_line +msgid "Product pack line" +msgstr "Linea de pack" + +#. module: product_pack +#: model:ir.model.fields,help:product_pack.field_product_product__pack_line_ids +#: model:ir.model.fields,help:product_pack.field_product_template__pack_line_ids +msgid "Products that are part of this pack." +msgstr "Productos que forman parte del pack" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line__quantity +msgid "Quantity" +msgstr "Cantidad" + +#. module: product_pack +#: model:ir.model.fields,help:product_pack.field_product_product__pack_modifiable_invisible +#: model:ir.model.fields,help:product_pack.field_product_template__pack_modifiable_invisible +msgid "" +"Technical field in order to compute the availability of the Pack Modifiable " +"field" +msgstr "" + +#. module: product_pack +#: model:ir.model.fields.selection,name:product_pack.selection__product_template__pack_component_price__totalized +msgid "Totalized in main product" +msgstr "Totalizado en el producto principal" + +#. module: product_pack +#: model:product.product,uom_name:product_pack.product_pack_cpu_detailed_components +#: model:product.product,uom_name:product_pack.product_pack_cpu_detailed_ignored +#: model:product.product,uom_name:product_pack.product_pack_cpu_detailed_totalized +#: model:product.product,uom_name:product_pack.product_pack_cpu_non_detailed +#: model:product.product,uom_name:product_pack.product_pack_pc_detailed_components +#: model:product.product,uom_name:product_pack.product_pack_pc_detailed_ignored +#: model:product.product,uom_name:product_pack.product_pack_pc_detailed_totalized +#: model:product.template,uom_name:product_pack.product_pack_cpu_detailed_components_product_template +#: model:product.template,uom_name:product_pack.product_pack_cpu_detailed_ignored_product_template +#: model:product.template,uom_name:product_pack.product_pack_cpu_detailed_totalized_product_template +#: model:product.template,uom_name:product_pack.product_pack_cpu_non_detailed_product_template +#: model:product.template,uom_name:product_pack.product_pack_pc_detailed_components_product_template +#: model:product.template,uom_name:product_pack.product_pack_pc_detailed_ignored_product_template +#: model:product.template,uom_name:product_pack.product_pack_pc_detailed_totalized_product_template +#, fuzzy +msgid "Units" +msgstr "Unidad(es)" + +#. module: product_pack +#: code:addons/product_pack/models/product_pack_line.py:0 +#, python-format +msgid "" +"You cannot set recursive packs.\n" +"Product id: %s" +msgstr "" +"No puede establecer packs recursivos.\n" +"ID del producto: %s" + +#. module: product_pack +#: model_terms:ir.ui.view,arch_db:product_pack.product_template_only_form_view +msgid "You must save first to add pack lines" +msgstr "Debe guardar primero para agregar líneas de paquete" + +#~ msgid "Pack Type" +#~ msgstr "Tipo de Pack" + +#~ msgid "kg" +#~ msgstr "kg" diff --git a/product_pack/i18n/fr.po b/product_pack/i18n/fr.po new file mode 100644 index 00000000..e5bb82b3 --- /dev/null +++ b/product_pack/i18n/fr.po @@ -0,0 +1,329 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_pack +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2020-05-28 12:19+0000\n" +"Last-Translator: Yann Papouin \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 3.10\n" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line__create_uid +msgid "Created by" +msgstr "Créé par" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line__create_date +msgid "Created on" +msgstr "Créé le" + +#. module: product_pack +#: model:ir.model.fields.selection,name:product_pack.selection__product_template__pack_type__detailed +msgid "Detailed" +msgstr "Détaillé" + +#. module: product_pack +#: model:ir.model.fields.selection,name:product_pack.selection__product_template__pack_component_price__detailed +msgid "Detailed per component" +msgstr "Détaillé par composant" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line__display_name +#: model:ir.model.fields,field_description:product_pack.field_product_product__display_name +#: model:ir.model.fields,field_description:product_pack.field_product_template__display_name +msgid "Display Name" +msgstr "Nom affiché" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_product__used_in_pack_line_ids +#: model:ir.model.fields,field_description:product_pack.field_product_template__used_in_pack_line_ids +msgid "Found in packs" +msgstr "Trouvé dans des packs" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line__id +#: model:ir.model.fields,field_description:product_pack.field_product_product__id +#: model:ir.model.fields,field_description:product_pack.field_product_template__id +msgid "ID" +msgstr "ID" + +#. module: product_pack +#: model:ir.model.fields,help:product_pack.field_product_product__pack_modifiable +#: model:ir.model.fields,help:product_pack.field_product_template__pack_modifiable +msgid "" +"If you check this field yo will be able to edit sale/purchase order line " +"relate to its component" +msgstr "" +"Si vous cochez ce champ, vous pourrez modifier la ligne de commande de " +"vente / d'achat relative à son composant" + +#. module: product_pack +#: model:ir.model.fields.selection,name:product_pack.selection__product_template__pack_component_price__ignored +msgid "Ignored" +msgstr "Ignoré" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_product__pack_ok +#: model:ir.model.fields,field_description:product_pack.field_product_template__pack_ok +msgid "Is Pack?" +msgstr "Est un pack ?" + +#. module: product_pack +#: model:ir.model.fields,help:product_pack.field_product_product__pack_ok +#: model:ir.model.fields,help:product_pack.field_product_template__pack_ok +msgid "Is a Product Pack?" +msgstr "Est un pack d'article ?" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line____last_update +#: model:ir.model.fields,field_description:product_pack.field_product_product____last_update +#: model:ir.model.fields,field_description:product_pack.field_product_template____last_update +msgid "Last Modified on" +msgstr "Dernière modification le" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line__write_uid +msgid "Last Updated by" +msgstr "Dernière mise à jour par" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line__write_date +msgid "Last Updated on" +msgstr "Dernière mise à jour le" + +#. module: product_pack +#: model:ir.model.fields.selection,name:product_pack.selection__product_template__pack_type__non_detailed +msgid "Non Detailed" +msgstr "Non détaillé" + +#. module: product_pack +#: model:ir.model.fields,help:product_pack.field_product_product__pack_component_price +#: model:ir.model.fields,help:product_pack.field_product_template__pack_component_price +msgid "" +"On sale orders or purchase orders:\n" +"* Detailed per component: Detail lines with prices.\n" +"* Totalized in main product: Detail lines merging lines prices on pack " +"(don't show component prices).\n" +"* Ignored: Use product pack price (ignore detail line prices)." +msgstr "" +"Sur les commandes clients ou fournisseurs :\n" +"* Détaillé par composant : lignes détaillées avec prix.\n" +"* Totalisé dans l'article principal : lignes détaillées mais le prix est " +"additionné sur celui du pack (n'affiche pas les prix par composant).\n" +"* Ignoré : utilise le prix du pack d'articles (ignore les prix des " +"composants)." + +#. module: product_pack +#: model:ir.model.fields,help:product_pack.field_product_product__pack_type +#: model:ir.model.fields,help:product_pack.field_product_template__pack_type +msgid "" +"On sale orders or purchase orders:\n" +"* Detailed: Display components individually in the sale order.\n" +"* Non Detailed: Do not display components individually in the sale order." +msgstr "" +"Sur les commandes clients ou fournisseurs :\n" +"* Détaillé : affiche les composants individuellement dans la commande.\n" +"* Non détaillé : n'affiche pas les composants dans la commande." + +#. module: product_pack +#: model_terms:ir.ui.view,arch_db:product_pack.product_template_form_view +msgid "Pack" +msgstr "Pack" + +#. module: product_pack +#: model:product.product,name:product_pack.product_pack_cpu_detailed_components +#: model:product.template,name:product_pack.product_pack_cpu_detailed_components_product_template +msgid "Pack CPU (Detailed - Displayed Components Price)" +msgstr "Pack CPU (Détaillé - Prix des composants affiché)" + +#. module: product_pack +#: model:product.product,name:product_pack.product_pack_cpu_detailed_ignored +#: model:product.template,name:product_pack.product_pack_cpu_detailed_ignored_product_template +msgid "Pack CPU (Detailed - Ignored Components Price)" +msgstr "Pack CPU (Détaillé - Prix des composants ignoré)" + +#. module: product_pack +#: model:product.product,name:product_pack.product_pack_cpu_detailed_totalized +#: model:product.template,name:product_pack.product_pack_cpu_detailed_totalized_product_template +msgid "Pack CPU (Detailed - Totalized Components Price)" +msgstr "Pack CPU (Détaillé - Prix des composants totalisé)" + +#. module: product_pack +#: model:product.product,name:product_pack.product_pack_cpu_non_detailed +#: model:product.template,name:product_pack.product_pack_cpu_non_detailed_product_template +msgid "Pack CPU (Non Detailed - Totalized Components Price)" +msgstr "Pack CPU (Non détaillé - Prix des composants totalisé)" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_product__pack_type +#: model:ir.model.fields,field_description:product_pack.field_product_template__pack_type +msgid "Pack Display Type" +msgstr "" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_product__pack_modifiable +#: model:ir.model.fields,field_description:product_pack.field_product_template__pack_modifiable +msgid "Pack Modifiable" +msgstr "Pack modifiable" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_product__pack_modifiable_invisible +#: model:ir.model.fields,field_description:product_pack.field_product_template__pack_modifiable_invisible +msgid "Pack Modifiable Invisible" +msgstr "" + +#. module: product_pack +#: model:product.product,name:product_pack.product_pack_pc_detailed_components +#: model:product.template,name:product_pack.product_pack_pc_detailed_components_product_template +msgid "Pack PC (Detailed - Displayed Components Price)" +msgstr "Pack PC (Détaillé - Prix des composants affiché)" + +#. module: product_pack +#: model:product.product,name:product_pack.product_pack_pc_detailed_ignored +#: model:product.template,name:product_pack.product_pack_pc_detailed_ignored_product_template +msgid "Pack PC (Detailed - Ignored Components Price)" +msgstr "Pack PC (Détaillé - Prix des composants ignoré)" + +#. module: product_pack +#: model:product.product,name:product_pack.product_pack_pc_detailed_totalized +#: model:product.template,name:product_pack.product_pack_pc_detailed_totalized_product_template +msgid "Pack PC (Detailed - Totalized Components Price)" +msgstr "Pack PC (Détaillé - Prix des composants totalisé)" + +#. module: product_pack +#: model_terms:ir.ui.view,arch_db:product_pack.product_pack_line_form +msgid "Pack Product Line" +msgstr "Ligne d'article de pack" + +#. module: product_pack +#: model_terms:ir.ui.view,arch_db:product_pack.product_pack_line_tree +msgid "Pack Product Lines" +msgstr "Lignes d'article de pack" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_product__pack_line_ids +#: model:ir.model.fields,field_description:product_pack.field_product_template__pack_line_ids +#: model_terms:ir.ui.view,arch_db:product_pack.nan_product_pack_form +#: model_terms:ir.ui.view,arch_db:product_pack.product_template_only_form_view +msgid "Pack Products" +msgstr "Pack d'articles" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_product__pack_component_price +#: model:ir.model.fields,field_description:product_pack.field_product_template__pack_component_price +msgid "Pack component price" +msgstr "Prix d'un composant du pack" + +#. module: product_pack +#: code:addons/product_pack/models/product_template.py:0 +#, python-format +msgid "" +"Pack lines products company must be the same as the parent product company" +msgstr "" +"Les composants d'un pack doivent appartenir à la même société que celle du " +"produit parent" + +#. module: product_pack +#: model:ir.model.fields,help:product_pack.field_product_product__used_in_pack_line_ids +#: model:ir.model.fields,help:product_pack.field_product_template__used_in_pack_line_ids +msgid "Packs where product is used." +msgstr "Packs où le produit est utilisé." + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line__parent_product_id +msgid "Parent Product" +msgstr "Article parent" + +#. module: product_pack +#: model:ir.model,name:product_pack.model_product_product +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line__product_id +msgid "Product" +msgstr "Article" + +#. module: product_pack +#: model:ir.model,name:product_pack.model_product_template +msgid "Product Template" +msgstr "Modèle d'article" + +#. module: product_pack +#: model:ir.model.constraint,message:product_pack.constraint_product_pack_line_product_uniq +msgid "Product must be only once on a pack!" +msgstr "Un article ne doit être apparaître qu’une seule fois dans un pack !" + +#. module: product_pack +#: model:ir.model,name:product_pack.model_product_pack_line +msgid "Product pack line" +msgstr "Ligne de pack d'articles" + +#. module: product_pack +#: model:ir.model.fields,help:product_pack.field_product_product__pack_line_ids +#: model:ir.model.fields,help:product_pack.field_product_template__pack_line_ids +msgid "Products that are part of this pack." +msgstr "Articles qui composent ce pack." + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line__quantity +msgid "Quantity" +msgstr "Quantité" + +#. module: product_pack +#: model:ir.model.fields,help:product_pack.field_product_product__pack_modifiable_invisible +#: model:ir.model.fields,help:product_pack.field_product_template__pack_modifiable_invisible +msgid "" +"Technical field in order to compute the availability of the Pack Modifiable " +"field" +msgstr "" + +#. module: product_pack +#: model:ir.model.fields.selection,name:product_pack.selection__product_template__pack_component_price__totalized +msgid "Totalized in main product" +msgstr "Totalisé dans l'article principal" + +#. module: product_pack +#: model:product.product,uom_name:product_pack.product_pack_cpu_detailed_components +#: model:product.product,uom_name:product_pack.product_pack_cpu_detailed_ignored +#: model:product.product,uom_name:product_pack.product_pack_cpu_detailed_totalized +#: model:product.product,uom_name:product_pack.product_pack_cpu_non_detailed +#: model:product.product,uom_name:product_pack.product_pack_pc_detailed_components +#: model:product.product,uom_name:product_pack.product_pack_pc_detailed_ignored +#: model:product.product,uom_name:product_pack.product_pack_pc_detailed_totalized +#: model:product.template,uom_name:product_pack.product_pack_cpu_detailed_components_product_template +#: model:product.template,uom_name:product_pack.product_pack_cpu_detailed_ignored_product_template +#: model:product.template,uom_name:product_pack.product_pack_cpu_detailed_totalized_product_template +#: model:product.template,uom_name:product_pack.product_pack_cpu_non_detailed_product_template +#: model:product.template,uom_name:product_pack.product_pack_pc_detailed_components_product_template +#: model:product.template,uom_name:product_pack.product_pack_pc_detailed_ignored_product_template +#: model:product.template,uom_name:product_pack.product_pack_pc_detailed_totalized_product_template +#, fuzzy +msgid "Units" +msgstr "Unité(s)" + +#. module: product_pack +#: code:addons/product_pack/models/product_pack_line.py:0 +#, python-format +msgid "" +"You cannot set recursive packs.\n" +"Product id: %s" +msgstr "" +"Vous ne pouvez pas définir de packs récursifs.\n" +"ID du produit : %s" + +#. module: product_pack +#: model_terms:ir.ui.view,arch_db:product_pack.product_template_only_form_view +msgid "You must save first to add pack lines" +msgstr "Vous devez d'abord enregistrer pour ajouter des lignes de pack" + +#~ msgid "Pack Type" +#~ msgstr "Type de pack" + +#~ msgid "kg" +#~ msgstr "kg" diff --git a/product_pack/i18n/nl.po b/product_pack/i18n/nl.po new file mode 100644 index 00000000..1f27d6b4 --- /dev/null +++ b/product_pack/i18n/nl.po @@ -0,0 +1,307 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_pack +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 13.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2020-12-14 00:28+0000\n" +"Last-Translator: Bosd \n" +"Language-Team: none\n" +"Language: nl\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.3.2\n" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line__create_uid +msgid "Created by" +msgstr "Aangemaakt door" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line__create_date +msgid "Created on" +msgstr "Aangemaakt op" + +#. module: product_pack +#: model:ir.model.fields.selection,name:product_pack.selection__product_template__pack_type__detailed +msgid "Detailed" +msgstr "Gedetailleerd" + +#. module: product_pack +#: model:ir.model.fields.selection,name:product_pack.selection__product_template__pack_component_price__detailed +msgid "Detailed per component" +msgstr "Gedetailleerd per component" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line__display_name +#: model:ir.model.fields,field_description:product_pack.field_product_product__display_name +#: model:ir.model.fields,field_description:product_pack.field_product_template__display_name +msgid "Display Name" +msgstr "Weergavenaam" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_product__used_in_pack_line_ids +#: model:ir.model.fields,field_description:product_pack.field_product_template__used_in_pack_line_ids +msgid "Found in packs" +msgstr "" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line__id +#: model:ir.model.fields,field_description:product_pack.field_product_product__id +#: model:ir.model.fields,field_description:product_pack.field_product_template__id +msgid "ID" +msgstr "ID" + +#. module: product_pack +#: model:ir.model.fields,help:product_pack.field_product_product__pack_modifiable +#: model:ir.model.fields,help:product_pack.field_product_template__pack_modifiable +msgid "" +"If you check this field yo will be able to edit sale/purchase order line " +"relate to its component" +msgstr "" + +#. module: product_pack +#: model:ir.model.fields.selection,name:product_pack.selection__product_template__pack_component_price__ignored +msgid "Ignored" +msgstr "" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_product__pack_ok +#: model:ir.model.fields,field_description:product_pack.field_product_template__pack_ok +msgid "Is Pack?" +msgstr "Is verpakking?" + +#. module: product_pack +#: model:ir.model.fields,help:product_pack.field_product_product__pack_ok +#: model:ir.model.fields,help:product_pack.field_product_template__pack_ok +msgid "Is a Product Pack?" +msgstr "" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line____last_update +#: model:ir.model.fields,field_description:product_pack.field_product_product____last_update +#: model:ir.model.fields,field_description:product_pack.field_product_template____last_update +msgid "Last Modified on" +msgstr "Laatst gewijzigt op" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line__write_uid +msgid "Last Updated by" +msgstr "" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line__write_date +msgid "Last Updated on" +msgstr "" + +#. module: product_pack +#: model:ir.model.fields.selection,name:product_pack.selection__product_template__pack_type__non_detailed +msgid "Non Detailed" +msgstr "" + +#. module: product_pack +#: model:ir.model.fields,help:product_pack.field_product_product__pack_component_price +#: model:ir.model.fields,help:product_pack.field_product_template__pack_component_price +msgid "" +"On sale orders or purchase orders:\n" +"* Detailed per component: Detail lines with prices.\n" +"* Totalized in main product: Detail lines merging lines prices on pack " +"(don't show component prices).\n" +"* Ignored: Use product pack price (ignore detail line prices)." +msgstr "" + +#. module: product_pack +#: model:ir.model.fields,help:product_pack.field_product_product__pack_type +#: model:ir.model.fields,help:product_pack.field_product_template__pack_type +msgid "" +"On sale orders or purchase orders:\n" +"* Detailed: Display components individually in the sale order.\n" +"* Non Detailed: Do not display components individually in the sale order." +msgstr "" + +#. module: product_pack +#: model_terms:ir.ui.view,arch_db:product_pack.product_template_form_view +msgid "Pack" +msgstr "" + +#. module: product_pack +#: model:product.product,name:product_pack.product_pack_cpu_detailed_components +#: model:product.template,name:product_pack.product_pack_cpu_detailed_components_product_template +msgid "Pack CPU (Detailed - Displayed Components Price)" +msgstr "" + +#. module: product_pack +#: model:product.product,name:product_pack.product_pack_cpu_detailed_ignored +#: model:product.template,name:product_pack.product_pack_cpu_detailed_ignored_product_template +msgid "Pack CPU (Detailed - Ignored Components Price)" +msgstr "" + +#. module: product_pack +#: model:product.product,name:product_pack.product_pack_cpu_detailed_totalized +#: model:product.template,name:product_pack.product_pack_cpu_detailed_totalized_product_template +msgid "Pack CPU (Detailed - Totalized Components Price)" +msgstr "" + +#. module: product_pack +#: model:product.product,name:product_pack.product_pack_cpu_non_detailed +#: model:product.template,name:product_pack.product_pack_cpu_non_detailed_product_template +msgid "Pack CPU (Non Detailed - Totalized Components Price)" +msgstr "" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_product__pack_type +#: model:ir.model.fields,field_description:product_pack.field_product_template__pack_type +msgid "Pack Display Type" +msgstr "" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_product__pack_modifiable +#: model:ir.model.fields,field_description:product_pack.field_product_template__pack_modifiable +msgid "Pack Modifiable" +msgstr "" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_product__pack_modifiable_invisible +#: model:ir.model.fields,field_description:product_pack.field_product_template__pack_modifiable_invisible +msgid "Pack Modifiable Invisible" +msgstr "" + +#. module: product_pack +#: model:product.product,name:product_pack.product_pack_pc_detailed_components +#: model:product.template,name:product_pack.product_pack_pc_detailed_components_product_template +msgid "Pack PC (Detailed - Displayed Components Price)" +msgstr "" + +#. module: product_pack +#: model:product.product,name:product_pack.product_pack_pc_detailed_ignored +#: model:product.template,name:product_pack.product_pack_pc_detailed_ignored_product_template +msgid "Pack PC (Detailed - Ignored Components Price)" +msgstr "" + +#. module: product_pack +#: model:product.product,name:product_pack.product_pack_pc_detailed_totalized +#: model:product.template,name:product_pack.product_pack_pc_detailed_totalized_product_template +msgid "Pack PC (Detailed - Totalized Components Price)" +msgstr "" + +#. module: product_pack +#: model_terms:ir.ui.view,arch_db:product_pack.product_pack_line_form +msgid "Pack Product Line" +msgstr "" + +#. module: product_pack +#: model_terms:ir.ui.view,arch_db:product_pack.product_pack_line_tree +msgid "Pack Product Lines" +msgstr "" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_product__pack_line_ids +#: model:ir.model.fields,field_description:product_pack.field_product_template__pack_line_ids +#: model_terms:ir.ui.view,arch_db:product_pack.nan_product_pack_form +#: model_terms:ir.ui.view,arch_db:product_pack.product_template_only_form_view +msgid "Pack Products" +msgstr "" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_product__pack_component_price +#: model:ir.model.fields,field_description:product_pack.field_product_template__pack_component_price +msgid "Pack component price" +msgstr "" + +#. module: product_pack +#: code:addons/product_pack/models/product_template.py:0 +#, python-format +msgid "" +"Pack lines products company must be the same as the parent product company" +msgstr "" + +#. module: product_pack +#: model:ir.model.fields,help:product_pack.field_product_product__used_in_pack_line_ids +#: model:ir.model.fields,help:product_pack.field_product_template__used_in_pack_line_ids +msgid "Packs where product is used." +msgstr "" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line__parent_product_id +msgid "Parent Product" +msgstr "" + +#. module: product_pack +#: model:ir.model,name:product_pack.model_product_product +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line__product_id +msgid "Product" +msgstr "" + +#. module: product_pack +#: model:ir.model,name:product_pack.model_product_template +msgid "Product Template" +msgstr "" + +#. module: product_pack +#: model:ir.model.constraint,message:product_pack.constraint_product_pack_line_product_uniq +msgid "Product must be only once on a pack!" +msgstr "" + +#. module: product_pack +#: model:ir.model,name:product_pack.model_product_pack_line +msgid "Product pack line" +msgstr "" + +#. module: product_pack +#: model:ir.model.fields,help:product_pack.field_product_product__pack_line_ids +#: model:ir.model.fields,help:product_pack.field_product_template__pack_line_ids +msgid "Products that are part of this pack." +msgstr "" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line__quantity +msgid "Quantity" +msgstr "" + +#. module: product_pack +#: model:ir.model.fields,help:product_pack.field_product_product__pack_modifiable_invisible +#: model:ir.model.fields,help:product_pack.field_product_template__pack_modifiable_invisible +msgid "" +"Technical field in order to compute the availability of the Pack Modifiable " +"field" +msgstr "" + +#. module: product_pack +#: model:ir.model.fields.selection,name:product_pack.selection__product_template__pack_component_price__totalized +msgid "Totalized in main product" +msgstr "" + +#. module: product_pack +#: model:product.product,uom_name:product_pack.product_pack_cpu_detailed_components +#: model:product.product,uom_name:product_pack.product_pack_cpu_detailed_ignored +#: model:product.product,uom_name:product_pack.product_pack_cpu_detailed_totalized +#: model:product.product,uom_name:product_pack.product_pack_cpu_non_detailed +#: model:product.product,uom_name:product_pack.product_pack_pc_detailed_components +#: model:product.product,uom_name:product_pack.product_pack_pc_detailed_ignored +#: model:product.product,uom_name:product_pack.product_pack_pc_detailed_totalized +#: model:product.template,uom_name:product_pack.product_pack_cpu_detailed_components_product_template +#: model:product.template,uom_name:product_pack.product_pack_cpu_detailed_ignored_product_template +#: model:product.template,uom_name:product_pack.product_pack_cpu_detailed_totalized_product_template +#: model:product.template,uom_name:product_pack.product_pack_cpu_non_detailed_product_template +#: model:product.template,uom_name:product_pack.product_pack_pc_detailed_components_product_template +#: model:product.template,uom_name:product_pack.product_pack_pc_detailed_ignored_product_template +#: model:product.template,uom_name:product_pack.product_pack_pc_detailed_totalized_product_template +msgid "Units" +msgstr "" + +#. module: product_pack +#: code:addons/product_pack/models/product_pack_line.py:0 +#, python-format +msgid "" +"You cannot set recursive packs.\n" +"Product id: %s" +msgstr "" + +#. module: product_pack +#: model_terms:ir.ui.view,arch_db:product_pack.product_template_only_form_view +msgid "You must save first to add pack lines" +msgstr "" diff --git a/product_pack/i18n/product_pack.pot b/product_pack/i18n/product_pack.pot new file mode 100644 index 00000000..c9dfd98d --- /dev/null +++ b/product_pack/i18n/product_pack.pot @@ -0,0 +1,293 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_pack +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 15.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_pack +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line__create_uid +msgid "Created by" +msgstr "" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line__create_date +msgid "Created on" +msgstr "" + +#. module: product_pack +#: model:ir.model.fields.selection,name:product_pack.selection__product_template__pack_type__detailed +msgid "Detailed" +msgstr "" + +#. module: product_pack +#: model:ir.model.fields.selection,name:product_pack.selection__product_template__pack_component_price__detailed +msgid "Detailed per component" +msgstr "" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line__display_name +msgid "Display Name" +msgstr "" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_product__used_in_pack_line_ids +#: model:ir.model.fields,field_description:product_pack.field_product_template__used_in_pack_line_ids +msgid "Found in packs" +msgstr "" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line__id +msgid "ID" +msgstr "" + +#. module: product_pack +#: model:ir.model.fields,help:product_pack.field_product_product__pack_modifiable +#: model:ir.model.fields,help:product_pack.field_product_template__pack_modifiable +msgid "" +"If you check this field yo will be able to edit sale/purchase order line " +"relate to its component" +msgstr "" + +#. module: product_pack +#: model:ir.model.fields.selection,name:product_pack.selection__product_template__pack_component_price__ignored +msgid "Ignored" +msgstr "" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_product__pack_ok +#: model:ir.model.fields,field_description:product_pack.field_product_template__pack_ok +msgid "Is Pack?" +msgstr "" + +#. module: product_pack +#: model:ir.model.fields,help:product_pack.field_product_product__pack_ok +#: model:ir.model.fields,help:product_pack.field_product_template__pack_ok +msgid "Is a Product Pack?" +msgstr "" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line____last_update +msgid "Last Modified on" +msgstr "" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line__write_uid +msgid "Last Updated by" +msgstr "" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line__write_date +msgid "Last Updated on" +msgstr "" + +#. module: product_pack +#: model:ir.model.fields.selection,name:product_pack.selection__product_template__pack_type__non_detailed +msgid "Non Detailed" +msgstr "" + +#. module: product_pack +#: model:ir.model.fields,help:product_pack.field_product_product__pack_component_price +#: model:ir.model.fields,help:product_pack.field_product_template__pack_component_price +msgid "" +"On sale orders or purchase orders:\n" +"* Detailed per component: Detail lines with prices.\n" +"* Totalized in main product: Detail lines merging lines prices on pack (don't show component prices).\n" +"* Ignored: Use product pack price (ignore detail line prices)." +msgstr "" + +#. module: product_pack +#: model:ir.model.fields,help:product_pack.field_product_product__pack_type +#: model:ir.model.fields,help:product_pack.field_product_template__pack_type +msgid "" +"On sale orders or purchase orders:\n" +"* Detailed: Display components individually in the sale order.\n" +"* Non Detailed: Do not display components individually in the sale order." +msgstr "" + +#. module: product_pack +#: model_terms:ir.ui.view,arch_db:product_pack.product_template_form_view +msgid "Pack" +msgstr "" + +#. module: product_pack +#: model:product.product,name:product_pack.product_pack_cpu_detailed_components +#: model:product.template,name:product_pack.product_pack_cpu_detailed_components_product_template +msgid "Pack CPU (Detailed - Displayed Components Price)" +msgstr "" + +#. module: product_pack +#: model:product.product,name:product_pack.product_pack_cpu_detailed_ignored +#: model:product.template,name:product_pack.product_pack_cpu_detailed_ignored_product_template +msgid "Pack CPU (Detailed - Ignored Components Price)" +msgstr "" + +#. module: product_pack +#: model:product.product,name:product_pack.product_pack_cpu_detailed_totalized +#: model:product.template,name:product_pack.product_pack_cpu_detailed_totalized_product_template +msgid "Pack CPU (Detailed - Totalized Components Price)" +msgstr "" + +#. module: product_pack +#: model:product.product,name:product_pack.product_pack_cpu_non_detailed +#: model:product.template,name:product_pack.product_pack_cpu_non_detailed_product_template +msgid "Pack CPU (Non Detailed - Totalized Components Price)" +msgstr "" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_product__pack_component_price +#: model:ir.model.fields,field_description:product_pack.field_product_template__pack_component_price +msgid "Pack Component Price" +msgstr "" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_product__pack_type +#: model:ir.model.fields,field_description:product_pack.field_product_template__pack_type +msgid "Pack Display Type" +msgstr "" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_product__pack_modifiable +#: model:ir.model.fields,field_description:product_pack.field_product_template__pack_modifiable +msgid "Pack Modifiable" +msgstr "" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_product__pack_modifiable_invisible +#: model:ir.model.fields,field_description:product_pack.field_product_template__pack_modifiable_invisible +msgid "Pack Modifiable Invisible" +msgstr "" + +#. module: product_pack +#: model:product.product,name:product_pack.product_pack_pc_detailed_components +#: model:product.template,name:product_pack.product_pack_pc_detailed_components_product_template +msgid "Pack PC (Detailed - Displayed Components Price)" +msgstr "" + +#. module: product_pack +#: model:product.product,name:product_pack.product_pack_pc_detailed_ignored +#: model:product.template,name:product_pack.product_pack_pc_detailed_ignored_product_template +msgid "Pack PC (Detailed - Ignored Components Price)" +msgstr "" + +#. module: product_pack +#: model:product.product,name:product_pack.product_pack_pc_detailed_totalized +#: model:product.template,name:product_pack.product_pack_pc_detailed_totalized_product_template +msgid "Pack PC (Detailed - Totalized Components Price)" +msgstr "" + +#. module: product_pack +#: model_terms:ir.ui.view,arch_db:product_pack.product_pack_line_form +msgid "Pack Product Line" +msgstr "" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_product__pack_line_ids +#: model:ir.model.fields,field_description:product_pack.field_product_template__pack_line_ids +#: model_terms:ir.ui.view,arch_db:product_pack.nan_product_pack_form +#: model_terms:ir.ui.view,arch_db:product_pack.product_template_only_form_view +msgid "Pack Products" +msgstr "" + +#. module: product_pack +#: code:addons/product_pack/models/product_template.py:0 +#: code:addons/product_pack/models/product_template.py:0 +#, python-format +msgid "" +"Pack lines products company must be the same as the parent product company" +msgstr "" + +#. module: product_pack +#: model:ir.model.fields,help:product_pack.field_product_product__used_in_pack_line_ids +#: model:ir.model.fields,help:product_pack.field_product_template__used_in_pack_line_ids +msgid "Packs where product is used." +msgstr "" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line__parent_product_id +msgid "Parent Product" +msgstr "" + +#. module: product_pack +#: model:ir.model,name:product_pack.model_product_product +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line__product_id +msgid "Product" +msgstr "" + +#. module: product_pack +#: model:ir.model,name:product_pack.model_product_template +msgid "Product Template" +msgstr "" + +#. module: product_pack +#: model:ir.model.constraint,message:product_pack.constraint_product_pack_line_product_uniq +msgid "Product must be only once on a pack!" +msgstr "" + +#. module: product_pack +#: model:ir.model,name:product_pack.model_product_pack_line +msgid "Product pack line" +msgstr "" + +#. module: product_pack +#: model:ir.model.fields,help:product_pack.field_product_product__pack_line_ids +#: model:ir.model.fields,help:product_pack.field_product_template__pack_line_ids +msgid "Products that are part of this pack." +msgstr "" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line__quantity +msgid "Quantity" +msgstr "" + +#. module: product_pack +#: model:ir.model.fields,help:product_pack.field_product_product__pack_modifiable_invisible +#: model:ir.model.fields,help:product_pack.field_product_template__pack_modifiable_invisible +msgid "" +"Technical field in order to compute the availability of the Pack Modifiable " +"field" +msgstr "" + +#. module: product_pack +#: model:ir.model.fields.selection,name:product_pack.selection__product_template__pack_component_price__totalized +msgid "Totalized in main product" +msgstr "" + +#. module: product_pack +#: model:product.product,uom_name:product_pack.product_pack_cpu_detailed_components +#: model:product.product,uom_name:product_pack.product_pack_cpu_detailed_ignored +#: model:product.product,uom_name:product_pack.product_pack_cpu_detailed_totalized +#: model:product.product,uom_name:product_pack.product_pack_cpu_non_detailed +#: model:product.product,uom_name:product_pack.product_pack_pc_detailed_components +#: model:product.product,uom_name:product_pack.product_pack_pc_detailed_ignored +#: model:product.product,uom_name:product_pack.product_pack_pc_detailed_totalized +#: model:product.template,uom_name:product_pack.product_pack_cpu_detailed_components_product_template +#: model:product.template,uom_name:product_pack.product_pack_cpu_detailed_ignored_product_template +#: model:product.template,uom_name:product_pack.product_pack_cpu_detailed_totalized_product_template +#: model:product.template,uom_name:product_pack.product_pack_cpu_non_detailed_product_template +#: model:product.template,uom_name:product_pack.product_pack_pc_detailed_components_product_template +#: model:product.template,uom_name:product_pack.product_pack_pc_detailed_ignored_product_template +#: model:product.template,uom_name:product_pack.product_pack_pc_detailed_totalized_product_template +msgid "Units" +msgstr "" + +#. module: product_pack +#: code:addons/product_pack/models/product_pack_line.py:0 +#, python-format +msgid "" +"You cannot set recursive packs.\n" +"Product id: %s" +msgstr "" + +#. module: product_pack +#: model_terms:ir.ui.view,arch_db:product_pack.product_template_only_form_view +msgid "You must save first to add pack lines" +msgstr "" diff --git a/product_pack/i18n/pt.po b/product_pack/i18n/pt.po new file mode 100644 index 00000000..1a96fc87 --- /dev/null +++ b/product_pack/i18n/pt.po @@ -0,0 +1,326 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_pack +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2019-12-12 22:05+0000\n" +"Last-Translator: Pedro Castro Silva \n" +"Language-Team: none\n" +"Language: pt\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 3.9.1\n" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line__create_uid +msgid "Created by" +msgstr "Criado por" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line__create_date +msgid "Created on" +msgstr "Criado em" + +#. module: product_pack +#: model:ir.model.fields.selection,name:product_pack.selection__product_template__pack_type__detailed +msgid "Detailed" +msgstr "Detalhado" + +#. module: product_pack +#: model:ir.model.fields.selection,name:product_pack.selection__product_template__pack_component_price__detailed +msgid "Detailed per component" +msgstr "Detalhado por componente" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line__display_name +#: model:ir.model.fields,field_description:product_pack.field_product_product__display_name +#: model:ir.model.fields,field_description:product_pack.field_product_template__display_name +msgid "Display Name" +msgstr "Nome a Exibir" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_product__used_in_pack_line_ids +#: model:ir.model.fields,field_description:product_pack.field_product_template__used_in_pack_line_ids +msgid "Found in packs" +msgstr "Pertencente a packs" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line__id +#: model:ir.model.fields,field_description:product_pack.field_product_product__id +#: model:ir.model.fields,field_description:product_pack.field_product_template__id +msgid "ID" +msgstr "ID" + +#. module: product_pack +#: model:ir.model.fields,help:product_pack.field_product_product__pack_modifiable +#: model:ir.model.fields,help:product_pack.field_product_template__pack_modifiable +msgid "" +"If you check this field yo will be able to edit sale/purchase order line " +"relate to its component" +msgstr "" +"Se assinalar este campo, poderá editar linhas de encomendas de compra/venda " +"relacionadas com o seu componente" + +#. module: product_pack +#: model:ir.model.fields.selection,name:product_pack.selection__product_template__pack_component_price__ignored +msgid "Ignored" +msgstr "Ignorado" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_product__pack_ok +#: model:ir.model.fields,field_description:product_pack.field_product_template__pack_ok +msgid "Is Pack?" +msgstr "É Pack?" + +#. module: product_pack +#: model:ir.model.fields,help:product_pack.field_product_product__pack_ok +#: model:ir.model.fields,help:product_pack.field_product_template__pack_ok +msgid "Is a Product Pack?" +msgstr "É um Pack de Produtos?" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line____last_update +#: model:ir.model.fields,field_description:product_pack.field_product_product____last_update +#: model:ir.model.fields,field_description:product_pack.field_product_template____last_update +msgid "Last Modified on" +msgstr "Modif. pela Última Vez em" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line__write_uid +msgid "Last Updated by" +msgstr "Atualiz. pela Última Vez por" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line__write_date +msgid "Last Updated on" +msgstr "Atualiz. pela Última Vez em" + +#. module: product_pack +#: model:ir.model.fields.selection,name:product_pack.selection__product_template__pack_type__non_detailed +msgid "Non Detailed" +msgstr "Não Detalhado" + +#. module: product_pack +#: model:ir.model.fields,help:product_pack.field_product_product__pack_component_price +#: model:ir.model.fields,help:product_pack.field_product_template__pack_component_price +msgid "" +"On sale orders or purchase orders:\n" +"* Detailed per component: Detail lines with prices.\n" +"* Totalized in main product: Detail lines merging lines prices on pack " +"(don't show component prices).\n" +"* Ignored: Use product pack price (ignore detail line prices)." +msgstr "" +"Em encomendas de compra ou venda:\n" +"* Detalhado por componente: Linha de detalhes com preços.\n" +"* Totalizado no produto principal: Linhas de detalhes fundindo os preços das " +"linhas no pack (não mostrar preços dos compoenentes).\n" +"* Ignorado: Usar o preço do pack de produtos (ignorar preços das linhas de " +"detalhes)." + +#. module: product_pack +#: model:ir.model.fields,help:product_pack.field_product_product__pack_type +#: model:ir.model.fields,help:product_pack.field_product_template__pack_type +msgid "" +"On sale orders or purchase orders:\n" +"* Detailed: Display components individually in the sale order.\n" +"* Non Detailed: Do not display components individually in the sale order." +msgstr "" +"Em encomendas de compra ou venda:\n" +"* Detalhado: Exibir os componentes individualmente na encomenda.\n" +"*Não Detalhado: Não exibir os componentes individualmente na encomenda." + +#. module: product_pack +#: model_terms:ir.ui.view,arch_db:product_pack.product_template_form_view +msgid "Pack" +msgstr "" + +#. module: product_pack +#: model:product.product,name:product_pack.product_pack_cpu_detailed_components +#: model:product.template,name:product_pack.product_pack_cpu_detailed_components_product_template +msgid "Pack CPU (Detailed - Displayed Components Price)" +msgstr "Pack CPU (Detalhado - Preço dos Componentes Exibido)" + +#. module: product_pack +#: model:product.product,name:product_pack.product_pack_cpu_detailed_ignored +#: model:product.template,name:product_pack.product_pack_cpu_detailed_ignored_product_template +msgid "Pack CPU (Detailed - Ignored Components Price)" +msgstr "Pack CPU (Detalhado - Preço dos Componentes Ignorado)" + +#. module: product_pack +#: model:product.product,name:product_pack.product_pack_cpu_detailed_totalized +#: model:product.template,name:product_pack.product_pack_cpu_detailed_totalized_product_template +msgid "Pack CPU (Detailed - Totalized Components Price)" +msgstr "Pack CPU (Detalhado - Preço dos Componentes Totalizado)" + +#. module: product_pack +#: model:product.product,name:product_pack.product_pack_cpu_non_detailed +#: model:product.template,name:product_pack.product_pack_cpu_non_detailed_product_template +msgid "Pack CPU (Non Detailed - Totalized Components Price)" +msgstr "Pack CPU (Não Detalhado - Preço dos Componentes Totalizado)" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_product__pack_type +#: model:ir.model.fields,field_description:product_pack.field_product_template__pack_type +msgid "Pack Display Type" +msgstr "" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_product__pack_modifiable +#: model:ir.model.fields,field_description:product_pack.field_product_template__pack_modifiable +msgid "Pack Modifiable" +msgstr "Pack Modificável" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_product__pack_modifiable_invisible +#: model:ir.model.fields,field_description:product_pack.field_product_template__pack_modifiable_invisible +msgid "Pack Modifiable Invisible" +msgstr "" + +#. module: product_pack +#: model:product.product,name:product_pack.product_pack_pc_detailed_components +#: model:product.template,name:product_pack.product_pack_pc_detailed_components_product_template +msgid "Pack PC (Detailed - Displayed Components Price)" +msgstr "Pack PC (Detalhado - Preço dos Componentes Exibido)" + +#. module: product_pack +#: model:product.product,name:product_pack.product_pack_pc_detailed_ignored +#: model:product.template,name:product_pack.product_pack_pc_detailed_ignored_product_template +msgid "Pack PC (Detailed - Ignored Components Price)" +msgstr "Pack PC (Detalhado - Preço dos Componentes Ignorado)" + +#. module: product_pack +#: model:product.product,name:product_pack.product_pack_pc_detailed_totalized +#: model:product.template,name:product_pack.product_pack_pc_detailed_totalized_product_template +msgid "Pack PC (Detailed - Totalized Components Price)" +msgstr "Pack PC (Detalhado - Preço dos Componentes Totalizado)" + +#. module: product_pack +#: model_terms:ir.ui.view,arch_db:product_pack.product_pack_line_form +msgid "Pack Product Line" +msgstr "Linha de Pack de Produtos" + +#. module: product_pack +#: model_terms:ir.ui.view,arch_db:product_pack.product_pack_line_tree +msgid "Pack Product Lines" +msgstr "Linhas de Pack de Produtos" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_product__pack_line_ids +#: model:ir.model.fields,field_description:product_pack.field_product_template__pack_line_ids +#: model_terms:ir.ui.view,arch_db:product_pack.nan_product_pack_form +#: model_terms:ir.ui.view,arch_db:product_pack.product_template_only_form_view +msgid "Pack Products" +msgstr "Packs de Produtos" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_product__pack_component_price +#: model:ir.model.fields,field_description:product_pack.field_product_template__pack_component_price +msgid "Pack component price" +msgstr "Preço do componente do pack" + +#. module: product_pack +#: code:addons/product_pack/models/product_template.py:0 +#, python-format +msgid "" +"Pack lines products company must be the same as the parent product company" +msgstr "" +"A empresa das linhas de produtos dos packs tem que ser a mesma que a do " +"produto ascendente" + +#. module: product_pack +#: model:ir.model.fields,help:product_pack.field_product_product__used_in_pack_line_ids +#: model:ir.model.fields,help:product_pack.field_product_template__used_in_pack_line_ids +msgid "Packs where product is used." +msgstr "Packs em que o produto é usado." + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line__parent_product_id +msgid "Parent Product" +msgstr "Produto Ascendente" + +#. module: product_pack +#: model:ir.model,name:product_pack.model_product_product +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line__product_id +msgid "Product" +msgstr "Produto" + +#. module: product_pack +#: model:ir.model,name:product_pack.model_product_template +msgid "Product Template" +msgstr "Modelo de Produto" + +#. module: product_pack +#: model:ir.model.constraint,message:product_pack.constraint_product_pack_line_product_uniq +msgid "Product must be only once on a pack!" +msgstr "O produto só pode aparecer uma vez no pack!" + +#. module: product_pack +#: model:ir.model,name:product_pack.model_product_pack_line +msgid "Product pack line" +msgstr "Linha de pack de produto" + +#. module: product_pack +#: model:ir.model.fields,help:product_pack.field_product_product__pack_line_ids +#: model:ir.model.fields,help:product_pack.field_product_template__pack_line_ids +msgid "Products that are part of this pack." +msgstr "Produtos pertencentes a este pack." + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line__quantity +msgid "Quantity" +msgstr "Quantidade" + +#. module: product_pack +#: model:ir.model.fields,help:product_pack.field_product_product__pack_modifiable_invisible +#: model:ir.model.fields,help:product_pack.field_product_template__pack_modifiable_invisible +msgid "" +"Technical field in order to compute the availability of the Pack Modifiable " +"field" +msgstr "" + +#. module: product_pack +#: model:ir.model.fields.selection,name:product_pack.selection__product_template__pack_component_price__totalized +msgid "Totalized in main product" +msgstr "Totalizado no produto principal" + +#. module: product_pack +#: model:product.product,uom_name:product_pack.product_pack_cpu_detailed_components +#: model:product.product,uom_name:product_pack.product_pack_cpu_detailed_ignored +#: model:product.product,uom_name:product_pack.product_pack_cpu_detailed_totalized +#: model:product.product,uom_name:product_pack.product_pack_cpu_non_detailed +#: model:product.product,uom_name:product_pack.product_pack_pc_detailed_components +#: model:product.product,uom_name:product_pack.product_pack_pc_detailed_ignored +#: model:product.product,uom_name:product_pack.product_pack_pc_detailed_totalized +#: model:product.template,uom_name:product_pack.product_pack_cpu_detailed_components_product_template +#: model:product.template,uom_name:product_pack.product_pack_cpu_detailed_ignored_product_template +#: model:product.template,uom_name:product_pack.product_pack_cpu_detailed_totalized_product_template +#: model:product.template,uom_name:product_pack.product_pack_cpu_non_detailed_product_template +#: model:product.template,uom_name:product_pack.product_pack_pc_detailed_components_product_template +#: model:product.template,uom_name:product_pack.product_pack_pc_detailed_ignored_product_template +#: model:product.template,uom_name:product_pack.product_pack_pc_detailed_totalized_product_template +#, fuzzy +msgid "Units" +msgstr "Unidade(s)" + +#. module: product_pack +#: code:addons/product_pack/models/product_pack_line.py:0 +#, python-format +msgid "" +"You cannot set recursive packs.\n" +"Product id: %s" +msgstr "" +"Não pode atribuir pack recursivos.\n" +"Id de produto: %s" + +#. module: product_pack +#: model_terms:ir.ui.view,arch_db:product_pack.product_template_only_form_view +msgid "You must save first to add pack lines" +msgstr "Para adicionar linhas de packs, deve primeiro guardar" + +#~ msgid "Pack Type" +#~ msgstr "Tipo de Pack" diff --git a/product_pack/i18n/sv.po b/product_pack/i18n/sv.po new file mode 100644 index 00000000..9d14e2c9 --- /dev/null +++ b/product_pack/i18n/sv.po @@ -0,0 +1,319 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_pack +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2022-02-17 12:16+0000\n" +"Last-Translator: Simon S \n" +"Language-Team: none\n" +"Language: sv\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.3.2\n" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line__create_uid +msgid "Created by" +msgstr "Skapad av" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line__create_date +msgid "Created on" +msgstr "Skapad den" + +#. module: product_pack +#: model:ir.model.fields.selection,name:product_pack.selection__product_template__pack_type__detailed +msgid "Detailed" +msgstr "Detaljerad" + +#. module: product_pack +#: model:ir.model.fields.selection,name:product_pack.selection__product_template__pack_component_price__detailed +msgid "Detailed per component" +msgstr "Detaljerad per beståndsdel" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line__display_name +#: model:ir.model.fields,field_description:product_pack.field_product_product__display_name +#: model:ir.model.fields,field_description:product_pack.field_product_template__display_name +msgid "Display Name" +msgstr "Visningsnamn" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_product__used_in_pack_line_ids +#: model:ir.model.fields,field_description:product_pack.field_product_template__used_in_pack_line_ids +msgid "Found in packs" +msgstr "Finns i pack" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line__id +#: model:ir.model.fields,field_description:product_pack.field_product_product__id +#: model:ir.model.fields,field_description:product_pack.field_product_template__id +msgid "ID" +msgstr "ID" + +#. module: product_pack +#: model:ir.model.fields,help:product_pack.field_product_product__pack_modifiable +#: model:ir.model.fields,help:product_pack.field_product_template__pack_modifiable +msgid "" +"If you check this field yo will be able to edit sale/purchase order line " +"relate to its component" +msgstr "" +"Om du kryssar i det här fältet så kommer du att kunna redigera den " +"relaterade orderraden för försäljning/köpordern" + +#. module: product_pack +#: model:ir.model.fields.selection,name:product_pack.selection__product_template__pack_component_price__ignored +msgid "Ignored" +msgstr "Ignorerad" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_product__pack_ok +#: model:ir.model.fields,field_description:product_pack.field_product_template__pack_ok +msgid "Is Pack?" +msgstr "Är ett pack?" + +#. module: product_pack +#: model:ir.model.fields,help:product_pack.field_product_product__pack_ok +#: model:ir.model.fields,help:product_pack.field_product_template__pack_ok +msgid "Is a Product Pack?" +msgstr "Är ett produkt pack?" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line____last_update +#: model:ir.model.fields,field_description:product_pack.field_product_product____last_update +#: model:ir.model.fields,field_description:product_pack.field_product_template____last_update +msgid "Last Modified on" +msgstr "Senast ändrad" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line__write_uid +msgid "Last Updated by" +msgstr "Senast uppdaterad av" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line__write_date +msgid "Last Updated on" +msgstr "Senast uppdaterad den" + +#. module: product_pack +#: model:ir.model.fields.selection,name:product_pack.selection__product_template__pack_type__non_detailed +msgid "Non Detailed" +msgstr "Icke detaljerad" + +#. module: product_pack +#: model:ir.model.fields,help:product_pack.field_product_product__pack_component_price +#: model:ir.model.fields,help:product_pack.field_product_template__pack_component_price +msgid "" +"On sale orders or purchase orders:\n" +"* Detailed per component: Detail lines with prices.\n" +"* Totalized in main product: Detail lines merging lines prices on pack " +"(don't show component prices).\n" +"* Ignored: Use product pack price (ignore detail line prices)." +msgstr "" +"För sälj eller köpordrar:\n" +"* Detaljerade per beståndsdel: Detaljrader med priser.\n" +"* Summerade i huvudprodukten: Detaljrader med sammanslagna packpriser (visar " +"ej beståndsdelarnas priser).\n" +"* Ignorerade: Använd produkt-packpriser (ignorera detaljradernas priser)." + +#. module: product_pack +#: model:ir.model.fields,help:product_pack.field_product_product__pack_type +#: model:ir.model.fields,help:product_pack.field_product_template__pack_type +msgid "" +"On sale orders or purchase orders:\n" +"* Detailed: Display components individually in the sale order.\n" +"* Non Detailed: Do not display components individually in the sale order." +msgstr "" +"För sälj eller köpordrar:\n" +"* Detaljerad: Visa individuella beståndsdelar i säljordern.\n" +"* Icke detaljerad: Visa inte individuella beståndsdelar i säljordern." + +#. module: product_pack +#: model_terms:ir.ui.view,arch_db:product_pack.product_template_form_view +msgid "Pack" +msgstr "Pack" + +#. module: product_pack +#: model:product.product,name:product_pack.product_pack_cpu_detailed_components +#: model:product.template,name:product_pack.product_pack_cpu_detailed_components_product_template +msgid "Pack CPU (Detailed - Displayed Components Price)" +msgstr "Pack CPU (Detaljerad - Visa pris för beståndsdelar)" + +#. module: product_pack +#: model:product.product,name:product_pack.product_pack_cpu_detailed_ignored +#: model:product.template,name:product_pack.product_pack_cpu_detailed_ignored_product_template +msgid "Pack CPU (Detailed - Ignored Components Price)" +msgstr "Pack CPU (Detaljerad - Ignorera priser för beståndsdelar)" + +#. module: product_pack +#: model:product.product,name:product_pack.product_pack_cpu_detailed_totalized +#: model:product.template,name:product_pack.product_pack_cpu_detailed_totalized_product_template +msgid "Pack CPU (Detailed - Totalized Components Price)" +msgstr "Pack CPU (Detaljerad - Summerade priser för beståndsdelar)" + +#. module: product_pack +#: model:product.product,name:product_pack.product_pack_cpu_non_detailed +#: model:product.template,name:product_pack.product_pack_cpu_non_detailed_product_template +msgid "Pack CPU (Non Detailed - Totalized Components Price)" +msgstr "Pack CPU (Icke detaljerad - Summerade priser för beståndsdelar)" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_product__pack_type +#: model:ir.model.fields,field_description:product_pack.field_product_template__pack_type +msgid "Pack Display Type" +msgstr "Pack visningstyp" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_product__pack_modifiable +#: model:ir.model.fields,field_description:product_pack.field_product_template__pack_modifiable +msgid "Pack Modifiable" +msgstr "Pack modifierbart" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_product__pack_modifiable_invisible +#: model:ir.model.fields,field_description:product_pack.field_product_template__pack_modifiable_invisible +msgid "Pack Modifiable Invisible" +msgstr "" + +#. module: product_pack +#: model:product.product,name:product_pack.product_pack_pc_detailed_components +#: model:product.template,name:product_pack.product_pack_pc_detailed_components_product_template +msgid "Pack PC (Detailed - Displayed Components Price)" +msgstr "Pack PC (Detaljerad - Visa pris för beståndsdelar)" + +#. module: product_pack +#: model:product.product,name:product_pack.product_pack_pc_detailed_ignored +#: model:product.template,name:product_pack.product_pack_pc_detailed_ignored_product_template +msgid "Pack PC (Detailed - Ignored Components Price)" +msgstr "Pack PC (Detaljerad - Ignorera priser för beståndsdelar)" + +#. module: product_pack +#: model:product.product,name:product_pack.product_pack_pc_detailed_totalized +#: model:product.template,name:product_pack.product_pack_pc_detailed_totalized_product_template +msgid "Pack PC (Detailed - Totalized Components Price)" +msgstr "Pack PC (Icke detaljerad - Summerade priser för beståndsdelar)" + +#. module: product_pack +#: model_terms:ir.ui.view,arch_db:product_pack.product_pack_line_form +msgid "Pack Product Line" +msgstr "Pack produktrad" + +#. module: product_pack +#: model_terms:ir.ui.view,arch_db:product_pack.product_pack_line_tree +msgid "Pack Product Lines" +msgstr "Pack produktrader" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_product__pack_line_ids +#: model:ir.model.fields,field_description:product_pack.field_product_template__pack_line_ids +#: model_terms:ir.ui.view,arch_db:product_pack.nan_product_pack_form +#: model_terms:ir.ui.view,arch_db:product_pack.product_template_only_form_view +msgid "Pack Products" +msgstr "Pack produkter" + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_product__pack_component_price +#: model:ir.model.fields,field_description:product_pack.field_product_template__pack_component_price +msgid "Pack component price" +msgstr "Packpris för beståndsdel" + +#. module: product_pack +#: code:addons/product_pack/models/product_template.py:0 +#, python-format +msgid "" +"Pack lines products company must be the same as the parent product company" +msgstr "Produktbolaget för packraderna måste vara samma som moderbolaget" + +#. module: product_pack +#: model:ir.model.fields,help:product_pack.field_product_product__used_in_pack_line_ids +#: model:ir.model.fields,help:product_pack.field_product_template__used_in_pack_line_ids +msgid "Packs where product is used." +msgstr "Pack där produkt används." + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line__parent_product_id +msgid "Parent Product" +msgstr "Moderprodukt" + +#. module: product_pack +#: model:ir.model,name:product_pack.model_product_product +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line__product_id +msgid "Product" +msgstr "Produkt" + +#. module: product_pack +#: model:ir.model,name:product_pack.model_product_template +msgid "Product Template" +msgstr "Produktmall" + +#. module: product_pack +#: model:ir.model.constraint,message:product_pack.constraint_product_pack_line_product_uniq +msgid "Product must be only once on a pack!" +msgstr "Produkten får endast förekomma en gång per pack!" + +#. module: product_pack +#: model:ir.model,name:product_pack.model_product_pack_line +msgid "Product pack line" +msgstr "Produkt packrad" + +#. module: product_pack +#: model:ir.model.fields,help:product_pack.field_product_product__pack_line_ids +#: model:ir.model.fields,help:product_pack.field_product_template__pack_line_ids +msgid "Products that are part of this pack." +msgstr "Produkter som tillhör detta pack." + +#. module: product_pack +#: model:ir.model.fields,field_description:product_pack.field_product_pack_line__quantity +msgid "Quantity" +msgstr "Kvantitet" + +#. module: product_pack +#: model:ir.model.fields,help:product_pack.field_product_product__pack_modifiable_invisible +#: model:ir.model.fields,help:product_pack.field_product_template__pack_modifiable_invisible +msgid "" +"Technical field in order to compute the availability of the Pack Modifiable " +"field" +msgstr "" + +#. module: product_pack +#: model:ir.model.fields.selection,name:product_pack.selection__product_template__pack_component_price__totalized +msgid "Totalized in main product" +msgstr "Summerade i huvudprodukten" + +#. module: product_pack +#: model:product.product,uom_name:product_pack.product_pack_cpu_detailed_components +#: model:product.product,uom_name:product_pack.product_pack_cpu_detailed_ignored +#: model:product.product,uom_name:product_pack.product_pack_cpu_detailed_totalized +#: model:product.product,uom_name:product_pack.product_pack_cpu_non_detailed +#: model:product.product,uom_name:product_pack.product_pack_pc_detailed_components +#: model:product.product,uom_name:product_pack.product_pack_pc_detailed_ignored +#: model:product.product,uom_name:product_pack.product_pack_pc_detailed_totalized +#: model:product.template,uom_name:product_pack.product_pack_cpu_detailed_components_product_template +#: model:product.template,uom_name:product_pack.product_pack_cpu_detailed_ignored_product_template +#: model:product.template,uom_name:product_pack.product_pack_cpu_detailed_totalized_product_template +#: model:product.template,uom_name:product_pack.product_pack_cpu_non_detailed_product_template +#: model:product.template,uom_name:product_pack.product_pack_pc_detailed_components_product_template +#: model:product.template,uom_name:product_pack.product_pack_pc_detailed_ignored_product_template +#: model:product.template,uom_name:product_pack.product_pack_pc_detailed_totalized_product_template +msgid "Units" +msgstr "Enheter" + +#. module: product_pack +#: code:addons/product_pack/models/product_pack_line.py:0 +#, python-format +msgid "" +"You cannot set recursive packs.\n" +"Product id: %s" +msgstr "" +"Du kan inte sätta rekursiva pack.\n" +"Produkt id: %s" + +#. module: product_pack +#: model_terms:ir.ui.view,arch_db:product_pack.product_template_only_form_view +msgid "You must save first to add pack lines" +msgstr "Du måste spara innan du kan addera packrader" diff --git a/product_pack/models/__init__.py b/product_pack/models/__init__.py new file mode 100644 index 00000000..626eb1a8 --- /dev/null +++ b/product_pack/models/__init__.py @@ -0,0 +1,5 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from . import product_pack_line +from . import product_product +from . import product_template diff --git a/product_pack/models/product_pack_line.py b/product_pack/models/product_pack_line.py new file mode 100644 index 00000000..5a105777 --- /dev/null +++ b/product_pack/models/product_pack_line.py @@ -0,0 +1,59 @@ +# Copyright 2019 Tecnativa - Ernesto Tejeda +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from odoo import _, api, fields, models +from odoo.exceptions import ValidationError + + +class ProductPackLine(models.Model): + _name = "product.pack.line" + _description = "Product pack line" + _rec_name = "product_id" + + parent_product_id = fields.Many2one( + "product.product", + "Parent Product", + ondelete="cascade", + index=True, + required=True, + ) + quantity = fields.Float( + required=True, + default=1.0, + digits="Product UoS", + ) + product_id = fields.Many2one( + "product.product", + "Product", + ondelete="cascade", + index=True, + required=True, + ) + + # because on expand_pack_line we are searching for existing product, we + # need to enforce this condition + _sql_constraints = [ + ( + "product_uniq", + "unique(parent_product_id, product_id)", + "Product must be only once on a pack!", + ), + ] + + @api.constrains("product_id") + def _check_recursion(self): + """Check recursion on packs.""" + for line in self: + parent_product = line.parent_product_id + pack_lines = line + while pack_lines: + if parent_product in pack_lines.mapped("product_id"): + raise ValidationError( + _("You cannot set recursive packs.\nProduct id: %s") + % parent_product.id + ) + pack_lines = pack_lines.mapped("product_id.pack_line_ids") + + def get_price(self): + self.ensure_one() + return self.product_id.lst_price * self.quantity diff --git a/product_pack/models/product_product.py b/product_pack/models/product_product.py new file mode 100644 index 00000000..e55db3bd --- /dev/null +++ b/product_pack/models/product_product.py @@ -0,0 +1,113 @@ +# Copyright 2019 Tecnativa - Ernesto Tejeda +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from odoo import api, fields, models + + +class ProductProduct(models.Model): + _inherit = "product.product" + + pack_line_ids = fields.One2many( + "product.pack.line", + "parent_product_id", + "Pack Products", + help="Products that are part of this pack.", + ) + used_in_pack_line_ids = fields.One2many( + "product.pack.line", + "product_id", + "Found in packs", + help="Packs where product is used.", + ) + + def get_pack_lines(self): + """Returns the content (lines) of the packs. + By default, return all the pack_line_ids, but that function + can be overloaded to introduce filtering function by date, etc...""" + return self.mapped("pack_line_ids") + + def split_pack_products(self): + """Split products and the pack in 2 separate recordsets. + + :return: [packs, no_packs] + """ + packs = self.filtered( + lambda p: p.pack_ok + and ( + (p.pack_type == "detailed" and p.pack_component_price == "totalized") + or p.pack_type == "non_detailed" + ) + ) + # TODO: Check why this is needed + # for compatibility with website_sale + if self._context.get("website_id", False) and not self._context.get( + "from_cart", False + ): + packs |= self.filtered( + lambda p: p.pack_ok + and p.pack_type == "detailed" + and p.pack_component_price == "detailed" + ) + + return packs, (self - packs) + + def price_compute( + self, price_type, uom=False, currency=False, company=False, date=False + ): + company = company or self.env.company + date = date or fields.Date.context_today(self) + + self = self.with_company(company) + + packs, no_packs = self.split_pack_products() + prices = super(ProductProduct, no_packs).price_compute( + price_type, uom, currency, company, date + ) + for product in packs.with_context(prefetch_fields=False): + pack_price = 0.0 + for pack_line in product.sudo().pack_line_ids: + pack_price += pack_line.get_price() + pricelist_id_or_name = self._context.get("pricelist") + # if there is a pricelist on the context the returned prices are on + # that currency but, if the pack product has a different currency + # it will be converted again by pp._compute_price_rule, so if + # that is the case we convert the amounts to the pack currency + if pricelist_id_or_name: + pricelist = False + if isinstance(pricelist_id_or_name, list): + pricelist_id_or_name = pricelist_id_or_name[0] + if isinstance(pricelist_id_or_name, str): + pricelist_name_search = self.env["product.pricelist"].name_search( + pricelist_id_or_name, operator="=", limit=1 + ) + if pricelist_name_search: + pricelist = self.env["product.pricelist"].browse( + [pricelist_name_search[0][0]] + ) + elif isinstance(pricelist_id_or_name, int): + pricelist = self.env["product.pricelist"].browse( + pricelist_id_or_name + ) + if pricelist and pricelist.currency_id != product.currency_id: + pack_price = pricelist.currency_id._convert( + pack_price, + product.currency_id, + self.company_id or self.env.company, + fields.Date.today(), + ) + prices[product.id] = pack_price + return prices + + @api.depends("list_price", "price_extra") + def _compute_product_lst_price(self): + packs, no_packs = self.split_pack_products() + ret_val = super(ProductProduct, no_packs)._compute_product_lst_price() + to_uom = None + if "uom" in self._context: + to_uom = self.env["uom.uom"].browse([self._context["uom"]]) + for product in packs: + list_price = product.price_compute("list_price").get(product.id) + if to_uom: + list_price = product.uom_id._compute_price(list_price, to_uom) + product.lst_price = list_price + product.price_extra + return ret_val diff --git a/product_pack/models/product_template.py b/product_pack/models/product_template.py new file mode 100644 index 00000000..bf948c25 --- /dev/null +++ b/product_pack/models/product_template.py @@ -0,0 +1,109 @@ +# Copyright 2019 Tecnativa - Ernesto Tejeda +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from odoo import _, api, fields, models +from odoo.exceptions import ValidationError + + +class ProductTemplate(models.Model): + _inherit = "product.template" + + pack_type = fields.Selection( + [("detailed", "Detailed"), ("non_detailed", "Non Detailed")], + string="Pack Display Type", + help="On sale orders or purchase orders:\n" + "* Detailed: Display components individually in the sale order.\n" + "* Non Detailed: Do not display components individually in the" + " sale order.", + ) + pack_component_price = fields.Selection( + [ + ("detailed", "Detailed per component"), + ("totalized", "Totalized in main product"), + ("ignored", "Ignored"), + ], + help="On sale orders or purchase orders:\n" + "* Detailed per component: Detail lines with prices.\n" + "* Totalized in main product: Detail lines merging " + "lines prices on pack (don't show component prices).\n" + "* Ignored: Use product pack price (ignore detail line prices).", + ) + pack_ok = fields.Boolean( + "Is Pack?", + help="Is a Product Pack?", + ) + pack_line_ids = fields.One2many( + related="product_variant_ids.pack_line_ids", + ) + used_in_pack_line_ids = fields.One2many( + related="product_variant_ids.used_in_pack_line_ids", + readonly=True, + ) + pack_modifiable = fields.Boolean( + help="If you check this field yo will be able to edit " + "sale/purchase order line relate to its component", + ) + pack_modifiable_invisible = fields.Boolean( + compute="_compute_pack_modifiable_invisible", + help="Technical field in order to compute the availability of the " + "Pack Modifiable field", + ) + + def _get_pack_modifiable_invisible_depends(self): + return ["pack_type", "pack_component_price"] + + @api.depends(lambda self: self._get_pack_modifiable_invisible_depends()) + def _compute_pack_modifiable_invisible(self): + """ + The pack modifiable field should be invisible when: + - pack details are not displayed or + - pack component prices are not detailed + + """ + for product in self: + product.pack_modifiable_invisible = ( + product.pack_type != "detailed" + or product.pack_component_price != "detailed" + ) + + @api.onchange("pack_type", "pack_component_price") + def onchange_pack_type(self): + products = self.filtered( + lambda x: x.pack_modifiable + and (x.pack_type != "detailed" or x.pack_component_price != "detailed") + ) + for rec in products: + rec.pack_modifiable = False + + @api.constrains("company_id", "product_variant_ids") + def _check_pack_line_company(self): + """Check packs are related to packs of same company.""" + for rec in self: + for line in rec.pack_line_ids: + if ( + line.product_id.company_id and rec.company_id + ) and line.product_id.company_id != rec.company_id: + raise ValidationError( + _( + "Pack lines products company must be the same as the " + "parent product company" + ) + ) + for line in rec.used_in_pack_line_ids: + if ( + line.product_id.company_id and rec.company_id + ) and line.parent_product_id.company_id != rec.company_id: + raise ValidationError( + _( + "Pack lines products company must be the same as the " + "parent product company" + ) + ) + + def write(self, vals): + """We remove from product.product to avoid error.""" + _vals = vals.copy() + if vals.get("pack_line_ids", False): + self.product_variant_ids.write({"pack_line_ids": vals.get("pack_line_ids")}) + _vals.pop("pack_line_ids") + return super().write(_vals) diff --git a/product_pack/readme/CONTRIBUTORS.rst b/product_pack/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000..e0d92389 --- /dev/null +++ b/product_pack/readme/CONTRIBUTORS.rst @@ -0,0 +1,18 @@ +* `ADHOC SA `_: + + * Juan José Scarafía + * Nicolas Mac Rouillon + * Katherine Zaoral +* `NaN·TIC `_ +* `Tecnativa `_: + + * Ernesto Tejeda + * Pedro M. Baeza + * Jairo Llopis + * Sergio Teruel +* `Sygel `_: + + * Manuel Regidor +* `Bloopark `_: + + * July Chacko diff --git a/product_pack/readme/DESCRIPTION.rst b/product_pack/readme/DESCRIPTION.rst new file mode 100644 index 00000000..08d1193a --- /dev/null +++ b/product_pack/readme/DESCRIPTION.rst @@ -0,0 +1,2 @@ +This module allows you to define a product as a *Product Pack*. Each +*Product Pack* has a list of products that are part of this pack. diff --git a/product_pack/readme/ROADMAP.rst b/product_pack/readme/ROADMAP.rst new file mode 100644 index 00000000..b279fd9c --- /dev/null +++ b/product_pack/readme/ROADMAP.rst @@ -0,0 +1,4 @@ +* It could add another *Pack Type* called maybe *merged* in *Packs*, in which + the calculation of the related sale order line *Unit Price* is equal to + *main product Pack price* + *sum of all its component* +* Make *product.pack.line* multi-company diff --git a/product_pack/readme/USAGE.rst b/product_pack/readme/USAGE.rst new file mode 100644 index 00000000..9bee1990 --- /dev/null +++ b/product_pack/readme/USAGE.rst @@ -0,0 +1,30 @@ +To use this module, you need to: + +#. Go to *Sales > Products > Products*, create a product and set "Is Pack?". +#. Set *Pack Type* and *Pack component price*. +#. Then choose the products to include in the pack. + +`Product pack` is a base module for `sale_product_pack` and other modules that +needs to use packs. `Pack type` and `Pack component price` are used to define +the behavior that the packs will have when it is selected in the sales order +lines (if `sale_product_pack` module is installed). +The options of this field are the followings: + +`Pack type`: + + * Detailed: It allows you to select an option defined in + `Pack component price` field. + * Non Detailed: Will not show the components information, + only the pack product and the price will be the its price plus the sum of + all the components prices. + +`Pack component price`: + + * Detailed per component: will show each components and its prices, + including the pack product itself with its price. + * Totalized in main product: will show each component but will not show + components prices. The pack product will be the only one that has price + and this one will be its price plus the sum of all the components prices. + * Ignored: will show each components but will not show + components prices. The pack product will be the only one that has price + and this one will be the price set in the pack product. diff --git a/product_pack/security/ir.model.access.csv b/product_pack/security/ir.model.access.csv new file mode 100644 index 00000000..3f4dab2c --- /dev/null +++ b/product_pack/security/ir.model.access.csv @@ -0,0 +1,3 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_product_pack_line_user,product.pack.line,model_product_pack_line,base.group_user,1,0,0,0 +access_product_pack_line_system,product.pack.line,model_product_pack_line,base.group_system,1,1,1,1 diff --git a/product_pack/static/description/icon.png b/product_pack/static/description/icon.png new file mode 100644 index 00000000..3a0328b5 Binary files /dev/null and b/product_pack/static/description/icon.png differ diff --git a/product_pack/static/description/index.html b/product_pack/static/description/index.html new file mode 100644 index 00000000..d2a34e93 --- /dev/null +++ b/product_pack/static/description/index.html @@ -0,0 +1,489 @@ + + + + + + +Product Pack + + + +
+

Product Pack

+ + +

Beta License: AGPL-3 OCA/product-pack Translate me on Weblate Try me on Runbot

+

This module allows you to define a product as a Product Pack. Each +Product Pack has a list of products that are part of this pack.

+

Table of contents

+ +
+

Usage

+

To use this module, you need to:

+
    +
  1. Go to Sales > Products > Products, create a product and set “Is Pack?”.
  2. +
  3. Set Pack Type and Pack component price.
  4. +
  5. Then choose the products to include in the pack.
  6. +
+

Product pack is a base module for sale_product_pack and other modules that +needs to use packs. Pack type and Pack component price are used to define +the behavior that the packs will have when it is selected in the sales order +lines (if sale_product_pack module is installed). +The options of this field are the followings:

+

Pack type:

+
+
    +
  • Detailed: It allows you to select an option defined in +Pack component price field.
  • +
  • Non Detailed: Will not show the components information, +only the pack product and the price will be the its price plus the sum of +all the components prices.
  • +
+
+

Pack component price:

+
+
    +
  • Detailed per component: will show each components and its prices, +including the pack product itself with its price.
  • +
  • Totalized in main product: will show each component but will not show +components prices. The pack product will be the only one that has price +and this one will be its price plus the sum of all the components prices.
  • +
  • Ignored: will show each components but will not show +components prices. The pack product will be the only one that has price +and this one will be the price set in the pack product.
  • +
+
+
+
+

Known issues / Roadmap

+
    +
  • It could add another Pack Type called maybe merged in Packs, in which +the calculation of the related sale order line Unit Price is equal to +main product Pack price + sum of all its component
  • +
  • Make product.pack.line multi-company
  • +
+
+
+

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

+
    +
  • NaN·tic
  • +
  • ADHOC SA
  • +
  • Tecnativa
  • +
+
+
+

Contributors

+
    +
  • ADHOC SA:
      +
    • Juan José Scarafía
    • +
    • Nicolas Mac Rouillon
    • +
    • Katherine Zaoral
    • +
    +
  • +
  • NaN·TIC
  • +
  • Tecnativa:
      +
    • Ernesto Tejeda
    • +
    • Pedro M. Baeza
    • +
    • Jairo Llopis
    • +
    • Sergio Teruel
    • +
    +
  • +
  • Sygel:
      +
    • Manuel Regidor
    • +
    +
  • +
+
+
+

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.

+

Current maintainer:

+

ernestotejeda

+

This module is part of the OCA/product-pack project on GitHub.

+

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

+
+
+
+ + diff --git a/product_pack/tests/__init__.py b/product_pack/tests/__init__.py new file mode 100644 index 00000000..a88756fc --- /dev/null +++ b/product_pack/tests/__init__.py @@ -0,0 +1 @@ +from . import test_product_pack diff --git a/product_pack/tests/common.py b/product_pack/tests/common.py new file mode 100644 index 00000000..f421b0a3 --- /dev/null +++ b/product_pack/tests/common.py @@ -0,0 +1,16 @@ +# Copyright 2021 ACSONE SA/NV +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + + +class ProductPackCommon: + @classmethod + def setUpClass(cls): + super().setUpClass() + cls.product_pack_line_obj = cls.env["product.pack.line"] + cls.cpu_detailed = cls.env.ref( + "product_pack.product_pack_cpu_detailed_components" + ) + vals = { + "name": "Company Pack 2", + } + cls.company_2 = cls.env["res.company"].create(vals) diff --git a/product_pack/tests/test_product_pack.py b/product_pack/tests/test_product_pack.py new file mode 100644 index 00000000..c62deb54 --- /dev/null +++ b/product_pack/tests/test_product_pack.py @@ -0,0 +1,119 @@ +# Copyright 2021 ACSONE SA/NV +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +from psycopg2 import IntegrityError + +from odoo.exceptions import ValidationError +from odoo.tests import Form +from odoo.tests.common import TransactionCase +from odoo.tools import mute_logger + +from .common import ProductPackCommon + + +class TestProductPack(ProductPackCommon, TransactionCase): + @classmethod + def setUpClass(cls): + super().setUpClass() + + def test_product_pack_recursion(self): + # Add pack product in its pack lines + # Check constraint raises + with self.assertRaises(ValidationError): + self.cpu_detailed.write( + { + "pack_line_ids": [ + ( + 0, + 0, + { + "product_id": self.cpu_detailed.id, + "quantity": 1.0, + }, + ) + ] + } + ) + + @mute_logger("odoo.sql_db") + def test_product_in_pack_unique(self): + # Add product that is already in the concerned pack + # Check constraint raises + product_line = self.env.ref("product.product_product_16") + with self.assertRaises(IntegrityError), self.env.cr.savepoint(): + self.cpu_detailed.write( + { + "pack_line_ids": [ + ( + 0, + 0, + { + "product_id": product_line.id, + "quantity": 1.0, + }, + ) + ] + } + ) + + def test_get_pack_line_price(self): + # Check pack line price from product one + component = self.env.ref("product_pack.pack_cpu_detailed_components_1") + component.product_id.lst_price = 30.0 + self.assertEqual( + 30.0, + self.cpu_detailed.pack_line_ids.filtered( + lambda l: l.product_id == component.product_id + ).get_price(), + ) + + def test_get_pack_lst_price(self): + # Check pack lst_price if totalized from components + pack = self.env.ref("product_pack.product_pack_cpu_detailed_totalized") + component_1 = self.env.ref("product_pack.pack_cpu_detailed_totalized_1") + component_1.product_id.lst_price = 30.0 + component_2 = self.env.ref("product_pack.pack_cpu_detailed_totalized_3") + component_2.product_id.lst_price = 15.0 + component_3 = self.env.ref("product_pack.pack_cpu_detailed_totalized_4") + component_3.product_id.lst_price = 5.0 + self.assertEqual(50.0, pack.lst_price) + + def test_pack_company(self): + # Try to assign pack lines with product that do not belong to pack + # company + component = self.env.ref("product_pack.pack_cpu_detailed_totalized_1") + with self.assertRaises(ValidationError), self.env.cr.savepoint(): + component.product_id.company_id = self.company_2 + + def test_pack_line_company(self): + # Try to assign pack lines with product that do not belong to pack + # company + pack = self.env.ref("product_pack.product_pack_cpu_detailed_totalized") + with self.assertRaises(ValidationError), self.env.cr.savepoint(): + pack.company_id = self.company_2 + + def test_pack_type(self): + # Change pack type from detailed to non detailed + pack = self.env.ref( + "product_pack.product_pack_cpu_detailed_components" + ).product_tmpl_id + pack.pack_modifiable = True + with Form(pack) as pack_form: + pack_form.pack_type = "non_detailed" + self.assertFalse(pack_form.pack_modifiable) + + def test_pack_modifiable(self): + # Pack is detailed with component price as detailed + # Pack modifiable invisible should be False + # Set the Pack as non detailed + # Pack modifiable invisible should be True + # Set the Pack as detailed with component price as totalized + # Pack modifiable invisible should be True + pack = self.env.ref( + "product_pack.product_pack_cpu_detailed_components" + ).product_tmpl_id + self.assertFalse(pack.pack_modifiable_invisible) + pack.pack_type = "non_detailed" + self.assertTrue(pack.pack_modifiable_invisible) + pack.pack_type = "detailed" + pack.pack_component_price = "totalized" + self.assertTrue(pack.pack_modifiable_invisible) diff --git a/product_pack/views/product_pack_line_views.xml b/product_pack/views/product_pack_line_views.xml new file mode 100644 index 00000000..374d4bb6 --- /dev/null +++ b/product_pack/views/product_pack_line_views.xml @@ -0,0 +1,27 @@ + + + + + product.pack.line.form + product.pack.line + +
+ + + + +
+
+
+ + product.pack.line.tree + product.pack.line + + + + + + + +
diff --git a/product_pack/views/product_product_views.xml b/product_pack/views/product_product_views.xml new file mode 100644 index 00000000..7b6f779c --- /dev/null +++ b/product_pack/views/product_product_views.xml @@ -0,0 +1,17 @@ + + + + + product.product.pack.form + product.product + + + + + + + + + + diff --git a/product_pack/views/product_template_views.xml b/product_pack/views/product_template_views.xml new file mode 100644 index 00000000..7f9da795 --- /dev/null +++ b/product_pack/views/product_template_views.xml @@ -0,0 +1,73 @@ + + + + + + product.template.pack.form + product.template + + +
+
+ +
+
+ + + + + + + + + + + + +
+
+ + + product.template.pack.form + product.template + + + + {'invisible': ['|', ('product_variant_count', '>', 1), ('pack_ok', '=', False)]} + + + +

You must save first to add pack lines

+ + + + + +
+
+
+
+
diff --git a/sale_product_pack/README.rst b/sale_product_pack/README.rst new file mode 100644 index 00000000..a42a47b3 --- /dev/null +++ b/sale_product_pack/README.rst @@ -0,0 +1,126 @@ +================= +Sale Product Pack +================= + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! 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%2Fproduct--pack-lightgray.png?logo=github + :target: https://github.com/OCA/product-pack/tree/14.0/sale_product_pack + :alt: OCA/product-pack +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/product-pack-14-0/product-pack-14-0-sale_product_pack + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/286/14.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module adds *Product Pack* functionality to sales orders. You can choose +a *Pack* in *sales order lines* and see different behaviors depending on +"Pack type" and "Pack component price" fields options selected on this *Pack*. + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +To use this module, you need to: + +#. Go to *Sales > Products > Products*, create or select a product and check + *Is Pack?* +#. Set "Product type" and "Pack component price" fields in the *Pack* page. +#. Add the products to be included in it. +#. Go to *Sales > Orders > Quotations* and create a Quotation. +#. Add a product that has checked "Is Pack?" +#. Save data and you will see an specific behavior depending on "Pack type" and + "Pack component price" fields options selected on this *Pack*. For example, + for products that has *Detailed* option selected in "Pack type" field you + will see one *sale order line* per component that belong to this Pack. + (See *Product pack* module README.rst file) + +Known issues / Roadmap +====================== + +* If this module is installed and stock module is installed too, when you + create a Sale order for a *Non detailed* Pack and you confirm it, + a *Stock picking* is not created with the storable components of that Pack. + So, add a new module called *sale_stock_product_pack* that adds that feature. + +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 +~~~~~~~ + +* NaN·tic +* ADHOC SA +* Tecnativa +* bloopark systems GmbH & Co. KG + +Contributors +~~~~~~~~~~~~ + +* `Tecnativa `_: + + * Ernesto Tejeda + * Pedro M. Baeza + +* `Akretion `_: + + * Raphaël Reverdy + +* `Open Source Integrators `_: + + * Daniel Reis + +* `bloopark systems GmbH & Co. KG `_: + + * July Chacko + +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. + +.. |maintainer-ernestotejeda| image:: https://github.com/ernestotejeda.png?size=40px + :target: https://github.com/ernestotejeda + :alt: ernestotejeda + +Current `maintainer `__: + +|maintainer-ernestotejeda| + +This module is part of the `OCA/product-pack `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/sale_product_pack/__init__.py b/sale_product_pack/__init__.py new file mode 100644 index 00000000..cb45f271 --- /dev/null +++ b/sale_product_pack/__init__.py @@ -0,0 +1,2 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +from . import models diff --git a/sale_product_pack/__manifest__.py b/sale_product_pack/__manifest__.py new file mode 100644 index 00000000..268caea0 --- /dev/null +++ b/sale_product_pack/__manifest__.py @@ -0,0 +1,17 @@ +# Copyright 2019 NaN (http://www.nan-tic.com) - Àngel Àlvarez +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +{ + "name": "Sale Product Pack", + "version": "16.0.1.1.1", + "category": "Sales", + "summary": "This module allows you to sell product packs", + "website": "https://github.com/OCA/product-pack", + "author": "NaN·tic, ADHOC SA, Tecnativa, bloopark systems GmbH & Co. KG, " + "Odoo Community Association (OCA)", + "maintainers": ["ernestotejeda"], + "license": "AGPL-3", + "depends": ["product_pack", "sale"], + "data": ["security/ir.model.access.csv", "views/product_pack_line_views.xml"], + "demo": ["demo/product_pack_line_demo.xml"], + "installable": True, +} diff --git a/sale_product_pack/demo/product_pack_line_demo.xml b/sale_product_pack/demo/product_pack_line_demo.xml new file mode 100644 index 00000000..b40178bd --- /dev/null +++ b/sale_product_pack/demo/product_pack_line_demo.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/sale_product_pack/i18n/ca.po b/sale_product_pack/i18n/ca.po new file mode 100644 index 00000000..52fe35d1 --- /dev/null +++ b/sale_product_pack/i18n/ca.po @@ -0,0 +1,186 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_product_pack +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2022-02-28 13:17+0000\n" +"Last-Translator: Noel estudillo \n" +"Language-Team: none\n" +"Language: ca\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.3.2\n" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line__pack_depth +msgid "Depth" +msgstr "Profunditat" + +#. module: sale_product_pack +#: model:ir.model.fields,help:sale_product_pack.field_sale_order_line__pack_depth +msgid "Depth of the product if it is part of a pack." +msgstr "Profunditat del producte si forma part d’un pack." + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_product_pack_line__display_name +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order__display_name +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line__display_name +msgid "Display Name" +msgstr "Nom de visualització" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line__do_no_expand_pack_lines +msgid "Do No Expand Pack Lines" +msgstr "" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_product_pack_line__id +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order__id +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line__id +msgid "ID" +msgstr "ID" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_product_pack_line____last_update +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order____last_update +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line____last_update +msgid "Last Modified on" +msgstr "Última modificació el" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line__pack_child_line_ids +msgid "Lines in pack" +msgstr "Línies en pack" + +#. module: sale_product_pack +#: model:ir.model.fields,help:sale_product_pack.field_sale_order_line__pack_component_price +msgid "" +"On sale orders or purchase orders:\n" +"* Detailed per component: Detail lines with prices.\n" +"* Totalized in main product: Detail lines merging lines prices on pack " +"(don't show component prices).\n" +"* Ignored: Use product pack price (ignore detail line prices)." +msgstr "" +"Comandes de venda o comandes de compra:\n" +"* Detall per component: Línies de detall amb preus.\n" +"* Totalitzat en producte principal: línies de detalls fusionen els preus de " +"les línies en el pack (no mostren els preus dels components).\n" +"* Ignorat: utilitza el preu del pack de producte (ignora els preus de la " +"línia de detalls)." + +#. module: sale_product_pack +#: model:ir.model.fields,help:sale_product_pack.field_sale_order_line__pack_type +msgid "" +"On sale orders or purchase orders:\n" +"* Detailed: Display components individually in the sale order.\n" +"* Non Detailed: Do not display components individually in the sale order." +msgstr "" +"Comandes de venda o comandes de compra:\n" +"* Detallat: mostra els components de forma individual en la comanda de " +"venda.\n" +"* No detallat: no mostren els components de forma individual en la comanda " +"de venda." + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line__pack_parent_line_id +msgid "Pack" +msgstr "Pack" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line__pack_type +msgid "Pack Display Type" +msgstr "Tipus de pantalla de paquet" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line__pack_modifiable +msgid "Pack Modifiable" +msgstr "Paquet modificable" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line__pack_component_price +msgid "Pack component price" +msgstr "Preu dels components" + +#. module: sale_product_pack +#: model_terms:ir.ui.view,arch_db:sale_product_pack.view_order_form +msgid "Parent Pack is not modifiable" +msgstr "El paquet de pares no es pot modificar" + +#. module: sale_product_pack +#: code:addons/sale_product_pack/models/sale_order_line.py:0 +#, python-format +msgid "Parent Product" +msgstr "Producte principal" + +#. module: sale_product_pack +#: model:ir.model,name:sale_product_pack.model_product_pack_line +msgid "Product pack line" +msgstr "Línia de pack" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_product_pack_line__sale_discount +msgid "Sale discount (%)" +msgstr "Descompte per vendes" + +#. module: sale_product_pack +#: model:ir.model,name:sale_product_pack.model_sale_order +msgid "Sales Order" +msgstr "Comanda de venda" + +#. module: sale_product_pack +#: model:ir.model,name:sale_product_pack.model_sale_order_line +msgid "Sales Order Line" +msgstr "Línia de comandes de vendes" + +#. module: sale_product_pack +#: model:ir.model.fields,help:sale_product_pack.field_sale_order_line__pack_parent_line_id +msgid "The pack that contains this product." +msgstr "El pack que conté aquest producte." + +#. module: sale_product_pack +#: model:ir.model.fields,help:sale_product_pack.field_sale_order_line__pack_modifiable +msgid "The parent pack is modifiable" +msgstr "El paquet principal és modificable" + +#. module: sale_product_pack +#: model:ir.model.fields,help:sale_product_pack.field_sale_order_line__do_no_expand_pack_lines +msgid "" +"This is a technical field in order to check if pack lines has to be expanded" +msgstr "" + +#. module: sale_product_pack +#: code:addons/sale_product_pack/models/sale_order_line.py:0 +#, python-format +msgid "" +"You can not change this line because is part of a pack included in this order" +msgstr "" +"No podeu canviar aquesta línia perquè forma part d’un pack inclòs en aquest " +"ordre" + +#. module: sale_product_pack +#: code:addons/sale_product_pack/models/sale_order.py:0 +#, python-format +msgid "" +"You cannot delete this line because is part of a pack in this sale order. In " +"order to delete this line you need to delete the pack itself" +msgstr "" +"No podeu suprimir aquesta línia perquè forma part d'un paquet d'aquesta " +"comanda de venda. Per eliminar aquesta línia, heu d'esborrar el paquet en si" + +#~ msgid "Pack Type" +#~ msgstr "Tipus de pack" + +#~ msgid "Sale Order" +#~ msgstr "Comanda de venda" + +#~ msgid "" +#~ "You can not delete this line because is part of a pack in this sale " +#~ "order. In order to delete this line you need to delete the pack itself" +#~ msgstr "" +#~ "No podeu suprimir aquesta línia perquè forma part d’un pack d’aquesta " +#~ "comanda de venda. Per eliminar aquesta línia, heu de suprimir el pack" diff --git a/sale_product_pack/i18n/ca_ES.po b/sale_product_pack/i18n/ca_ES.po new file mode 100644 index 00000000..26640285 --- /dev/null +++ b/sale_product_pack/i18n/ca_ES.po @@ -0,0 +1,156 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_product_pack +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: ca_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" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line__pack_depth +msgid "Depth" +msgstr "" + +#. module: sale_product_pack +#: model:ir.model.fields,help:sale_product_pack.field_sale_order_line__pack_depth +msgid "Depth of the product if it is part of a pack." +msgstr "" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_product_pack_line__display_name +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order__display_name +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line__display_name +msgid "Display Name" +msgstr "" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line__do_no_expand_pack_lines +msgid "Do No Expand Pack Lines" +msgstr "" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_product_pack_line__id +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order__id +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line__id +msgid "ID" +msgstr "" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_product_pack_line____last_update +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order____last_update +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line____last_update +msgid "Last Modified on" +msgstr "" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line__pack_child_line_ids +msgid "Lines in pack" +msgstr "" + +#. module: sale_product_pack +#: model:ir.model.fields,help:sale_product_pack.field_sale_order_line__pack_component_price +msgid "" +"On sale orders or purchase orders:\n" +"* Detailed per component: Detail lines with prices.\n" +"* Totalized in main product: Detail lines merging lines prices on pack " +"(don't show component prices).\n" +"* Ignored: Use product pack price (ignore detail line prices)." +msgstr "" + +#. module: sale_product_pack +#: model:ir.model.fields,help:sale_product_pack.field_sale_order_line__pack_type +msgid "" +"On sale orders or purchase orders:\n" +"* Detailed: Display components individually in the sale order.\n" +"* Non Detailed: Do not display components individually in the sale order." +msgstr "" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line__pack_parent_line_id +msgid "Pack" +msgstr "" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line__pack_type +msgid "Pack Display Type" +msgstr "" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line__pack_modifiable +msgid "Pack Modifiable" +msgstr "" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line__pack_component_price +msgid "Pack component price" +msgstr "" + +#. module: sale_product_pack +#: model_terms:ir.ui.view,arch_db:sale_product_pack.view_order_form +msgid "Parent Pack is not modifiable" +msgstr "" + +#. module: sale_product_pack +#: code:addons/sale_product_pack/models/sale_order_line.py:0 +#, python-format +msgid "Parent Product" +msgstr "" + +#. module: sale_product_pack +#: model:ir.model,name:sale_product_pack.model_product_pack_line +msgid "Product pack line" +msgstr "" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_product_pack_line__sale_discount +msgid "Sale discount (%)" +msgstr "" + +#. module: sale_product_pack +#: model:ir.model,name:sale_product_pack.model_sale_order +msgid "Sales Order" +msgstr "" + +#. module: sale_product_pack +#: model:ir.model,name:sale_product_pack.model_sale_order_line +msgid "Sales Order Line" +msgstr "" + +#. module: sale_product_pack +#: model:ir.model.fields,help:sale_product_pack.field_sale_order_line__pack_parent_line_id +msgid "The pack that contains this product." +msgstr "" + +#. module: sale_product_pack +#: model:ir.model.fields,help:sale_product_pack.field_sale_order_line__pack_modifiable +msgid "The parent pack is modifiable" +msgstr "" + +#. module: sale_product_pack +#: model:ir.model.fields,help:sale_product_pack.field_sale_order_line__do_no_expand_pack_lines +msgid "" +"This is a technical field in order to check if pack lines has to be expanded" +msgstr "" + +#. module: sale_product_pack +#: code:addons/sale_product_pack/models/sale_order_line.py:0 +#, python-format +msgid "" +"You can not change this line because is part of a pack included in this order" +msgstr "" + +#. module: sale_product_pack +#: code:addons/sale_product_pack/models/sale_order.py:0 +#, python-format +msgid "" +"You cannot delete this line because is part of a pack in this sale order. In " +"order to delete this line you need to delete the pack itself" +msgstr "" diff --git a/sale_product_pack/i18n/es.po b/sale_product_pack/i18n/es.po new file mode 100644 index 00000000..c93c5fab --- /dev/null +++ b/sale_product_pack/i18n/es.po @@ -0,0 +1,187 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_product_pack +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2019-09-20 22:46+0000\n" +"PO-Revision-Date: 2019-12-27 14:13+0000\n" +"Last-Translator: Carles Antoli \n" +"Language-Team: \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 3.10\n" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line__pack_depth +msgid "Depth" +msgstr "Profundidad" + +#. module: sale_product_pack +#: model:ir.model.fields,help:sale_product_pack.field_sale_order_line__pack_depth +msgid "Depth of the product if it is part of a pack." +msgstr "Profundidad del producto si forma parte de un pack." + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_product_pack_line__display_name +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order__display_name +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line__display_name +msgid "Display Name" +msgstr "" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line__do_no_expand_pack_lines +msgid "Do No Expand Pack Lines" +msgstr "" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_product_pack_line__id +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order__id +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line__id +msgid "ID" +msgstr "" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_product_pack_line____last_update +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order____last_update +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line____last_update +msgid "Last Modified on" +msgstr "" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line__pack_child_line_ids +msgid "Lines in pack" +msgstr "Líneas en el pack" + +#. module: sale_product_pack +#: model:ir.model.fields,help:sale_product_pack.field_sale_order_line__pack_component_price +#, fuzzy +msgid "" +"On sale orders or purchase orders:\n" +"* Detailed per component: Detail lines with prices.\n" +"* Totalized in main product: Detail lines merging lines prices on pack " +"(don't show component prices).\n" +"* Ignored: Use product pack price (ignore detail line prices)." +msgstr "" +"En órdenes de venta u órdenes de compra:\n" +"* Detallado por componente: Detalla las lineas con precios.\n" +"* Totalizado en el producto principal: Detalla las lineas mezclando sus " +"precios en el Pack (No muestra los precios de los componentes).\n" +"* Ignorado: Se usa el precio el Pack (los precios de las lineas son " +"ignorados)." + +#. module: sale_product_pack +#: model:ir.model.fields,help:sale_product_pack.field_sale_order_line__pack_type +#, fuzzy +msgid "" +"On sale orders or purchase orders:\n" +"* Detailed: Display components individually in the sale order.\n" +"* Non Detailed: Do not display components individually in the sale order." +msgstr "" +"En órdenes de venta u órdenes de compra:\n" +"* Detallado: Muestra los componentes individualmente en lineas de la Orden " +"de Venta/Orden de Compra\n" +"* No Detallado: No muestra los componentes individualmente en lineas de la " +"Orden de Venta/Orden de Compra" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line__pack_parent_line_id +msgid "Pack" +msgstr "Pack" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line__pack_type +msgid "Pack Display Type" +msgstr "" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line__pack_modifiable +msgid "Pack Modifiable" +msgstr "" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line__pack_component_price +msgid "Pack component price" +msgstr "Precio de los componentes" + +#. module: sale_product_pack +#: model_terms:ir.ui.view,arch_db:sale_product_pack.view_order_form +msgid "Parent Pack is not modifiable" +msgstr "" + +#. module: sale_product_pack +#: code:addons/sale_product_pack/models/sale_order_line.py:0 +#, fuzzy, python-format +msgid "Parent Product" +msgstr "Producto" + +#. module: sale_product_pack +#: model:ir.model,name:sale_product_pack.model_product_pack_line +msgid "Product pack line" +msgstr "Linea de pack" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_product_pack_line__sale_discount +msgid "Sale discount (%)" +msgstr "Descuento para ventas" + +#. module: sale_product_pack +#: model:ir.model,name:sale_product_pack.model_sale_order +msgid "Sales Order" +msgstr "" + +#. module: sale_product_pack +#: model:ir.model,name:sale_product_pack.model_sale_order_line +msgid "Sales Order Line" +msgstr "Línea de pedido de venta" + +#. module: sale_product_pack +#: model:ir.model.fields,help:sale_product_pack.field_sale_order_line__pack_parent_line_id +msgid "The pack that contains this product." +msgstr "El pack que contiene este producto." + +#. module: sale_product_pack +#: model:ir.model.fields,help:sale_product_pack.field_sale_order_line__pack_modifiable +msgid "The parent pack is modifiable" +msgstr "" + +#. module: sale_product_pack +#: model:ir.model.fields,help:sale_product_pack.field_sale_order_line__do_no_expand_pack_lines +msgid "" +"This is a technical field in order to check if pack lines has to be expanded" +msgstr "" + +#. module: sale_product_pack +#: code:addons/sale_product_pack/models/sale_order_line.py:0 +#, python-format +msgid "" +"You can not change this line because is part of a pack included in this order" +msgstr "" +"No puedes cambiar esta línea porque es parte de un pack incluido en este " +"orden" + +#. module: sale_product_pack +#: code:addons/sale_product_pack/models/sale_order.py:0 +#, python-format +msgid "" +"You cannot delete this line because is part of a pack in this sale order. In " +"order to delete this line you need to delete the pack itself" +msgstr "" + +#~ msgid "Pack Type" +#~ msgstr "Tipo de Pack" + +#~ msgid "Sale Order" +#~ msgstr "Pedido de venta" + +#~ msgid "" +#~ "You can not delete this line because is part of a pack in this sale " +#~ "order. In order to delete this line you need to delete the pack itself" +#~ msgstr "" +#~ "No puede eliminar esta línea porque forma parte de un pack en esta orden " +#~ "de venta. Para eliminar esta línea necesitas eliminar el pack" diff --git a/sale_product_pack/i18n/fr.po b/sale_product_pack/i18n/fr.po new file mode 100644 index 00000000..a15a6d40 --- /dev/null +++ b/sale_product_pack/i18n/fr.po @@ -0,0 +1,183 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_product_pack +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2020-05-28 12:19+0000\n" +"Last-Translator: Yann Papouin \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 3.10\n" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line__pack_depth +msgid "Depth" +msgstr "Niveau" + +#. module: sale_product_pack +#: model:ir.model.fields,help:sale_product_pack.field_sale_order_line__pack_depth +msgid "Depth of the product if it is part of a pack." +msgstr "Niveau de l'article s'il fait partie d'un pack." + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_product_pack_line__display_name +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order__display_name +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line__display_name +msgid "Display Name" +msgstr "" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line__do_no_expand_pack_lines +msgid "Do No Expand Pack Lines" +msgstr "" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_product_pack_line__id +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order__id +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line__id +msgid "ID" +msgstr "" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_product_pack_line____last_update +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order____last_update +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line____last_update +msgid "Last Modified on" +msgstr "" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line__pack_child_line_ids +msgid "Lines in pack" +msgstr "Lignes rattachées à un pack" + +#. module: sale_product_pack +#: model:ir.model.fields,help:sale_product_pack.field_sale_order_line__pack_component_price +msgid "" +"On sale orders or purchase orders:\n" +"* Detailed per component: Detail lines with prices.\n" +"* Totalized in main product: Detail lines merging lines prices on pack " +"(don't show component prices).\n" +"* Ignored: Use product pack price (ignore detail line prices)." +msgstr "" +"Sur les commandes clients ou fournisseurs :\n" +"* Détaillé par composant : lignes détaillées avec prix.\n" +"* Totalisé dans l'article principal : lignes détaillées mais le prix est " +"additionné sur celui du pack (n'affiche pas les prix par composant).\n" +"* Ignoré : utilise le prix du pack d'articles (ignore les prix des " +"composants)." + +#. module: sale_product_pack +#: model:ir.model.fields,help:sale_product_pack.field_sale_order_line__pack_type +msgid "" +"On sale orders or purchase orders:\n" +"* Detailed: Display components individually in the sale order.\n" +"* Non Detailed: Do not display components individually in the sale order." +msgstr "" +"Sur les commandes clients ou fournisseurs :\n" +"* Détaillé : affiche les composants individuellement dans la commande.\n" +"* Non détaillé : n'affiche pas les composants dans la commande." + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line__pack_parent_line_id +msgid "Pack" +msgstr "Pack" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line__pack_type +msgid "Pack Display Type" +msgstr "" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line__pack_modifiable +msgid "Pack Modifiable" +msgstr "Pack modifiable" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line__pack_component_price +msgid "Pack component price" +msgstr "Prix d'un composant du pack" + +#. module: sale_product_pack +#: model_terms:ir.ui.view,arch_db:sale_product_pack.view_order_form +msgid "Parent Pack is not modifiable" +msgstr "Le pack parent n'est pas modifiable" + +#. module: sale_product_pack +#: code:addons/sale_product_pack/models/sale_order_line.py:0 +#, python-format +msgid "Parent Product" +msgstr "Article parent" + +#. module: sale_product_pack +#: model:ir.model,name:sale_product_pack.model_product_pack_line +msgid "Product pack line" +msgstr "Ligne d'article de pack" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_product_pack_line__sale_discount +msgid "Sale discount (%)" +msgstr "Remise de vente (%)" + +#. module: sale_product_pack +#: model:ir.model,name:sale_product_pack.model_sale_order +msgid "Sales Order" +msgstr "" + +#. module: sale_product_pack +#: model:ir.model,name:sale_product_pack.model_sale_order_line +msgid "Sales Order Line" +msgstr "Ligne de bons de commande" + +#. module: sale_product_pack +#: model:ir.model.fields,help:sale_product_pack.field_sale_order_line__pack_parent_line_id +msgid "The pack that contains this product." +msgstr "Le pack qui contient cet article." + +#. module: sale_product_pack +#: model:ir.model.fields,help:sale_product_pack.field_sale_order_line__pack_modifiable +msgid "The parent pack is modifiable" +msgstr "Le pack parent est modifiable" + +#. module: sale_product_pack +#: model:ir.model.fields,help:sale_product_pack.field_sale_order_line__do_no_expand_pack_lines +msgid "" +"This is a technical field in order to check if pack lines has to be expanded" +msgstr "" + +#. module: sale_product_pack +#: code:addons/sale_product_pack/models/sale_order_line.py:0 +#, python-format +msgid "" +"You can not change this line because is part of a pack included in this order" +msgstr "" +"Vous ne pouvez pas modifier cette ligne car elle fait partie d'un pack " +"inclus dans cette commande" + +#. module: sale_product_pack +#: code:addons/sale_product_pack/models/sale_order.py:0 +#, python-format +msgid "" +"You cannot delete this line because is part of a pack in this sale order. In " +"order to delete this line you need to delete the pack itself" +msgstr "" + +#~ msgid "Pack Type" +#~ msgstr "Type de pack" + +#~ msgid "Sale Order" +#~ msgstr "Bon de commande" + +#~ msgid "" +#~ "You can not delete this line because is part of a pack in this sale " +#~ "order. In order to delete this line you need to delete the pack itself" +#~ msgstr "" +#~ "Vous ne pouvez pas supprimer cette ligne car elle fait partie d'un pack " +#~ "dans ce bon de commande. Pour supprimer cette ligne, vous devez supprimer " +#~ "le pack lui-même" diff --git a/sale_product_pack/i18n/nl.po b/sale_product_pack/i18n/nl.po new file mode 100644 index 00000000..dcf12d7e --- /dev/null +++ b/sale_product_pack/i18n/nl.po @@ -0,0 +1,163 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_product_pack +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 13.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2020-12-14 00:28+0000\n" +"Last-Translator: Bosd \n" +"Language-Team: none\n" +"Language: nl\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.3.2\n" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line__pack_depth +msgid "Depth" +msgstr "Diepte" + +#. module: sale_product_pack +#: model:ir.model.fields,help:sale_product_pack.field_sale_order_line__pack_depth +msgid "Depth of the product if it is part of a pack." +msgstr "" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_product_pack_line__display_name +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order__display_name +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line__display_name +msgid "Display Name" +msgstr "" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line__do_no_expand_pack_lines +msgid "Do No Expand Pack Lines" +msgstr "" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_product_pack_line__id +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order__id +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line__id +msgid "ID" +msgstr "" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_product_pack_line____last_update +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order____last_update +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line____last_update +msgid "Last Modified on" +msgstr "" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line__pack_child_line_ids +msgid "Lines in pack" +msgstr "regels in verpakking" + +#. module: sale_product_pack +#: model:ir.model.fields,help:sale_product_pack.field_sale_order_line__pack_component_price +msgid "" +"On sale orders or purchase orders:\n" +"* Detailed per component: Detail lines with prices.\n" +"* Totalized in main product: Detail lines merging lines prices on pack " +"(don't show component prices).\n" +"* Ignored: Use product pack price (ignore detail line prices)." +msgstr "" + +#. module: sale_product_pack +#: model:ir.model.fields,help:sale_product_pack.field_sale_order_line__pack_type +msgid "" +"On sale orders or purchase orders:\n" +"* Detailed: Display components individually in the sale order.\n" +"* Non Detailed: Do not display components individually in the sale order." +msgstr "" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line__pack_parent_line_id +msgid "Pack" +msgstr "Verpakking" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line__pack_type +msgid "Pack Display Type" +msgstr "" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line__pack_modifiable +msgid "Pack Modifiable" +msgstr "Aanpasbare verpakking" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line__pack_component_price +msgid "Pack component price" +msgstr "" + +#. module: sale_product_pack +#: model_terms:ir.ui.view,arch_db:sale_product_pack.view_order_form +msgid "Parent Pack is not modifiable" +msgstr "" + +#. module: sale_product_pack +#: code:addons/sale_product_pack/models/sale_order_line.py:0 +#, python-format +msgid "Parent Product" +msgstr "" + +#. module: sale_product_pack +#: model:ir.model,name:sale_product_pack.model_product_pack_line +msgid "Product pack line" +msgstr "" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_product_pack_line__sale_discount +msgid "Sale discount (%)" +msgstr "" + +#. module: sale_product_pack +#: model:ir.model,name:sale_product_pack.model_sale_order +msgid "Sales Order" +msgstr "Verkooporder" + +#. module: sale_product_pack +#: model:ir.model,name:sale_product_pack.model_sale_order_line +msgid "Sales Order Line" +msgstr "" + +#. module: sale_product_pack +#: model:ir.model.fields,help:sale_product_pack.field_sale_order_line__pack_parent_line_id +msgid "The pack that contains this product." +msgstr "" + +#. module: sale_product_pack +#: model:ir.model.fields,help:sale_product_pack.field_sale_order_line__pack_modifiable +msgid "The parent pack is modifiable" +msgstr "De hoofdverpakking is aanpasbaar" + +#. module: sale_product_pack +#: model:ir.model.fields,help:sale_product_pack.field_sale_order_line__do_no_expand_pack_lines +msgid "" +"This is a technical field in order to check if pack lines has to be expanded" +msgstr "" + +#. module: sale_product_pack +#: code:addons/sale_product_pack/models/sale_order_line.py:0 +#, python-format +msgid "" +"You can not change this line because is part of a pack included in this order" +msgstr "" +"Deze regel kan niet worden aangepast omdat een verpakking is gebruikt in " +"deze verkoop order" + +#. module: sale_product_pack +#: code:addons/sale_product_pack/models/sale_order.py:0 +#, python-format +msgid "" +"You cannot delete this line because is part of a pack in this sale order. In " +"order to delete this line you need to delete the pack itself" +msgstr "" + +#~ msgid "Pack Type" +#~ msgstr "Verpakkingstype" diff --git a/sale_product_pack/i18n/pt.po b/sale_product_pack/i18n/pt.po new file mode 100644 index 00000000..bab349be --- /dev/null +++ b/sale_product_pack/i18n/pt.po @@ -0,0 +1,182 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_product_pack +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2019-12-12 22:05+0000\n" +"Last-Translator: Pedro Castro Silva \n" +"Language-Team: none\n" +"Language: pt\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 3.9.1\n" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line__pack_depth +msgid "Depth" +msgstr "Profundidade" + +#. module: sale_product_pack +#: model:ir.model.fields,help:sale_product_pack.field_sale_order_line__pack_depth +msgid "Depth of the product if it is part of a pack." +msgstr "Profundidade do produto se é parte de um pack." + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_product_pack_line__display_name +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order__display_name +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line__display_name +msgid "Display Name" +msgstr "" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line__do_no_expand_pack_lines +msgid "Do No Expand Pack Lines" +msgstr "" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_product_pack_line__id +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order__id +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line__id +msgid "ID" +msgstr "" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_product_pack_line____last_update +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order____last_update +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line____last_update +msgid "Last Modified on" +msgstr "" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line__pack_child_line_ids +msgid "Lines in pack" +msgstr "Linhas no pack" + +#. module: sale_product_pack +#: model:ir.model.fields,help:sale_product_pack.field_sale_order_line__pack_component_price +msgid "" +"On sale orders or purchase orders:\n" +"* Detailed per component: Detail lines with prices.\n" +"* Totalized in main product: Detail lines merging lines prices on pack " +"(don't show component prices).\n" +"* Ignored: Use product pack price (ignore detail line prices)." +msgstr "" +"Em encomendas de compra ou venda:\n" +"* Detalhado por componente: Linha de detalhes com preços.\n" +"* Totalizado no produto principal: Linhas de detalhes fundindo os preços das " +"linhas no pack (não mostrar preços dos componentes).\n" +"* Ignorado: Usar o preço do pack de produtos (ignorar preços das linhas de " +"detalhes)." + +#. module: sale_product_pack +#: model:ir.model.fields,help:sale_product_pack.field_sale_order_line__pack_type +msgid "" +"On sale orders or purchase orders:\n" +"* Detailed: Display components individually in the sale order.\n" +"* Non Detailed: Do not display components individually in the sale order." +msgstr "" +"Em encomendas de compra ou venda:\n" +"* Detalhado: Exibir os componentes individualmente na encomenda.\n" +"*Não Detalhado: Não exibir os componentes individualmente na encomenda." + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line__pack_parent_line_id +msgid "Pack" +msgstr "" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line__pack_type +msgid "Pack Display Type" +msgstr "" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line__pack_modifiable +msgid "Pack Modifiable" +msgstr "" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line__pack_component_price +msgid "Pack component price" +msgstr "Preço do componente do pack" + +#. module: sale_product_pack +#: model_terms:ir.ui.view,arch_db:sale_product_pack.view_order_form +msgid "Parent Pack is not modifiable" +msgstr "" + +#. module: sale_product_pack +#: code:addons/sale_product_pack/models/sale_order_line.py:0 +#, python-format +msgid "Parent Product" +msgstr "" + +#. module: sale_product_pack +#: model:ir.model,name:sale_product_pack.model_product_pack_line +msgid "Product pack line" +msgstr "Linha de pack de produto" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_product_pack_line__sale_discount +msgid "Sale discount (%)" +msgstr "Desconto de venda (%)" + +#. module: sale_product_pack +#: model:ir.model,name:sale_product_pack.model_sale_order +msgid "Sales Order" +msgstr "" + +#. module: sale_product_pack +#: model:ir.model,name:sale_product_pack.model_sale_order_line +msgid "Sales Order Line" +msgstr "Linha de Encomenda de Venda" + +#. module: sale_product_pack +#: model:ir.model.fields,help:sale_product_pack.field_sale_order_line__pack_parent_line_id +msgid "The pack that contains this product." +msgstr "O pack que contém este produto." + +#. module: sale_product_pack +#: model:ir.model.fields,help:sale_product_pack.field_sale_order_line__pack_modifiable +msgid "The parent pack is modifiable" +msgstr "" + +#. module: sale_product_pack +#: model:ir.model.fields,help:sale_product_pack.field_sale_order_line__do_no_expand_pack_lines +msgid "" +"This is a technical field in order to check if pack lines has to be expanded" +msgstr "" + +#. module: sale_product_pack +#: code:addons/sale_product_pack/models/sale_order_line.py:0 +#, python-format +msgid "" +"You can not change this line because is part of a pack included in this order" +msgstr "" +"Não pode alterar esta linha porque é parte de um pack incluído nesta " +"encomenda" + +#. module: sale_product_pack +#: code:addons/sale_product_pack/models/sale_order.py:0 +#, python-format +msgid "" +"You cannot delete this line because is part of a pack in this sale order. In " +"order to delete this line you need to delete the pack itself" +msgstr "" + +#~ msgid "Pack Type" +#~ msgstr "Tipo de Pack" + +#~ msgid "Sale Order" +#~ msgstr "Encomenda de Venda" + +#~ msgid "" +#~ "You can not delete this line because is part of a pack in this sale " +#~ "order. In order to delete this line you need to delete the pack itself" +#~ msgstr "" +#~ "Não pode eliminar esta linha porque é parte de um pack incluído nesta " +#~ "encomenda. Para a eliminar, precisa de eliminar o próprio pack" diff --git a/sale_product_pack/i18n/sale_product_pack.pot b/sale_product_pack/i18n/sale_product_pack.pot new file mode 100644 index 00000000..08763364 --- /dev/null +++ b/sale_product_pack/i18n/sale_product_pack.pot @@ -0,0 +1,155 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_product_pack +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.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: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line__pack_depth +msgid "Depth" +msgstr "" + +#. module: sale_product_pack +#: model:ir.model.fields,help:sale_product_pack.field_sale_order_line__pack_depth +msgid "Depth of the product if it is part of a pack." +msgstr "" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_product_pack_line__display_name +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order__display_name +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line__display_name +msgid "Display Name" +msgstr "" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line__do_no_expand_pack_lines +msgid "Do No Expand Pack Lines" +msgstr "" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_product_pack_line__id +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order__id +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line__id +msgid "ID" +msgstr "" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_product_pack_line____last_update +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order____last_update +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line____last_update +msgid "Last Modified on" +msgstr "" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line__pack_child_line_ids +msgid "Lines in pack" +msgstr "" + +#. module: sale_product_pack +#: model:ir.model.fields,help:sale_product_pack.field_sale_order_line__pack_component_price +msgid "" +"On sale orders or purchase orders:\n" +"* Detailed per component: Detail lines with prices.\n" +"* Totalized in main product: Detail lines merging lines prices on pack (don't show component prices).\n" +"* Ignored: Use product pack price (ignore detail line prices)." +msgstr "" + +#. module: sale_product_pack +#: model:ir.model.fields,help:sale_product_pack.field_sale_order_line__pack_type +msgid "" +"On sale orders or purchase orders:\n" +"* Detailed: Display components individually in the sale order.\n" +"* Non Detailed: Do not display components individually in the sale order." +msgstr "" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line__pack_parent_line_id +msgid "Pack" +msgstr "" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line__pack_type +msgid "Pack Display Type" +msgstr "" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line__pack_modifiable +msgid "Pack Modifiable" +msgstr "" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_sale_order_line__pack_component_price +msgid "Pack component price" +msgstr "" + +#. module: sale_product_pack +#: model_terms:ir.ui.view,arch_db:sale_product_pack.view_order_form +msgid "Parent Pack is not modifiable" +msgstr "" + +#. module: sale_product_pack +#: code:addons/sale_product_pack/models/sale_order_line.py:0 +#, python-format +msgid "Parent Product" +msgstr "" + +#. module: sale_product_pack +#: model:ir.model,name:sale_product_pack.model_product_pack_line +msgid "Product pack line" +msgstr "" + +#. module: sale_product_pack +#: model:ir.model.fields,field_description:sale_product_pack.field_product_pack_line__sale_discount +msgid "Sale discount (%)" +msgstr "" + +#. module: sale_product_pack +#: model:ir.model,name:sale_product_pack.model_sale_order +msgid "Sales Order" +msgstr "" + +#. module: sale_product_pack +#: model:ir.model,name:sale_product_pack.model_sale_order_line +msgid "Sales Order Line" +msgstr "" + +#. module: sale_product_pack +#: model:ir.model.fields,help:sale_product_pack.field_sale_order_line__pack_parent_line_id +msgid "The pack that contains this product." +msgstr "" + +#. module: sale_product_pack +#: model:ir.model.fields,help:sale_product_pack.field_sale_order_line__pack_modifiable +msgid "The parent pack is modifiable" +msgstr "" + +#. module: sale_product_pack +#: model:ir.model.fields,help:sale_product_pack.field_sale_order_line__do_no_expand_pack_lines +msgid "" +"This is a technical field in order to check if pack lines has to be expanded" +msgstr "" + +#. module: sale_product_pack +#: code:addons/sale_product_pack/models/sale_order_line.py:0 +#, python-format +msgid "" +"You can not change this line because is part of a pack included in this " +"order" +msgstr "" + +#. module: sale_product_pack +#: code:addons/sale_product_pack/models/sale_order.py:0 +#, python-format +msgid "" +"You cannot delete this line because is part of a pack in this sale order. In" +" order to delete this line you need to delete the pack itself" +msgstr "" diff --git a/sale_product_pack/models/__init__.py b/sale_product_pack/models/__init__.py new file mode 100644 index 00000000..cd999716 --- /dev/null +++ b/sale_product_pack/models/__init__.py @@ -0,0 +1,5 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from . import product_pack_line +from . import sale_order_line +from . import sale_order diff --git a/sale_product_pack/models/product_pack_line.py b/sale_product_pack/models/product_pack_line.py new file mode 100644 index 00000000..26bc3a35 --- /dev/null +++ b/sale_product_pack/models/product_pack_line.py @@ -0,0 +1,54 @@ +# Copyright 2019 Tecnativa - Ernesto Tejeda +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +from odoo import fields, models + + +class ProductPack(models.Model): + _inherit = "product.pack.line" + + sale_discount = fields.Float( + "Sale discount (%)", + digits="Discount", + ) + + def get_sale_order_line_vals(self, line, order): + self.ensure_one() + quantity = self.quantity * line.product_uom_qty + line_vals = { + "order_id": order.id, + "sequence": line.sequence, + "product_id": self.product_id.id or False, + "pack_parent_line_id": line.id, + "pack_depth": line.pack_depth + 1, + "company_id": order.company_id.id, + "pack_modifiable": line.product_id.pack_modifiable, + } + sol = line.new(line_vals) + sol._onchange_product_id_warning() + sol.product_uom_qty = quantity + sol._compute_product_uom_qty() + sol._compute_product_uom() + sol._compute_discount() + vals = sol._convert_to_write(sol._cache) + pack_price_types = {"totalized", "ignored"} + sale_discount = 0.0 + if line.product_id.pack_component_price == "detailed": + sale_discount = 100.0 - ( + (100.0 - sol.discount) * (100.0 - self.sale_discount) / 100.0 + ) + elif ( + line.product_id.pack_type == "detailed" + and line.product_id.pack_component_price in pack_price_types + ): + vals["price_unit"] = 0.0 + vals.update( + { + "discount": sale_discount, + "name": "{}{}".format("> " * (line.pack_depth + 1), sol.name), + } + ) + return vals + + def get_price(self): + self.ensure_one() + return super().get_price() * (1 - self.sale_discount / 100.0) diff --git a/sale_product_pack/models/sale_order.py b/sale_product_pack/models/sale_order.py new file mode 100644 index 00000000..9e9a5785 --- /dev/null +++ b/sale_product_pack/models/sale_order.py @@ -0,0 +1,59 @@ +# Copyright 2019 Tecnativa - Ernesto Tejeda +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +from odoo import _, api, models +from odoo.exceptions import UserError + + +class SaleOrder(models.Model): + _inherit = "sale.order" + + def copy(self, default=None): + sale_copy = super().copy(default) + # we unlink pack lines that should not be copied + pack_copied_lines = sale_copy.order_line.filtered( + lambda l: l.pack_parent_line_id.order_id == self + ) + pack_copied_lines.unlink() + return sale_copy + + @api.onchange("order_line") + def check_pack_line_unlink(self): + """At least on embeded tree editable view odoo returns a recordset on + _origin.order_line only when lines are unlinked and this is exactly + what we need + """ + origin_line_ids = self._origin.order_line.ids + line_ids = self.order_line.ids + removed_line_ids = list(set(origin_line_ids) - set(line_ids)) + removed_line = self.env["sale.order.line"].browse(removed_line_ids) + if removed_line.filtered( + lambda x: x.pack_parent_line_id + and not x.pack_parent_line_id.product_id.pack_modifiable + ): + raise UserError( + _( + "You cannot delete this line because is part of a pack in" + " this sale order. In order to delete this line you need to" + " delete the pack itself" + ) + ) + + def write(self, vals): + if "order_line" in vals: + to_delete_ids = [e[1] for e in vals["order_line"] if e[0] == 2] + subpacks_to_delete_ids = ( + self.env["sale.order.line"] + .search( + [("id", "child_of", to_delete_ids), ("id", "not in", to_delete_ids)] + ) + .ids + ) + if subpacks_to_delete_ids: + for cmd in vals["order_line"]: + if cmd[1] in subpacks_to_delete_ids: + if cmd[0] != 2: + cmd[0] = 2 + subpacks_to_delete_ids.remove(cmd[1]) + for to_delete_id in subpacks_to_delete_ids: + vals["order_line"].append([2, to_delete_id, False]) + return super().write(vals) diff --git a/sale_product_pack/models/sale_order_line.py b/sale_product_pack/models/sale_order_line.py new file mode 100644 index 00000000..f5ab1f73 --- /dev/null +++ b/sale_product_pack/models/sale_order_line.py @@ -0,0 +1,119 @@ +# Copyright 2019 Tecnativa - Ernesto Tejeda +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +from odoo import _, api, fields, models +from odoo.exceptions import UserError +from odoo.fields import first + + +class SaleOrderLine(models.Model): + _inherit = "sale.order.line" + _parent_name = "pack_parent_line_id" + + pack_type = fields.Selection( + related="product_id.pack_type", + ) + pack_component_price = fields.Selection( + related="product_id.pack_component_price", + ) + + # Fields for common packs + pack_depth = fields.Integer( + "Depth", help="Depth of the product if it is part of a pack." + ) + pack_parent_line_id = fields.Many2one( + "sale.order.line", + "Pack", + help="The pack that contains this product.", + ) + pack_child_line_ids = fields.One2many( + "sale.order.line", "pack_parent_line_id", "Lines in pack" + ) + pack_modifiable = fields.Boolean(help="The parent pack is modifiable") + + do_no_expand_pack_lines = fields.Boolean( + compute="_compute_do_no_expand_pack_lines", + help="This is a technical field in order to check if pack lines has to be expanded", + ) + + @api.depends_context("update_prices", "update_pricelist") + def _compute_do_no_expand_pack_lines(self): + do_not_expand = self.env.context.get("update_prices") or self.env.context.get( + "update_pricelist", False + ) + self.update( + { + "do_no_expand_pack_lines": do_not_expand, + } + ) + + def expand_pack_line(self, write=False): + self.ensure_one() + # if we are using update_pricelist or checking out on ecommerce we + # only want to update prices + vals_list = [] + if self.product_id.pack_ok and self.pack_type == "detailed": + for subline in self.product_id.get_pack_lines(): + vals = subline.get_sale_order_line_vals(self, self.order_id) + if write: + existing_subline = first( + self.pack_child_line_ids.filtered( + lambda child: child.product_id == subline.product_id + ) + ) + # if subline already exists we update, if not we create + if existing_subline: + if self.do_no_expand_pack_lines: + vals.pop("product_uom_qty", None) + vals.pop("discount", None) + existing_subline.write(vals) + elif not self.do_no_expand_pack_lines: + vals_list.append(vals) + else: + vals_list.append(vals) + if vals_list: + self.create(vals_list) + + @api.model + def create(self, vals_list): + record = super().create(vals_list) + record.expand_pack_line() + return record + + def write(self, vals): + res = super().write(vals) + if "product_id" in vals or "product_uom_qty" in vals: + for record in self: + record.expand_pack_line(write=True) + return res + + @api.onchange( + "product_id", + "product_uom_qty", + "product_uom", + "price_unit", + "discount", + "name", + "tax_id", + ) + def check_pack_line_modify(self): + """Do not let to edit a sale order line if this one belongs to pack""" + if self._origin.pack_parent_line_id and not self._origin.pack_modifiable: + raise UserError( + _( + "You can not change this line because is part of a pack" + " included in this order" + ) + ) + + def action_open_parent_pack_product_view(self): + domain = [ + ("id", "in", self.mapped("pack_parent_line_id").mapped("product_id").ids) + ] + return { + "name": _("Parent Product"), + "type": "ir.actions.act_window", + "res_model": "product.product", + "view_type": "form", + "view_mode": "tree,form", + "domain": domain, + } diff --git a/sale_product_pack/readme/CONTRIBUTORS.rst b/sale_product_pack/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000..fe4531df --- /dev/null +++ b/sale_product_pack/readme/CONTRIBUTORS.rst @@ -0,0 +1,16 @@ +* `Tecnativa `_: + + * Ernesto Tejeda + * Pedro M. Baeza + +* `Akretion `_: + + * Raphaël Reverdy + +* `Open Source Integrators `_: + + * Daniel Reis + +* `bloopark systems GmbH & Co. KG `_: + + * July Chacko diff --git a/sale_product_pack/readme/DESCRIPTION.rst b/sale_product_pack/readme/DESCRIPTION.rst new file mode 100644 index 00000000..46463c9b --- /dev/null +++ b/sale_product_pack/readme/DESCRIPTION.rst @@ -0,0 +1,3 @@ +This module adds *Product Pack* functionality to sales orders. You can choose +a *Pack* in *sales order lines* and see different behaviors depending on +"Pack type" and "Pack component price" fields options selected on this *Pack*. diff --git a/sale_product_pack/readme/ROADMAP.rst b/sale_product_pack/readme/ROADMAP.rst new file mode 100644 index 00000000..9625a6b2 --- /dev/null +++ b/sale_product_pack/readme/ROADMAP.rst @@ -0,0 +1,4 @@ +* If this module is installed and stock module is installed too, when you + create a Sale order for a *Non detailed* Pack and you confirm it, + a *Stock picking* is not created with the storable components of that Pack. + So, add a new module called *sale_stock_product_pack* that adds that feature. diff --git a/sale_product_pack/readme/USAGE.rst b/sale_product_pack/readme/USAGE.rst new file mode 100644 index 00000000..2d6c8f2d --- /dev/null +++ b/sale_product_pack/readme/USAGE.rst @@ -0,0 +1,13 @@ +To use this module, you need to: + +#. Go to *Sales > Products > Products*, create or select a product and check + *Is Pack?* +#. Set "Product type" and "Pack component price" fields in the *Pack* page. +#. Add the products to be included in it. +#. Go to *Sales > Orders > Quotations* and create a Quotation. +#. Add a product that has checked "Is Pack?" +#. Save data and you will see an specific behavior depending on "Pack type" and + "Pack component price" fields options selected on this *Pack*. For example, + for products that has *Detailed* option selected in "Pack type" field you + will see one *sale order line* per component that belong to this Pack. + (See *Product pack* module README.rst file) diff --git a/sale_product_pack/security/ir.model.access.csv b/sale_product_pack/security/ir.model.access.csv new file mode 100644 index 00000000..6b968d84 --- /dev/null +++ b/sale_product_pack/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_product_pack_line_sale_manager,product.pack.line,model_product_pack_line,sales_team.group_sale_manager,1,1,1,1 diff --git a/sale_product_pack/static/description/icon.png b/sale_product_pack/static/description/icon.png new file mode 100644 index 00000000..3a0328b5 Binary files /dev/null and b/sale_product_pack/static/description/icon.png differ diff --git a/sale_product_pack/static/description/index.html b/sale_product_pack/static/description/index.html new file mode 100644 index 00000000..34e76748 --- /dev/null +++ b/sale_product_pack/static/description/index.html @@ -0,0 +1,465 @@ + + + + + + +Sale Product Pack + + + +
+

Sale Product Pack

+ + +

Beta License: AGPL-3 OCA/product-pack Translate me on Weblate Try me on Runbot

+

This module adds Product Pack functionality to sales orders. You can choose +a Pack in sales order lines and see different behaviors depending on +“Pack type” and “Pack component price” fields options selected on this Pack.

+

Table of contents

+ +
+

Usage

+

To use this module, you need to:

+
    +
  1. Go to Sales > Products > Products, create or select a product and check +Is Pack?
  2. +
  3. Set “Product type” and “Pack component price” fields in the Pack page.
  4. +
  5. Add the products to be included in it.
  6. +
  7. Go to Sales > Orders > Quotations and create a Quotation.
  8. +
  9. Add a product that has checked “Is Pack?”
  10. +
  11. Save data and you will see an specific behavior depending on “Pack type” and +“Pack component price” fields options selected on this Pack. For example, +for products that has Detailed option selected in “Pack type” field you +will see one sale order line per component that belong to this Pack. +(See Product pack module README.rst file)
  12. +
+
+
+

Known issues / Roadmap

+
    +
  • If this module is installed and stock module is installed too, when you +create a Sale order for a Non detailed Pack and you confirm it, +a Stock picking is not created with the storable components of that Pack. +So, add a new module called sale_stock_product_pack that adds that feature.
  • +
+
+
+

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

+
    +
  • NaN·tic
  • +
  • ADHOC SA
  • +
  • Tecnativa
  • +
+
+
+

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.

+

Current maintainer:

+

ernestotejeda

+

This module is part of the OCA/product-pack project on GitHub.

+

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

+
+
+
+ + diff --git a/sale_product_pack/tests/__init__.py b/sale_product_pack/tests/__init__.py new file mode 100644 index 00000000..365edcb3 --- /dev/null +++ b/sale_product_pack/tests/__init__.py @@ -0,0 +1,3 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from . import test_sale_product_pack diff --git a/sale_product_pack/tests/test_sale_product_pack.py b/sale_product_pack/tests/test_sale_product_pack.py new file mode 100644 index 00000000..fe027ead --- /dev/null +++ b/sale_product_pack/tests/test_sale_product_pack.py @@ -0,0 +1,223 @@ +# Copyright 2019 Tecnativa - Ernesto Tejeda +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from odoo.tests.common import TransactionCase + + +class TestSaleProductPack(TransactionCase): + @classmethod + def setUpClass(cls): + super().setUpClass() + pricelist = cls.env["product.pricelist"].create( + { + "name": "Test", + "company_id": cls.env.company.id, + "item_ids": [ + ( + 0, + 0, + { + "applied_on": "3_global", + "compute_price": "formula", + "base": "list_price", + }, + ) + ], + } + ) + cls.sale_order = cls.env["sale.order"].create( + { + "company_id": cls.env.company.id, + "partner_id": cls.env.ref("base.res_partner_12").id, + "pricelist_id": pricelist.id, + } + ) + + def _get_component_prices_sum(self, product_pack): + component_prices = 0.0 + for pack_line in product_pack.get_pack_lines(): + product_line_price = pack_line.product_id.list_price * ( + 1 - (pack_line.sale_discount or 0.0) / 100.0 + ) + component_prices += product_line_price * pack_line.quantity + return component_prices + + def test_create_components_price_order_line(self): + product_cp = self.env.ref("product_pack.product_pack_cpu_detailed_components") + self.env["sale.order.line"].create( + { + "order_id": self.sale_order.id, + "name": product_cp.name, + "product_id": product_cp.id, + "product_uom_qty": 1, + } + ) + # After create, there will be four lines + self.assertEqual(len(self.sale_order.order_line), 4) + pack_line = self.sale_order.order_line.filtered( + lambda line: line.product_id == product_cp + ) + # Check if sequence is the same as pack product one + sequence = pack_line.sequence + self.assertEqual( + [sequence, sequence, sequence, sequence], + self.sale_order.order_line.mapped("sequence"), + ) + # The products of those four lines are the main product pack and its + # product components + self.assertEqual( + self.sale_order.order_line.mapped("product_id"), + product_cp | product_cp.get_pack_lines().mapped("product_id"), + ) + + def test_create_ignored_price_order_line(self): + product_tp = self.env.ref("product_pack.product_pack_cpu_detailed_ignored") + line = self.env["sale.order.line"].create( + { + "order_id": self.sale_order.id, + "name": product_tp.name, + "product_id": product_tp.id, + "product_uom_qty": 1, + } + ) + # After create, there will be four lines + self.assertEqual(len(self.sale_order.order_line), 4) + # The products of those four lines are the main product pack and its + # product components + self.assertEqual( + self.sale_order.order_line.mapped("product_id"), + product_tp | product_tp.get_pack_lines().mapped("product_id"), + ) + # All component lines have zero as subtotal + self.assertEqual( + (self.sale_order.order_line - line).mapped("price_subtotal"), [0, 0, 0] + ) + # Pack price is different from the sum of component prices + self.assertAlmostEqual(line.price_subtotal, 30.75) + self.assertNotEqual(self._get_component_prices_sum(product_tp), 30.75) + + def test_create_totalized_price_order_line(self): + product_tp = self.env.ref("product_pack.product_pack_cpu_detailed_totalized") + line = self.env["sale.order.line"].create( + { + "order_id": self.sale_order.id, + "name": product_tp.name, + "product_id": product_tp.id, + "product_uom_qty": 1, + } + ) + # After create, there will be four lines + self.assertEqual(len(self.sale_order.order_line), 4) + # The products of those four lines are the main product pack and its + # product components + self.assertEqual( + self.sale_order.order_line.mapped("product_id"), + product_tp | product_tp.get_pack_lines().mapped("product_id"), + ) + # All component lines have zero as subtotal + self.assertAlmostEqual( + (self.sale_order.order_line - line).mapped("price_subtotal"), [0, 0, 0] + ) + # Pack price is equal to the sum of component prices + self.assertAlmostEqual(line.price_subtotal, 2662.5) + self.assertAlmostEqual(self._get_component_prices_sum(product_tp), 2662.5) + + def test_create_non_detailed_price_order_line(self): + product_ndtp = self.env.ref("product_pack.product_pack_cpu_non_detailed") + line = self.env["sale.order.line"].create( + { + "order_id": self.sale_order.id, + "name": product_ndtp.name, + "product_id": product_ndtp.id, + "product_uom_qty": 1, + } + ) + # After create, there will be only one line, because product_type is + # not a detailed one + self.assertEqual(self.sale_order.order_line, line) + # Pack price is equal to the sum of component prices + self.assertAlmostEqual(line.price_subtotal, 2662.5) + self.assertAlmostEqual(self._get_component_prices_sum(product_ndtp), 2662.5) + + def test_update_qty(self): + # Ensure the quantities are always updated + + def qty_in_order(): + return sum(self.sale_order.order_line.mapped("product_uom_qty")) + + product_cp = self.env.ref("product_pack.product_pack_cpu_detailed_components") + main_sol = self.env["sale.order.line"].create( + { + "order_id": self.sale_order.id, + "name": product_cp.name, + "product_id": product_cp.id, + "product_uom_qty": 1, + } + ) + total_qty_init = qty_in_order() + # change qty of main sol + main_sol.product_uom_qty = 2 * main_sol.product_uom_qty + total_qty_updated = qty_in_order() + # Ensure all quantities have doubled + self.assertAlmostEqual(total_qty_init * 2, total_qty_updated) + + # Confirm the sale + self.sale_order.action_confirm() + + # Ensure we can still update the quantity + main_sol.product_uom_qty = 2 * main_sol.product_uom_qty + total_qty_confirmed = qty_in_order() + self.assertAlmostEqual(total_qty_updated * 2, total_qty_confirmed) + + def test_do_not_expand(self): + product_cp = self.env.ref("product_pack.product_pack_cpu_detailed_components") + pack_line = self.env["sale.order.line"].create( + { + "order_id": self.sale_order.id, + "name": product_cp.name, + "product_id": product_cp.id, + "product_uom_qty": 1, + } + ) + # After create, there will be four lines + self.assertEqual(len(self.sale_order.order_line), 4) + pack_line_update = pack_line.with_context(update_prices=True) + self.assertTrue(pack_line_update.do_no_expand_pack_lines) + pack_line_update = pack_line.with_context(update_pricelist=True) + self.assertTrue(pack_line_update.do_no_expand_pack_lines) + + def test_create_several_lines(self): + # Create two sale order lines with two pack products + # Check 8 lines are created + # Check lines sequences and order are respected + product_cp = self.env.ref("product_pack.product_pack_cpu_detailed_components") + product_tp = self.env.ref("product_pack.product_pack_cpu_detailed_ignored") + vals = [ + { + "order_id": self.sale_order.id, + "name": product_cp.name, + "product_id": product_cp.id, + "product_uom_qty": 1, + }, + { + "order_id": self.sale_order.id, + "name": product_tp.name, + "product_id": product_tp.id, + "product_uom_qty": 1, + }, + ] + self.env["sale.order.line"].create(vals) + # After create, there will be eight lines (4 + 4) + self.assertEqual(len(self.sale_order.order_line), 8) + # Check if lines are well ordered + self.assertEqual(self.sale_order.order_line[0].product_id, product_cp) + sequence_cp = self.sale_order.order_line[0].sequence + self.assertEqual(sequence_cp, self.sale_order.order_line[1].sequence) + self.assertEqual(sequence_cp, self.sale_order.order_line[2].sequence) + self.assertEqual(sequence_cp, self.sale_order.order_line[3].sequence) + + self.assertEqual(self.sale_order.order_line[4].product_id, product_tp) + sequence_tp = self.sale_order.order_line[4].sequence + self.assertEqual(sequence_tp, self.sale_order.order_line[5].sequence) + self.assertEqual(sequence_tp, self.sale_order.order_line[6].sequence) + self.assertEqual(sequence_tp, self.sale_order.order_line[7].sequence) diff --git a/sale_product_pack/views/product_pack_line_views.xml b/sale_product_pack/views/product_pack_line_views.xml new file mode 100644 index 00000000..e5cedcf6 --- /dev/null +++ b/sale_product_pack/views/product_pack_line_views.xml @@ -0,0 +1,51 @@ + + + + + product.pack.line.sale.form + product.pack.line + + + + + + + + + product.pack.line.sale.tree + product.pack.line + + + + + + + + + sale.order + + + + + +