From aa9ab28c943d9ddf6f9f450ba7b2e182b5aa2679 Mon Sep 17 00:00:00 2001 From: Antonio Yamuta Date: Tue, 12 Jun 2018 08:43:01 -0700 Subject: [PATCH 001/224] [11.0] product_internal_reference_mandatory (#334) * [ADD] Module to set the internal reference of the product as required. --- product_code_mandatory/README.rst | 66 ++++++++++++++++++ product_code_mandatory/__init__.py | 16 +++++ product_code_mandatory/__manifest__.py | 19 +++++ .../i18n/product_code_mandatory.pot | 20 ++++++ product_code_mandatory/models/__init__.py | 4 ++ product_code_mandatory/models/product.py | 15 ++++ .../static/description/icon.png | Bin 0 -> 9455 bytes .../views/product_code_seq.xml | 11 +++ product_code_mandatory/views/product_view.xml | 26 +++++++ 9 files changed, 177 insertions(+) create mode 100644 product_code_mandatory/README.rst create mode 100644 product_code_mandatory/__init__.py create mode 100644 product_code_mandatory/__manifest__.py create mode 100644 product_code_mandatory/i18n/product_code_mandatory.pot create mode 100644 product_code_mandatory/models/__init__.py create mode 100644 product_code_mandatory/models/product.py create mode 100644 product_code_mandatory/static/description/icon.png create mode 100644 product_code_mandatory/views/product_code_seq.xml create mode 100644 product_code_mandatory/views/product_view.xml diff --git a/product_code_mandatory/README.rst b/product_code_mandatory/README.rst new file mode 100644 index 00000000000..e264aaeb221 --- /dev/null +++ b/product_code_mandatory/README.rst @@ -0,0 +1,66 @@ +.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +====================== +Product Code Mandatory +====================== + +This module sets the field internal reference (default_code) of the product +as required. + +Usage +===== + +* Unable to save a product with an empty or blank internal reference. +* When creating more than one product variant from the template, a variant will be created + with a default value for default_code field. +* A pre_init_hook process is initiated when there exist records without an internal reference(default_code). + A default value is generated to populate empty field as a temporary value. + +.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas + :alt: Try me on Runbot + :target: https://runbot.odoo-community.org/runbot/135/11.0 + +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 smash it by providing detailed and welcomed feedback. + +Credits +======= + +Images +------ + +* Odoo Community Association: `Icon `_. + +Contributors +------------ + +* Antonio Yamuta + +Funders +------- + +The development of this module has been financially supported by: + +* Open Source Integrators + +Maintainer +---------- + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +This module is maintained by the OCA. + +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. + +To contribute to this module, please visit https://odoo-community.org. diff --git a/product_code_mandatory/__init__.py b/product_code_mandatory/__init__.py new file mode 100644 index 00000000000..c1430458d08 --- /dev/null +++ b/product_code_mandatory/__init__.py @@ -0,0 +1,16 @@ +# Copyright (C) 2018 - TODAY, Open Source Integrators +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import models + + +def pre_init_product_code(cr): + cr.execute("""UPDATE product_template + SET default_code = 'DEFAULT' || nextval('ir_default_id_seq') + WHERE default_code is NULL + OR LENGTH(default_code) = 0""") + cr.execute("""UPDATE product_product + SET default_code = 'DEFAULT' || nextval('ir_default_id_seq') + WHERE default_code is NULL + OR LENGTH(default_code) = 0""") + return True diff --git a/product_code_mandatory/__manifest__.py b/product_code_mandatory/__manifest__.py new file mode 100644 index 00000000000..17c8541bbb7 --- /dev/null +++ b/product_code_mandatory/__manifest__.py @@ -0,0 +1,19 @@ +# Copyright (C) 2018 - TODAY, Open Source Integrators +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +{ + "name": "Product Internal Reference as Required", + "summary": "Set Product Internal Reference as a required field", + "version": "11.0.1.0.0", + "license": "AGPL-3", + "author": "Open Source Integrators, Odoo Community Association (OCA)", + "category": "Product", + "website": "http://www.opensourceintegrators.com", + "depends": ["product"], + "data": [ + "views/product_view.xml", + "views/product_code_seq.xml", + ], + "pre_init_hook": 'pre_init_product_code', + "installable": True, +} diff --git a/product_code_mandatory/i18n/product_code_mandatory.pot b/product_code_mandatory/i18n/product_code_mandatory.pot new file mode 100644 index 00000000000..f67715231d5 --- /dev/null +++ b/product_code_mandatory/i18n/product_code_mandatory.pot @@ -0,0 +1,20 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_code_mandatory +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.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_code_mandatory +#: model:ir.model,name:product_code_mandatory.model_product_product +msgid "Product" +msgstr "" + diff --git a/product_code_mandatory/models/__init__.py b/product_code_mandatory/models/__init__.py new file mode 100644 index 00000000000..e2434221bf7 --- /dev/null +++ b/product_code_mandatory/models/__init__.py @@ -0,0 +1,4 @@ +# Copyright (C) 2018 - TODAY, Open Source Integrators License AGPL-3.0 +# or later (http://www.gnu.org/licenses/agpl). + +from . import product diff --git a/product_code_mandatory/models/product.py b/product_code_mandatory/models/product.py new file mode 100644 index 00000000000..1314f7a61ea --- /dev/null +++ b/product_code_mandatory/models/product.py @@ -0,0 +1,15 @@ +# Copyright (C) 2018 - TODAY, Open Source Integrators License AGPL-3.0 +# or later (http://www.gnu.org/licenses/agpl). + +from odoo import fields, models + + +class ProductProduct(models.Model): + _inherit = 'product.product' + + def _get_default_code(self): + res = self.env['ir.sequence'].next_by_code('product.default.code') + return res + + default_code = fields.Char('Internal Reference', index=True, + default=_get_default_code) diff --git a/product_code_mandatory/static/description/icon.png b/product_code_mandatory/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..3a0328b516c4980e8e44cdb63fd945757ddd132d GIT binary patch literal 9455 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 z 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 Xviia!U7SGha1wx#SCgwmn*{w2TRX*I literal 0 HcmV?d00001 diff --git a/product_code_mandatory/views/product_code_seq.xml b/product_code_mandatory/views/product_code_seq.xml new file mode 100644 index 00000000000..224fa46d933 --- /dev/null +++ b/product_code_mandatory/views/product_code_seq.xml @@ -0,0 +1,11 @@ + + + + + Productc Default Code Mandatory + product.default.code + DEFAULT- + 4 + + + diff --git a/product_code_mandatory/views/product_view.xml b/product_code_mandatory/views/product_view.xml new file mode 100644 index 00000000000..d01729f1fb8 --- /dev/null +++ b/product_code_mandatory/views/product_view.xml @@ -0,0 +1,26 @@ + + + + + product.template.only.form.code.mandatory.view + product.template + + + + {'invisible': [('product_variant_count', '>', 1)], + 'required': [('product_variant_count', '=', 1)]} + + + + + + product.normal.form.code.mandatory.view + product.product + + + + True + + + + From ef358a0c1764e1609e4d702dafd27906c2fe9022 Mon Sep 17 00:00:00 2001 From: Sudhir Arya Date: Tue, 4 Dec 2018 12:18:06 +0530 Subject: [PATCH 002/224] [MIG] Migrated product_code_mandatory to v12 --- product_code_mandatory/README.rst | 78 ++-- product_code_mandatory/__init__.py | 3 - product_code_mandatory/__manifest__.py | 10 +- .../{views => data}/product_code_seq.xml | 5 +- .../i18n/product_code_mandatory.pot | 12 +- product_code_mandatory/models/__init__.py | 3 - product_code_mandatory/models/product.py | 3 +- .../readme/CONTRIBUTORS.rst | 2 + product_code_mandatory/readme/DESCRIPTION.rst | 2 + product_code_mandatory/readme/USAGE.rst | 9 + .../static/description/index.html | 433 ++++++++++++++++++ product_code_mandatory/tests/__init__.py | 1 + .../tests/test_product_code.py | 17 + product_code_mandatory/views/product_view.xml | 17 +- 14 files changed, 544 insertions(+), 51 deletions(-) rename product_code_mandatory/{views => data}/product_code_seq.xml (72%) create mode 100644 product_code_mandatory/readme/CONTRIBUTORS.rst create mode 100644 product_code_mandatory/readme/DESCRIPTION.rst create mode 100644 product_code_mandatory/readme/USAGE.rst create mode 100644 product_code_mandatory/static/description/index.html create mode 100644 product_code_mandatory/tests/__init__.py create mode 100644 product_code_mandatory/tests/test_product_code.py diff --git a/product_code_mandatory/README.rst b/product_code_mandatory/README.rst index e264aaeb221..1f61b0b1605 100644 --- a/product_code_mandatory/README.rst +++ b/product_code_mandatory/README.rst @@ -1,66 +1,88 @@ -.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png +====================================== +Product Internal Reference as Required +====================================== + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! 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 - -====================== -Product Code Mandatory -====================== +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fproduct--attribute-lightgray.png?logo=github + :target: https://github.com/OCA/product-attribute/tree/12.0/product_code_mandatory + :alt: OCA/product-attribute +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/product-attribute-12-0/product-attribute-12-0-product_code_mandatory + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/135/12.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| This module sets the field internal reference (default_code) of the product as required. +**Table of contents** + +.. contents:: + :local: + Usage ===== * Unable to save a product with an empty or blank internal reference. * When creating more than one product variant from the template, a variant will be created - with a default value for default_code field. + with a default value for default_code field. * A pre_init_hook process is initiated when there exist records without an internal reference(default_code). A default value is generated to populate empty field as a temporary value. .. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas :alt: Try me on Runbot - :target: https://runbot.odoo-community.org/runbot/135/11.0 + :target: https://runbot.odoo-community.org/runbot/135/12.0 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 smash it by providing detailed and welcomed feedback. +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 ======= -Images ------- +Authors +~~~~~~~ -* Odoo Community Association: `Icon `_. +* Open Source Integrators Contributors ------------- +~~~~~~~~~~~~ * Antonio Yamuta +* Sudhir Arya -Funders -------- - -The development of this module has been financially supported by: +Maintainers +~~~~~~~~~~~ -* Open Source Integrators - -Maintainer ----------- +This module is maintained by the OCA. .. image:: https://odoo-community.org/logo.png - :alt: Odoo Community Association - :target: https://odoo-community.org - -This module is maintained by the OCA. + :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. -To contribute to this module, please visit https://odoo-community.org. +This module is part of the `OCA/product-attribute `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/product_code_mandatory/__init__.py b/product_code_mandatory/__init__.py index c1430458d08..98feeb03b6c 100644 --- a/product_code_mandatory/__init__.py +++ b/product_code_mandatory/__init__.py @@ -1,6 +1,3 @@ -# Copyright (C) 2018 - TODAY, Open Source Integrators -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). - from . import models diff --git a/product_code_mandatory/__manifest__.py b/product_code_mandatory/__manifest__.py index 17c8541bbb7..bfdc375d3fb 100644 --- a/product_code_mandatory/__manifest__.py +++ b/product_code_mandatory/__manifest__.py @@ -4,15 +4,17 @@ { "name": "Product Internal Reference as Required", "summary": "Set Product Internal Reference as a required field", - "version": "11.0.1.0.0", + "version": "12.0.1.0.0", "license": "AGPL-3", "author": "Open Source Integrators, Odoo Community Association (OCA)", "category": "Product", - "website": "http://www.opensourceintegrators.com", - "depends": ["product"], + "website": "https://github.com/OCA/product-attribute", + "depends": [ + "product", + ], "data": [ + "data/product_code_seq.xml", "views/product_view.xml", - "views/product_code_seq.xml", ], "pre_init_hook": 'pre_init_product_code', "installable": True, diff --git a/product_code_mandatory/views/product_code_seq.xml b/product_code_mandatory/data/product_code_seq.xml similarity index 72% rename from product_code_mandatory/views/product_code_seq.xml rename to product_code_mandatory/data/product_code_seq.xml index 224fa46d933..95121f4a751 100644 --- a/product_code_mandatory/views/product_code_seq.xml +++ b/product_code_mandatory/data/product_code_seq.xml @@ -1,11 +1,12 @@ - + - Productc Default Code Mandatory + Product Default Code Mandatory product.default.code DEFAULT- 4 + diff --git a/product_code_mandatory/i18n/product_code_mandatory.pot b/product_code_mandatory/i18n/product_code_mandatory.pot index f67715231d5..e29d9a5a846 100644 --- a/product_code_mandatory/i18n/product_code_mandatory.pot +++ b/product_code_mandatory/i18n/product_code_mandatory.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 11.0\n" +"Project-Id-Version: Odoo Server 12.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: <>\n" "Language-Team: \n" @@ -13,8 +13,18 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: \n" +#. module: product_code_mandatory +#: model:ir.model.fields,field_description:product_code_mandatory.field_product_product__default_code +msgid "Internal Reference" +msgstr "" + #. module: product_code_mandatory #: model:ir.model,name:product_code_mandatory.model_product_product msgid "Product" msgstr "" +#. module: product_code_mandatory +#: model:ir.model.fields,help:product_code_mandatory.field_product_product__default_code +msgid "Set to '/' and save if you want a new internal reference to be proposed." +msgstr "" + diff --git a/product_code_mandatory/models/__init__.py b/product_code_mandatory/models/__init__.py index e2434221bf7..9649db77a15 100644 --- a/product_code_mandatory/models/__init__.py +++ b/product_code_mandatory/models/__init__.py @@ -1,4 +1 @@ -# Copyright (C) 2018 - TODAY, Open Source Integrators License AGPL-3.0 -# or later (http://www.gnu.org/licenses/agpl). - from . import product diff --git a/product_code_mandatory/models/product.py b/product_code_mandatory/models/product.py index 1314f7a61ea..e8f59b0a4f8 100644 --- a/product_code_mandatory/models/product.py +++ b/product_code_mandatory/models/product.py @@ -8,8 +8,7 @@ class ProductProduct(models.Model): _inherit = 'product.product' def _get_default_code(self): - res = self.env['ir.sequence'].next_by_code('product.default.code') - return res + return self.env['ir.sequence'].next_by_code('product.default.code') default_code = fields.Char('Internal Reference', index=True, default=_get_default_code) diff --git a/product_code_mandatory/readme/CONTRIBUTORS.rst b/product_code_mandatory/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000000..bfde52f3cc0 --- /dev/null +++ b/product_code_mandatory/readme/CONTRIBUTORS.rst @@ -0,0 +1,2 @@ +* Antonio Yamuta +* Sudhir Arya diff --git a/product_code_mandatory/readme/DESCRIPTION.rst b/product_code_mandatory/readme/DESCRIPTION.rst new file mode 100644 index 00000000000..2c500712643 --- /dev/null +++ b/product_code_mandatory/readme/DESCRIPTION.rst @@ -0,0 +1,2 @@ +This module sets the field internal reference (default_code) of the product +as required. diff --git a/product_code_mandatory/readme/USAGE.rst b/product_code_mandatory/readme/USAGE.rst new file mode 100644 index 00000000000..adb3cce07ca --- /dev/null +++ b/product_code_mandatory/readme/USAGE.rst @@ -0,0 +1,9 @@ +* Unable to save a product with an empty or blank internal reference. +* When creating more than one product variant from the template, a variant will be created + with a default value for default_code field. +* A pre_init_hook process is initiated when there exist records without an internal reference(default_code). + A default value is generated to populate empty field as a temporary value. + +.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas + :alt: Try me on Runbot + :target: https://runbot.odoo-community.org/runbot/135/12.0 diff --git a/product_code_mandatory/static/description/index.html b/product_code_mandatory/static/description/index.html new file mode 100644 index 00000000000..649f33bf581 --- /dev/null +++ b/product_code_mandatory/static/description/index.html @@ -0,0 +1,433 @@ + + + + + + +Product Internal Reference as Required + + + +
+

Product Internal Reference as Required

+ + +

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

+

This module sets the field internal reference (default_code) of the product +as required.

+

Table of contents

+ +
+

Usage

+
    +
  • Unable to save a product with an empty or blank internal reference.
  • +
  • When creating more than one product variant from the template, a variant will be created +with a default value for default_code field.
  • +
  • A pre_init_hook process is initiated when there exist records without an internal reference(default_code). +A default value is generated to populate empty field as a temporary value.
  • +
+Try me on Runbot +
+
+

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

+
    +
  • Open Source Integrators
  • +
+
+ +
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use.

+

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

+

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

+
+
+
+ + diff --git a/product_code_mandatory/tests/__init__.py b/product_code_mandatory/tests/__init__.py new file mode 100644 index 00000000000..fd357bf2801 --- /dev/null +++ b/product_code_mandatory/tests/__init__.py @@ -0,0 +1 @@ +from . import test_product_code diff --git a/product_code_mandatory/tests/test_product_code.py b/product_code_mandatory/tests/test_product_code.py new file mode 100644 index 00000000000..c9fb4bec296 --- /dev/null +++ b/product_code_mandatory/tests/test_product_code.py @@ -0,0 +1,17 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo.tests.common import TransactionCase + + +class TestProductCode(TransactionCase): + + def setUp(self): + super(TestProductCode, self).setUp() + self.product_model = self.env['product.product'] + self.product = self.product_model.create({ + 'name': 'Test Product Code', + }) + + def test_product_code(self): + """Check Product Code""" + self.assertTrue(self.product.default_code, 'Product code is not set.') diff --git a/product_code_mandatory/views/product_view.xml b/product_code_mandatory/views/product_view.xml index d01729f1fb8..654e6236b2a 100644 --- a/product_code_mandatory/views/product_view.xml +++ b/product_code_mandatory/views/product_view.xml @@ -1,26 +1,27 @@ - + - + product.template.only.form.code.mandatory.view product.template - + {'invisible': [('product_variant_count', '>', 1)], - 'required': [('product_variant_count', '=', 1)]} - + 'required': [('product_variant_count', '=', 1)]} + - + product.normal.form.code.mandatory.view product.product - + True - + + From 8844af0040a768f329a297e82781b4792489d954 Mon Sep 17 00:00:00 2001 From: Pedro Castro Silva Date: Mon, 23 Mar 2020 12:16:55 +0000 Subject: [PATCH 003/224] Added translation using Weblate (Portuguese) --- product_code_mandatory/i18n/pt.po | 34 +++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 product_code_mandatory/i18n/pt.po diff --git a/product_code_mandatory/i18n/pt.po b/product_code_mandatory/i18n/pt.po new file mode 100644 index 00000000000..3c7c2afabf2 --- /dev/null +++ b/product_code_mandatory/i18n/pt.po @@ -0,0 +1,34 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_code_mandatory +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2020-03-23 14:13+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.10\n" + +#. module: product_code_mandatory +#: model:ir.model.fields,field_description:product_code_mandatory.field_product_product__default_code +msgid "Internal Reference" +msgstr "Referência Interna" + +#. module: product_code_mandatory +#: model:ir.model,name:product_code_mandatory.model_product_product +msgid "Product" +msgstr "Produto" + +#. module: product_code_mandatory +#: model:ir.model.fields,help:product_code_mandatory.field_product_product__default_code +msgid "Set to '/' and save if you want a new internal reference to be proposed." +msgstr "" +"Defina como '/' e guarde caso pretenda que uma nova referência interna seja " +"proposta." From a69b7cc7d923354ece8d34ce5de589279ce97132 Mon Sep 17 00:00:00 2001 From: Jaime Arroyo Date: Thu, 9 Jul 2020 12:46:30 +0200 Subject: [PATCH 004/224] [IMP] product_code_mandatory: black, isort, prettier --- product_code_mandatory/__init__.py | 12 ++++++++---- product_code_mandatory/__manifest__.py | 13 ++++--------- product_code_mandatory/data/product_code_seq.xml | 6 ++---- product_code_mandatory/models/product.py | 9 +++++---- product_code_mandatory/readme/USAGE.rst | 2 +- product_code_mandatory/tests/test_product_code.py | 9 +++------ product_code_mandatory/views/product_view.xml | 13 ++++++------- 7 files changed, 29 insertions(+), 35 deletions(-) diff --git a/product_code_mandatory/__init__.py b/product_code_mandatory/__init__.py index 98feeb03b6c..1c1865a1dd0 100644 --- a/product_code_mandatory/__init__.py +++ b/product_code_mandatory/__init__.py @@ -2,12 +2,16 @@ def pre_init_product_code(cr): - cr.execute("""UPDATE product_template + cr.execute( + """UPDATE product_template SET default_code = 'DEFAULT' || nextval('ir_default_id_seq') WHERE default_code is NULL - OR LENGTH(default_code) = 0""") - cr.execute("""UPDATE product_product + OR LENGTH(default_code) = 0""" + ) + cr.execute( + """UPDATE product_product SET default_code = 'DEFAULT' || nextval('ir_default_id_seq') WHERE default_code is NULL - OR LENGTH(default_code) = 0""") + OR LENGTH(default_code) = 0""" + ) return True diff --git a/product_code_mandatory/__manifest__.py b/product_code_mandatory/__manifest__.py index bfdc375d3fb..039726156b3 100644 --- a/product_code_mandatory/__manifest__.py +++ b/product_code_mandatory/__manifest__.py @@ -4,18 +4,13 @@ { "name": "Product Internal Reference as Required", "summary": "Set Product Internal Reference as a required field", - "version": "12.0.1.0.0", + "version": "13.0.1.0.0", "license": "AGPL-3", "author": "Open Source Integrators, Odoo Community Association (OCA)", "category": "Product", "website": "https://github.com/OCA/product-attribute", - "depends": [ - "product", - ], - "data": [ - "data/product_code_seq.xml", - "views/product_view.xml", - ], - "pre_init_hook": 'pre_init_product_code', + "depends": ["product"], + "data": ["data/product_code_seq.xml", "views/product_view.xml"], + "pre_init_hook": "pre_init_product_code", "installable": True, } diff --git a/product_code_mandatory/data/product_code_seq.xml b/product_code_mandatory/data/product_code_seq.xml index 95121f4a751..b388e14c240 100644 --- a/product_code_mandatory/data/product_code_seq.xml +++ b/product_code_mandatory/data/product_code_seq.xml @@ -1,12 +1,10 @@ - + - Product Default Code Mandatory product.default.code DEFAULT- 4 - + - diff --git a/product_code_mandatory/models/product.py b/product_code_mandatory/models/product.py index e8f59b0a4f8..ea6415717f9 100644 --- a/product_code_mandatory/models/product.py +++ b/product_code_mandatory/models/product.py @@ -5,10 +5,11 @@ class ProductProduct(models.Model): - _inherit = 'product.product' + _inherit = "product.product" def _get_default_code(self): - return self.env['ir.sequence'].next_by_code('product.default.code') + return self.env["ir.sequence"].next_by_code("product.default.code") - default_code = fields.Char('Internal Reference', index=True, - default=_get_default_code) + default_code = fields.Char( + "Internal Reference", index=True, default=_get_default_code + ) diff --git a/product_code_mandatory/readme/USAGE.rst b/product_code_mandatory/readme/USAGE.rst index adb3cce07ca..e9a7b9fc7f7 100644 --- a/product_code_mandatory/readme/USAGE.rst +++ b/product_code_mandatory/readme/USAGE.rst @@ -1,5 +1,5 @@ * Unable to save a product with an empty or blank internal reference. -* When creating more than one product variant from the template, a variant will be created +* When creating more than one product variant from the template, a variant will be created with a default value for default_code field. * A pre_init_hook process is initiated when there exist records without an internal reference(default_code). A default value is generated to populate empty field as a temporary value. diff --git a/product_code_mandatory/tests/test_product_code.py b/product_code_mandatory/tests/test_product_code.py index c9fb4bec296..6db56fce44c 100644 --- a/product_code_mandatory/tests/test_product_code.py +++ b/product_code_mandatory/tests/test_product_code.py @@ -4,14 +4,11 @@ class TestProductCode(TransactionCase): - def setUp(self): super(TestProductCode, self).setUp() - self.product_model = self.env['product.product'] - self.product = self.product_model.create({ - 'name': 'Test Product Code', - }) + self.product_model = self.env["product.product"] + self.product = self.product_model.create({"name": "Test Product Code"}) def test_product_code(self): """Check Product Code""" - self.assertTrue(self.product.default_code, 'Product code is not set.') + self.assertTrue(self.product.default_code, "Product code is not set.") diff --git a/product_code_mandatory/views/product_view.xml b/product_code_mandatory/views/product_view.xml index 654e6236b2a..648dd282b20 100644 --- a/product_code_mandatory/views/product_view.xml +++ b/product_code_mandatory/views/product_view.xml @@ -1,27 +1,26 @@ - + - product.template.only.form.code.mandatory.view product.template - + - {'invisible': [('product_variant_count', '>', 1)], + {'invisible': [('product_variant_count', '>', 1)], 'required': [('product_variant_count', '=', 1)]} - product.normal.form.code.mandatory.view product.product - + True - From 4f21f959a2035b3b60fb7b34c5309745a4c311f5 Mon Sep 17 00:00:00 2001 From: Jaime Arroyo Date: Thu, 9 Jul 2020 12:48:25 +0200 Subject: [PATCH 005/224] [13.0][MIG] product_code_mandatory --- product_code_mandatory/README.rst | 18 +++++++++--------- product_code_mandatory/__manifest__.py | 2 +- .../i18n/product_code_mandatory.pot | 10 +++++----- .../static/description/index.html | 12 ++++++------ 4 files changed, 21 insertions(+), 21 deletions(-) diff --git a/product_code_mandatory/README.rst b/product_code_mandatory/README.rst index 1f61b0b1605..7e5ef9ca0b5 100644 --- a/product_code_mandatory/README.rst +++ b/product_code_mandatory/README.rst @@ -1,6 +1,6 @@ -====================================== -Product Internal Reference as Required -====================================== +====================== +Product Code Mandatory +====================== .. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! This file is generated by oca-gen-addon-readme !! @@ -14,13 +14,13 @@ Product Internal Reference as Required :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fproduct--attribute-lightgray.png?logo=github - :target: https://github.com/OCA/product-attribute/tree/12.0/product_code_mandatory + :target: https://github.com/OCA/product-attribute/tree/13.0/product_code_mandatory :alt: OCA/product-attribute .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/product-attribute-12-0/product-attribute-12-0-product_code_mandatory + :target: https://translation.odoo-community.org/projects/product-attribute-13-0/product-attribute-13-0-product_code_mandatory :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/135/12.0 + :target: https://runbot.odoo-community.org/runbot/135/13.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -37,7 +37,7 @@ Usage ===== * Unable to save a product with an empty or blank internal reference. -* When creating more than one product variant from the template, a variant will be created +* When creating more than one product variant from the template, a variant will be created with a default value for default_code field. * A pre_init_hook process is initiated when there exist records without an internal reference(default_code). A default value is generated to populate empty field as a temporary value. @@ -52,7 +52,7 @@ 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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -83,6 +83,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -This module is part of the `OCA/product-attribute `_ project on GitHub. +This module is part of the `OCA/product-attribute `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/product_code_mandatory/__manifest__.py b/product_code_mandatory/__manifest__.py index 039726156b3..ec7d3656fc6 100644 --- a/product_code_mandatory/__manifest__.py +++ b/product_code_mandatory/__manifest__.py @@ -2,7 +2,7 @@ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { - "name": "Product Internal Reference as Required", + "name": "Product Code Mandatory", "summary": "Set Product Internal Reference as a required field", "version": "13.0.1.0.0", "license": "AGPL-3", diff --git a/product_code_mandatory/i18n/product_code_mandatory.pot b/product_code_mandatory/i18n/product_code_mandatory.pot index e29d9a5a846..2807d2b6076 100644 --- a/product_code_mandatory/i18n/product_code_mandatory.pot +++ b/product_code_mandatory/i18n/product_code_mandatory.pot @@ -1,12 +1,12 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * product_code_mandatory +# * product_code_mandatory # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 12.0\n" +"Project-Id-Version: Odoo Server 13.0\n" "Report-Msgid-Bugs-To: \n" -"Last-Translator: <>\n" +"Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -25,6 +25,6 @@ msgstr "" #. module: product_code_mandatory #: model:ir.model.fields,help:product_code_mandatory.field_product_product__default_code -msgid "Set to '/' and save if you want a new internal reference to be proposed." +msgid "" +"Set to '/' and save if you want a new internal reference to be proposed." msgstr "" - diff --git a/product_code_mandatory/static/description/index.html b/product_code_mandatory/static/description/index.html index 649f33bf581..1be3881f468 100644 --- a/product_code_mandatory/static/description/index.html +++ b/product_code_mandatory/static/description/index.html @@ -4,7 +4,7 @@ -Product Internal Reference as Required +Product Code Mandatory -
-

Product Internal Reference as Required

+
+

Product Code Mandatory

-

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

+

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

This module sets the field internal reference (default_code) of the product as required.

Table of contents

@@ -399,7 +399,7 @@

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.

+feedback.

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

@@ -424,7 +424,7 @@

Maintainers

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

-

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

+

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

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

From 653b55399a7fd6212e408afbbd693f19da0a0002 Mon Sep 17 00:00:00 2001 From: watthanun Date: Fri, 4 Dec 2020 17:19:59 +0700 Subject: [PATCH 006/224] [MIG] product_code_mandatory: Migration to 14.0 --- product_code_mandatory/README.rst | 11 ++++++----- product_code_mandatory/__manifest__.py | 4 ++-- .../i18n/product_code_mandatory.pot | 17 ++++++++++++++++- product_code_mandatory/models/product.py | 2 +- product_code_mandatory/readme/CONTRIBUTORS.rst | 1 + .../static/description/index.html | 7 ++++--- 6 files changed, 30 insertions(+), 12 deletions(-) diff --git a/product_code_mandatory/README.rst b/product_code_mandatory/README.rst index 7e5ef9ca0b5..c4a02364328 100644 --- a/product_code_mandatory/README.rst +++ b/product_code_mandatory/README.rst @@ -14,13 +14,13 @@ Product Code Mandatory :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fproduct--attribute-lightgray.png?logo=github - :target: https://github.com/OCA/product-attribute/tree/13.0/product_code_mandatory + :target: https://github.com/OCA/product-attribute/tree/14.0/product_code_mandatory :alt: OCA/product-attribute .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/product-attribute-13-0/product-attribute-13-0-product_code_mandatory + :target: https://translation.odoo-community.org/projects/product-attribute-14-0/product-attribute-14-0-product_code_mandatory :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/135/13.0 + :target: https://runbot.odoo-community.org/runbot/135/14.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -52,7 +52,7 @@ 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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -69,6 +69,7 @@ Contributors * Antonio Yamuta * Sudhir Arya +* Watthanun Khorchai Maintainers ~~~~~~~~~~~ @@ -83,6 +84,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -This module is part of the `OCA/product-attribute `_ project on GitHub. +This module is part of the `OCA/product-attribute `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/product_code_mandatory/__manifest__.py b/product_code_mandatory/__manifest__.py index ec7d3656fc6..159049bbbf5 100644 --- a/product_code_mandatory/__manifest__.py +++ b/product_code_mandatory/__manifest__.py @@ -1,10 +1,10 @@ # Copyright (C) 2018 - TODAY, Open Source Integrators -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). { "name": "Product Code Mandatory", "summary": "Set Product Internal Reference as a required field", - "version": "13.0.1.0.0", + "version": "14.0.1.0.1", "license": "AGPL-3", "author": "Open Source Integrators, Odoo Community Association (OCA)", "category": "Product", diff --git a/product_code_mandatory/i18n/product_code_mandatory.pot b/product_code_mandatory/i18n/product_code_mandatory.pot index 2807d2b6076..da873055f4c 100644 --- a/product_code_mandatory/i18n/product_code_mandatory.pot +++ b/product_code_mandatory/i18n/product_code_mandatory.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 13.0\n" +"Project-Id-Version: Odoo Server 14.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: \n" "Language-Team: \n" @@ -13,11 +13,26 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: \n" +#. module: product_code_mandatory +#: model:ir.model.fields,field_description:product_code_mandatory.field_product_product__display_name +msgid "Display Name" +msgstr "" + +#. module: product_code_mandatory +#: model:ir.model.fields,field_description:product_code_mandatory.field_product_product__id +msgid "ID" +msgstr "" + #. module: product_code_mandatory #: model:ir.model.fields,field_description:product_code_mandatory.field_product_product__default_code msgid "Internal Reference" msgstr "" +#. module: product_code_mandatory +#: model:ir.model.fields,field_description:product_code_mandatory.field_product_product____last_update +msgid "Last Modified on" +msgstr "" + #. module: product_code_mandatory #: model:ir.model,name:product_code_mandatory.model_product_product msgid "Product" diff --git a/product_code_mandatory/models/product.py b/product_code_mandatory/models/product.py index ea6415717f9..33e5f57039a 100644 --- a/product_code_mandatory/models/product.py +++ b/product_code_mandatory/models/product.py @@ -1,5 +1,5 @@ # Copyright (C) 2018 - TODAY, Open Source Integrators License AGPL-3.0 -# or later (http://www.gnu.org/licenses/agpl). +# or later (https://www.gnu.org/licenses/agpl). from odoo import fields, models diff --git a/product_code_mandatory/readme/CONTRIBUTORS.rst b/product_code_mandatory/readme/CONTRIBUTORS.rst index bfde52f3cc0..c683f780130 100644 --- a/product_code_mandatory/readme/CONTRIBUTORS.rst +++ b/product_code_mandatory/readme/CONTRIBUTORS.rst @@ -1,2 +1,3 @@ * Antonio Yamuta * Sudhir Arya +* Watthanun Khorchai diff --git a/product_code_mandatory/static/description/index.html b/product_code_mandatory/static/description/index.html index 1be3881f468..08b37e2e3fa 100644 --- a/product_code_mandatory/static/description/index.html +++ b/product_code_mandatory/static/description/index.html @@ -367,7 +367,7 @@

Product Code Mandatory

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

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

+

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

This module sets the field internal reference (default_code) of the product as required.

Table of contents

@@ -399,7 +399,7 @@

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.

+feedback.

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

@@ -415,6 +415,7 @@

Contributors

@@ -424,7 +425,7 @@

Maintainers

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

-

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

+

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

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

From 2e6e13360112c3f6774874ab49eee6ee87838247 Mon Sep 17 00:00:00 2001 From: Yves Le Doeuff Date: Sat, 10 Apr 2021 09:00:12 +0000 Subject: [PATCH 007/224] Added translation using Weblate (French) --- product_code_mandatory/i18n/fr.po | 50 ++++++++++++++++++++++++++++ product_code_mandatory/i18n/fr_FR.po | 50 ++++++++++++++++++++++++++++ 2 files changed, 100 insertions(+) create mode 100644 product_code_mandatory/i18n/fr.po create mode 100644 product_code_mandatory/i18n/fr_FR.po diff --git a/product_code_mandatory/i18n/fr.po b/product_code_mandatory/i18n/fr.po new file mode 100644 index 00000000000..7b3d4e1b893 --- /dev/null +++ b/product_code_mandatory/i18n/fr.po @@ -0,0 +1,50 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_code_mandatory +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2021-04-10 11:46+0000\n" +"Last-Translator: Yves Le Doeuff \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 4.3.2\n" + +#. module: product_code_mandatory +#: model:ir.model.fields,field_description:product_code_mandatory.field_product_product__display_name +msgid "Display Name" +msgstr "Nom affiché" + +#. module: product_code_mandatory +#: model:ir.model.fields,field_description:product_code_mandatory.field_product_product__id +msgid "ID" +msgstr "" + +#. module: product_code_mandatory +#: model:ir.model.fields,field_description:product_code_mandatory.field_product_product__default_code +msgid "Internal Reference" +msgstr "Référence interne" + +#. module: product_code_mandatory +#: model:ir.model.fields,field_description:product_code_mandatory.field_product_product____last_update +msgid "Last Modified on" +msgstr "Dernière modification" + +#. module: product_code_mandatory +#: model:ir.model,name:product_code_mandatory.model_product_product +msgid "Product" +msgstr "Article" + +#. module: product_code_mandatory +#: model:ir.model.fields,help:product_code_mandatory.field_product_product__default_code +msgid "" +"Set to '/' and save if you want a new internal reference to be proposed." +msgstr "" +"Mettez '/' et sauvegardez si vous voulez qu'une nouvelle référence vous soit " +"proposée." diff --git a/product_code_mandatory/i18n/fr_FR.po b/product_code_mandatory/i18n/fr_FR.po new file mode 100644 index 00000000000..c5200207018 --- /dev/null +++ b/product_code_mandatory/i18n/fr_FR.po @@ -0,0 +1,50 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_code_mandatory +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2021-04-10 15:46+0000\n" +"Last-Translator: Yves Le Doeuff \n" +"Language-Team: none\n" +"Language: fr_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 4.3.2\n" + +#. module: product_code_mandatory +#: model:ir.model.fields,field_description:product_code_mandatory.field_product_product__display_name +msgid "Display Name" +msgstr "Nom affiché" + +#. module: product_code_mandatory +#: model:ir.model.fields,field_description:product_code_mandatory.field_product_product__id +msgid "ID" +msgstr "" + +#. module: product_code_mandatory +#: model:ir.model.fields,field_description:product_code_mandatory.field_product_product__default_code +msgid "Internal Reference" +msgstr "Référence interne" + +#. module: product_code_mandatory +#: model:ir.model.fields,field_description:product_code_mandatory.field_product_product____last_update +msgid "Last Modified on" +msgstr "Dernière modification" + +#. module: product_code_mandatory +#: model:ir.model,name:product_code_mandatory.model_product_product +msgid "Product" +msgstr "Article" + +#. module: product_code_mandatory +#: model:ir.model.fields,help:product_code_mandatory.field_product_product__default_code +msgid "" +"Set to '/' and save if you want a new internal reference to be proposed." +msgstr "" +"Mettez '/' et sauvegardez si vous voulez qu'une nouvelle référence vous soit " +"proposée." From a7b12359c979a2e792fb29efad5fb313064cb7a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nedas=20=C5=BDilinskas?= Date: Wed, 19 Jan 2022 07:41:02 +0000 Subject: [PATCH 008/224] [MIG] product_code_mandatory: Migration to 15.0 --- product_code_mandatory/README.rst | 11 +++++---- product_code_mandatory/__manifest__.py | 2 +- .../i18n/product_code_mandatory.pot | 23 +------------------ .../readme/CONTRIBUTORS.rst | 1 + .../static/description/index.html | 7 +++--- 5 files changed, 13 insertions(+), 31 deletions(-) diff --git a/product_code_mandatory/README.rst b/product_code_mandatory/README.rst index c4a02364328..5349fc1e3a4 100644 --- a/product_code_mandatory/README.rst +++ b/product_code_mandatory/README.rst @@ -14,13 +14,13 @@ Product Code Mandatory :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fproduct--attribute-lightgray.png?logo=github - :target: https://github.com/OCA/product-attribute/tree/14.0/product_code_mandatory + :target: https://github.com/OCA/product-attribute/tree/15.0/product_code_mandatory :alt: OCA/product-attribute .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/product-attribute-14-0/product-attribute-14-0-product_code_mandatory + :target: https://translation.odoo-community.org/projects/product-attribute-15-0/product-attribute-15-0-product_code_mandatory :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/135/14.0 + :target: https://runbot.odoo-community.org/runbot/135/15.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -52,7 +52,7 @@ 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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -70,6 +70,7 @@ Contributors * Antonio Yamuta * Sudhir Arya * Watthanun Khorchai +* Nedas Žilinskas Maintainers ~~~~~~~~~~~ @@ -84,6 +85,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -This module is part of the `OCA/product-attribute `_ project on GitHub. +This module is part of the `OCA/product-attribute `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/product_code_mandatory/__manifest__.py b/product_code_mandatory/__manifest__.py index 159049bbbf5..3b690c0108d 100644 --- a/product_code_mandatory/__manifest__.py +++ b/product_code_mandatory/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Product Code Mandatory", "summary": "Set Product Internal Reference as a required field", - "version": "14.0.1.0.1", + "version": "15.0.1.0.0", "license": "AGPL-3", "author": "Open Source Integrators, Odoo Community Association (OCA)", "category": "Product", diff --git a/product_code_mandatory/i18n/product_code_mandatory.pot b/product_code_mandatory/i18n/product_code_mandatory.pot index da873055f4c..9b3d81258c2 100644 --- a/product_code_mandatory/i18n/product_code_mandatory.pot +++ b/product_code_mandatory/i18n/product_code_mandatory.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 14.0\n" +"Project-Id-Version: Odoo Server 15.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: \n" "Language-Team: \n" @@ -13,33 +13,12 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: \n" -#. module: product_code_mandatory -#: model:ir.model.fields,field_description:product_code_mandatory.field_product_product__display_name -msgid "Display Name" -msgstr "" - -#. module: product_code_mandatory -#: model:ir.model.fields,field_description:product_code_mandatory.field_product_product__id -msgid "ID" -msgstr "" - #. module: product_code_mandatory #: model:ir.model.fields,field_description:product_code_mandatory.field_product_product__default_code msgid "Internal Reference" msgstr "" -#. module: product_code_mandatory -#: model:ir.model.fields,field_description:product_code_mandatory.field_product_product____last_update -msgid "Last Modified on" -msgstr "" - #. module: product_code_mandatory #: model:ir.model,name:product_code_mandatory.model_product_product msgid "Product" msgstr "" - -#. module: product_code_mandatory -#: model:ir.model.fields,help:product_code_mandatory.field_product_product__default_code -msgid "" -"Set to '/' and save if you want a new internal reference to be proposed." -msgstr "" diff --git a/product_code_mandatory/readme/CONTRIBUTORS.rst b/product_code_mandatory/readme/CONTRIBUTORS.rst index c683f780130..21c5ea62267 100644 --- a/product_code_mandatory/readme/CONTRIBUTORS.rst +++ b/product_code_mandatory/readme/CONTRIBUTORS.rst @@ -1,3 +1,4 @@ * Antonio Yamuta * Sudhir Arya * Watthanun Khorchai +* Nedas Žilinskas diff --git a/product_code_mandatory/static/description/index.html b/product_code_mandatory/static/description/index.html index 08b37e2e3fa..c3cafc938dc 100644 --- a/product_code_mandatory/static/description/index.html +++ b/product_code_mandatory/static/description/index.html @@ -367,7 +367,7 @@

Product Code Mandatory

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

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

+

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

This module sets the field internal reference (default_code) of the product as required.

Table of contents

@@ -399,7 +399,7 @@

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.

+feedback.

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

@@ -416,6 +416,7 @@

Contributors

  • Antonio Yamuta <ayamuta@opensourceintegrators.com>
  • Sudhir Arya <sudhir@erpharbor.com>
  • Watthanun Khorchai <watthanun_t@hotmail.com>
  • +
  • Nedas Žilinskas <nedas.zilinskas@web-veistamo.fi>
  • @@ -425,7 +426,7 @@

    Maintainers

    OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

    -

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

    +

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

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

    From 2067b1610a1bd774ac9e76a7c43961979df4bec6 Mon Sep 17 00:00:00 2001 From: pablontura Date: Fri, 22 Apr 2022 08:14:55 +0000 Subject: [PATCH 009/224] Added translation using Weblate (Catalan) --- product_code_mandatory/i18n/ca.po | 27 +++++++++++++++++++ .../i18n/product_code_mandatory.pot | 6 +++++ 2 files changed, 33 insertions(+) create mode 100644 product_code_mandatory/i18n/ca.po diff --git a/product_code_mandatory/i18n/ca.po b/product_code_mandatory/i18n/ca.po new file mode 100644 index 00000000000..4488d5f9ac9 --- /dev/null +++ b/product_code_mandatory/i18n/ca.po @@ -0,0 +1,27 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_code_mandatory +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 15.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2022-04-22 10:05+0000\n" +"Last-Translator: pablontura \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_code_mandatory +#: model:ir.model.fields,field_description:product_code_mandatory.field_product_product__default_code +msgid "Internal Reference" +msgstr "Referència interna" + +#. module: product_code_mandatory +#: model:ir.model,name:product_code_mandatory.model_product_product +msgid "Product" +msgstr "Producte" diff --git a/product_code_mandatory/i18n/product_code_mandatory.pot b/product_code_mandatory/i18n/product_code_mandatory.pot index 9b3d81258c2..784b6ca0b6b 100644 --- a/product_code_mandatory/i18n/product_code_mandatory.pot +++ b/product_code_mandatory/i18n/product_code_mandatory.pot @@ -22,3 +22,9 @@ msgstr "" #: model:ir.model,name:product_code_mandatory.model_product_product msgid "Product" msgstr "" + +#. module: product_code_mandatory +#: model:ir.model.fields,help:product_code_mandatory.field_product_product__default_code +msgid "" +"Set to '/' and save if you want a new internal reference to be proposed." +msgstr "" From 03704b7b61f21c4c639246d11b2c23edb8ef03a6 Mon Sep 17 00:00:00 2001 From: OCA Transbot Date: Sun, 3 Jul 2022 14:40:00 +0000 Subject: [PATCH 010/224] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: product-attribute-15.0/product-attribute-15.0-product_code_mandatory Translate-URL: https://translation.odoo-community.org/projects/product-attribute-15-0/product-attribute-15-0-product_code_mandatory/ --- product_code_mandatory/i18n/ca.po | 6 ++++++ product_code_mandatory/i18n/fr.po | 21 ++++++--------------- product_code_mandatory/i18n/fr_FR.po | 21 ++++++--------------- product_code_mandatory/i18n/pt.po | 5 +++-- 4 files changed, 21 insertions(+), 32 deletions(-) diff --git a/product_code_mandatory/i18n/ca.po b/product_code_mandatory/i18n/ca.po index 4488d5f9ac9..1419f045da6 100644 --- a/product_code_mandatory/i18n/ca.po +++ b/product_code_mandatory/i18n/ca.po @@ -25,3 +25,9 @@ msgstr "Referència interna" #: model:ir.model,name:product_code_mandatory.model_product_product msgid "Product" msgstr "Producte" + +#. module: product_code_mandatory +#: model:ir.model.fields,help:product_code_mandatory.field_product_product__default_code +msgid "" +"Set to '/' and save if you want a new internal reference to be proposed." +msgstr "" diff --git a/product_code_mandatory/i18n/fr.po b/product_code_mandatory/i18n/fr.po index 7b3d4e1b893..c8c9fe611a7 100644 --- a/product_code_mandatory/i18n/fr.po +++ b/product_code_mandatory/i18n/fr.po @@ -16,26 +16,11 @@ msgstr "" "Plural-Forms: nplurals=2; plural=n > 1;\n" "X-Generator: Weblate 4.3.2\n" -#. module: product_code_mandatory -#: model:ir.model.fields,field_description:product_code_mandatory.field_product_product__display_name -msgid "Display Name" -msgstr "Nom affiché" - -#. module: product_code_mandatory -#: model:ir.model.fields,field_description:product_code_mandatory.field_product_product__id -msgid "ID" -msgstr "" - #. module: product_code_mandatory #: model:ir.model.fields,field_description:product_code_mandatory.field_product_product__default_code msgid "Internal Reference" msgstr "Référence interne" -#. module: product_code_mandatory -#: model:ir.model.fields,field_description:product_code_mandatory.field_product_product____last_update -msgid "Last Modified on" -msgstr "Dernière modification" - #. module: product_code_mandatory #: model:ir.model,name:product_code_mandatory.model_product_product msgid "Product" @@ -48,3 +33,9 @@ msgid "" msgstr "" "Mettez '/' et sauvegardez si vous voulez qu'une nouvelle référence vous soit " "proposée." + +#~ msgid "Display Name" +#~ msgstr "Nom affiché" + +#~ msgid "Last Modified on" +#~ msgstr "Dernière modification" diff --git a/product_code_mandatory/i18n/fr_FR.po b/product_code_mandatory/i18n/fr_FR.po index c5200207018..af934ded787 100644 --- a/product_code_mandatory/i18n/fr_FR.po +++ b/product_code_mandatory/i18n/fr_FR.po @@ -16,26 +16,11 @@ msgstr "" "Plural-Forms: nplurals=2; plural=n > 1;\n" "X-Generator: Weblate 4.3.2\n" -#. module: product_code_mandatory -#: model:ir.model.fields,field_description:product_code_mandatory.field_product_product__display_name -msgid "Display Name" -msgstr "Nom affiché" - -#. module: product_code_mandatory -#: model:ir.model.fields,field_description:product_code_mandatory.field_product_product__id -msgid "ID" -msgstr "" - #. module: product_code_mandatory #: model:ir.model.fields,field_description:product_code_mandatory.field_product_product__default_code msgid "Internal Reference" msgstr "Référence interne" -#. module: product_code_mandatory -#: model:ir.model.fields,field_description:product_code_mandatory.field_product_product____last_update -msgid "Last Modified on" -msgstr "Dernière modification" - #. module: product_code_mandatory #: model:ir.model,name:product_code_mandatory.model_product_product msgid "Product" @@ -48,3 +33,9 @@ msgid "" msgstr "" "Mettez '/' et sauvegardez si vous voulez qu'une nouvelle référence vous soit " "proposée." + +#~ msgid "Display Name" +#~ msgstr "Nom affiché" + +#~ msgid "Last Modified on" +#~ msgstr "Dernière modification" diff --git a/product_code_mandatory/i18n/pt.po b/product_code_mandatory/i18n/pt.po index 3c7c2afabf2..e90e12a1fc5 100644 --- a/product_code_mandatory/i18n/pt.po +++ b/product_code_mandatory/i18n/pt.po @@ -1,6 +1,6 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * product_code_mandatory +# * product_code_mandatory # msgid "" msgstr "" @@ -28,7 +28,8 @@ msgstr "Produto" #. module: product_code_mandatory #: model:ir.model.fields,help:product_code_mandatory.field_product_product__default_code -msgid "Set to '/' and save if you want a new internal reference to be proposed." +msgid "" +"Set to '/' and save if you want a new internal reference to be proposed." msgstr "" "Defina como '/' e guarde caso pretenda que uma nova referência interna seja " "proposta." From 210d3fa9aa9644435a91af3d36cecdfcf6243419 Mon Sep 17 00:00:00 2001 From: augusto-weiss Date: Thu, 15 Sep 2022 10:56:33 -0300 Subject: [PATCH 011/224] [FIX] product_code_mandatory: align code with Odoo way to set default code --- product_code_mandatory/README.rst | 15 +++++--- product_code_mandatory/__init__.py | 16 ++++++-- product_code_mandatory/__manifest__.py | 2 +- .../static/description/index.html | 38 ++++++++++--------- 4 files changed, 43 insertions(+), 28 deletions(-) diff --git a/product_code_mandatory/README.rst b/product_code_mandatory/README.rst index 5349fc1e3a4..11c77f4cc12 100644 --- a/product_code_mandatory/README.rst +++ b/product_code_mandatory/README.rst @@ -2,10 +2,13 @@ Product Code Mandatory ====================== -.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:df7bdf43dba84557746371c9915e7f7822e56daf2dfa9a50222336a573df1235 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png :target: https://odoo-community.org/page/development-status @@ -19,11 +22,11 @@ Product Code Mandatory .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png :target: https://translation.odoo-community.org/projects/product-attribute-15-0/product-attribute-15-0-product_code_mandatory :alt: Translate me on Weblate -.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/135/15.0 - :alt: Try me on Runbot +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/product-attribute&target_branch=15.0 + :alt: Try me on Runboat -|badge1| |badge2| |badge3| |badge4| |badge5| +|badge1| |badge2| |badge3| |badge4| |badge5| This module sets the field internal reference (default_code) of the product as required. @@ -51,7 +54,7 @@ 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 +If you spotted it first, help us to smash it by providing a detailed and welcomed `feedback `_. Do not contact contributors directly about support or help with technical issues. diff --git a/product_code_mandatory/__init__.py b/product_code_mandatory/__init__.py index 1c1865a1dd0..511066707ab 100644 --- a/product_code_mandatory/__init__.py +++ b/product_code_mandatory/__init__.py @@ -1,17 +1,27 @@ from . import models +from odoo import api, SUPERUSER_ID + def pre_init_product_code(cr): + env = api.Environment(cr, SUPERUSER_ID, {}) + cr.execute( - """UPDATE product_template - SET default_code = 'DEFAULT' || nextval('ir_default_id_seq') + """ + SELECT product_tmpl_id from product_product WHERE default_code is NULL - OR LENGTH(default_code) = 0""" + OR LENGTH(default_code) = 0 + GROUP BY product_tmpl_id + HAVING COUNT(product_tmpl_id) = 1""" ) + product_template_ids = [x[0] for x in cr.fetchall()] cr.execute( """UPDATE product_product SET default_code = 'DEFAULT' || nextval('ir_default_id_seq') WHERE default_code is NULL OR LENGTH(default_code) = 0""" ) + + env["product.template"].browse(product_template_ids)._compute_default_code() + return True diff --git a/product_code_mandatory/__manifest__.py b/product_code_mandatory/__manifest__.py index 3b690c0108d..8ec22912d31 100644 --- a/product_code_mandatory/__manifest__.py +++ b/product_code_mandatory/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Product Code Mandatory", "summary": "Set Product Internal Reference as a required field", - "version": "15.0.1.0.0", + "version": "15.0.1.0.1", "license": "AGPL-3", "author": "Open Source Integrators, Odoo Community Association (OCA)", "category": "Product", diff --git a/product_code_mandatory/static/description/index.html b/product_code_mandatory/static/description/index.html index c3cafc938dc..d4c4c0c8cc0 100644 --- a/product_code_mandatory/static/description/index.html +++ b/product_code_mandatory/static/description/index.html @@ -1,20 +1,20 @@ - + - + Product Code Mandatory + + +
    +

    Product Abc Classification

    + + +

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

    +

    This modules provides the bases to build ABC analysis (or ABC classification) +addons. These classification are used by inventory management teams to help +identify the most important products in their portfolio and ensure they +prioritize managing them above those less valuable.

    +

    Managers will create a profile with several levels (percentages) and then the +profiled products will automatically get a corresponding level using the +ABC classification.

    +

    The addon product_abc_classification_sale_stock defines a computation profile +based on the number of sale order line delivered by product.

    +

    Table of contents

    + +
    +

    Usage

    +

    To use this module, you need to:

    +

    #. Go to Sales or Inventory menu, then to Configuration/Products/ABC Classification Profile +and create a profile with levels, knowing that the sum of all levels in the profile +should sum 100 and all the levels should be different.

    +

    #. Later you should go to product categories or product variants, and assign them a profile. +Then the cron classification will proceed to assign to these products one of the profile’s levels.

    +

    NOTE: If you profile (or unprofile) a product category, then all its +child categories and products will be profiled (or unprofiled).

    +
    +
    +

    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

    +
      +
    • ACSONE SA/NV
    • +
    • ForgeFlow
    • +
    +
    +
    +

    Contributors

    + +
    +
    +

    Maintainers

    +

    This module is maintained by the OCA.

    +Odoo Community Association +

    OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use.

    +

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

    +

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

    +
    +
    +
    + + diff --git a/product_abc_classification/tests/__init__.py b/product_abc_classification/tests/__init__.py new file mode 100644 index 00000000000..8292c06ca32 --- /dev/null +++ b/product_abc_classification/tests/__init__.py @@ -0,0 +1,3 @@ +from . import test_abc_classification_product_level +from . import test_abc_classification_profile +from . import test_product diff --git a/product_abc_classification/tests/common.py b/product_abc_classification/tests/common.py new file mode 100644 index 00000000000..4900770fdce --- /dev/null +++ b/product_abc_classification/tests/common.py @@ -0,0 +1,123 @@ +# Copyright 2021 ACSONE SA/NV +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo.tests.common import TransactionCase + + +class ABCClassificationCase(TransactionCase): + @classmethod + def setUpClass(cls): + super().setUpClass() + cls.env = cls.env(context=dict(cls.env.context, tracking_disable=True)) + # add a fake profile_type + cls.ABCClassificationProfile = cls.env["abc.classification.profile"] + cls.ABCClassificationProfile._fields["profile_type"].selection = [ + ("test_type", "Test Type") + ] + cls.classification_profile = cls.ABCClassificationProfile.create( + {"name": "Profile test", "profile_type": "test_type"} + ) + + +class ABCClassificationLevelCase(ABCClassificationCase): + @classmethod + def setUpClass(cls): + super().setUpClass() + cls.classification_profile.write( + { + "level_ids": [ + ( + 0, + 0, + { + "percentage": 60, + "percentage_products": 40, + "name": "a", + }, + ), + ( + 0, + 0, + { + "percentage": 40, + "percentage_products": 60, + "name": "b", + }, + ), + ] + } + ) + + levels = cls.classification_profile.level_ids + cls.classification_level_a = levels.filtered(lambda l: l.name == "a") + cls.classification_level_b = levels.filtered(lambda l: l.name == "b") + cls.classification_profile_bis = cls.ABCClassificationProfile.create( + { + "name": "Profile test bis", + "profile_type": "test_type", + "level_ids": [ + ( + 0, + 0, + { + "percentage": 80, + "percentage_products": 40, + "name": "a", + }, + ), + ( + 0, + 0, + { + "percentage": 20, + "percentage_products": 60, + "name": "b", + }, + ), + ], + } + ) + levels = cls.classification_profile_bis.level_ids + cls.classification_level_bis_a = levels.filtered(lambda l: l.name == "a") + + cls.classification_level_bis_b = levels.filtered(lambda l: l.name == "b") + # create a template with one variant adn declare attributes to create + # an other variant on demand + cls.size_attr = cls.env["product.attribute"].create( + { + "name": "Size", + "create_variant": "no_variant", + "value_ids": [(0, 0, {"name": "S"}), (0, 0, {"name": "M"})], + } + ) + cls.size_attr_value_s = cls.size_attr.value_ids[0] + cls.size_attr_value_m = cls.size_attr.value_ids[1] + cls.uom_unit = cls.env.ref("uom.product_uom_unit") + cls.product_template = cls.env["product.template"].create( + { + "name": "Test sized", + "uom_id": cls.uom_unit.id, + "uom_po_id": cls.uom_unit.id, + "attribute_line_ids": [ + ( + 0, + 0, + { + "attribute_id": cls.size_attr.id, + "value_ids": [(6, 0, cls.size_attr.value_ids.ids)], + }, + ) + ], + } + ) + cls.product_product = cls.product_template.product_variant_ids + cls.ProductLevel = cls.env["abc.classification.product.level"] + + @classmethod + def _create_variant(cls, size_value): + return cls.env["product.product"].create( + { + "product_tmpl_id": cls.product_template.id, + "product_template_attribute_value_ids": [(6, 0, size_value.ids)], + } + ) diff --git a/product_abc_classification/tests/test_abc_classification_product_level.py b/product_abc_classification/tests/test_abc_classification_product_level.py new file mode 100644 index 00000000000..9b2db6df872 --- /dev/null +++ b/product_abc_classification/tests/test_abc_classification_product_level.py @@ -0,0 +1,363 @@ +# 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 .common import ABCClassificationLevelCase + + +class TestABCClassificationProductLevel(ABCClassificationLevelCase): + @classmethod + def setUpClass(cls): + super().setUpClass() + cls.product_1 = cls.env["product.product"].create( + { + "name": "Test 1", + "uom_id": cls.uom_unit.id, + "uom_po_id": cls.uom_unit.id, + } + ) + cls.product_level = cls.ProductLevel.create( + { + "product_id": cls.product_product.id, + "computed_level_id": cls.classification_level_a.id, + "profile_id": cls.classification_profile.id, + } + ) + + @classmethod + def _create_product_levels(cls): + product_2 = cls.env["product.product"].create( + { + "name": "Test 2", + "uom_id": cls.uom_unit.id, + "uom_po_id": cls.uom_unit.id, + } + ) + + product_3 = cls.env["product.product"].create( + { + "name": "Test 3", + "uom_id": cls.uom_unit.id, + "uom_po_id": cls.uom_unit.id, + } + ) + cls.ProductLevel.create( + { + "product_id": product_2.id, + "manual_level_id": cls.classification_level_b.id, + "computed_level_id": cls.classification_level_a.id, + "profile_id": cls.classification_profile.id, + } + ) + cls.ProductLevel.create( + { + "product_id": product_3.id, + "manual_level_id": cls.classification_level_b.id, + "computed_level_id": cls.classification_level_a.id, + "profile_id": cls.classification_profile.id, + } + ) + + def test_00(self): + """ + Test case: + Create a classification product level with only a computed_level_id + Expected result: + A instance is created with: + * the manual_level_id and level_id set + * flag is False since manual and computd are the same + + """ + level = self.ProductLevel.create( + { + "product_id": self.product_1.id, + "computed_level_id": self.classification_level_a.id, + "profile_id": self.classification_profile.id, + } + ) + self.assertEqual(level.manual_level_id, self.classification_level_a) + self.assertEqual(level.level_id, self.classification_level_a) + self.assertFalse(level.flag) + + def test_01(self): + """ + Test case: + Create product level with only a manual level + + A creation if a product level is created without computed value + the computed value is never taken into account + Expected result: + A new level is create with: + * computed_level_id = False + * level_id = manual_level_id + * flag = False + """ + level = self.ProductLevel.create( + { + "product_id": self.product_1.id, + "manual_level_id": self.classification_level_a.id, + "profile_id": self.classification_profile.id, + } + ) + self.assertFalse(level.computed_level_id) + self.assertEqual(level.manual_level_id, self.classification_level_a) + self.assertEqual(level.level_id, self.classification_level_a) + self.assertFalse(level.flag) + + def test_02(self): + """ + Data: + An existing classification level with computed = manual + Test case: + 1. Change manual_level_id to an other value than the computed one + 2. Reset manual_level_id to the computed one + Expected result: + 1. level_id === manual =! computed and flag is true + 2 level_id == manual == computed and flag is true + ValidationError + """ + self.assertFalse(self.product_level.flag) + self.assertEqual( + self.product_level.manual_level_id, + self.product_level.computed_level_id, + ) + self.assertEqual( + self.product_level.computed_level_id, self.classification_level_a + ) + self.assertEqual(self.product_level.level_id, self.classification_level_a) + # 1 + self.product_level.manual_level_id = self.classification_level_b + self.assertEqual(self.product_level.level_id, self.classification_level_b) + self.assertTrue(self.product_level.flag) + # 2 + self.product_level.manual_level_id = self.product_level.computed_level_id + self.assertEqual(self.product_level.level_id, self.classification_level_a) + self.assertFalse(self.product_level.flag) + + def test_03(self): + """ + Data: + An existing product level + Test case: + Create a new product level for the same product and the same profile + Expected result: + IntegrityError (level name must be unique by profile and product) + """ + with self.assertRaises(IntegrityError): + self.ProductLevel.create( + { + "product_id": self.product_product.id, + "computed_level_id": self.classification_level_a.id, + "profile_id": self.classification_profile.id, + } + ) + + def test_04(self): + """ + Data: + An existing product level + Test case: + 1. Link a manual level from an other profile + 2. Link a computed level from an other profile + Expected result: + 1. and 2. Validation error (All the levels must share the same + profile as the one on the product level) + """ + with self.assertRaises(ValidationError), self.env.cr.savepoint(): + self.product_level.write( + { + "manual_level_id": self.classification_level_b.id, + "computed_level_id": self.classification_level_bis_a.id, + } + ) + with self.assertRaises(ValidationError), self.env.cr.savepoint(): + self.product_level.write( + { + "manual_level_id": self.classification_level_bis_a.id, + "computed_level_id": self.classification_level_a.id, + } + ) + self.product_level.write( + { + "manual_level_id": self.classification_level_bis_a.id, + "computed_level_id": self.classification_level_bis_a.id, + "profile_id": self.classification_profile_bis.id, + } + ) + + def test_05(self): + """ + Test case: + Create a product level without computed nor manual level + Expected result: + Validation error (at least a value for one of these fields is + expected) + """ + with self.assertRaises(ValidationError): + self.ProductLevel.create( + { + "product_id": self.product_1.id, + "profile_id": self.classification_profile.id, + } + ) + + def test_06_update_product_level_with_auto_compute(self): + self.classification_profile_bis.auto_apply_computed_value = True + self.product_level.write( + { + "computed_level_id": self.classification_level_bis_a.id, + "profile_id": self.classification_profile_bis.id, + } + ) + + self.assertEqual( + self.product_level.manual_level_id, + self.product_level.computed_level_id, + ) + self.assertEqual( + self.product_level.computed_level_id, self.classification_level_bis_a + ) + self.assertEqual(self.product_level.level_id, self.classification_level_bis_a) + + self.product_level.write( + { + "computed_level_id": self.classification_level_bis_b.id, + } + ) + self.assertEqual( + self.product_level.manual_level_id, + self.product_level.computed_level_id, + ) + self.assertEqual( + self.product_level.computed_level_id, self.classification_level_bis_b + ) + self.assertEqual(self.product_level.level_id, self.classification_level_bis_b) + + def test_07_update_product_level_without_auto_compute(self): + self.classification_profile.auto_apply_computed_value = False + self.product_level.write( + { + "manual_level_id": self.classification_level_b.id, + "computed_level_id": self.classification_level_a.id, + "profile_id": self.classification_profile.id, + } + ) + + self.assertNotEqual( + self.product_level.manual_level_id, + self.product_level.computed_level_id, + ) + self.assertEqual( + self.product_level.computed_level_id, self.classification_level_a + ) + self.assertEqual( + self.product_level.manual_level_id, self.classification_level_b + ) + self.assertEqual(self.product_level.level_id, self.classification_level_b) + + self.product_level.write( + { + "manual_level_id": self.classification_level_a.id, + "computed_level_id": self.classification_level_b.id, + } + ) + + self.assertNotEqual( + self.product_level.manual_level_id, + self.product_level.computed_level_id, + ) + self.assertEqual( + self.product_level.computed_level_id, self.classification_level_b + ) + self.assertEqual( + self.product_level.manual_level_id, self.classification_level_a + ) + self.assertEqual(self.product_level.level_id, self.classification_level_a) + + def test_08_update_recordset_with__autocompute(self): + self._create_product_levels() + self.classification_profile.auto_apply_computed_value = True + + levels = self.ProductLevel.search( + [("profile_id", "=", self.classification_profile.id)] + ) + levels.write( + { + "manual_level_id": self.classification_level_a.id, + "computed_level_id": self.classification_level_b.id, + } + ) + + for level in levels: + self.assertEqual(level.manual_level_id, level.computed_level_id) + self.assertEqual(level.manual_level_id, self.classification_level_b) + self.assertEqual(level.computed_level_id, self.classification_level_b) + self.assertEqual(level.level_id, self.classification_level_b) + + def test_09_update_recordset_and_change_profile(self): + self._create_product_levels() + self.classification_profile_bis.auto_apply_computed_value = True + + levels = self.ProductLevel.search( + [("profile_id", "=", self.classification_profile.id)] + ) + levels.write( + { + "computed_level_id": self.classification_level_bis_a.id, + "profile_id": self.classification_profile_bis.id, + } + ) + + for level in levels: + self.assertEqual(level.manual_level_id, level.computed_level_id) + self.assertEqual(level.manual_level_id, self.classification_level_bis_a) + self.assertEqual(level.computed_level_id, self.classification_level_bis_a) + self.assertEqual(level.level_id, self.classification_level_bis_a) + + def test_10_create_product_level_for_profile_auto_assign(self): + self.classification_profile.auto_apply_computed_value = True + level = self.ProductLevel.create( + { + "product_id": self.product_1.id, + "manual_level_id": self.classification_level_b.id, + "computed_level_id": self.classification_level_a.id, + "profile_id": self.classification_profile.id, + } + ) + self.assertEqual(level.manual_level_id, level.computed_level_id) + self.assertEqual(level.manual_level_id, self.classification_level_a) + self.assertEqual(level.computed_level_id, self.classification_level_a) + self.assertEqual(level.level_id, self.classification_level_a) + + def test_11_auto_apply_computed_level(self): + self._create_product_levels() + + levels = self.ProductLevel.search( + [("profile_id", "=", self.classification_profile.id)] + ) + level0 = levels[0] + level1 = levels[1] + level2 = levels[2] + self.assertEqual(level0.manual_level_id, level0.computed_level_id) + self.assertEqual(level0.manual_level_id, self.classification_level_a) + self.assertEqual(level0.computed_level_id, self.classification_level_a) + self.assertEqual(level0.level_id, self.classification_level_a) + + self.assertNotEqual(level1.manual_level_id, level1.computed_level_id) + self.assertEqual(level1.manual_level_id, self.classification_level_b) + self.assertEqual(level1.computed_level_id, self.classification_level_a) + self.assertEqual(level1.level_id, self.classification_level_b) + + self.assertNotEqual(level2.manual_level_id, level2.computed_level_id) + self.assertEqual(level2.manual_level_id, self.classification_level_b) + self.assertEqual(level2.computed_level_id, self.classification_level_a) + self.assertEqual(level2.level_id, self.classification_level_b) + + self.classification_profile.auto_apply_computed_value = True + for level in levels: + self.assertEqual(level.manual_level_id, self.classification_level_a) + self.assertEqual(level.computed_level_id, self.classification_level_a) + self.assertEqual(level.level_id, self.classification_level_a) diff --git a/product_abc_classification/tests/test_abc_classification_profile.py b/product_abc_classification/tests/test_abc_classification_profile.py new file mode 100644 index 00000000000..51691913cf2 --- /dev/null +++ b/product_abc_classification/tests/test_abc_classification_profile.py @@ -0,0 +1,300 @@ +# 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 .common import ABCClassificationCase + + +class TestABCClassificationProfile(ABCClassificationCase): + def test_00(self): + """ + Data: + A test profile + Test case: + Assign levels for a total of 100% + Expected result: + OK + """ + self.classification_profile.write( + { + "level_ids": [ + ( + 0, + 0, + { + "percentage": 60, + "percentage_products": 40, + "name": "A", + }, + ), + ( + 0, + 0, + { + "percentage": 40, + "percentage_products": 60, + "name": "B", + }, + ), + ] + } + ) + self.assertEqual(len(self.classification_profile.level_ids), 2) + + def test_01(self): + """ + Data: + A test profile + Test case: + Assign levels for a total < 100% + Expected result: + ValidationError + """ + with self.assertRaises(ValidationError): + self.classification_profile.write( + { + "level_ids": [ + ( + 0, + 0, + { + "percentage": 60, + "percentage_products": 40, + "name": "A", + }, + ), + ( + 0, + 0, + { + "percentage": 30, + "percentage_products": 60, + "name": "B", + }, + ), + ] + } + ) + + def test_02(self): + """ + Data: + A test profile + Test case: + Assign levels for a total > 100% + Expected result: + ValidationError + """ + with self.assertRaises(ValidationError): + self.classification_profile.write( + { + "level_ids": [ + ( + 0, + 0, + { + "percentage": 60, + "percentage_products": 40, + "name": "A", + }, + ), + ( + 0, + 0, + { + "percentage": 50, + "percentage_products": 60, + "name": "B", + }, + ), + ] + } + ) + + def test_03(self): + """ + Data: + A test profile + Test case: + Assign levels for a total = 100% but with same percentage + Expected result: + ValidationError + """ + with self.assertRaises(ValidationError): + self.classification_profile.write( + { + "level_ids": [ + ( + 0, + 0, + { + "percentage": 50, + "percentage_products": 40, + "name": "A", + }, + ), + ( + 0, + 0, + { + "percentage": 50, + "percentage_products": 60, + "name": "B", + }, + ), + ] + } + ) + + def test_04(self): + """ + Data: + A test profile + Test case: + Assign levels for a total = 100% but with one level with negative + percentage and one level exceeding 100% + Expected result: + ValidationError + """ + with self.assertRaises(ValidationError): + self.classification_profile.write( + { + "level_ids": [ + ( + 0, + 0, + { + "percentage": 150, + "percentage_products": 40, + "name": "A", + }, + ), + ( + 0, + 0, + { + "percentage": -50, + "percentage_products": 60, + "name": "B", + }, + ), + ] + } + ) + + def test_05(self): + """ + Data: + A test profile + Test case: + Assign levels for a total = 100% but with same name + Expected result: + IntegrityError (level name must be unique by profile) + """ + with self.assertRaises(IntegrityError): + self.classification_profile.write( + { + "level_ids": [ + ( + 0, + 0, + { + "percentage": 60, + "percentage_products": 40, + "name": "A", + }, + ), + ( + 0, + 0, + { + "percentage": 40, + "percentage_products": 60, + "name": "A", + }, + ), + ] + } + ) + + def test_06(self): + """ + Data: + A test profile with 2 levels A and B + Test case: + Create a new profile with the same level name + Expected result: + Profile created without error since the level name is unique by + profile + """ + self.classification_profile.write( + { + "level_ids": [ + ( + 0, + 0, + { + "percentage": 60, + "percentage_products": 40, + "name": "A", + }, + ), + ( + 0, + 0, + { + "percentage": 40, + "percentage_products": 60, + "name": "B", + }, + ), + ] + } + ) + new_profile = self.ABCClassificationProfile.create( + { + "name": "New Profile test", + "profile_type": "test_type", + "level_ids": [ + ( + 0, + 0, + { + "percentage": 60, + "percentage_products": 40, + "name": "A", + }, + ), + ( + 0, + 0, + { + "percentage": 40, + "percentage_products": 60, + "name": "B", + }, + ), + ], + } + ) + self.assertTrue(new_profile) + + def test_07(self): + """ + Data: + A test profile + Test case: + Create a new profile with the same name + Expected result: + IntegrityError (profile name must be unique by profile) + """ + with self.assertRaises(IntegrityError): + self.ABCClassificationProfile.create( + { + "name": self.classification_profile.name, + "profile_type": "test_type", + } + ) diff --git a/product_abc_classification/tests/test_product.py b/product_abc_classification/tests/test_product.py new file mode 100644 index 00000000000..923ae1eefe9 --- /dev/null +++ b/product_abc_classification/tests/test_product.py @@ -0,0 +1,109 @@ +# Copyright 2021 ACSONE SA/NV +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from .common import ABCClassificationLevelCase + + +class TestProduct(ABCClassificationLevelCase): + @classmethod + def setUpClass(cls): + super().setUpClass() + + def test_00(self): + """ + Data: + A product template with one variant. + Test Case: + 1. Associate a classification profile to the template + 2. Unset the classifiation profile + Expected: + 1. The classification profile is also associated to the variant + 2. The classification profile no more associated to the variant + """ + self.assertFalse(self.product_template.abc_classification_profile_ids) + self.assertFalse(self.product_product.abc_classification_profile_ids) + # 1 + self.product_template.abc_classification_profile_ids = ( + self.classification_profile + ) + self.assertEqual( + self.product_product.abc_classification_profile_ids, + self.classification_profile, + ) + # 2 + self.product_template.abc_classification_profile_ids = False + self.assertFalse(self.product_product.abc_classification_profile_ids) + + def test_01(self): + """ + Data: + A product template with two variants (without profiles). + Test Case: + 1. Associate a classification profile to the template + Expected: + The classification profile is not associated to the variant + """ + self._create_variant(self.size_attr_value_m) + variants = self.product_template.product_variant_ids + self.assertEqual(len(variants), 2) + self.assertFalse(variants.mapped("abc_classification_profile_ids")) + self.product_template.abc_classification_profile_ids = ( + self.classification_profile + ) + self.assertFalse(variants.mapped("abc_classification_profile_ids")) + + def test_02(self): + """ + Data: + A product template with one variant + Test Case: + 1 Associate a product level to the variant + 2 unlink the level + Expected result: + 1 The product level is also associated to the template + 2 No more level associated to the template + """ + product_level = self.ProductLevel.create( + { + "product_id": self.product_product.id, + "computed_level_id": self.classification_level_a.id, + "profile_id": self.classification_profile.id, + } + ) + self.assertEqual( + self.product_product.abc_classification_product_level_ids, + product_level, + ) + self.assertEqual( + self.product_template.abc_classification_product_level_ids, + product_level, + ) + product_level.unlink() + + self.assertFalse(self.product_product.abc_classification_product_level_ids) + self.assertFalse(self.product_template.abc_classification_product_level_ids) + + def test_03(self): + """ + Data: + A product template with two variants + Test Case: + Associate a product level to one variant + Expected result: + The product level is not associated to the template + """ + new_variant = self._create_variant(self.size_attr_value_m) + variants = self.product_template.product_variant_ids + self.assertEqual(len(variants), 2) + product_level = self.ProductLevel.create( + { + "product_id": new_variant.id, + "computed_level_id": self.classification_level_a.id, + "profile_id": self.classification_profile.id, + } + ) + self.assertEqual( + new_variant.abc_classification_product_level_ids, + product_level, + ) + self.assertFalse(self.product_template.abc_classification_product_level_ids) diff --git a/product_abc_classification/views/abc_classification_product_level.xml b/product_abc_classification/views/abc_classification_product_level.xml new file mode 100644 index 00000000000..71ac10979bd --- /dev/null +++ b/product_abc_classification/views/abc_classification_product_level.xml @@ -0,0 +1,101 @@ + + + + + abc.classification.product.level.form (in product_abc_classification) + abc.classification.product.level + +
    + + + + + + + + + + + + + + + +
    + + +
    +
    +
    +
    + + abc.classification.product.level.tree (in product_abc_classification) + abc.classification.product.level + + + + + + + + + + + + abc.classification.product.level.search (in product_abc_classification) + abc.classification.product.level + + + + + + + + + + + + + + + + Products ABC Classification + abc.classification.product.level + tree,form + {'search_default_group_by_level': 1} + + +
    diff --git a/product_abc_classification/views/abc_classification_profile.xml b/product_abc_classification/views/abc_classification_profile.xml new file mode 100644 index 00000000000..f7eaf1f93da --- /dev/null +++ b/product_abc_classification/views/abc_classification_profile.xml @@ -0,0 +1,54 @@ + + + + + abc.classification.profile.form (in product_abc_classification) + abc.classification.profile + +
    + + + + + + + + + + + + + + + + + +
    +
    +
    + + abc.classification.profile.tree (in product_abc_classification) + abc.classification.profile + + + + + + + + ABC Classification profiles + abc.classification.profile + tree,form + + +
    diff --git a/product_abc_classification/views/product_product.xml b/product_abc_classification/views/product_product.xml new file mode 100644 index 00000000000..ef810e32598 --- /dev/null +++ b/product_abc_classification/views/product_product.xml @@ -0,0 +1,19 @@ + + + + + product.product.form (ABC Classification) + product.product + + + + {'default_product_id': active_id, 'default_profile_id': abc_classification_profile_ids and abc_classification_profile_ids[0] and abc_classification_profile_ids[0][2] and abc_classification_profile_ids[0][2][0] or False} + {'read_only': False} + [('product_id', '=', active_id)] + + + + diff --git a/product_abc_classification/views/product_template.xml b/product_abc_classification/views/product_template.xml new file mode 100644 index 00000000000..1127c274e5f --- /dev/null +++ b/product_abc_classification/views/product_template.xml @@ -0,0 +1,32 @@ + + + + + product.template.form (ABC Classification) + product.template + + + + + + + + + + + + + + + From 24c91f573f716060bf4d12695eceae14cc5188b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miquel=20Ra=C3=AFch?= Date: Wed, 2 Feb 2022 17:34:19 +0100 Subject: [PATCH 025/224] [IMP] product_abc_classification: add product smart button in profile --- .../models/abc_classification_profile.py | 37 +++++++++++++++++++ .../views/abc_classification_profile.xml | 10 +++++ 2 files changed, 47 insertions(+) diff --git a/product_abc_classification/models/abc_classification_profile.py b/product_abc_classification/models/abc_classification_profile.py index b57b0a1e46d..6411834d0ee 100644 --- a/product_abc_classification/models/abc_classification_profile.py +++ b/product_abc_classification/models/abc_classification_profile.py @@ -30,6 +30,15 @@ class AbcClassificationProfile(models.Model): required=True, ) + product_variant_ids = fields.Many2many( + comodel_name="product.product", + relation="abc_classification_profile_product_rel", + column1="profile_id", + column2="product_id", + index=True, + ) + product_count = fields.Integer(compute="_compute_product_count", readonly=True) + auto_apply_computed_value = fields.Boolean(default=False) _sql_constraints = [("name_uniq", "UNIQUE(name)", _("Profile name must be unique"))] @@ -60,6 +69,34 @@ def _check_levels(self): def _compute_abc_classification(self): raise NotImplementedError() + @api.depends("product_variant_ids") + def _compute_product_count(self): + for profile in self: + profile.product_count = len(profile.product_variant_ids) + + def action_view_products(self): + products = self.mapped("product_variant_ids") + action = self.env["ir.actions.act_window"].for_xml_id( + "product", "product_variant_action" + ) + del action["context"] + if len(products) > 1: + action["domain"] = [("id", "in", products.ids)] + elif len(products) == 1: + form_view = [ + (self.env.ref("product.product_variant_easy_edit_view").id, "form") + ] + if "views" in action: + action["views"] = form_view + [ + (state, view) for state, view in action["views"] if view != "form" + ] + else: + action["views"] = form_view + action["res_id"] = products.id + else: + action = {"type": "ir.actions.act_window_close"} + return action + @api.model def _cron_compute_abc_classification(self): self.search([])._compute_abc_classification() diff --git a/product_abc_classification/views/abc_classification_profile.xml b/product_abc_classification/views/abc_classification_profile.xml index f7eaf1f93da..65830d78c4f 100644 --- a/product_abc_classification/views/abc_classification_profile.xml +++ b/product_abc_classification/views/abc_classification_profile.xml @@ -10,6 +10,16 @@
    +
    + +
    From 52affaf7c0f84ef9b33da42bcca301ca997612c3 Mon Sep 17 00:00:00 2001 From: Denis Roussel Date: Tue, 15 Nov 2022 08:13:45 +0100 Subject: [PATCH 026/224] [FIX] product_abc_classification: Remove not working context attributes --- product_abc_classification/views/product_product.xml | 2 +- product_abc_classification/views/product_template.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/product_abc_classification/views/product_product.xml b/product_abc_classification/views/product_product.xml index ef810e32598..b6b19dc26ca 100644 --- a/product_abc_classification/views/product_product.xml +++ b/product_abc_classification/views/product_product.xml @@ -10,7 +10,7 @@ {'default_product_id': active_id, 'default_profile_id': abc_classification_profile_ids and abc_classification_profile_ids[0] and abc_classification_profile_ids[0][2] and abc_classification_profile_ids[0][2][0] or False} + >{'default_product_id': active_id, 'default_profile_id': abc_classification_profile_ids and abc_classification_profile_ids[0] or False} {'read_only': False} [('product_id', '=', active_id)] diff --git a/product_abc_classification/views/product_template.xml b/product_abc_classification/views/product_template.xml index 1127c274e5f..2f2873568fc 100644 --- a/product_abc_classification/views/product_template.xml +++ b/product_abc_classification/views/product_template.xml @@ -18,7 +18,7 @@ From f4b5abd8168788c8ba9dbff6494260671c17b814 Mon Sep 17 00:00:00 2001 From: Denis Roussel Date: Thu, 17 Nov 2022 14:23:31 +0100 Subject: [PATCH 027/224] [FIX] product_abc_classification: Use the good _for_xml_id() and add tests --- .../models/abc_classification_profile.py | 4 +-- .../tests/test_product.py | 30 +++++++++++++++++++ 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/product_abc_classification/models/abc_classification_profile.py b/product_abc_classification/models/abc_classification_profile.py index 6411834d0ee..c71f4b4bb63 100644 --- a/product_abc_classification/models/abc_classification_profile.py +++ b/product_abc_classification/models/abc_classification_profile.py @@ -76,8 +76,8 @@ def _compute_product_count(self): def action_view_products(self): products = self.mapped("product_variant_ids") - action = self.env["ir.actions.act_window"].for_xml_id( - "product", "product_variant_action" + action = self.env["ir.actions.act_window"]._for_xml_id( + "product.product_variant_action" ) del action["context"] if len(products) > 1: diff --git a/product_abc_classification/tests/test_product.py b/product_abc_classification/tests/test_product.py index 923ae1eefe9..add08143a4a 100644 --- a/product_abc_classification/tests/test_product.py +++ b/product_abc_classification/tests/test_product.py @@ -107,3 +107,33 @@ def test_03(self): product_level, ) self.assertFalse(self.product_template.abc_classification_product_level_ids) + + def test_04(self): + """ + Data: + A product template + Test case: + Check if resource id in action is the product variant one + """ + self.product_template.abc_classification_profile_ids = ( + self.classification_profile + ) + action = self.classification_profile.action_view_products() + self.assertEqual(action["res_id"], self.product_template.product_variant_ids.id) + + def test_05(self): + """ + Data: + A product template with two variants + Test case: + Check if doamin in action is the product variants ids + """ + self._create_variant(self.size_attr_value_m) + self.product_template.product_variant_ids.abc_classification_profile_ids = ( + self.classification_profile + ) + action = self.classification_profile.action_view_products() + self.assertEqual( + action["domain"], + [("id", "in", self.product_template.product_variant_ids.ids)], + ) From 327ad7c291ed38499b2dbf2ac608dc64f1a541de Mon Sep 17 00:00:00 2001 From: Denis Roussel Date: Tue, 22 Nov 2022 10:47:00 +0100 Subject: [PATCH 028/224] [FIX] product_abc_classification: Adapt write() for a multi recordset --- .../abc_classification_product_level.py | 40 ++++++++++++++----- 1 file changed, 31 insertions(+), 9 deletions(-) diff --git a/product_abc_classification/models/abc_classification_product_level.py b/product_abc_classification/models/abc_classification_product_level.py index 1ad9cf6c184..7def032e335 100644 --- a/product_abc_classification/models/abc_classification_product_level.py +++ b/product_abc_classification/models/abc_classification_product_level.py @@ -146,14 +146,36 @@ def create(self, vals_list): return super().create(vals_list) def write(self, vals): + """ + We apply the manual level to the product level if + computed level is modified and only for profiles with + auto_apply_computed_value = =True + """ values = vals.copy() - if "profile_id" in values: - profile = self.env["abc.classification.profile"].browse( - values["profile_id"] + new_self = self + if "computed_level_id" in values: + profile_obj = self.env["abc.classification.profile"] + target_profile_id = ( + profile_obj.browse(values["profile_id"]).filtered( + "auto_apply_computed_value" + ) + if "profile_id" in values + else profile_obj.browse() ) - else: - profile = self.mapped("profile_id") - - if profile.auto_apply_computed_value and "computed_level_id" in values: - values["manual_level_id"] = values["computed_level_id"] - return super().write(values) + if target_profile_id: + # If the profile of levels should be changed at the same time + # and has auto_apply_computed_value True + # So, we can apply change to the whole recordset + values["manual_level_id"] = values["computed_level_id"] + else: + # If profile is not modified, filter levels per profile + # if it has auto_apply_computed_value True and modify only + # those ones + auto_applied_profiles_levels = self.filtered( + lambda l: l.profile_id.auto_apply_computed_value + ) + new_self = self - auto_applied_profiles_levels + super( + AbcClassificationProductLevel, auto_applied_profiles_levels + ).write(dict(values, manual_level_id=values["computed_level_id"])) + return super(AbcClassificationProductLevel, new_self).write(values) From 2343b4b78340c65999c6cfb0838ac691139ad0a7 Mon Sep 17 00:00:00 2001 From: Denis Roussel Date: Wed, 15 Feb 2023 12:51:41 +0100 Subject: [PATCH 029/224] [IMP] product_abc_classification: Improve profile view + help --- .../models/abc_classification_profile.py | 6 +- .../views/abc_classification_profile.xml | 111 +++++++++++------- 2 files changed, 71 insertions(+), 46 deletions(-) diff --git a/product_abc_classification/models/abc_classification_profile.py b/product_abc_classification/models/abc_classification_profile.py index c71f4b4bb63..dc7fd29f3ad 100644 --- a/product_abc_classification/models/abc_classification_profile.py +++ b/product_abc_classification/models/abc_classification_profile.py @@ -39,7 +39,11 @@ class AbcClassificationProfile(models.Model): ) product_count = fields.Integer(compute="_compute_product_count", readonly=True) - auto_apply_computed_value = fields.Boolean(default=False) + auto_apply_computed_value = fields.Boolean( + default=False, + help="Check this if you want to apply the computed level on each product that has this " + "profile.", + ) _sql_constraints = [("name_uniq", "UNIQUE(name)", _("Profile name must be unique"))] diff --git a/product_abc_classification/views/abc_classification_profile.xml b/product_abc_classification/views/abc_classification_profile.xml index 65830d78c4f..89b078b40da 100644 --- a/product_abc_classification/views/abc_classification_profile.xml +++ b/product_abc_classification/views/abc_classification_profile.xml @@ -2,60 +2,81 @@ - - + abc.classification.profile.form (in product_abc_classification) - abc.classification.profile - - - -
    - -
    - - - - - - - - - - - - - - - -
    - -
    -
    - - + + +
    +

    + +

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + + + abc.classification.profile.tree (in product_abc_classification) - abc.classification.profile - - - - - - - - ABC Classification profiles - abc.classification.profile - tree,form - - abc.classification.profile + + + + + + + + ABC Classification profiles + abc.classification.profile + tree,form + + Date: Wed, 5 Apr 2023 16:04:33 +0200 Subject: [PATCH 030/224] [FIX] product_abc_classification: Translated terms into views --- product_abc_classification/i18n/fr.po | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/product_abc_classification/i18n/fr.po b/product_abc_classification/i18n/fr.po index 47bc99abc3f..dffcbb0a26c 100644 --- a/product_abc_classification/i18n/fr.po +++ b/product_abc_classification/i18n/fr.po @@ -18,7 +18,7 @@ msgstr "" #. module: product_abc_classification #: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_level_percentage msgid "% Indicator" -msgstr "% KPI +msgstr "% KPI" #. module: product_abc_classification #: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_level_percentage_products @@ -26,12 +26,12 @@ msgid "% Products" msgstr "% Articles" #. module: product_abc_classification -#: model:ir.ui.view,arch_db:product_abc_classification.product_template_form_view +#: model_terms:ir.ui.view,arch_db:product_abc_classification.product_template_form_view msgid "ABC Classification" msgstr "Classification ABC" #. module: product_abc_classification -#: model:ir.ui.view,arch_db:product_abc_classification.abc_classification_product_level_form_view +#: model_terms:ir.ui.view,arch_db:product_abc_classification.abc_classification_product_level_form_view msgid "ABC Classification Product Level" msgstr "Niveau de classification ABC des articles" @@ -42,12 +42,12 @@ msgid "ABC Classification profiles" msgstr "Profils de classification ABC" #. module: product_abc_classification -#: model:ir.ui.view,arch_db:product_abc_classification.abc_classification_profile_form_view +#: model_terms:ir.ui.view,arch_db:product_abc_classification.abc_classification_profile_form_view msgid "ABC Profile" msgstr "Profil ABC" #. module: product_abc_classification -#: model:ir.ui.view,arch_db:product_abc_classification.abc_classification_profile_tree_view +#: model_terms:ir.ui.view,arch_db:product_abc_classification.abc_classification_profile_tree_view msgid "ABC Profiles" msgstr "Profils ABC" @@ -62,7 +62,7 @@ msgid "Abc Classification Profile" msgstr "Profil de classification ABC" #. module: product_abc_classification -#: model:ir.ui.view,arch_db:product_abc_classification.abc_classification_product_level_search_view +#: model_terms:ir.ui.view,arch_db:product_abc_classification.abc_classification_product_level_search_view msgid "Abc classification" msgstr "Classification ABC" @@ -103,7 +103,7 @@ msgid "Classification level is mandatory" msgstr "La classe / niveau est obligatoire" #. module: product_abc_classification -#: model:ir.ui.view,arch_db:product_abc_classification.abc_classification_product_level_search_view +#: model_terms:ir.ui.view,arch_db:product_abc_classification.abc_classification_product_level_search_view msgid "Classification not in sync with computed" msgstr "Classes ABC manuelle et calculée divergentes" @@ -113,7 +113,7 @@ msgid "Computed classification level" msgstr "Classe calculée" #. module: product_abc_classification -#: model:ir.ui.view,arch_db:product_abc_classification.abc_classification_product_level_form_view +#: model_terms:ir.ui.view,arch_db:product_abc_classification.abc_classification_product_level_form_view msgid "Computed level differs from the specified level" msgstr "La class calculée diverge de la valeur spécifiée" @@ -145,7 +145,7 @@ msgid "Display Name" msgstr "Nom affiché" #. module: product_abc_classification -#: model:ir.ui.view,arch_db:product_abc_classification.abc_classification_product_level_search_view +#: model_terms:ir.ui.view,arch_db:product_abc_classification.abc_classification_product_level_search_view msgid "Group By" msgstr "Grouper par" @@ -183,7 +183,7 @@ msgid "Last Updated on" msgstr "Dernière mise à jour le" #. module: product_abc_classification -#: model:ir.ui.view,arch_db:product_abc_classification.abc_classification_product_level_search_view +#: model_terms:ir.ui.view,arch_db:product_abc_classification.abc_classification_product_level_search_view msgid "Level" msgstr "Niveau" @@ -252,7 +252,7 @@ msgstr "Classification ABC des articles" #. module: product_abc_classification #: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level_profile_id -#: model:ir.ui.view,arch_db:product_abc_classification.abc_classification_product_level_search_view +#: model_terms:ir.ui.view,arch_db:product_abc_classification.abc_classification_product_level_search_view msgid "Profile" msgstr "Profil" From bc381410247a9dc66a4d5c861ed317297c80ec9e Mon Sep 17 00:00:00 2001 From: Denis Roussel Date: Mon, 18 Sep 2023 11:43:52 +0200 Subject: [PATCH 031/224] [FIX] product_abc_classification: Fix tests --- product_abc_classification/tests/common.py | 7 ++++++- .../tests/test_abc_classification_profile.py | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/product_abc_classification/tests/common.py b/product_abc_classification/tests/common.py index 4900770fdce..d4c24f0cdf4 100644 --- a/product_abc_classification/tests/common.py +++ b/product_abc_classification/tests/common.py @@ -1,6 +1,7 @@ # Copyright 2021 ACSONE SA/NV # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +from odoo.fields import Command from odoo.tests.common import TransactionCase @@ -118,6 +119,10 @@ def _create_variant(cls, size_value): return cls.env["product.product"].create( { "product_tmpl_id": cls.product_template.id, - "product_template_attribute_value_ids": [(6, 0, size_value.ids)], + "product_template_attribute_value_ids": [ + Command.set( + size_value.pav_attribute_line_ids.product_template_value_ids.ids + ) + ], } ) diff --git a/product_abc_classification/tests/test_abc_classification_profile.py b/product_abc_classification/tests/test_abc_classification_profile.py index 51691913cf2..68044ba97bf 100644 --- a/product_abc_classification/tests/test_abc_classification_profile.py +++ b/product_abc_classification/tests/test_abc_classification_profile.py @@ -4,6 +4,7 @@ from psycopg2 import IntegrityError from odoo.exceptions import ValidationError +from odoo.tools.misc import mute_logger from .common import ABCClassificationCase @@ -185,6 +186,7 @@ def test_04(self): } ) + @mute_logger("odoo.sql_db") def test_05(self): """ Data: @@ -282,6 +284,7 @@ def test_06(self): ) self.assertTrue(new_profile) + @mute_logger("odoo.sql_db") def test_07(self): """ Data: From 0afc17da9545444c005ff511fd1515daa5ab0e55 Mon Sep 17 00:00:00 2001 From: oca-ci Date: Mon, 18 Sep 2023 10:03:06 +0000 Subject: [PATCH 032/224] [UPD] Update product_abc_classification.pot --- product_abc_classification/i18n/fr.po | 356 ++++++++++---- .../i18n/product_abc_classification.pot | 456 ++++++++++++++++++ 2 files changed, 717 insertions(+), 95 deletions(-) create mode 100644 product_abc_classification/i18n/product_abc_classification.pot diff --git a/product_abc_classification/i18n/fr.po b/product_abc_classification/i18n/fr.po index dffcbb0a26c..dd41746496f 100644 --- a/product_abc_classification/i18n/fr.po +++ b/product_abc_classification/i18n/fr.po @@ -1,6 +1,6 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * product_abc_classification +# * product_abc_classification # msgid "" msgstr "" @@ -10,18 +10,19 @@ msgstr "" "PO-Revision-Date: 2021-02-15 16:46+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_abc_classification -#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_level_percentage +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_level__percentage msgid "% Indicator" msgstr "% KPI" #. module: product_abc_classification -#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_level_percentage_products +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_level__percentage_products msgid "% Products" msgstr "% Articles" @@ -30,6 +31,12 @@ msgstr "% Articles" msgid "ABC Classification" msgstr "Classification ABC" +#. module: product_abc_classification +#: model:ir.model,name:product_abc_classification.model_abc_classification_level +#, fuzzy +msgid "ABC Classification Level" +msgstr "Classe / Niveau" + #. module: product_abc_classification #: model_terms:ir.ui.view,arch_db:product_abc_classification.abc_classification_product_level_form_view msgid "ABC Classification Product Level" @@ -46,18 +53,18 @@ msgstr "Profils de classification ABC" msgid "ABC Profile" msgstr "Profil ABC" -#. module: product_abc_classification -#: model_terms:ir.ui.view,arch_db:product_abc_classification.abc_classification_profile_tree_view -msgid "ABC Profiles" -msgstr "Profils ABC" - #. module: product_abc_classification #: model:ir.model,name:product_abc_classification.model_abc_classification_product_level +#: model:ir.model.fields,field_description:product_abc_classification.field_product_product__abc_classification_product_level_ids +#: model:ir.model.fields,field_description:product_abc_classification.field_product_template__abc_classification_product_level_ids msgid "Abc Classification Product Level" msgstr "Niveau de classification" #. module: product_abc_classification #: model:ir.model,name:product_abc_classification.model_abc_classification_profile +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level__allowed_profile_ids +#: model:ir.model.fields,field_description:product_abc_classification.field_product_product__abc_classification_profile_ids +#: model:ir.model.fields,field_description:product_abc_classification.field_product_template__abc_classification_profile_ids msgid "Abc Classification Profile" msgstr "Profil de classification ABC" @@ -67,37 +74,46 @@ msgid "Abc classification" msgstr "Classification ABC" #. module: product_abc_classification -#: model:ir.model.fields,field_description:product_abc_classification.field_delivery_carrier_abc_classification_product_level_ids -#: model:ir.model.fields,field_description:product_abc_classification.field_product_product_abc_classification_product_level_ids -#: model:ir.model.fields,field_description:product_abc_classification.field_product_template_abc_classification_product_level_ids -msgid "Abc classification product level ids" -msgstr "Classes ABC" +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level__message_needaction +msgid "Action Needed" +msgstr "" + +#. module: product_abc_classification +#: model_terms:ir.ui.view,arch_db:product_abc_classification.abc_classification_profile_form_view +msgid "Additional Information" +msgstr "" #. module: product_abc_classification -#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level_allowed_profile_ids -#: model:ir.model.fields,field_description:product_abc_classification.field_delivery_carrier_abc_classification_profile_ids -#: model:ir.model.fields,field_description:product_abc_classification.field_product_product_abc_classification_profile_ids -#: model:ir.model.fields,field_description:product_abc_classification.field_product_template_abc_classification_profile_ids -msgid "Abc classification profile ids" -msgstr "Profils ABC" +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level__message_attachment_count +msgid "Attachment Count" +msgstr "" #. module: product_abc_classification -#: selection:abc.classification.profile,profile_type:0 -msgid "Based on the count of delivered sale order line by product" -msgstr "Basé sur le total des lignes de vente par article" +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_profile__auto_apply_computed_value +#, fuzzy +msgid "Auto Apply Computed Value" +msgstr "Appliquer automatiquement la classification calculée" #. module: product_abc_classification -#: model:ir.model.fields,help:product_abc_classification.field_abc_classification_level_name +#: model:ir.model.fields,help:product_abc_classification.field_abc_classification_profile__auto_apply_computed_value +msgid "" +"Check this if you want to apply the computed level on each product that has " +"this profile." +msgstr "" + +#. module: product_abc_classification +#: model:ir.model.fields,help:product_abc_classification.field_abc_classification_level__name msgid "Classification A, B or C" msgstr "Classification A, B ou C" #. module: product_abc_classification -#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level_level_id +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level__level_id msgid "Classification level" msgstr "Classe / Niveau" #. module: product_abc_classification -#: code:addons/product_abc_classification/models/abc_classification_product_level.py:84 +#. odoo-python +#: code:addons/product_abc_classification/models/abc_classification_product_level.py:0 #, python-format msgid "Classification level is mandatory" msgstr "La classe / niveau est obligatoire" @@ -108,7 +124,12 @@ msgid "Classification not in sync with computed" msgstr "Classes ABC manuelle et calculée divergentes" #. module: product_abc_classification -#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level_computed_level_id +#: model_terms:ir.ui.view,arch_db:product_abc_classification.abc_classification_profile_form_view +msgid "Computation" +msgstr "" + +#. module: product_abc_classification +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level__computed_level_id msgid "Computed classification level" msgstr "Classe calculée" @@ -118,132 +139,237 @@ msgid "Computed level differs from the specified level" msgstr "La class calculée diverge de la valeur spécifiée" #. module: product_abc_classification -#: code:addons/product_abc_classification/models/abc_classification_product_level.py:90 +#. odoo-python +#: code:addons/product_abc_classification/models/abc_classification_product_level.py:0 #, python-format -msgid "Computed level must be in the same classifiation profile as the one on the product level" -msgstr "La classe calculée doit utiliser le même profil de classification que celui défini sur le produit" +msgid "" +"Computed level must be in the same classifiation profile as the one on the " +"product level" +msgstr "" +"La classe calculée doit utiliser le même profil de classification que celui " +"défini sur le produit" #. module: product_abc_classification -#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_level_create_uid -#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level_create_uid -#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_profile_create_uid +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_level__create_uid +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level__create_uid +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_profile__create_uid msgid "Created by" msgstr "Créé par" #. module: product_abc_classification -#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_level_create_date -#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level_create_date -#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_profile_create_date +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_level__create_date +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level__create_date +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_profile__create_date msgid "Created on" msgstr "Créé le" #. module: product_abc_classification -#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_level_display_name -#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level_display_name -#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_profile_display_name +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_level__display_name +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level__display_name +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_profile__display_name msgid "Display Name" msgstr "Nom affiché" +#. module: product_abc_classification +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level__message_follower_ids +msgid "Followers" +msgstr "" + +#. module: product_abc_classification +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level__message_partner_ids +msgid "Followers (Partners)" +msgstr "" + #. module: product_abc_classification #: model_terms:ir.ui.view,arch_db:product_abc_classification.abc_classification_product_level_search_view msgid "Group By" msgstr "Grouper par" #. module: product_abc_classification -#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_level_id -#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level_id -#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_profile_id +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level__has_message +msgid "Has Message" +msgstr "" + +#. module: product_abc_classification +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_level__id +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level__id +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_profile__id msgid "ID" msgstr "ID" #. module: product_abc_classification -#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level_flag -msgid "If True, this means that the manual classification is different from the computed one" -msgstr "Si coché, indique que la classe attribuée manuellement au produit diverge de la classe calculée par le système." +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level__flag +msgid "" +"If True, this means that the manual classification is different from the " +"computed one" +msgstr "" +"Si coché, indique que la classe attribuée manuellement au produit diverge de " +"la classe calculée par le système." + +#. module: product_abc_classification +#: model:ir.model.fields,help:product_abc_classification.field_abc_classification_product_level__message_needaction +msgid "If checked, new messages require your attention." +msgstr "" + +#. module: product_abc_classification +#: model:ir.model.fields,help:product_abc_classification.field_abc_classification_product_level__message_has_error +#: model:ir.model.fields,help:product_abc_classification.field_abc_classification_product_level__message_has_sms_error +msgid "If checked, some messages have a delivery error." +msgstr "" + +#. module: product_abc_classification +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level__message_is_follower +msgid "Is Follower" +msgstr "" #. module: product_abc_classification -#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_level___last_update -#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level___last_update -#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_profile___last_update +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_level____last_update +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level____last_update +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_profile____last_update msgid "Last Modified on" msgstr "Dernière modification le" #. module: product_abc_classification -#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_level_write_uid -#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level_write_uid -#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_profile_write_uid +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_level__write_uid +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level__write_uid +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_profile__write_uid msgid "Last Updated by" msgstr "Dernière mise à jour par" #. module: product_abc_classification -#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_level_write_date -#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level_write_date -#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_profile_write_date +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_level__write_date +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level__write_date +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_profile__write_date msgid "Last Updated on" msgstr "Dernière mise à jour le" #. module: product_abc_classification +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_profile__level_ids #: model_terms:ir.ui.view,arch_db:product_abc_classification.abc_classification_product_level_search_view msgid "Level" msgstr "Niveau" #. module: product_abc_classification -#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_profile_level_ids -msgid "Level ids" -msgstr "Classes" - -#. module: product_abc_classification -#: sql_constraint:abc.classification.level:0 -#: code:addons/product_abc_classification/models/abc_classification_level.py:30 +#. odoo-python +#: code:addons/product_abc_classification/models/abc_classification_level.py:0 +#: model:ir.model.constraint,message:product_abc_classification.constraint_abc_classification_level_name_uniq #, python-format msgid "Level name must be unique by profile" msgstr "Le nom de la classe doit être unique par profil" #. module: product_abc_classification -#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level_manual_level_id +#: model_terms:ir.ui.view,arch_db:product_abc_classification.abc_classification_profile_form_view +#, fuzzy +msgid "Levels" +msgstr "Niveau" + +#. module: product_abc_classification +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level__message_main_attachment_id +msgid "Main Attachment" +msgstr "" + +#. module: product_abc_classification +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level__manual_level_id msgid "Manual classification level" msgstr "Classe (Valeur à utiliser)" #. module: product_abc_classification -#: code:addons/product_abc_classification/models/abc_classification_product_level.py:100 +#. odoo-python +#: code:addons/product_abc_classification/models/abc_classification_product_level.py:0 #, python-format -msgid "Manual level must be in the same classifiation profile as the one on the product level" -msgstr "La classe à utiliser doit utiliser le même profil de classification que celui défini sur le produit" +msgid "" +"Manual level must be in the same classifiation profile as the one on the " +"product level" +msgstr "" +"La classe à utiliser doit utiliser le même profil de classification que " +"celui défini sur le produit" + +#. module: product_abc_classification +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level__message_has_error +msgid "Message Delivery error" +msgstr "" + +#. module: product_abc_classification +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level__message_ids +msgid "Messages" +msgstr "" #. module: product_abc_classification -#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_level_name -#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_profile_name +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_level__name +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_profile__name msgid "Name" msgstr "Nom" #. module: product_abc_classification -#: sql_constraint:abc.classification.product.level:0 -#: code:addons/product_abc_classification/models/abc_classification_product_level.py:76 +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level__message_needaction_counter +msgid "Number of Actions" +msgstr "" + +#. module: product_abc_classification +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level__message_has_error_counter +msgid "Number of errors" +msgstr "" + +#. module: product_abc_classification +#: model:ir.model.fields,help:product_abc_classification.field_abc_classification_product_level__message_needaction_counter +msgid "Number of messages requiring action" +msgstr "" + +#. module: product_abc_classification +#: model:ir.model.fields,help:product_abc_classification.field_abc_classification_product_level__message_has_error_counter +msgid "Number of messages with delivery error" +msgstr "" + +#. module: product_abc_classification +#. odoo-python +#: code:addons/product_abc_classification/models/abc_classification_product_level.py:0 +#: model:ir.model.constraint,message:product_abc_classification.constraint_abc_classification_product_level_product_level_uniq #, python-format msgid "Only one level by profile by product allowed" msgstr "Une classe de classification ABC par profil et par produit autorisée." #. module: product_abc_classification -#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_profile_period +#: model:ir.actions.server,name:product_abc_classification.ir_cron_product_abc_classification_ir_actions_server +#: model:ir.cron,cron_name:product_abc_classification.ir_cron_product_abc_classification +#, fuzzy +msgid "Perform the product ABC Classification" +msgstr "Classification ABC des articles" + +#. module: product_abc_classification +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_profile__period msgid "Period on which to compute the classification (Days)" msgstr "Période référence pour le calcul de la classification (Nbr jours)" #. module: product_abc_classification -#: model:ir.model,name:product_abc_classification.model_product_product -#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level_product_id +#: model:ir.model,name:product_abc_classification.model_product_template +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level__product_id msgid "Product" msgstr "Article" #. module: product_abc_classification -#: model:ir.model,name:product_abc_classification.model_product_template -msgid "Product Template" +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_profile__product_count +#, fuzzy +msgid "Product Count" +msgstr "Article" + +#. module: product_abc_classification +#: model:ir.model,name:product_abc_classification.model_product_product +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_profile__product_variant_ids +#, fuzzy +msgid "Product Variant" msgstr "Modèle de produit" #. module: product_abc_classification -#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level_product_tmpl_id +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level__product_tmpl_id msgid "Product template" msgstr "Modèle de produit" +#. module: product_abc_classification +#: model_terms:ir.ui.view,arch_db:product_abc_classification.abc_classification_profile_form_view +#, fuzzy +msgid "Products" +msgstr "Article" + #. module: product_abc_classification #: model:ir.actions.act_window,name:product_abc_classification.abc_classification_product_level_action #: model:ir.ui.menu,name:product_abc_classification.menu_abc_classification_product_level_config_stock @@ -251,77 +377,117 @@ msgid "Products ABC Classification" msgstr "Classification ABC des articles" #. module: product_abc_classification -#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level_profile_id +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_level__profile_id +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level__profile_id #: model_terms:ir.ui.view,arch_db:product_abc_classification.abc_classification_product_level_search_view msgid "Profile" msgstr "Profil" #. module: product_abc_classification -#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_level_profile_id -msgid "Profile id" +#: model_terms:ir.ui.view,arch_db:product_abc_classification.abc_classification_profile_form_view +#, fuzzy +msgid "Profile Information" msgstr "Profil" #. module: product_abc_classification -#: sql_constraint:abc.classification.profile:0 -#: code:addons/product_abc_classification/models/abc_classification_profile.py:33 +#. odoo-python +#: code:addons/product_abc_classification/models/abc_classification_profile.py:0 +#: model:ir.model.constraint,message:product_abc_classification.constraint_abc_classification_profile_name_uniq #, python-format msgid "Profile name must be unique" msgstr "Le nom du profil doit être unique" #. module: product_abc_classification -#: code:addons/product_abc_classification/models/abc_classification_level.py:39 +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level__message_has_sms_error +msgid "SMS Delivery error" +msgstr "" + +#. module: product_abc_classification +#. odoo-python +#: code:addons/product_abc_classification/models/abc_classification_level.py:0 #, python-format msgid "The percentage cannot be greater than 100." msgstr "Le pourcentage ne peut pas dépasser 100." #. module: product_abc_classification -#: code:addons/product_abc_classification/models/abc_classification_level.py:51 +#. odoo-python +#: code:addons/product_abc_classification/models/abc_classification_level.py:0 #, python-format msgid "The percentage of products cannot be greater than 100." msgstr "Le pourcentage d'articles' ne peut pas dépasser 100." #. module: product_abc_classification -#: code:addons/product_abc_classification/models/abc_classification_level.py:55 +#. odoo-python +#: code:addons/product_abc_classification/models/abc_classification_level.py:0 #, python-format msgid "The percentage of products should be a positive number." msgstr "Le pourcentage d'articles' doit être un nombre positif." #. module: product_abc_classification -#: code:addons/product_abc_classification/models/abc_classification_level.py:43 +#. odoo-python +#: code:addons/product_abc_classification/models/abc_classification_level.py:0 #, python-format msgid "The percentage should be a positive number." msgstr "Le pourcentage doit être un nombre positif." #. module: product_abc_classification -#: code:addons/product_abc_classification/models/abc_classification_profile.py:52 +#. odoo-python +#: code:addons/product_abc_classification/models/abc_classification_profile.py:0 #, python-format msgid "The percentages of the levels must be unique." -msgstr "Les valeurs de pourcentage des différentes classes doivent être uniques pour un même profil." +msgstr "" +"Les valeurs de pourcentage des différentes classes doivent être uniques pour " +"un même profil." #. module: product_abc_classification -#: code:addons/product_abc_classification/models/abc_classification_profile.py:43 +#. odoo-python +#: code:addons/product_abc_classification/models/abc_classification_profile.py:0 #, python-format msgid "The sum of the percentages of the levels should be 100." msgstr "La somme des pourcentages ne doit pas dépasser 100." #. module: product_abc_classification -#: code:addons/product_abc_classification/models/abc_classification_profile.py:60 +#. odoo-python +#: code:addons/product_abc_classification/models/abc_classification_profile.py:0 #, python-format msgid "The sum of the products percentages of the levels should be 100." msgstr "La somme des pourcentages d'articles ne doit pas dépasser 100." #. module: product_abc_classification -#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level_profile_type -#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_profile_profile_type +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level__profile_type +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_profile__profile_type msgid "Type of ABC classification" msgstr "Type de classification ABC" #. module: product_abc_classification -#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_profile_auto_apply_computed_value -msgid "Auto apply computed value" -msgstr "Appliquer automatiquement la classification calculée" +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level__website_message_ids +msgid "Website Messages" +msgstr "" #. module: product_abc_classification -#: model:ir.model,name:product_abc_classification.model_abc_classification_level -msgid "abc.classification.level" -msgstr "Classe de classification ABC" +#: model:ir.model.fields,help:product_abc_classification.field_abc_classification_product_level__website_message_ids +msgid "Website communication history" +msgstr "" + +#. module: product_abc_classification +#: model_terms:ir.ui.view,arch_db:product_abc_classification.abc_classification_profile_form_view +msgid "e.g. Sale Profile" +msgstr "" + +#~ msgid "ABC Profiles" +#~ msgstr "Profils ABC" + +#~ msgid "Abc classification product level ids" +#~ msgstr "Classes ABC" + +#~ msgid "Abc classification profile ids" +#~ msgstr "Profils ABC" + +#~ msgid "Based on the count of delivered sale order line by product" +#~ msgstr "Basé sur le total des lignes de vente par article" + +#~ msgid "Level ids" +#~ msgstr "Classes" + +#~ msgid "abc.classification.level" +#~ msgstr "Classe de classification ABC" diff --git a/product_abc_classification/i18n/product_abc_classification.pot b/product_abc_classification/i18n/product_abc_classification.pot new file mode 100644 index 00000000000..41db7ec3115 --- /dev/null +++ b/product_abc_classification/i18n/product_abc_classification.pot @@ -0,0 +1,456 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_abc_classification +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.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_abc_classification +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_level__percentage +msgid "% Indicator" +msgstr "" + +#. module: product_abc_classification +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_level__percentage_products +msgid "% Products" +msgstr "" + +#. module: product_abc_classification +#: model_terms:ir.ui.view,arch_db:product_abc_classification.product_template_form_view +msgid "ABC Classification" +msgstr "" + +#. module: product_abc_classification +#: model:ir.model,name:product_abc_classification.model_abc_classification_level +msgid "ABC Classification Level" +msgstr "" + +#. module: product_abc_classification +#: model_terms:ir.ui.view,arch_db:product_abc_classification.abc_classification_product_level_form_view +msgid "ABC Classification Product Level" +msgstr "" + +#. module: product_abc_classification +#: model:ir.actions.act_window,name:product_abc_classification.abc_classification_profile_action +#: model:ir.ui.menu,name:product_abc_classification.menu_abc_classification_profile_config_stock +msgid "ABC Classification profiles" +msgstr "" + +#. module: product_abc_classification +#: model_terms:ir.ui.view,arch_db:product_abc_classification.abc_classification_profile_form_view +msgid "ABC Profile" +msgstr "" + +#. module: product_abc_classification +#: model:ir.model,name:product_abc_classification.model_abc_classification_product_level +#: model:ir.model.fields,field_description:product_abc_classification.field_product_product__abc_classification_product_level_ids +#: model:ir.model.fields,field_description:product_abc_classification.field_product_template__abc_classification_product_level_ids +msgid "Abc Classification Product Level" +msgstr "" + +#. module: product_abc_classification +#: model:ir.model,name:product_abc_classification.model_abc_classification_profile +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level__allowed_profile_ids +#: model:ir.model.fields,field_description:product_abc_classification.field_product_product__abc_classification_profile_ids +#: model:ir.model.fields,field_description:product_abc_classification.field_product_template__abc_classification_profile_ids +msgid "Abc Classification Profile" +msgstr "" + +#. module: product_abc_classification +#: model_terms:ir.ui.view,arch_db:product_abc_classification.abc_classification_product_level_search_view +msgid "Abc classification" +msgstr "" + +#. module: product_abc_classification +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level__message_needaction +msgid "Action Needed" +msgstr "" + +#. module: product_abc_classification +#: model_terms:ir.ui.view,arch_db:product_abc_classification.abc_classification_profile_form_view +msgid "Additional Information" +msgstr "" + +#. module: product_abc_classification +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level__message_attachment_count +msgid "Attachment Count" +msgstr "" + +#. module: product_abc_classification +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_profile__auto_apply_computed_value +msgid "Auto Apply Computed Value" +msgstr "" + +#. module: product_abc_classification +#: model:ir.model.fields,help:product_abc_classification.field_abc_classification_profile__auto_apply_computed_value +msgid "" +"Check this if you want to apply the computed level on each product that has " +"this profile." +msgstr "" + +#. module: product_abc_classification +#: model:ir.model.fields,help:product_abc_classification.field_abc_classification_level__name +msgid "Classification A, B or C" +msgstr "" + +#. module: product_abc_classification +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level__level_id +msgid "Classification level" +msgstr "" + +#. module: product_abc_classification +#. odoo-python +#: code:addons/product_abc_classification/models/abc_classification_product_level.py:0 +#, python-format +msgid "Classification level is mandatory" +msgstr "" + +#. module: product_abc_classification +#: model_terms:ir.ui.view,arch_db:product_abc_classification.abc_classification_product_level_search_view +msgid "Classification not in sync with computed" +msgstr "" + +#. module: product_abc_classification +#: model_terms:ir.ui.view,arch_db:product_abc_classification.abc_classification_profile_form_view +msgid "Computation" +msgstr "" + +#. module: product_abc_classification +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level__computed_level_id +msgid "Computed classification level" +msgstr "" + +#. module: product_abc_classification +#: model_terms:ir.ui.view,arch_db:product_abc_classification.abc_classification_product_level_form_view +msgid "Computed level differs from the specified level" +msgstr "" + +#. module: product_abc_classification +#. odoo-python +#: code:addons/product_abc_classification/models/abc_classification_product_level.py:0 +#, python-format +msgid "" +"Computed level must be in the same classifiation profile as the one on the " +"product level" +msgstr "" + +#. module: product_abc_classification +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_level__create_uid +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level__create_uid +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_profile__create_uid +msgid "Created by" +msgstr "" + +#. module: product_abc_classification +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_level__create_date +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level__create_date +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_profile__create_date +msgid "Created on" +msgstr "" + +#. module: product_abc_classification +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_level__display_name +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level__display_name +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_profile__display_name +msgid "Display Name" +msgstr "" + +#. module: product_abc_classification +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level__message_follower_ids +msgid "Followers" +msgstr "" + +#. module: product_abc_classification +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level__message_partner_ids +msgid "Followers (Partners)" +msgstr "" + +#. module: product_abc_classification +#: model_terms:ir.ui.view,arch_db:product_abc_classification.abc_classification_product_level_search_view +msgid "Group By" +msgstr "" + +#. module: product_abc_classification +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level__has_message +msgid "Has Message" +msgstr "" + +#. module: product_abc_classification +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_level__id +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level__id +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_profile__id +msgid "ID" +msgstr "" + +#. module: product_abc_classification +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level__flag +msgid "" +"If True, this means that the manual classification is different from the " +"computed one" +msgstr "" + +#. module: product_abc_classification +#: model:ir.model.fields,help:product_abc_classification.field_abc_classification_product_level__message_needaction +msgid "If checked, new messages require your attention." +msgstr "" + +#. module: product_abc_classification +#: model:ir.model.fields,help:product_abc_classification.field_abc_classification_product_level__message_has_error +#: model:ir.model.fields,help:product_abc_classification.field_abc_classification_product_level__message_has_sms_error +msgid "If checked, some messages have a delivery error." +msgstr "" + +#. module: product_abc_classification +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level__message_is_follower +msgid "Is Follower" +msgstr "" + +#. module: product_abc_classification +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_level____last_update +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level____last_update +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_profile____last_update +msgid "Last Modified on" +msgstr "" + +#. module: product_abc_classification +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_level__write_uid +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level__write_uid +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_profile__write_uid +msgid "Last Updated by" +msgstr "" + +#. module: product_abc_classification +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_level__write_date +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level__write_date +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_profile__write_date +msgid "Last Updated on" +msgstr "" + +#. module: product_abc_classification +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_profile__level_ids +#: model_terms:ir.ui.view,arch_db:product_abc_classification.abc_classification_product_level_search_view +msgid "Level" +msgstr "" + +#. module: product_abc_classification +#. odoo-python +#: code:addons/product_abc_classification/models/abc_classification_level.py:0 +#: model:ir.model.constraint,message:product_abc_classification.constraint_abc_classification_level_name_uniq +#, python-format +msgid "Level name must be unique by profile" +msgstr "" + +#. module: product_abc_classification +#: model_terms:ir.ui.view,arch_db:product_abc_classification.abc_classification_profile_form_view +msgid "Levels" +msgstr "" + +#. module: product_abc_classification +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level__message_main_attachment_id +msgid "Main Attachment" +msgstr "" + +#. module: product_abc_classification +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level__manual_level_id +msgid "Manual classification level" +msgstr "" + +#. module: product_abc_classification +#. odoo-python +#: code:addons/product_abc_classification/models/abc_classification_product_level.py:0 +#, python-format +msgid "" +"Manual level must be in the same classifiation profile as the one on the " +"product level" +msgstr "" + +#. module: product_abc_classification +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level__message_has_error +msgid "Message Delivery error" +msgstr "" + +#. module: product_abc_classification +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level__message_ids +msgid "Messages" +msgstr "" + +#. module: product_abc_classification +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_level__name +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_profile__name +msgid "Name" +msgstr "" + +#. module: product_abc_classification +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level__message_needaction_counter +msgid "Number of Actions" +msgstr "" + +#. module: product_abc_classification +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level__message_has_error_counter +msgid "Number of errors" +msgstr "" + +#. module: product_abc_classification +#: model:ir.model.fields,help:product_abc_classification.field_abc_classification_product_level__message_needaction_counter +msgid "Number of messages requiring action" +msgstr "" + +#. module: product_abc_classification +#: model:ir.model.fields,help:product_abc_classification.field_abc_classification_product_level__message_has_error_counter +msgid "Number of messages with delivery error" +msgstr "" + +#. module: product_abc_classification +#. odoo-python +#: code:addons/product_abc_classification/models/abc_classification_product_level.py:0 +#: model:ir.model.constraint,message:product_abc_classification.constraint_abc_classification_product_level_product_level_uniq +#, python-format +msgid "Only one level by profile by product allowed" +msgstr "" + +#. module: product_abc_classification +#: model:ir.actions.server,name:product_abc_classification.ir_cron_product_abc_classification_ir_actions_server +#: model:ir.cron,cron_name:product_abc_classification.ir_cron_product_abc_classification +msgid "Perform the product ABC Classification" +msgstr "" + +#. module: product_abc_classification +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_profile__period +msgid "Period on which to compute the classification (Days)" +msgstr "" + +#. module: product_abc_classification +#: model:ir.model,name:product_abc_classification.model_product_template +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level__product_id +msgid "Product" +msgstr "" + +#. module: product_abc_classification +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_profile__product_count +msgid "Product Count" +msgstr "" + +#. module: product_abc_classification +#: model:ir.model,name:product_abc_classification.model_product_product +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_profile__product_variant_ids +msgid "Product Variant" +msgstr "" + +#. module: product_abc_classification +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level__product_tmpl_id +msgid "Product template" +msgstr "" + +#. module: product_abc_classification +#: model_terms:ir.ui.view,arch_db:product_abc_classification.abc_classification_profile_form_view +msgid "Products" +msgstr "" + +#. module: product_abc_classification +#: model:ir.actions.act_window,name:product_abc_classification.abc_classification_product_level_action +#: model:ir.ui.menu,name:product_abc_classification.menu_abc_classification_product_level_config_stock +msgid "Products ABC Classification" +msgstr "" + +#. module: product_abc_classification +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_level__profile_id +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level__profile_id +#: model_terms:ir.ui.view,arch_db:product_abc_classification.abc_classification_product_level_search_view +msgid "Profile" +msgstr "" + +#. module: product_abc_classification +#: model_terms:ir.ui.view,arch_db:product_abc_classification.abc_classification_profile_form_view +msgid "Profile Information" +msgstr "" + +#. module: product_abc_classification +#. odoo-python +#: code:addons/product_abc_classification/models/abc_classification_profile.py:0 +#: model:ir.model.constraint,message:product_abc_classification.constraint_abc_classification_profile_name_uniq +#, python-format +msgid "Profile name must be unique" +msgstr "" + +#. module: product_abc_classification +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level__message_has_sms_error +msgid "SMS Delivery error" +msgstr "" + +#. module: product_abc_classification +#. odoo-python +#: code:addons/product_abc_classification/models/abc_classification_level.py:0 +#, python-format +msgid "The percentage cannot be greater than 100." +msgstr "" + +#. module: product_abc_classification +#. odoo-python +#: code:addons/product_abc_classification/models/abc_classification_level.py:0 +#, python-format +msgid "The percentage of products cannot be greater than 100." +msgstr "" + +#. module: product_abc_classification +#. odoo-python +#: code:addons/product_abc_classification/models/abc_classification_level.py:0 +#, python-format +msgid "The percentage of products should be a positive number." +msgstr "" + +#. module: product_abc_classification +#. odoo-python +#: code:addons/product_abc_classification/models/abc_classification_level.py:0 +#, python-format +msgid "The percentage should be a positive number." +msgstr "" + +#. module: product_abc_classification +#. odoo-python +#: code:addons/product_abc_classification/models/abc_classification_profile.py:0 +#, python-format +msgid "The percentages of the levels must be unique." +msgstr "" + +#. module: product_abc_classification +#. odoo-python +#: code:addons/product_abc_classification/models/abc_classification_profile.py:0 +#, python-format +msgid "The sum of the percentages of the levels should be 100." +msgstr "" + +#. module: product_abc_classification +#. odoo-python +#: code:addons/product_abc_classification/models/abc_classification_profile.py:0 +#, python-format +msgid "The sum of the products percentages of the levels should be 100." +msgstr "" + +#. module: product_abc_classification +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level__profile_type +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_profile__profile_type +msgid "Type of ABC classification" +msgstr "" + +#. module: product_abc_classification +#: model:ir.model.fields,field_description:product_abc_classification.field_abc_classification_product_level__website_message_ids +msgid "Website Messages" +msgstr "" + +#. module: product_abc_classification +#: model:ir.model.fields,help:product_abc_classification.field_abc_classification_product_level__website_message_ids +msgid "Website communication history" +msgstr "" + +#. module: product_abc_classification +#: model_terms:ir.ui.view,arch_db:product_abc_classification.abc_classification_profile_form_view +msgid "e.g. Sale Profile" +msgstr "" From bec67d8f2d39e7d2e77b189529d199378293dda2 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Mon, 18 Sep 2023 10:06:33 +0000 Subject: [PATCH 033/224] oca-github-bot post-merge updates --- product_abc_classification/README.rst | 23 +++++----- .../static/description/index.html | 42 ++++++++++--------- 2 files changed, 35 insertions(+), 30 deletions(-) diff --git a/product_abc_classification/README.rst b/product_abc_classification/README.rst index bbed589ebf5..a5ba9334ace 100644 --- a/product_abc_classification/README.rst +++ b/product_abc_classification/README.rst @@ -2,10 +2,13 @@ Product Abc Classification ========================== -.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:8a366c55660284e3ef7f90bca5d9f06cd061ff819a5524aec87e67efb6fcf7a0 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png :target: https://odoo-community.org/page/development-status @@ -14,16 +17,16 @@ Product Abc Classification :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fproduct--attribute-lightgray.png?logo=github - :target: https://github.com/OCA/product-attribute/tree/16.0/product_abc_classification_base + :target: https://github.com/OCA/product-attribute/tree/16.0/product_abc_classification :alt: OCA/product-attribute .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/product-attribute-16-0/product-attribute-16-0-product_abc_classification_base + :target: https://translation.odoo-community.org/projects/product-attribute-16-0/product-attribute-16-0-product_abc_classification :alt: Translate me on Weblate -.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/135/16.0 - :alt: Try me on Runbot +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/product-attribute&target_branch=16.0 + :alt: Try me on Runboat -|badge1| |badge2| |badge3| |badge4| |badge5| +|badge1| |badge2| |badge3| |badge4| |badge5| This modules provides the bases to build ABC analysis (or ABC classification) addons. These classification are used by inventory management teams to help @@ -62,8 +65,8 @@ 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 `_. +If you spotted it first, help us to smash it by providing a detailed and welcomed +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -97,6 +100,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -This module is part of the `OCA/product-attribute `_ project on GitHub. +This module is part of the `OCA/product-attribute `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/product_abc_classification/static/description/index.html b/product_abc_classification/static/description/index.html index b309d87953d..171c5b550d4 100644 --- a/product_abc_classification/static/description/index.html +++ b/product_abc_classification/static/description/index.html @@ -1,20 +1,20 @@ - + - + Product Abc Classification -
    -

    Product Sequence

    +
    + + +Odoo Community Association + +
    +

    Product Sequence

    -

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

    +

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

    This module allows to associate a sequence to the product reference. The reference (default code) is unique (SQL constraint) and required.

    You can optionally specify different sequences for different product @@ -388,7 +393,7 @@

    Product Sequence

    -

    Usage

    +

    Usage

    To specify a different sequence for a product category proceed as follows:

      @@ -403,7 +408,7 @@

      Usage

    -

    Bug Tracker

    +

    Bug Tracker

    Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed @@ -411,16 +416,16 @@

    Bug Tracker

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

    -

    Credits

    +

    Credits

    -

    Authors

    +

    Authors

    • Zikzakmedia SL
    • Sodexis
    -

    Contributors

    +

    Contributors

    -

    Maintainers

    +

    Maintainers

    This module is maintained by the OCA.

    Odoo Community Association @@ -449,5 +454,6 @@

    Maintainers

    +
    From 15c480f349f78e3f2ca9324e69aacee3a35da024 Mon Sep 17 00:00:00 2001 From: david Date: Mon, 30 Mar 2020 15:26:27 +0200 Subject: [PATCH 055/224] [ADD] product_multi_price: New Module --- product_multi_price/README.rst | 115 +++++ product_multi_price/__init__.py | 1 + product_multi_price/__manifest__.py | 25 + .../demo/multi_price_demo_data.xml | 10 + product_multi_price/i18n/es.po | 172 +++++++ .../i18n/product_multi_price.pot | 171 +++++++ product_multi_price/models/__init__.py | 4 + .../models/product_multi_price.py | 98 ++++ .../models/product_pricelist.py | 37 ++ product_multi_price/models/product_product.py | 68 +++ .../models/product_template.py | 59 +++ product_multi_price/readme/CONFIGURE.rst | 9 + product_multi_price/readme/CONTRIBUTORS.rst | 4 + product_multi_price/readme/DESCRIPTION.rst | 2 + product_multi_price/readme/ROADMAP.rst | 3 + product_multi_price/readme/USAGE.rst | 14 + .../security/ir.model.access.csv | 4 + .../security/multi_price_security.xml | 18 + .../static/description/icon.png | Bin 0 -> 9455 bytes .../static/description/index.html | 465 ++++++++++++++++++ product_multi_price/tests/__init__.py | 1 + .../tests/test_product_multi_price.py | 119 +++++ .../views/multi_price_views.xml | 62 +++ .../views/product_pricelist_views.xml | 14 + product_multi_price/views/product_views.xml | 28 ++ 25 files changed, 1503 insertions(+) create mode 100644 product_multi_price/README.rst create mode 100644 product_multi_price/__init__.py create mode 100644 product_multi_price/__manifest__.py create mode 100644 product_multi_price/demo/multi_price_demo_data.xml create mode 100644 product_multi_price/i18n/es.po create mode 100644 product_multi_price/i18n/product_multi_price.pot create mode 100644 product_multi_price/models/__init__.py create mode 100644 product_multi_price/models/product_multi_price.py create mode 100644 product_multi_price/models/product_pricelist.py create mode 100644 product_multi_price/models/product_product.py create mode 100644 product_multi_price/models/product_template.py create mode 100644 product_multi_price/readme/CONFIGURE.rst create mode 100644 product_multi_price/readme/CONTRIBUTORS.rst create mode 100644 product_multi_price/readme/DESCRIPTION.rst create mode 100644 product_multi_price/readme/ROADMAP.rst create mode 100644 product_multi_price/readme/USAGE.rst create mode 100644 product_multi_price/security/ir.model.access.csv create mode 100644 product_multi_price/security/multi_price_security.xml create mode 100644 product_multi_price/static/description/icon.png create mode 100644 product_multi_price/static/description/index.html create mode 100644 product_multi_price/tests/__init__.py create mode 100644 product_multi_price/tests/test_product_multi_price.py create mode 100644 product_multi_price/views/multi_price_views.xml create mode 100644 product_multi_price/views/product_pricelist_views.xml create mode 100644 product_multi_price/views/product_views.xml diff --git a/product_multi_price/README.rst b/product_multi_price/README.rst new file mode 100644 index 00000000000..0e5cc0caa2b --- /dev/null +++ b/product_multi_price/README.rst @@ -0,0 +1,115 @@ +=================== +Product Multi Price +=================== + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! 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--attribute-lightgray.png?logo=github + :target: https://github.com/OCA/product-attribute/tree/11.0/product_multi_price + :alt: OCA/product-attribute +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/product-attribute-11-0/product-attribute-11-0-product_multi_price + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/135/11.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module allows to set multiple prices to products and base pricelist +rules on them. + +**Table of contents** + +.. contents:: + :local: + +Configuration +============= + +To configure multiple prices you need to set multi prices field names first. +To do so, you need admin permissions. Then go to: + +#. *Settings > General Settings > Technical > Database Structure > + Price Field Names* +#. Create the multi price fields you need. + +If you have multiple companies, you can assign independet field sets for each +one. + +Usage +===== + +To use this module, you need to: + +#. Go to the product page. +#. In the general tab, there's a list called *Prices*. +#. You can add one for every multiple price field name available. + +To base pricelist rules on that fields, in the pricelist: + +#. Add a rule and choose *formula* as the computing method. +#. In the *Based on* dropdown list you can select *Multiple Prices*. +#. A new list appear: *Multiple Price Field Name*. Pick the one you need. +#. Configure the formula. +#. Now the rule is based on that price for the products that have it + configured. Otherwise, it will return 0. + +Known issues / Roadmap +====================== + +* Add mechanisms that allow to set multiprices values from external flows. For + example: having AVCO, FIFO and Standard prices computed simultaneously in + this table. + +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 +~~~~~~~ + +* Tecnativa + +Contributors +~~~~~~~~~~~~ + +* `Tecnativa `_ + + * David Vidal + * Pedro M. Baeza + +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +This module is part of the `OCA/product-attribute `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/product_multi_price/__init__.py b/product_multi_price/__init__.py new file mode 100644 index 00000000000..0650744f6bc --- /dev/null +++ b/product_multi_price/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/product_multi_price/__manifest__.py b/product_multi_price/__manifest__.py new file mode 100644 index 00000000000..43ae4912d7e --- /dev/null +++ b/product_multi_price/__manifest__.py @@ -0,0 +1,25 @@ +# Copyright 2020 Tecnativa - David Vidal +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +{ + "name": "Product Multi Price", + "version": "11.0.1.0.0", + 'author': 'Tecnativa,' + 'Odoo Community Association (OCA)', + 'website': 'https://github.com/OCA/product-attribute', + "category": "Product Management", + "license": "AGPL-3", + "depends": [ + "product", + ], + "data": [ + "security/ir.model.access.csv", + "security/multi_price_security.xml", + "views/multi_price_views.xml", + "views/product_pricelist_views.xml", + "views/product_views.xml", + ], + 'demo': [ + "demo/multi_price_demo_data.xml", + ], + "installable": True, +} diff --git a/product_multi_price/demo/multi_price_demo_data.xml b/product_multi_price/demo/multi_price_demo_data.xml new file mode 100644 index 00000000000..d2f2955c39f --- /dev/null +++ b/product_multi_price/demo/multi_price_demo_data.xml @@ -0,0 +1,10 @@ + + + + + + price_1 + + + + diff --git a/product_multi_price/i18n/es.po b/product_multi_price/i18n/es.po new file mode 100644 index 00000000000..eb43d2e9f86 --- /dev/null +++ b/product_multi_price/i18n/es.po @@ -0,0 +1,172 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_multi_price +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-04-03 14:21+0000\n" +"PO-Revision-Date: 2020-04-03 14:21+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: product_multi_price +#: sql_constraint:product.multi.price:0 +msgid "A field name cannot be assigned to a product twice for the same company" +msgstr "No puede haber un nombre de campo repetido en la misma compañía" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_company_id +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name_company_id +msgid "Company" +msgstr "Compañía" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_create_uid +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name_create_uid +msgid "Created by" +msgstr "Creado por" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_create_date +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name_create_date +msgid "Created on" +msgstr "Creado en" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_display_name +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name_display_name +msgid "Display Name" +msgstr "Nombre mostrado" + +#. module: product_multi_price +#: code:addons/product_multi_price/models/product_multi_price.py:91 +#, python-format +msgid "Field names can only contain characters, digits and underscores (up to 63)." +msgstr "Los nombres de campo solo pueden contener caracteres alfanuméricos, dígitos o guiones bajos (hasta 63)." + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_id +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name_id +msgid "ID" +msgstr "ID (identificación)" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price___last_update +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name___last_update +msgid "Last Modified on" +msgstr "Última modificación en" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name_write_uid +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_write_uid +msgid "Last Updated by" +msgstr "Última actualización de" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name_write_date +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_write_date +msgid "Last Updated on" +msgstr "Última actualización en" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_template_multi_price +msgid "Multi Price" +msgstr "Multi Precio" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_pricelist_item_multi_price_name +msgid "Multiple Price Field Name" +msgstr "Nombre de Campo de Precio Múltiple" + +#. module: product_multi_price +#: model:ir.ui.view,arch_db:product_multi_price.product_template_form_view +#: model:ir.ui.view,arch_db:product_multi_price.product_variant_easy_edit_view +msgid "Multiple Prices" +msgstr "Precios Múltiples" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name +msgid "Name" +msgstr "Nombre" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_product_price_ids +#: model:ir.model.fields,field_description:product_multi_price.field_product_template_price_ids +msgid "Price" +msgstr "Precio" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name_name +msgid "Price Field Name" +msgstr "Nombre de Campo de Precio" + +#. module: product_multi_price +#: model:ir.actions.act_window,name:product_multi_price.action_multi_price_name_config +#: model:ir.ui.menu,name:product_multi_price.multi_price_name_menu +msgid "Price Field Names" +msgstr "Nombres de Campo de Precio" + +#. module: product_multi_price +#: model:ir.model,name:product_multi_price.model_product_pricelist +msgid "Pricelist" +msgstr "Tarifa" + +#. module: product_multi_price +#: model:ir.model,name:product_multi_price.model_product_pricelist_item +msgid "Pricelist item" +msgstr "Elemento de Tarifa" + +#. module: product_multi_price +#: sql_constraint:product.multi.price.name:0 +msgid "Prices Names must be unique per company" +msgstr "Los Nombres de Precio deben ser únicos para cada compañía" + +#. module: product_multi_price +#: model:ir.model,name:product_multi_price.model_product_product +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_product_id +msgid "Product" +msgstr "Producto" + +#. module: product_multi_price +#: model:ir.ui.view,arch_db:product_multi_price.product_multi_price_tree_view +msgid "Product Multi Price" +msgstr "Multi Precio de Producto" + +#. module: product_multi_price +#: model:ir.ui.view,arch_db:product_multi_price.product_multi_price_name_tree_view +msgid "Product Multi Price Field Name" +msgstr "Nombre de Campo de Multi Precio de Producto" + +#. module: product_multi_price +#: model:ir.ui.view,arch_db:product_multi_price.product_multi_price_form_view +msgid "Product Multi_price" +msgstr "Multi Precio de Producto" + +#. module: product_multi_price +#: model:ir.model,name:product_multi_price.model_product_template +msgid "Product Template" +msgstr "Plantilla de producto" + +#. module: product_multi_price +#: code:addons/product_multi_price/models/product_multi_price.py:96 +#, python-format +msgid "The field name is used in the model, try another" +msgstr "El campo se utiliza en el modelo, escoja otro" + +#. module: product_multi_price +#: model:ir.model,name:product_multi_price.model_product_multi_price +msgid "product.multi.price" +msgstr "product.multi.price" + +#. module: product_multi_price +#: model:ir.model,name:product_multi_price.model_product_multi_price_name +msgid "product.multi.price.name" +msgstr "product.multi.price.name" diff --git a/product_multi_price/i18n/product_multi_price.pot b/product_multi_price/i18n/product_multi_price.pot new file mode 100644 index 00000000000..2824a64a153 --- /dev/null +++ b/product_multi_price/i18n/product_multi_price.pot @@ -0,0 +1,171 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_multi_price +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.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_multi_price +#: sql_constraint:product.multi.price:0 +msgid "A field name cannot be assigned to a product twice for the same company" +msgstr "" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_company_id +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name_company_id +msgid "Company" +msgstr "" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_create_uid +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name_create_uid +msgid "Created by" +msgstr "" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_create_date +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name_create_date +msgid "Created on" +msgstr "" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_display_name +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name_display_name +msgid "Display Name" +msgstr "" + +#. module: product_multi_price +#: code:addons/product_multi_price/models/product_multi_price.py:92 +#, python-format +msgid "Field names can only contain characters, digits and underscores (up to 63)." +msgstr "" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_id +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name_id +msgid "ID" +msgstr "" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price___last_update +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name___last_update +msgid "Last Modified on" +msgstr "" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name_write_uid +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_write_uid +msgid "Last Updated by" +msgstr "" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name_write_date +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_write_date +msgid "Last Updated on" +msgstr "" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_template_multi_price +msgid "Multi Price" +msgstr "" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_pricelist_item_multi_price_name +msgid "Multiple Price Field Name" +msgstr "" + +#. module: product_multi_price +#: model:ir.ui.view,arch_db:product_multi_price.product_template_form_view +#: model:ir.ui.view,arch_db:product_multi_price.product_variant_easy_edit_view +msgid "Multiple Prices" +msgstr "" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name +msgid "Name" +msgstr "" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_product_price_ids +#: model:ir.model.fields,field_description:product_multi_price.field_product_template_price_ids +msgid "Price" +msgstr "" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name_name +msgid "Price Field Name" +msgstr "" + +#. module: product_multi_price +#: model:ir.actions.act_window,name:product_multi_price.action_multi_price_name_config +#: model:ir.ui.menu,name:product_multi_price.multi_price_name_menu +msgid "Price Field Names" +msgstr "" + +#. module: product_multi_price +#: model:ir.model,name:product_multi_price.model_product_pricelist +msgid "Pricelist" +msgstr "" + +#. module: product_multi_price +#: model:ir.model,name:product_multi_price.model_product_pricelist_item +msgid "Pricelist item" +msgstr "" + +#. module: product_multi_price +#: sql_constraint:product.multi.price.name:0 +msgid "Prices Names must be unique per company" +msgstr "" + +#. module: product_multi_price +#: model:ir.model,name:product_multi_price.model_product_product +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_product_id +msgid "Product" +msgstr "" + +#. module: product_multi_price +#: model:ir.ui.view,arch_db:product_multi_price.product_multi_price_tree_view +msgid "Product Multi Price" +msgstr "" + +#. module: product_multi_price +#: model:ir.ui.view,arch_db:product_multi_price.product_multi_price_name_tree_view +msgid "Product Multi Price Field Name" +msgstr "" + +#. module: product_multi_price +#: model:ir.ui.view,arch_db:product_multi_price.product_multi_price_form_view +msgid "Product Multi_price" +msgstr "" + +#. module: product_multi_price +#: model:ir.model,name:product_multi_price.model_product_template +msgid "Product Template" +msgstr "" + +#. module: product_multi_price +#: code:addons/product_multi_price/models/product_multi_price.py:97 +#, python-format +msgid "The field name is used in the model, try another" +msgstr "" + +#. module: product_multi_price +#: model:ir.model,name:product_multi_price.model_product_multi_price +msgid "product.multi.price" +msgstr "" + +#. module: product_multi_price +#: model:ir.model,name:product_multi_price.model_product_multi_price_name +msgid "product.multi.price.name" +msgstr "" + diff --git a/product_multi_price/models/__init__.py b/product_multi_price/models/__init__.py new file mode 100644 index 00000000000..b0fa0aa6da9 --- /dev/null +++ b/product_multi_price/models/__init__.py @@ -0,0 +1,4 @@ +from . import product_multi_price +from . import product_pricelist +from . import product_product +from . import product_template diff --git a/product_multi_price/models/product_multi_price.py b/product_multi_price/models/product_multi_price.py new file mode 100644 index 00000000000..c858a8748ff --- /dev/null +++ b/product_multi_price/models/product_multi_price.py @@ -0,0 +1,98 @@ +# Copyright 2020 Tecnativa - David Vidal +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +from odoo import _, api, fields, models, tools +from odoo.exceptions import ValidationError +from odoo.addons import decimal_precision as dp + + +class ProductMultiPrice(models.Model): + _name = 'product.multi.price' + + name = fields.Many2one( + comodel_name='product.multi.price.name', + required=True, + ) + product_id = fields.Many2one( + comodel_name='product.product', + required=True, + ondelete='cascade', + ) + price = fields.Float( + digits=dp.get_precision('Product Price'), + ) + company_id = fields.Many2one( + comodel_name='res.company', + related='name.company_id', + store=True, + readonly=True, + ) + + _sql_constraints = [ + ('multi_price_uniq', 'unique(name, product_id, company_id)', + 'A field name cannot be assigned to a product twice for the same ' + 'company'), + ] + + +class ProductMultiPriceName(models.Model): + _name = 'product.multi.price.name' + + @api.model + def _get_company(self): + return self._context.get('company_id', self.env.user.company_id.id) + + name = fields.Char( + required=True, + string='Price Field Name', + ondelete='restrict' + ) + company_id = fields.Many2one( + comodel_name='res.company', + required=True, + default=lambda self: self._get_company() + ) + + _sql_constraints = [ + ('multi_price_name_uniq', 'unique(name, company_id)', + 'Prices Names must be unique per company'), + ] + + @api.model + @tools.ormcache() + def _get_field_names(self): + return set([x.name for x in self.search([])]) + + @api.model + def create(self, vals): + res = super().create(vals) + self.clear_caches() + return res + + def write(self, vals): + res = super().write(vals) + if 'name' in vals: + self.clear_caches() + return res + + def unlink(self): + res = super().unlink() + self.clear_caches() + return res + + @api.constrains('name') + def _check_name(self): + """The target is to use multi price as if they were virtual fields + so we want to constrain the naming to the same rules""" + product_fields = list(self.env['product.product']._fields) + product_fields += list(self.env['product.template']._fields) + for field in self: + try: + models.check_pg_name(field.name) + except ValidationError: + msg = _( + "Field names can only contain characters, " + "digits and underscores (up to 63).") + raise ValidationError(msg) + if field in set(product_fields): + raise ValidationError(_( + "The field name is used in the model, try another")) diff --git a/product_multi_price/models/product_pricelist.py b/product_multi_price/models/product_pricelist.py new file mode 100644 index 00000000000..8d1cfb6963d --- /dev/null +++ b/product_multi_price/models/product_pricelist.py @@ -0,0 +1,37 @@ +# Copyright 2020 Tecnativa - David Vidal +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +from odoo import fields, models + + +class ProductPricelist(models.Model): + _inherit = 'product.pricelist' + + def _compute_price_rule(self, products_qty_partner, date=False, + uom_id=False): + """Recompute price after calling the atomic super method for + getting proper prices when based on multi price. + """ + rule_obj = self.env['product.pricelist.item'] + result = super()._compute_price_rule( + products_qty_partner, date, uom_id) + # Make sure all rule records are fetched at once and put in cache + rule_obj.browse(x[1] for x in result.values()).mapped('price_discount') + for product, qty, _partner in products_qty_partner: + rule = rule_obj.browse(result[product.id][1]) + if rule.compute_price == 'formula' and rule.base == 'multi_price': + result[product.id] = ( + product._get_multiprice_pricelist_price(rule), + rule.id) + return result + + +class ProductPricelistItem(models.Model): + _inherit = 'product.pricelist.item' + + base = fields.Selection( + selection_add=[('multi_price', 'Multiple Price Field')], + ) + multi_price_name = fields.Many2one( + comodel_name='product.multi.price.name', + string="Multiple Price Field Name", + ) diff --git a/product_multi_price/models/product_product.py b/product_multi_price/models/product_product.py new file mode 100644 index 00000000000..03a042a0fb1 --- /dev/null +++ b/product_multi_price/models/product_product.py @@ -0,0 +1,68 @@ +# Copyright 2020 Tecnativa - David Vidal +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +from odoo import models, fields, tools +from odoo.addons import decimal_precision as dp + + +class ProductProduct(models.Model): + _inherit = "product.product" + + price_ids = fields.One2many( + comodel_name='product.multi.price', + inverse_name='product_id', + ) + multi_price = fields.Float( + digits=dp.get_precision('Product Price'), + compute='_compute_multi_price', + groups="base.group_user", + ) + + def _get_multiprice_pricelist_price(self, rule): + """Method for getting the price from multi price.""" + self.ensure_one() + company = rule.company_id or self.env.user.company_id + price = self.env['product.multi.price'].search([ + ('company_id', '=', company.id), + ('name', '=', rule.multi_price_name.id), + ('product_id', '=', self.id), + ]).price or 0 + if price: + # We have to replicate this logic in this method as pricelist + # method are atomic and we can't hack inside. + # Verbatim copy of part of product.pricelist._compute_price_rule. + qty_uom_id = self._context.get('uom') or self.uom_id.id + price_uom = self.env['product.uom'].browse([qty_uom_id]) + convert_to_price_uom = ( + lambda price: self.uom_id._compute_price( + price, price_uom)) + price_limit = price + price = (price - (price * (rule.price_discount / 100))) or 0.0 + if rule.price_round: + price = tools.float_round( + price, precision_rounding=rule.price_round) + if rule.price_surcharge: + price_surcharge = convert_to_price_uom(rule.price_surcharge) + price += price_surcharge + if rule.price_min_margin: + price_min_margin = convert_to_price_uom(rule.price_min_margin) + price = max(price, price_limit + price_min_margin) + if rule.price_max_margin: + price_max_margin = convert_to_price_uom(rule.price_max_margin) + price = min(price, price_limit + price_max_margin) + return price + + def _compute_multi_price(self): + """Use multi_price field as the proxy for any of the registered + multi price fields on the product passing it by context""" + multi_price_field = self.env.context.get('multi_price_field', False) + if not multi_price_field: + self.update({'multi_price': 0}) + return + prices_list = self.env['product.multi.price'].search_read([ + ('name.name', '=', multi_price_field), + ('product_id', 'in', self.ids), + ('company_id', '=', self.env.user.company_id.id) + ], ['product_id', 'price'], limit=1) + prices_dict = {x['product_id'][0]: x['price'] for x in prices_list} + for product in self: + product.multi_price = prices_dict.get(product.id, 0.0) diff --git a/product_multi_price/models/product_template.py b/product_multi_price/models/product_template.py new file mode 100644 index 00000000000..a7c6f670964 --- /dev/null +++ b/product_multi_price/models/product_template.py @@ -0,0 +1,59 @@ +# Copyright 2020 Tecnativa - David Vidal +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +from odoo import api, fields, models +from odoo.addons import decimal_precision as dp + + +class ProductTemplate(models.Model): + _inherit = "product.template" + + price_ids = fields.One2many( + comodel_name='product.multi.price', + compute='_compute_price_ids', + inverse='_set_price_ids', + ) + multi_price = fields.Float( + digits=dp.get_precision('Product Price'), + compute='_compute_multi_price', + groups="base.group_user", + readonly=True, + ) + + @api.depends('product_variant_ids', + 'product_variant_ids.price_ids') + def _compute_price_ids(self): + for p in self: + if len(p.product_variant_ids) == 1: + p.price_ids = p.product_variant_ids.price_ids + + def _set_price_ids(self): + for p in self: + if len(p.product_variant_ids) == 1: + p.product_variant_ids.price_ids = p.price_ids + + def _get_multiprice_pricelist_price(self, rule): + if len(self.product_variant_ids) == 1: + return ( + self.product_variant_ids._get_multiprice_pricelist_price(rule)) + return 0 + + @api.depends('product_variant_ids', 'product_variant_ids.multi_price') + def _compute_multi_price(self): + """Use multi_price field as the frontend for any of the registered + multi price fields on the product passing it by context""" + multi_price_field = self.env.context.get('multi_price_field', False) + if not multi_price_field: + self.update({'multi_price': 0}) + return + for p in self: + if len(p.product_variant_ids) == 1: + p.multi_price = p.product_variant_ids.multi_price + + @api.model + def create(self, vals): + product = super().create(vals) + if vals.get('price_ids'): + product.write({ + 'price_ids': vals.get('price_ids'), + }) + return product diff --git a/product_multi_price/readme/CONFIGURE.rst b/product_multi_price/readme/CONFIGURE.rst new file mode 100644 index 00000000000..91472fd4369 --- /dev/null +++ b/product_multi_price/readme/CONFIGURE.rst @@ -0,0 +1,9 @@ +To configure multiple prices you need to set multi prices field names first. +To do so, you need admin permissions. Then go to: + +#. *Settings > General Settings > Technical > Database Structure > + Price Field Names* +#. Create the multi price fields you need. + +If you have multiple companies, you can assign independet field sets for each +one. diff --git a/product_multi_price/readme/CONTRIBUTORS.rst b/product_multi_price/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000000..ac6cb650339 --- /dev/null +++ b/product_multi_price/readme/CONTRIBUTORS.rst @@ -0,0 +1,4 @@ +* `Tecnativa `_ + + * David Vidal + * Pedro M. Baeza diff --git a/product_multi_price/readme/DESCRIPTION.rst b/product_multi_price/readme/DESCRIPTION.rst new file mode 100644 index 00000000000..c76055a6eb9 --- /dev/null +++ b/product_multi_price/readme/DESCRIPTION.rst @@ -0,0 +1,2 @@ +This module allows to set multiple prices to products and base pricelist +rules on them. diff --git a/product_multi_price/readme/ROADMAP.rst b/product_multi_price/readme/ROADMAP.rst new file mode 100644 index 00000000000..620354d64ab --- /dev/null +++ b/product_multi_price/readme/ROADMAP.rst @@ -0,0 +1,3 @@ +* Add mechanisms that allow to set multiprices values from external flows. For + example: having AVCO, FIFO and Standard prices computed simultaneously in + this table. diff --git a/product_multi_price/readme/USAGE.rst b/product_multi_price/readme/USAGE.rst new file mode 100644 index 00000000000..7c796fa82a8 --- /dev/null +++ b/product_multi_price/readme/USAGE.rst @@ -0,0 +1,14 @@ +To use this module, you need to: + +#. Go to the product page. +#. In the general tab, there's a list called *Prices*. +#. You can add one for every multiple price field name available. + +To base pricelist rules on that fields, in the pricelist: + +#. Add a rule and choose *formula* as the computing method. +#. In the *Based on* dropdown list you can select *Multiple Prices*. +#. A new list appear: *Multiple Price Field Name*. Pick the one you need. +#. Configure the formula. +#. Now the rule is based on that price for the products that have it + configured. Otherwise, it will return 0. diff --git a/product_multi_price/security/ir.model.access.csv b/product_multi_price/security/ir.model.access.csv new file mode 100644 index 00000000000..c15ad02ac20 --- /dev/null +++ b/product_multi_price/security/ir.model.access.csv @@ -0,0 +1,4 @@ +"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" +"multi price","product.multi.price","model_product_multi_price","base.group_user",1,1,1,1 +"multi price name read","product.multi.price.name","model_product_multi_price_name","base.group_user",1,0,0,0 +"multi price name admin","product.multi.price.name","model_product_multi_price_name","base.group_system",1,1,1,1 diff --git a/product_multi_price/security/multi_price_security.xml b/product_multi_price/security/multi_price_security.xml new file mode 100644 index 00000000000..ba093f4594a --- /dev/null +++ b/product_multi_price/security/multi_price_security.xml @@ -0,0 +1,18 @@ + + + + + Multiple Price multi-company + + + ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] + + + + Multiple Price Field Name multi-company + + + ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] + + + diff --git a/product_multi_price/static/description/icon.png b/product_multi_price/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..3a0328b516c4980e8e44cdb63fd945757ddd132d GIT binary patch literal 9455 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 z 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 Xviia!U7SGha1wx#SCgwmn*{w2TRX*I literal 0 HcmV?d00001 diff --git a/product_multi_price/static/description/index.html b/product_multi_price/static/description/index.html new file mode 100644 index 00000000000..0224d32fcc4 --- /dev/null +++ b/product_multi_price/static/description/index.html @@ -0,0 +1,465 @@ + + + + + + +Product Multi Price + + + +
    +

    Product Multi Price

    + + +

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

    +

    This module allows to set multiple prices to products and base pricelist +rules on them.

    +

    Table of contents

    + +
    +

    Configuration

    +

    To configure multiple prices you need to set multi prices field names first. +To do so, you need admin permissions. Then go to:

    +
      +
    1. Settings > General Settings > Technical > Database Structure > +Price Field Names
    2. +
    3. Create the multi price fields you need.
    4. +
    +

    If you have multiple companies, you can assign independet field sets for each +one.

    +
    +
    +

    Usage

    +

    To use this module, you need to:

    +
      +
    1. Go to the product page.
    2. +
    3. In the general tab, there’s a list called Prices.
    4. +
    5. You can add one for every multiple price field name available.
    6. +
    +

    To base pricelist rules on that fields, in the pricelist:

    +
      +
    1. Add a rule and choose formula as the computing method.
    2. +
    3. In the Based on dropdown list you can select Multiple Prices.
    4. +
    5. A new list appear: Multiple Price Field Name. Pick the one you need.
    6. +
    7. Configure the formula.
    8. +
    9. Now the rule is based on that price for the products that have it +configured. Otherwise, it will return 0.
    10. +
    +
    +
    +

    Known issues / Roadmap

    +
      +
    • Add mechanisms that allow to set multiprices values from external flows. For +example: having AVCO, FIFO and Standard prices computed simultaneously in +this table.
    • +
    +
    +
    +

    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

    +
      +
    • Tecnativa
    • +
    +
    +
    +

    Contributors

    +
      +
    • Tecnativa
        +
      • David Vidal
      • +
      • Pedro M. Baeza
      • +
      +
    • +
    +
    +
    +

    Maintainers

    +

    This module is maintained by the OCA.

    +Odoo Community Association +

    OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use.

    +

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

    +

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

    +
    +
    +
    + + diff --git a/product_multi_price/tests/__init__.py b/product_multi_price/tests/__init__.py new file mode 100644 index 00000000000..03b7c618dfc --- /dev/null +++ b/product_multi_price/tests/__init__.py @@ -0,0 +1 @@ +from . import test_product_multi_price diff --git a/product_multi_price/tests/test_product_multi_price.py b/product_multi_price/tests/test_product_multi_price.py new file mode 100644 index 00000000000..fafcb0600d6 --- /dev/null +++ b/product_multi_price/tests/test_product_multi_price.py @@ -0,0 +1,119 @@ +# Copyright 2020 Tecnativa - David Vidal +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +from odoo.tests.common import SavepointCase + + +class TestProductMultiPrice(SavepointCase): + + @classmethod + def setUpClass(cls): + super().setUpClass() + cls.price_name_obj = cls.env['product.multi.price.name'] + cls.price_field_1 = cls.price_name_obj.create({'name': 'test_field_1'}) + cls.price_field_2 = cls.price_name_obj.create({'name': 'test_field_2'}) + prod_tmpl_obj = cls.env['product.template'] + product_obj = cls.env['product.product'] + cls.prod_1 = prod_tmpl_obj.create({ + 'name': 'Test Product Template', + 'price_ids': [ + (0, 0, { + 'name': cls.price_field_1.id, + 'price': 5.5, + }), + (0, 0, { + 'name': cls.price_field_2.id, + 'price': 20.0, + }), + ], + }) + cls.prod_att_1 = cls.env['product.attribute'].create({'name': 'Color'}) + cls.prod_attr1_v1 = cls.env['product.attribute.value'].create({ + 'name': 'red', 'attribute_id': cls.prod_att_1.id}) + cls.prod_attr1_v2 = cls.env['product.attribute.value'].create({ + 'name': 'blue', 'attribute_id': cls.prod_att_1.id}) + cls.prod_2 = prod_tmpl_obj.create({ + 'name': 'Test Product 2 With Variants', + 'attribute_line_ids': [(0, 0, { + 'attribute_id': cls.prod_att_1.id, + })] + }) + cls.prod_prod_2_1 = product_obj.create({ + 'product_tmpl_id': cls.prod_2.id, + 'attribute_value_ids': [(6, 0, [cls.prod_attr1_v1.id])], + 'price_ids': [ + (0, 0, { + 'name': cls.price_field_1.id, + 'price': 6.6, + }), + (0, 0, { + 'name': cls.price_field_2.id, + 'price': 7.7, + }), + ], + }) + cls.prod_prod_2_2 = product_obj.create({ + 'product_tmpl_id': cls.prod_2.id, + 'attribute_value_ids': [(6, 0, [cls.prod_attr1_v2.id])], + 'price_ids': [ + (0, 0, { + 'name': cls.price_field_1.id, + 'price': 8.8, + }), + (0, 0, { + 'name': cls.price_field_2.id, + 'price': 9.9, + }), + ], + }) + cls.pricelist = cls.env['product.pricelist'].create({ + 'name': 'Test pricelist', + 'item_ids': [ + (0, 0, { + 'compute_price': 'formula', + 'base': 'multi_price', + 'multi_price_name': cls.price_field_1.id, + 'price_discount': 10, + 'applied_on': '3_global', + }), + ], + }) + + def test_product_multi_price(self): + """Multi Price for a product is computed based on the record name + passed by context""" + self.assertAlmostEqual(0, self.prod_1.multi_price) + price = self.prod_1.with_context( + multi_price_field='test_field_1').multi_price + self.assertAlmostEqual(price, 5.5) + price = self.prod_1.with_context( + multi_price_field='test_field_2').multi_price + self.assertAlmostEqual(price, 20.0) + # If the field doesn't exists or the product has no record for it + # a value of 0 will be returned. + price = self.prod_1.with_context( + multi_price_field='test_field_XXX').multi_price + self.assertAlmostEqual(price, 0) + # When a template has variants, no multiprice can be computed from it + price = self.prod_2.with_context( + multi_price_field='test_field_1').multi_price + self.assertAlmostEqual(price, 0.0) + # We should get it from the variants themselves + price = self.prod_prod_2_1.with_context( + multi_price_field='test_field_1').multi_price + self.assertAlmostEqual(price, 6.6) + price = self.prod_prod_2_2.with_context( + multi_price_field='test_field_1').multi_price + self.assertAlmostEqual(price, 8.8) + + def test_product_multi_price_pricelist(self): + """Pricelists based on multi prices for templates or variants""" + # import wdb; wdb.set_trace() + price = self.prod_1.with_context( + pricelist=self.pricelist.id).price + self.assertAlmostEqual(price, 4.95) + price = self.prod_prod_2_1.with_context( + pricelist=self.pricelist.id).price + self.assertAlmostEqual(price, 5.94) + price = self.prod_prod_2_2.with_context( + pricelist=self.pricelist.id).price + self.assertAlmostEqual(price, 7.92) diff --git a/product_multi_price/views/multi_price_views.xml b/product_multi_price/views/multi_price_views.xml new file mode 100644 index 00000000000..cc6b9e50f78 --- /dev/null +++ b/product_multi_price/views/multi_price_views.xml @@ -0,0 +1,62 @@ + + + + product.multi.price + + + + + + + + + + + + product.multi.price + +
    + + + + + + + + +
    +
    +
    + + + product.multi.price + primary + + + + + bottom + + + + + + product.multi.price.name + + + + + + + + + + Price Field Names + product.multi.price.name + form + {} + + + + +
    diff --git a/product_multi_price/views/product_pricelist_views.xml b/product_multi_price/views/product_pricelist_views.xml new file mode 100644 index 00000000000..e262ae80f9b --- /dev/null +++ b/product_multi_price/views/product_pricelist_views.xml @@ -0,0 +1,14 @@ + + + + + product.pricelist.item + + + + + + + + + diff --git a/product_multi_price/views/product_views.xml b/product_multi_price/views/product_views.xml new file mode 100644 index 00000000000..cc7e144f68d --- /dev/null +++ b/product_multi_price/views/product_views.xml @@ -0,0 +1,28 @@ + + + + + product.template + + + + + + + + + + + + product.product + + + + + + + + + + + From b53de07f43bed6f66162518eb9ef413949596b66 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Thu, 9 Apr 2020 10:56:00 +0200 Subject: [PATCH 056/224] [IMP] product_multi_price: Several improvements * Adjusted terminology * Better positioning of the prices list * Adjusted README * Remove useless constraint * Make multi price name translatable * Apply some guidelines * Remove compute proxy field as not finally used, and thus the ORM cache, but needed then to override initial computation. --- product_multi_price/README.rst | 11 ++-- product_multi_price/__manifest__.py | 2 +- product_multi_price/i18n/es.po | 57 +++++++------------ .../i18n/product_multi_price.pot | 38 +++---------- .../models/product_multi_price.py | 44 +------------- .../models/product_pricelist.py | 4 +- product_multi_price/models/product_product.py | 32 ++++------- .../models/product_template.py | 35 +++++------- product_multi_price/readme/CONFIGURE.rst | 3 +- product_multi_price/readme/USAGE.rst | 8 +-- .../static/description/index.html | 11 ++-- .../tests/test_product_multi_price.py | 28 --------- .../views/multi_price_views.xml | 3 +- product_multi_price/views/product_views.xml | 21 ++++--- 14 files changed, 85 insertions(+), 212 deletions(-) diff --git a/product_multi_price/README.rst b/product_multi_price/README.rst index 0e5cc0caa2b..02f54886cba 100644 --- a/product_multi_price/README.rst +++ b/product_multi_price/README.rst @@ -39,8 +39,7 @@ Configuration To configure multiple prices you need to set multi prices field names first. To do so, you need admin permissions. Then go to: -#. *Settings > General Settings > Technical > Database Structure > - Price Field Names* +#. *Settings > Technical > Database Structure > Price Field Names* #. Create the multi price fields you need. If you have multiple companies, you can assign independet field sets for each @@ -52,14 +51,14 @@ Usage To use this module, you need to: #. Go to the product page. -#. In the general tab, there's a list called *Prices*. -#. You can add one for every multiple price field name available. +#. In the general tab, there's a list called *Other Prices*. +#. You can add one for every price name available. To base pricelist rules on that fields, in the pricelist: #. Add a rule and choose *formula* as the computing method. -#. In the *Based on* dropdown list you can select *Multiple Prices*. -#. A new list appear: *Multiple Price Field Name*. Pick the one you need. +#. In the *Based on* dropdown list, select *Other Price*. +#. A new list appear: *Other Price Name*. Pick the one you need. #. Configure the formula. #. Now the rule is based on that price for the products that have it configured. Otherwise, it will return 0. diff --git a/product_multi_price/__manifest__.py b/product_multi_price/__manifest__.py index 43ae4912d7e..4a981581f67 100644 --- a/product_multi_price/__manifest__.py +++ b/product_multi_price/__manifest__.py @@ -2,7 +2,7 @@ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). { "name": "Product Multi Price", - "version": "11.0.1.0.0", + "version": "11.0.1.1.0", 'author': 'Tecnativa,' 'Odoo Community Association (OCA)', 'website': 'https://github.com/OCA/product-attribute', diff --git a/product_multi_price/i18n/es.po b/product_multi_price/i18n/es.po index eb43d2e9f86..7b5b57e8e8a 100644 --- a/product_multi_price/i18n/es.po +++ b/product_multi_price/i18n/es.po @@ -1,19 +1,21 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * product_multi_price +# * product_multi_price # msgid "" msgstr "" "Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-04-03 14:21+0000\n" -"PO-Revision-Date: 2020-04-03 14:21+0000\n" +"POT-Creation-Date: 2020-04-09 08:52+0000\n" +"PO-Revision-Date: 2020-04-09 10:54+0200\n" "Last-Translator: <>\n" "Language-Team: \n" +"Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" +"Content-Transfer-Encoding: 8bit\n" "Plural-Forms: \n" +"X-Generator: Poedit 2.0.6\n" #. module: product_multi_price #: sql_constraint:product.multi.price:0 @@ -44,12 +46,6 @@ msgstr "Creado en" msgid "Display Name" msgstr "Nombre mostrado" -#. module: product_multi_price -#: code:addons/product_multi_price/models/product_multi_price.py:91 -#, python-format -msgid "Field names can only contain characters, digits and underscores (up to 63)." -msgstr "Los nombres de campo solo pueden contener caracteres alfanuméricos, dígitos o guiones bajos (hasta 63)." - #. module: product_multi_price #: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_id #: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name_id @@ -75,31 +71,23 @@ msgid "Last Updated on" msgstr "Última actualización en" #. module: product_multi_price -#: model:ir.model.fields,field_description:product_multi_price.field_product_product_multi_price -#: model:ir.model.fields,field_description:product_multi_price.field_product_template_multi_price -msgid "Multi Price" -msgstr "Multi Precio" +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name +msgid "Name" +msgstr "Nombre" #. module: product_multi_price #: model:ir.model.fields,field_description:product_multi_price.field_product_pricelist_item_multi_price_name -msgid "Multiple Price Field Name" -msgstr "Nombre de Campo de Precio Múltiple" +msgid "Other Price Name" +msgstr "Nombre del otro precio" #. module: product_multi_price -#: model:ir.ui.view,arch_db:product_multi_price.product_template_form_view -#: model:ir.ui.view,arch_db:product_multi_price.product_variant_easy_edit_view -msgid "Multiple Prices" -msgstr "Precios Múltiples" - -#. module: product_multi_price -#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name -msgid "Name" -msgstr "Nombre" +#: model:ir.model.fields,field_description:product_multi_price.field_product_product_price_ids +#: model:ir.model.fields,field_description:product_multi_price.field_product_template_price_ids +msgid "Other Prices" +msgstr "Otros precios" #. module: product_multi_price #: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_price -#: model:ir.model.fields,field_description:product_multi_price.field_product_product_price_ids -#: model:ir.model.fields,field_description:product_multi_price.field_product_template_price_ids msgid "Price" msgstr "Precio" @@ -136,6 +124,7 @@ msgid "Product" msgstr "Producto" #. module: product_multi_price +#: model:ir.ui.view,arch_db:product_multi_price.product_multi_price_form_view #: model:ir.ui.view,arch_db:product_multi_price.product_multi_price_tree_view msgid "Product Multi Price" msgstr "Multi Precio de Producto" @@ -145,22 +134,11 @@ msgstr "Multi Precio de Producto" msgid "Product Multi Price Field Name" msgstr "Nombre de Campo de Multi Precio de Producto" -#. module: product_multi_price -#: model:ir.ui.view,arch_db:product_multi_price.product_multi_price_form_view -msgid "Product Multi_price" -msgstr "Multi Precio de Producto" - #. module: product_multi_price #: model:ir.model,name:product_multi_price.model_product_template msgid "Product Template" msgstr "Plantilla de producto" -#. module: product_multi_price -#: code:addons/product_multi_price/models/product_multi_price.py:96 -#, python-format -msgid "The field name is used in the model, try another" -msgstr "El campo se utiliza en el modelo, escoja otro" - #. module: product_multi_price #: model:ir.model,name:product_multi_price.model_product_multi_price msgid "product.multi.price" @@ -170,3 +148,6 @@ msgstr "product.multi.price" #: model:ir.model,name:product_multi_price.model_product_multi_price_name msgid "product.multi.price.name" msgstr "product.multi.price.name" + +#~ msgid "Multi Price" +#~ msgstr "Multi Precio" diff --git a/product_multi_price/i18n/product_multi_price.pot b/product_multi_price/i18n/product_multi_price.pot index 2824a64a153..bd0b44de3f3 100644 --- a/product_multi_price/i18n/product_multi_price.pot +++ b/product_multi_price/i18n/product_multi_price.pot @@ -42,12 +42,6 @@ msgstr "" msgid "Display Name" msgstr "" -#. module: product_multi_price -#: code:addons/product_multi_price/models/product_multi_price.py:92 -#, python-format -msgid "Field names can only contain characters, digits and underscores (up to 63)." -msgstr "" - #. module: product_multi_price #: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_id #: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name_id @@ -73,31 +67,23 @@ msgid "Last Updated on" msgstr "" #. module: product_multi_price -#: model:ir.model.fields,field_description:product_multi_price.field_product_product_multi_price -#: model:ir.model.fields,field_description:product_multi_price.field_product_template_multi_price -msgid "Multi Price" +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name +msgid "Name" msgstr "" #. module: product_multi_price #: model:ir.model.fields,field_description:product_multi_price.field_product_pricelist_item_multi_price_name -msgid "Multiple Price Field Name" +msgid "Other Price Name" msgstr "" #. module: product_multi_price -#: model:ir.ui.view,arch_db:product_multi_price.product_template_form_view -#: model:ir.ui.view,arch_db:product_multi_price.product_variant_easy_edit_view -msgid "Multiple Prices" -msgstr "" - -#. module: product_multi_price -#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name -msgid "Name" +#: model:ir.model.fields,field_description:product_multi_price.field_product_product_price_ids +#: model:ir.model.fields,field_description:product_multi_price.field_product_template_price_ids +msgid "Other Prices" msgstr "" #. module: product_multi_price #: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_price -#: model:ir.model.fields,field_description:product_multi_price.field_product_product_price_ids -#: model:ir.model.fields,field_description:product_multi_price.field_product_template_price_ids msgid "Price" msgstr "" @@ -134,6 +120,7 @@ msgid "Product" msgstr "" #. module: product_multi_price +#: model:ir.ui.view,arch_db:product_multi_price.product_multi_price_form_view #: model:ir.ui.view,arch_db:product_multi_price.product_multi_price_tree_view msgid "Product Multi Price" msgstr "" @@ -143,22 +130,11 @@ msgstr "" msgid "Product Multi Price Field Name" msgstr "" -#. module: product_multi_price -#: model:ir.ui.view,arch_db:product_multi_price.product_multi_price_form_view -msgid "Product Multi_price" -msgstr "" - #. module: product_multi_price #: model:ir.model,name:product_multi_price.model_product_template msgid "Product Template" msgstr "" -#. module: product_multi_price -#: code:addons/product_multi_price/models/product_multi_price.py:97 -#, python-format -msgid "The field name is used in the model, try another" -msgstr "" - #. module: product_multi_price #: model:ir.model,name:product_multi_price.model_product_multi_price msgid "product.multi.price" diff --git a/product_multi_price/models/product_multi_price.py b/product_multi_price/models/product_multi_price.py index c858a8748ff..40ab532b1ad 100644 --- a/product_multi_price/models/product_multi_price.py +++ b/product_multi_price/models/product_multi_price.py @@ -1,7 +1,6 @@ # Copyright 2020 Tecnativa - David Vidal # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -from odoo import _, api, fields, models, tools -from odoo.exceptions import ValidationError +from odoo import api, fields, models from odoo.addons import decimal_precision as dp @@ -11,6 +10,7 @@ class ProductMultiPrice(models.Model): name = fields.Many2one( comodel_name='product.multi.price.name', required=True, + translate=True, ) product_id = fields.Many2one( comodel_name='product.product', @@ -56,43 +56,3 @@ def _get_company(self): ('multi_price_name_uniq', 'unique(name, company_id)', 'Prices Names must be unique per company'), ] - - @api.model - @tools.ormcache() - def _get_field_names(self): - return set([x.name for x in self.search([])]) - - @api.model - def create(self, vals): - res = super().create(vals) - self.clear_caches() - return res - - def write(self, vals): - res = super().write(vals) - if 'name' in vals: - self.clear_caches() - return res - - def unlink(self): - res = super().unlink() - self.clear_caches() - return res - - @api.constrains('name') - def _check_name(self): - """The target is to use multi price as if they were virtual fields - so we want to constrain the naming to the same rules""" - product_fields = list(self.env['product.product']._fields) - product_fields += list(self.env['product.template']._fields) - for field in self: - try: - models.check_pg_name(field.name) - except ValidationError: - msg = _( - "Field names can only contain characters, " - "digits and underscores (up to 63).") - raise ValidationError(msg) - if field in set(product_fields): - raise ValidationError(_( - "The field name is used in the model, try another")) diff --git a/product_multi_price/models/product_pricelist.py b/product_multi_price/models/product_pricelist.py index 8d1cfb6963d..67b71dd869c 100644 --- a/product_multi_price/models/product_pricelist.py +++ b/product_multi_price/models/product_pricelist.py @@ -29,9 +29,9 @@ class ProductPricelistItem(models.Model): _inherit = 'product.pricelist.item' base = fields.Selection( - selection_add=[('multi_price', 'Multiple Price Field')], + selection_add=[('multi_price', 'Other Price')], ) multi_price_name = fields.Many2one( comodel_name='product.multi.price.name', - string="Multiple Price Field Name", + string="Other Price Name", ) diff --git a/product_multi_price/models/product_product.py b/product_multi_price/models/product_product.py index 03a042a0fb1..cfa5d41277d 100644 --- a/product_multi_price/models/product_product.py +++ b/product_multi_price/models/product_product.py @@ -1,7 +1,6 @@ # Copyright 2020 Tecnativa - David Vidal # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from odoo import models, fields, tools -from odoo.addons import decimal_precision as dp class ProductProduct(models.Model): @@ -10,11 +9,7 @@ class ProductProduct(models.Model): price_ids = fields.One2many( comodel_name='product.multi.price', inverse_name='product_id', - ) - multi_price = fields.Float( - digits=dp.get_precision('Product Price'), - compute='_compute_multi_price', - groups="base.group_user", + string="Other Prices", ) def _get_multiprice_pricelist_price(self, rule): @@ -51,18 +46,13 @@ def _get_multiprice_pricelist_price(self, rule): price = min(price, price_limit + price_max_margin) return price - def _compute_multi_price(self): - """Use multi_price field as the proxy for any of the registered - multi price fields on the product passing it by context""" - multi_price_field = self.env.context.get('multi_price_field', False) - if not multi_price_field: - self.update({'multi_price': 0}) - return - prices_list = self.env['product.multi.price'].search_read([ - ('name.name', '=', multi_price_field), - ('product_id', 'in', self.ids), - ('company_id', '=', self.env.user.company_id.id) - ], ['product_id', 'price'], limit=1) - prices_dict = {x['product_id'][0]: x['price'] for x in prices_list} - for product in self: - product.multi_price = prices_dict.get(product.id, 0.0) + def price_compute(self, price_type, uom=False, currency=False, + company=False): + """Return temporary prices when computation is done for multi price for + avoiding error on super method. We will later fill these with the + correct values. + """ + if price_type == 'multi_price': + return dict.fromkeys(self.ids, 1.0) + return super().price_compute( + price_type, uom=uom, currency=currency, company=company) diff --git a/product_multi_price/models/product_template.py b/product_multi_price/models/product_template.py index a7c6f670964..996fac1a4da 100644 --- a/product_multi_price/models/product_template.py +++ b/product_multi_price/models/product_template.py @@ -1,7 +1,6 @@ # Copyright 2020 Tecnativa - David Vidal # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from odoo import api, fields, models -from odoo.addons import decimal_precision as dp class ProductTemplate(models.Model): @@ -10,13 +9,8 @@ class ProductTemplate(models.Model): price_ids = fields.One2many( comodel_name='product.multi.price', compute='_compute_price_ids', - inverse='_set_price_ids', - ) - multi_price = fields.Float( - digits=dp.get_precision('Product Price'), - compute='_compute_multi_price', - groups="base.group_user", - readonly=True, + inverse='_inverse_price_ids', + string="Other Prices", ) @api.depends('product_variant_ids', @@ -26,7 +20,7 @@ def _compute_price_ids(self): if len(p.product_variant_ids) == 1: p.price_ids = p.product_variant_ids.price_ids - def _set_price_ids(self): + def _inverse_price_ids(self): for p in self: if len(p.product_variant_ids) == 1: p.product_variant_ids.price_ids = p.price_ids @@ -37,18 +31,6 @@ def _get_multiprice_pricelist_price(self, rule): self.product_variant_ids._get_multiprice_pricelist_price(rule)) return 0 - @api.depends('product_variant_ids', 'product_variant_ids.multi_price') - def _compute_multi_price(self): - """Use multi_price field as the frontend for any of the registered - multi price fields on the product passing it by context""" - multi_price_field = self.env.context.get('multi_price_field', False) - if not multi_price_field: - self.update({'multi_price': 0}) - return - for p in self: - if len(p.product_variant_ids) == 1: - p.multi_price = p.product_variant_ids.multi_price - @api.model def create(self, vals): product = super().create(vals) @@ -57,3 +39,14 @@ def create(self, vals): 'price_ids': vals.get('price_ids'), }) return product + + def price_compute(self, price_type, uom=False, currency=False, + company=False): + """Return temporary prices when computation is done for multi price for + avoiding error on super method. We will later fill these with the + correct values. + """ + if price_type == 'multi_price': + return dict.fromkeys(self.ids, 1.0) + return super().price_compute( + price_type, uom=uom, currency=currency, company=company) diff --git a/product_multi_price/readme/CONFIGURE.rst b/product_multi_price/readme/CONFIGURE.rst index 91472fd4369..79a9001b2f9 100644 --- a/product_multi_price/readme/CONFIGURE.rst +++ b/product_multi_price/readme/CONFIGURE.rst @@ -1,8 +1,7 @@ To configure multiple prices you need to set multi prices field names first. To do so, you need admin permissions. Then go to: -#. *Settings > General Settings > Technical > Database Structure > - Price Field Names* +#. *Settings > Technical > Database Structure > Price Field Names* #. Create the multi price fields you need. If you have multiple companies, you can assign independet field sets for each diff --git a/product_multi_price/readme/USAGE.rst b/product_multi_price/readme/USAGE.rst index 7c796fa82a8..409ae850807 100644 --- a/product_multi_price/readme/USAGE.rst +++ b/product_multi_price/readme/USAGE.rst @@ -1,14 +1,14 @@ To use this module, you need to: #. Go to the product page. -#. In the general tab, there's a list called *Prices*. -#. You can add one for every multiple price field name available. +#. In the general tab, there's a list called *Other Prices*. +#. You can add one for every price name available. To base pricelist rules on that fields, in the pricelist: #. Add a rule and choose *formula* as the computing method. -#. In the *Based on* dropdown list you can select *Multiple Prices*. -#. A new list appear: *Multiple Price Field Name*. Pick the one you need. +#. In the *Based on* dropdown list, select *Other Price*. +#. A new list appear: *Other Price Name*. Pick the one you need. #. Configure the formula. #. Now the rule is based on that price for the products that have it configured. Otherwise, it will return 0. diff --git a/product_multi_price/static/description/index.html b/product_multi_price/static/description/index.html index 0224d32fcc4..c5bc06401be 100644 --- a/product_multi_price/static/description/index.html +++ b/product_multi_price/static/description/index.html @@ -390,8 +390,7 @@

    Configuration

    To configure multiple prices you need to set multi prices field names first. To do so, you need admin permissions. Then go to:

      -
    1. Settings > General Settings > Technical > Database Structure > -Price Field Names
    2. +
    3. Settings > Technical > Database Structure > Price Field Names
    4. Create the multi price fields you need.

    If you have multiple companies, you can assign independet field sets for each @@ -402,14 +401,14 @@

    Usage

    To use this module, you need to:

    1. Go to the product page.
    2. -
    3. In the general tab, there’s a list called Prices.
    4. -
    5. You can add one for every multiple price field name available.
    6. +
    7. In the general tab, there’s a list called Other Prices.
    8. +
    9. You can add one for every price name available.

    To base pricelist rules on that fields, in the pricelist:

    1. Add a rule and choose formula as the computing method.
    2. -
    3. In the Based on dropdown list you can select Multiple Prices.
    4. -
    5. A new list appear: Multiple Price Field Name. Pick the one you need.
    6. +
    7. In the Based on dropdown list, select Other Price.
    8. +
    9. A new list appear: Other Price Name. Pick the one you need.
    10. Configure the formula.
    11. Now the rule is based on that price for the products that have it configured. Otherwise, it will return 0.
    12. diff --git a/product_multi_price/tests/test_product_multi_price.py b/product_multi_price/tests/test_product_multi_price.py index fafcb0600d6..0ad1c4411f6 100644 --- a/product_multi_price/tests/test_product_multi_price.py +++ b/product_multi_price/tests/test_product_multi_price.py @@ -78,36 +78,8 @@ def setUpClass(cls): ], }) - def test_product_multi_price(self): - """Multi Price for a product is computed based on the record name - passed by context""" - self.assertAlmostEqual(0, self.prod_1.multi_price) - price = self.prod_1.with_context( - multi_price_field='test_field_1').multi_price - self.assertAlmostEqual(price, 5.5) - price = self.prod_1.with_context( - multi_price_field='test_field_2').multi_price - self.assertAlmostEqual(price, 20.0) - # If the field doesn't exists or the product has no record for it - # a value of 0 will be returned. - price = self.prod_1.with_context( - multi_price_field='test_field_XXX').multi_price - self.assertAlmostEqual(price, 0) - # When a template has variants, no multiprice can be computed from it - price = self.prod_2.with_context( - multi_price_field='test_field_1').multi_price - self.assertAlmostEqual(price, 0.0) - # We should get it from the variants themselves - price = self.prod_prod_2_1.with_context( - multi_price_field='test_field_1').multi_price - self.assertAlmostEqual(price, 6.6) - price = self.prod_prod_2_2.with_context( - multi_price_field='test_field_1').multi_price - self.assertAlmostEqual(price, 8.8) - def test_product_multi_price_pricelist(self): """Pricelists based on multi prices for templates or variants""" - # import wdb; wdb.set_trace() price = self.prod_1.with_context( pricelist=self.pricelist.id).price self.assertAlmostEqual(price, 4.95) diff --git a/product_multi_price/views/multi_price_views.xml b/product_multi_price/views/multi_price_views.xml index cc6b9e50f78..ea4b6385a98 100644 --- a/product_multi_price/views/multi_price_views.xml +++ b/product_multi_price/views/multi_price_views.xml @@ -15,7 +15,7 @@ product.multi.price -
      + @@ -31,6 +31,7 @@ product.multi.price primary + diff --git a/product_multi_price/views/product_views.xml b/product_multi_price/views/product_views.xml index cc7e144f68d..8fce79c84dc 100644 --- a/product_multi_price/views/product_views.xml +++ b/product_multi_price/views/product_views.xml @@ -5,10 +5,12 @@ product.template - - - - + + @@ -17,11 +19,12 @@ product.product - - - - - + + + From 402d19ec81773835746d4449eadd2ead017381ac Mon Sep 17 00:00:00 2001 From: david Date: Fri, 17 Apr 2020 15:41:02 +0200 Subject: [PATCH 057/224] [FIX] product_multi_price: portal and public user error When a not internal user (portal/public) with a pricelist that contains multi price rules tries to see a page with a product affected for such rules, an exception raises due to lack of permissions over product.multi.price model. --- product_multi_price/__manifest__.py | 2 +- product_multi_price/models/product_product.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/product_multi_price/__manifest__.py b/product_multi_price/__manifest__.py index 4a981581f67..62620d5ee02 100644 --- a/product_multi_price/__manifest__.py +++ b/product_multi_price/__manifest__.py @@ -2,7 +2,7 @@ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). { "name": "Product Multi Price", - "version": "11.0.1.1.0", + "version": "11.0.1.1.1", 'author': 'Tecnativa,' 'Odoo Community Association (OCA)', 'website': 'https://github.com/OCA/product-attribute', diff --git a/product_multi_price/models/product_product.py b/product_multi_price/models/product_product.py index cfa5d41277d..6dff9b728fd 100644 --- a/product_multi_price/models/product_product.py +++ b/product_multi_price/models/product_product.py @@ -16,7 +16,7 @@ def _get_multiprice_pricelist_price(self, rule): """Method for getting the price from multi price.""" self.ensure_one() company = rule.company_id or self.env.user.company_id - price = self.env['product.multi.price'].search([ + price = self.env['product.multi.price'].sudo().search([ ('company_id', '=', company.id), ('name', '=', rule.multi_price_name.id), ('product_id', '=', self.id), From 5665c394a44d5ab4b4ac542b79914d2b73bd9f21 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Mon, 27 Apr 2020 11:06:42 +0200 Subject: [PATCH 058/224] [FIX] product_multi_price: Widget selection doesn't work inside tree view We mimick it putting regular widget with options no_open and no_create. --- product_multi_price/__manifest__.py | 3 ++- product_multi_price/views/multi_price_views.xml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/product_multi_price/__manifest__.py b/product_multi_price/__manifest__.py index 62620d5ee02..e8af2759d36 100644 --- a/product_multi_price/__manifest__.py +++ b/product_multi_price/__manifest__.py @@ -1,8 +1,9 @@ # Copyright 2020 Tecnativa - David Vidal +# Copyright 2020 Tecnativa - Pedro M. Baeza # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). { "name": "Product Multi Price", - "version": "11.0.1.1.1", + "version": "11.0.1.2.0", 'author': 'Tecnativa,' 'Odoo Community Association (OCA)', 'website': 'https://github.com/OCA/product-attribute', diff --git a/product_multi_price/views/multi_price_views.xml b/product_multi_price/views/multi_price_views.xml index ea4b6385a98..e49ba0dd642 100644 --- a/product_multi_price/views/multi_price_views.xml +++ b/product_multi_price/views/multi_price_views.xml @@ -5,7 +5,7 @@ - + From b58eae0bad30800ab68fde1e87794fd3eeb88fae Mon Sep 17 00:00:00 2001 From: david Date: Thu, 25 Jun 2020 15:54:54 +0200 Subject: [PATCH 059/224] [MIG] product_multi_price: Migration to 12.0 --- product_multi_price/README.rst | 10 +- product_multi_price/__manifest__.py | 2 +- product_multi_price/i18n/es.po | 136 +++++++++++++----- .../i18n/product_multi_price.pot | 116 ++++++++++----- .../models/product_multi_price.py | 2 + product_multi_price/models/product_product.py | 2 +- .../models/product_template.py | 9 +- .../static/description/index.html | 6 +- .../tests/test_product_multi_price.py | 17 ++- .../views/product_pricelist_views.xml | 2 +- 10 files changed, 209 insertions(+), 93 deletions(-) diff --git a/product_multi_price/README.rst b/product_multi_price/README.rst index 02f54886cba..fdf808c5355 100644 --- a/product_multi_price/README.rst +++ b/product_multi_price/README.rst @@ -14,13 +14,13 @@ Product Multi Price :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fproduct--attribute-lightgray.png?logo=github - :target: https://github.com/OCA/product-attribute/tree/11.0/product_multi_price + :target: https://github.com/OCA/product-attribute/tree/12.0/product_multi_price :alt: OCA/product-attribute .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/product-attribute-11-0/product-attribute-11-0-product_multi_price + :target: https://translation.odoo-community.org/projects/product-attribute-12-0/product-attribute-12-0-product_multi_price :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/135/11.0 + :target: https://runbot.odoo-community.org/runbot/135/12.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -76,7 +76,7 @@ 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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -109,6 +109,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -This module is part of the `OCA/product-attribute `_ project on GitHub. +This module is part of the `OCA/product-attribute `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/product_multi_price/__manifest__.py b/product_multi_price/__manifest__.py index e8af2759d36..d35ddf0157c 100644 --- a/product_multi_price/__manifest__.py +++ b/product_multi_price/__manifest__.py @@ -3,7 +3,7 @@ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). { "name": "Product Multi Price", - "version": "11.0.1.2.0", + "version": "12.0.1.0.0", 'author': 'Tecnativa,' 'Odoo Community Association (OCA)', 'website': 'https://github.com/OCA/product-attribute', diff --git a/product_multi_price/i18n/es.po b/product_multi_price/i18n/es.po index 7b5b57e8e8a..bf1c2557fc6 100644 --- a/product_multi_price/i18n/es.po +++ b/product_multi_price/i18n/es.po @@ -23,76 +23,126 @@ msgid "A field name cannot be assigned to a product twice for the same company" msgstr "No puede haber un nombre de campo repetido en la misma compañía" #. module: product_multi_price -#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_company_id -#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name_company_id +#: model:ir.model.fields,help:product_multi_price.field_product_pricelist_item__base +msgid "" +"Base price for computation.\n" +"Public Price: The base price will be the Sale/public Price.\n" +"Cost Price : The base price will be the cost price.\n" +"Other Pricelist : Computation of the base price based on another Pricelist." +msgstr "" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_pricelist_item__base +#, fuzzy +#| msgid "Created on" +msgid "Based on" +msgstr "Creado en" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__company_id +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name__company_id msgid "Company" msgstr "Compañía" #. module: product_multi_price -#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_create_uid -#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name_create_uid +#: selection:product.pricelist.item,base:0 +msgid "Cost" +msgstr "" + +#. module: product_multi_price +#: selection:product.pricelist.item,base:0 +msgid "Cost Price Tax Included" +msgstr "" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__create_uid +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name__create_uid msgid "Created by" msgstr "Creado por" #. module: product_multi_price -#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_create_date -#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name_create_date +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__create_date +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name__create_date msgid "Created on" msgstr "Creado en" #. module: product_multi_price -#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_display_name -#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name_display_name +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__display_name +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name__display_name msgid "Display Name" msgstr "Nombre mostrado" #. module: product_multi_price -#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_id -#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name_id +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__id +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name__id msgid "ID" msgstr "ID (identificación)" #. module: product_multi_price -#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price___last_update -#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name___last_update +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price____last_update +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name____last_update msgid "Last Modified on" msgstr "Última modificación en" #. module: product_multi_price -#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name_write_uid -#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_write_uid +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__write_uid +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name__write_uid msgid "Last Updated by" msgstr "Última actualización de" #. module: product_multi_price -#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name_write_date -#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_write_date +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__write_date +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name__write_date msgid "Last Updated on" msgstr "Última actualización en" #. module: product_multi_price -#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name +#: model:ir.model,name:product_multi_price.model_product_multi_price_name +msgid "Multi Price Record Options" +msgstr "" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__name msgid "Name" msgstr "Nombre" #. module: product_multi_price -#: model:ir.model.fields,field_description:product_multi_price.field_product_pricelist_item_multi_price_name +#: selection:product.pricelist.item,base:0 +#, fuzzy +#| msgid "Other Prices" +msgid "Other Price" +msgstr "Otros precios" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_pricelist_item__multi_price_name msgid "Other Price Name" msgstr "Nombre del otro precio" #. module: product_multi_price -#: model:ir.model.fields,field_description:product_multi_price.field_product_product_price_ids -#: model:ir.model.fields,field_description:product_multi_price.field_product_template_price_ids +#: selection:product.pricelist.item,base:0 +#, fuzzy +#| msgid "Other Prices" +msgid "Other Pricelist" +msgstr "Otros precios" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_product__price_ids +#: model:ir.model.fields,field_description:product_multi_price.field_product_template__price_ids msgid "Other Prices" msgstr "Otros precios" #. module: product_multi_price -#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_price +#: selection:product.pricelist.item,base:0 +msgid "Partner Prices on the product form" +msgstr "" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__price msgid "Price" msgstr "Precio" #. module: product_multi_price -#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name_name +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name__name msgid "Price Field Name" msgstr "Nombre de Campo de Precio" @@ -109,7 +159,9 @@ msgstr "Tarifa" #. module: product_multi_price #: model:ir.model,name:product_multi_price.model_product_pricelist_item -msgid "Pricelist item" +#, fuzzy +#| msgid "Pricelist item" +msgid "Pricelist Item" msgstr "Elemento de Tarifa" #. module: product_multi_price @@ -117,37 +169,49 @@ msgstr "Elemento de Tarifa" msgid "Prices Names must be unique per company" msgstr "Los Nombres de Precio deben ser únicos para cada compañía" +#. module: product_multi_price +#: selection:product.pricelist.item,base:0 +msgid "Prices based on supplier info" +msgstr "" + #. module: product_multi_price #: model:ir.model,name:product_multi_price.model_product_product -#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_product_id +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__product_id msgid "Product" msgstr "Producto" #. module: product_multi_price -#: model:ir.ui.view,arch_db:product_multi_price.product_multi_price_form_view -#: model:ir.ui.view,arch_db:product_multi_price.product_multi_price_tree_view +#: model_terms:ir.ui.view,arch_db:product_multi_price.product_multi_price_form_view +#: model_terms:ir.ui.view,arch_db:product_multi_price.product_multi_price_tree_view msgid "Product Multi Price" msgstr "Multi Precio de Producto" #. module: product_multi_price -#: model:ir.ui.view,arch_db:product_multi_price.product_multi_price_name_tree_view +#: model_terms:ir.ui.view,arch_db:product_multi_price.product_multi_price_name_tree_view msgid "Product Multi Price Field Name" msgstr "Nombre de Campo de Multi Precio de Producto" +#. module: product_multi_price +#: model:ir.model,name:product_multi_price.model_product_multi_price +#, fuzzy +#| msgid "Product Multi Price" +msgid "Product Multiple Prices" +msgstr "Multi Precio de Producto" + #. module: product_multi_price #: model:ir.model,name:product_multi_price.model_product_template msgid "Product Template" msgstr "Plantilla de producto" #. module: product_multi_price -#: model:ir.model,name:product_multi_price.model_product_multi_price -msgid "product.multi.price" -msgstr "product.multi.price" +#: selection:product.pricelist.item,base:0 +#, fuzzy +#| msgid "Multi Price" +msgid "Public Price" +msgstr "Multi Precio" -#. module: product_multi_price -#: model:ir.model,name:product_multi_price.model_product_multi_price_name -msgid "product.multi.price.name" -msgstr "product.multi.price.name" +#~ msgid "product.multi.price" +#~ msgstr "product.multi.price" -#~ msgid "Multi Price" -#~ msgstr "Multi Precio" +#~ msgid "product.multi.price.name" +#~ msgstr "product.multi.price.name" diff --git a/product_multi_price/i18n/product_multi_price.pot b/product_multi_price/i18n/product_multi_price.pot index bd0b44de3f3..c47ad504e61 100644 --- a/product_multi_price/i18n/product_multi_price.pot +++ b/product_multi_price/i18n/product_multi_price.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 11.0\n" +"Project-Id-Version: Odoo Server 12.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: <>\n" "Language-Team: \n" @@ -19,76 +19,119 @@ msgid "A field name cannot be assigned to a product twice for the same company" msgstr "" #. module: product_multi_price -#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_company_id -#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name_company_id +#: model:ir.model.fields,help:product_multi_price.field_product_pricelist_item__base +msgid "Base price for computation.\n" +"Public Price: The base price will be the Sale/public Price.\n" +"Cost Price : The base price will be the cost price.\n" +"Other Pricelist : Computation of the base price based on another Pricelist." +msgstr "" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_pricelist_item__base +msgid "Based on" +msgstr "" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__company_id +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name__company_id msgid "Company" msgstr "" #. module: product_multi_price -#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_create_uid -#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name_create_uid +#: selection:product.pricelist.item,base:0 +msgid "Cost" +msgstr "" + +#. module: product_multi_price +#: selection:product.pricelist.item,base:0 +msgid "Cost Price Tax Included" +msgstr "" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__create_uid +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name__create_uid msgid "Created by" msgstr "" #. module: product_multi_price -#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_create_date -#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name_create_date +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__create_date +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name__create_date msgid "Created on" msgstr "" #. module: product_multi_price -#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_display_name -#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name_display_name +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__display_name +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name__display_name msgid "Display Name" msgstr "" #. module: product_multi_price -#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_id -#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name_id +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__id +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name__id msgid "ID" msgstr "" #. module: product_multi_price -#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price___last_update -#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name___last_update +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price____last_update +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name____last_update msgid "Last Modified on" msgstr "" #. module: product_multi_price -#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name_write_uid -#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_write_uid +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__write_uid +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name__write_uid msgid "Last Updated by" msgstr "" #. module: product_multi_price -#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name_write_date -#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_write_date +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__write_date +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name__write_date msgid "Last Updated on" msgstr "" #. module: product_multi_price -#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name +#: model:ir.model,name:product_multi_price.model_product_multi_price_name +msgid "Multi Price Record Options" +msgstr "" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__name msgid "Name" msgstr "" #. module: product_multi_price -#: model:ir.model.fields,field_description:product_multi_price.field_product_pricelist_item_multi_price_name +#: selection:product.pricelist.item,base:0 +msgid "Other Price" +msgstr "" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_pricelist_item__multi_price_name msgid "Other Price Name" msgstr "" #. module: product_multi_price -#: model:ir.model.fields,field_description:product_multi_price.field_product_product_price_ids -#: model:ir.model.fields,field_description:product_multi_price.field_product_template_price_ids +#: selection:product.pricelist.item,base:0 +msgid "Other Pricelist" +msgstr "" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_product__price_ids +#: model:ir.model.fields,field_description:product_multi_price.field_product_template__price_ids msgid "Other Prices" msgstr "" #. module: product_multi_price -#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_price +#: selection:product.pricelist.item,base:0 +msgid "Partner Prices on the product form" +msgstr "" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__price msgid "Price" msgstr "" #. module: product_multi_price -#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name_name +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name__name msgid "Price Field Name" msgstr "" @@ -105,7 +148,7 @@ msgstr "" #. module: product_multi_price #: model:ir.model,name:product_multi_price.model_product_pricelist_item -msgid "Pricelist item" +msgid "Pricelist Item" msgstr "" #. module: product_multi_price @@ -113,35 +156,40 @@ msgstr "" msgid "Prices Names must be unique per company" msgstr "" +#. module: product_multi_price +#: selection:product.pricelist.item,base:0 +msgid "Prices based on supplier info" +msgstr "" + #. module: product_multi_price #: model:ir.model,name:product_multi_price.model_product_product -#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_product_id +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__product_id msgid "Product" msgstr "" #. module: product_multi_price -#: model:ir.ui.view,arch_db:product_multi_price.product_multi_price_form_view -#: model:ir.ui.view,arch_db:product_multi_price.product_multi_price_tree_view +#: model_terms:ir.ui.view,arch_db:product_multi_price.product_multi_price_form_view +#: model_terms:ir.ui.view,arch_db:product_multi_price.product_multi_price_tree_view msgid "Product Multi Price" msgstr "" #. module: product_multi_price -#: model:ir.ui.view,arch_db:product_multi_price.product_multi_price_name_tree_view +#: model_terms:ir.ui.view,arch_db:product_multi_price.product_multi_price_name_tree_view msgid "Product Multi Price Field Name" msgstr "" #. module: product_multi_price -#: model:ir.model,name:product_multi_price.model_product_template -msgid "Product Template" +#: model:ir.model,name:product_multi_price.model_product_multi_price +msgid "Product Multiple Prices" msgstr "" #. module: product_multi_price -#: model:ir.model,name:product_multi_price.model_product_multi_price -msgid "product.multi.price" +#: model:ir.model,name:product_multi_price.model_product_template +msgid "Product Template" msgstr "" #. module: product_multi_price -#: model:ir.model,name:product_multi_price.model_product_multi_price_name -msgid "product.multi.price.name" +#: selection:product.pricelist.item,base:0 +msgid "Public Price" msgstr "" diff --git a/product_multi_price/models/product_multi_price.py b/product_multi_price/models/product_multi_price.py index 40ab532b1ad..8be0abf2db9 100644 --- a/product_multi_price/models/product_multi_price.py +++ b/product_multi_price/models/product_multi_price.py @@ -6,6 +6,7 @@ class ProductMultiPrice(models.Model): _name = 'product.multi.price' + _description = "Product Multiple Prices" name = fields.Many2one( comodel_name='product.multi.price.name', @@ -36,6 +37,7 @@ class ProductMultiPrice(models.Model): class ProductMultiPriceName(models.Model): _name = 'product.multi.price.name' + _description = "Multi Price Record Options" @api.model def _get_company(self): diff --git a/product_multi_price/models/product_product.py b/product_multi_price/models/product_product.py index 6dff9b728fd..e937bdccc57 100644 --- a/product_multi_price/models/product_product.py +++ b/product_multi_price/models/product_product.py @@ -26,7 +26,7 @@ def _get_multiprice_pricelist_price(self, rule): # method are atomic and we can't hack inside. # Verbatim copy of part of product.pricelist._compute_price_rule. qty_uom_id = self._context.get('uom') or self.uom_id.id - price_uom = self.env['product.uom'].browse([qty_uom_id]) + price_uom = self.env['uom.uom'].browse([qty_uom_id]) convert_to_price_uom = ( lambda price: self.uom_id._compute_price( price, price_uom)) diff --git a/product_multi_price/models/product_template.py b/product_multi_price/models/product_template.py index 996fac1a4da..81be41bc417 100644 --- a/product_multi_price/models/product_template.py +++ b/product_multi_price/models/product_template.py @@ -33,12 +33,15 @@ def _get_multiprice_pricelist_price(self, rule): @api.model def create(self, vals): - product = super().create(vals) + """Overwrite creation for rewriting the prices (if set and having only + one variant), after the variant creation, that is performed in super. + """ + template = super().create(vals) if vals.get('price_ids'): - product.write({ + template.write({ 'price_ids': vals.get('price_ids'), }) - return product + return template def price_compute(self, price_type, uom=False, currency=False, company=False): diff --git a/product_multi_price/static/description/index.html b/product_multi_price/static/description/index.html index c5bc06401be..2a59ab2421d 100644 --- a/product_multi_price/static/description/index.html +++ b/product_multi_price/static/description/index.html @@ -367,7 +367,7 @@

      Product Multi Price

      !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

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

      +

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

      This module allows to set multiple prices to products and base pricelist rules on them.

      Table of contents

      @@ -427,7 +427,7 @@

      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.

      +feedback.

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

      @@ -455,7 +455,7 @@

      Maintainers

      OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

      -

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

      +

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

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

      diff --git a/product_multi_price/tests/test_product_multi_price.py b/product_multi_price/tests/test_product_multi_price.py index 0ad1c4411f6..bf8b90f0de7 100644 --- a/product_multi_price/tests/test_product_multi_price.py +++ b/product_multi_price/tests/test_product_multi_price.py @@ -12,7 +12,6 @@ def setUpClass(cls): cls.price_field_1 = cls.price_name_obj.create({'name': 'test_field_1'}) cls.price_field_2 = cls.price_name_obj.create({'name': 'test_field_2'}) prod_tmpl_obj = cls.env['product.template'] - product_obj = cls.env['product.product'] cls.prod_1 = prod_tmpl_obj.create({ 'name': 'Test Product Template', 'price_ids': [ @@ -35,11 +34,14 @@ def setUpClass(cls): 'name': 'Test Product 2 With Variants', 'attribute_line_ids': [(0, 0, { 'attribute_id': cls.prod_att_1.id, + 'value_ids': [(6, 0, [ + cls.prod_attr1_v1.id, cls.prod_attr1_v2.id + ])], })] }) - cls.prod_prod_2_1 = product_obj.create({ - 'product_tmpl_id': cls.prod_2.id, - 'attribute_value_ids': [(6, 0, [cls.prod_attr1_v1.id])], + cls.prod_prod_2_1 = cls.prod_2.product_variant_ids[0] + cls.prod_prod_2_2 = cls.prod_2.product_variant_ids[1] + cls.prod_prod_2_1.write({ 'price_ids': [ (0, 0, { 'name': cls.price_field_1.id, @@ -51,9 +53,7 @@ def setUpClass(cls): }), ], }) - cls.prod_prod_2_2 = product_obj.create({ - 'product_tmpl_id': cls.prod_2.id, - 'attribute_value_ids': [(6, 0, [cls.prod_attr1_v2.id])], + cls.prod_prod_2_2.write({ 'price_ids': [ (0, 0, { 'name': cls.price_field_1.id, @@ -74,8 +74,7 @@ def setUpClass(cls): 'multi_price_name': cls.price_field_1.id, 'price_discount': 10, 'applied_on': '3_global', - }), - ], + })], }) def test_product_multi_price_pricelist(self): diff --git a/product_multi_price/views/product_pricelist_views.xml b/product_multi_price/views/product_pricelist_views.xml index e262ae80f9b..419f96cf5ae 100644 --- a/product_multi_price/views/product_pricelist_views.xml +++ b/product_multi_price/views/product_pricelist_views.xml @@ -6,7 +6,7 @@ - + From 562c6a3ab2a85a35220124f16c7248a0bbdcf953 Mon Sep 17 00:00:00 2001 From: Ernesto Tejeda Date: Fri, 31 Jul 2020 12:13:46 -0400 Subject: [PATCH 060/224] [IMP] product_multi_price: add show multi-price access group. --- product_multi_price/README.rst | 6 ++- product_multi_price/__init__.py | 1 + product_multi_price/__manifest__.py | 3 +- product_multi_price/hooks.py | 13 +++++++ product_multi_price/i18n/es.po | 13 +++---- .../i18n/product_multi_price.pot | 5 +++ .../migrations/12.0.2.0.0/post-migration.py | 7 ++++ product_multi_price/readme/CONFIGURE.rst | 5 ++- product_multi_price/readme/CONTRIBUTORS.rst | 1 + .../security/multi_price_security.xml | 37 +++++++++++-------- .../static/description/index.html | 5 ++- product_multi_price/views/product_views.xml | 2 + 12 files changed, 70 insertions(+), 28 deletions(-) create mode 100644 product_multi_price/hooks.py create mode 100644 product_multi_price/migrations/12.0.2.0.0/post-migration.py diff --git a/product_multi_price/README.rst b/product_multi_price/README.rst index fdf808c5355..9d7443c3494 100644 --- a/product_multi_price/README.rst +++ b/product_multi_price/README.rst @@ -42,9 +42,12 @@ To do so, you need admin permissions. Then go to: #. *Settings > Technical > Database Structure > Price Field Names* #. Create the multi price fields you need. -If you have multiple companies, you can assign independet field sets for each +If you have multiple companies, you can assign independent field sets for each one. +Note: 'Show multi prices' access group must be checked to be able to +add multiple prices in the product form view. + Usage ===== @@ -95,6 +98,7 @@ Contributors * David Vidal * Pedro M. Baeza + * Ernesto Tejeda Maintainers ~~~~~~~~~~~ diff --git a/product_multi_price/__init__.py b/product_multi_price/__init__.py index 0650744f6bc..cc6b6354ad8 100644 --- a/product_multi_price/__init__.py +++ b/product_multi_price/__init__.py @@ -1 +1,2 @@ from . import models +from .hooks import post_init_hook diff --git a/product_multi_price/__manifest__.py b/product_multi_price/__manifest__.py index d35ddf0157c..a3f46cb6338 100644 --- a/product_multi_price/__manifest__.py +++ b/product_multi_price/__manifest__.py @@ -3,7 +3,7 @@ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). { "name": "Product Multi Price", - "version": "12.0.1.0.0", + "version": "12.0.2.0.0", 'author': 'Tecnativa,' 'Odoo Community Association (OCA)', 'website': 'https://github.com/OCA/product-attribute', @@ -22,5 +22,6 @@ 'demo': [ "demo/multi_price_demo_data.xml", ], + "post_init_hook": "post_init_hook", "installable": True, } diff --git a/product_multi_price/hooks.py b/product_multi_price/hooks.py new file mode 100644 index 00000000000..6c519a3d57f --- /dev/null +++ b/product_multi_price/hooks.py @@ -0,0 +1,13 @@ +# Copyright 2020 Tecnativa - Ernesto Tejeda +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import api, SUPERUSER_ID + + +def post_init_hook(cr, registry): + env = api.Environment(cr, SUPERUSER_ID, {}) + group_id = env.ref('product_multi_price.group_show_multi_prices').id + default_user = env.ref('base.default_user') + user = env['res.users'].with_context(active_test=False).search( + [("share", "=", False)]) + (user - default_user).write({'groups_id': [(4, group_id, None)]}) diff --git a/product_multi_price/i18n/es.po b/product_multi_price/i18n/es.po index bf1c2557fc6..e63c39f92dc 100644 --- a/product_multi_price/i18n/es.po +++ b/product_multi_price/i18n/es.po @@ -34,7 +34,6 @@ msgstr "" #. module: product_multi_price #: model:ir.model.fields,field_description:product_multi_price.field_product_pricelist_item__base #, fuzzy -#| msgid "Created on" msgid "Based on" msgstr "Creado en" @@ -109,7 +108,6 @@ msgstr "Nombre" #. module: product_multi_price #: selection:product.pricelist.item,base:0 #, fuzzy -#| msgid "Other Prices" msgid "Other Price" msgstr "Otros precios" @@ -121,7 +119,6 @@ msgstr "Nombre del otro precio" #. module: product_multi_price #: selection:product.pricelist.item,base:0 #, fuzzy -#| msgid "Other Prices" msgid "Other Pricelist" msgstr "Otros precios" @@ -160,7 +157,6 @@ msgstr "Tarifa" #. module: product_multi_price #: model:ir.model,name:product_multi_price.model_product_pricelist_item #, fuzzy -#| msgid "Pricelist item" msgid "Pricelist Item" msgstr "Elemento de Tarifa" @@ -194,7 +190,6 @@ msgstr "Nombre de Campo de Multi Precio de Producto" #. module: product_multi_price #: model:ir.model,name:product_multi_price.model_product_multi_price #, fuzzy -#| msgid "Product Multi Price" msgid "Product Multiple Prices" msgstr "Multi Precio de Producto" @@ -206,12 +201,14 @@ msgstr "Plantilla de producto" #. module: product_multi_price #: selection:product.pricelist.item,base:0 #, fuzzy -#| msgid "Multi Price" msgid "Public Price" msgstr "Multi Precio" -#~ msgid "product.multi.price" -#~ msgstr "product.multi.price" +#. module: product_multi_price +#: model:res.groups,name:product_multi_price.group_show_multi_prices +#, fuzzy +msgid "Show multi prices" +msgstr "product.multi.price" #~ msgid "product.multi.price.name" #~ msgstr "product.multi.price.name" diff --git a/product_multi_price/i18n/product_multi_price.pot b/product_multi_price/i18n/product_multi_price.pot index c47ad504e61..3fa5ca50859 100644 --- a/product_multi_price/i18n/product_multi_price.pot +++ b/product_multi_price/i18n/product_multi_price.pot @@ -193,3 +193,8 @@ msgstr "" msgid "Public Price" msgstr "" +#. module: product_multi_price +#: model:res.groups,name:product_multi_price.group_show_multi_prices +msgid "Show multi prices" +msgstr "" + diff --git a/product_multi_price/migrations/12.0.2.0.0/post-migration.py b/product_multi_price/migrations/12.0.2.0.0/post-migration.py new file mode 100644 index 00000000000..edf4a0f25ed --- /dev/null +++ b/product_multi_price/migrations/12.0.2.0.0/post-migration.py @@ -0,0 +1,7 @@ +# Copyright 2020 Tecnativa - Ernesto Tejeda +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl +from odoo.addons.product_multi_price.hooks import post_init_hook + + +def migrate(cr, version): + post_init_hook(cr, False) diff --git a/product_multi_price/readme/CONFIGURE.rst b/product_multi_price/readme/CONFIGURE.rst index 79a9001b2f9..b61299a3901 100644 --- a/product_multi_price/readme/CONFIGURE.rst +++ b/product_multi_price/readme/CONFIGURE.rst @@ -4,5 +4,8 @@ To do so, you need admin permissions. Then go to: #. *Settings > Technical > Database Structure > Price Field Names* #. Create the multi price fields you need. -If you have multiple companies, you can assign independet field sets for each +If you have multiple companies, you can assign independent field sets for each one. + +Note: 'Show multi prices' access group must be checked to be able to +add multiple prices in the product form view. diff --git a/product_multi_price/readme/CONTRIBUTORS.rst b/product_multi_price/readme/CONTRIBUTORS.rst index ac6cb650339..9eb6d6c6984 100644 --- a/product_multi_price/readme/CONTRIBUTORS.rst +++ b/product_multi_price/readme/CONTRIBUTORS.rst @@ -2,3 +2,4 @@ * David Vidal * Pedro M. Baeza + * Ernesto Tejeda diff --git a/product_multi_price/security/multi_price_security.xml b/product_multi_price/security/multi_price_security.xml index ba093f4594a..dd7c04826ce 100644 --- a/product_multi_price/security/multi_price_security.xml +++ b/product_multi_price/security/multi_price_security.xml @@ -1,18 +1,23 @@ - - - - Multiple Price multi-company - - - ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] - - - - Multiple Price Field Name multi-company - - - ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] - - + + + + Show multi prices + + + + + + Multiple Price multi-company + + + ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] + + + Multiple Price Field Name multi-company + + + ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] + + diff --git a/product_multi_price/static/description/index.html b/product_multi_price/static/description/index.html index 2a59ab2421d..c357803472d 100644 --- a/product_multi_price/static/description/index.html +++ b/product_multi_price/static/description/index.html @@ -393,8 +393,10 @@

      Configuration

    13. Settings > Technical > Database Structure > Price Field Names
    14. Create the multi price fields you need.
    -

    If you have multiple companies, you can assign independet field sets for each +

    If you have multiple companies, you can assign independent field sets for each one.

    +

    Note: ‘Show multi prices’ access group must be checked to be able to +add multiple prices in the product form view.

    Usage

    @@ -444,6 +446,7 @@

    Contributors

  • Tecnativa
    • David Vidal
    • Pedro M. Baeza
    • +
    • Ernesto Tejeda
  • diff --git a/product_multi_price/views/product_views.xml b/product_multi_price/views/product_views.xml index 8fce79c84dc..22c045731a6 100644 --- a/product_multi_price/views/product_views.xml +++ b/product_multi_price/views/product_views.xml @@ -4,6 +4,7 @@ product.template + product.product + Date: Tue, 22 Sep 2020 13:10:09 +0000 Subject: [PATCH 061/224] Added translation using Weblate (Italian) --- product_multi_price/i18n/it.po | 210 +++++++++++++++++++++++++++++++++ 1 file changed, 210 insertions(+) create mode 100644 product_multi_price/i18n/it.po diff --git a/product_multi_price/i18n/it.po b/product_multi_price/i18n/it.po new file mode 100644 index 00000000000..ee7e4f4c626 --- /dev/null +++ b/product_multi_price/i18n/it.po @@ -0,0 +1,210 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_multi_price +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2020-09-22 16:00+0000\n" +"Last-Translator: Lorenzo Battistini \n" +"Language-Team: none\n" +"Language: it\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 3.10\n" + +#. module: product_multi_price +#: sql_constraint:product.multi.price:0 +msgid "A field name cannot be assigned to a product twice for the same company" +msgstr "" +"Un nome di campo non può essere assegnato a un prodotto due volte per la " +"stessa azienda" + +#. module: product_multi_price +#: model:ir.model.fields,help:product_multi_price.field_product_pricelist_item__base +msgid "Base price for computation.\n" +"Public Price: The base price will be the Sale/public Price.\n" +"Cost Price : The base price will be the cost price.\n" +"Other Pricelist : Computation of the base price based on another Pricelist." +msgstr "" +"Prezzo di base per il calcolo.\n" +"Prezzo pubblico: il prezzo di base sarà il prezzo di vendita/prezzo pubblico." +"\n" +"Prezzo di costo : il prezzo di base sarà il prezzo di costo.\n" +"Altro listino prezzi : calcolo del prezzo di base sulla base di un altro " +"listino prezzi." + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_pricelist_item__base +msgid "Based on" +msgstr "Basato su" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__company_id +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name__company_id +msgid "Company" +msgstr "Azienda" + +#. module: product_multi_price +#: selection:product.pricelist.item,base:0 +msgid "Cost" +msgstr "Costo" + +#. module: product_multi_price +#: selection:product.pricelist.item,base:0 +msgid "Cost Price Tax Included" +msgstr "Prezzo di costo imposte incluse" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__create_uid +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name__create_uid +msgid "Created by" +msgstr "" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__create_date +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name__create_date +msgid "Created on" +msgstr "" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__display_name +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name__display_name +msgid "Display Name" +msgstr "Nome visualizzato" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__id +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name__id +msgid "ID" +msgstr "" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price____last_update +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name____last_update +msgid "Last Modified on" +msgstr "" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__write_uid +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name__write_uid +msgid "Last Updated by" +msgstr "" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__write_date +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name__write_date +msgid "Last Updated on" +msgstr "" + +#. module: product_multi_price +#: model:ir.model,name:product_multi_price.model_product_multi_price_name +msgid "Multi Price Record Options" +msgstr "" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__name +msgid "Name" +msgstr "Nome" + +#. module: product_multi_price +#: selection:product.pricelist.item,base:0 +msgid "Other Price" +msgstr "Altro prezzo" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_pricelist_item__multi_price_name +msgid "Other Price Name" +msgstr "Nome altro prezzo" + +#. module: product_multi_price +#: selection:product.pricelist.item,base:0 +msgid "Other Pricelist" +msgstr "Altro listino" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_product__price_ids +#: model:ir.model.fields,field_description:product_multi_price.field_product_template__price_ids +msgid "Other Prices" +msgstr "Altri prezzi" + +#. module: product_multi_price +#: selection:product.pricelist.item,base:0 +msgid "Partner Prices on the product form" +msgstr "" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__price +msgid "Price" +msgstr "Prezzo" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name__name +msgid "Price Field Name" +msgstr "Nome campo prezzo" + +#. module: product_multi_price +#: model:ir.actions.act_window,name:product_multi_price.action_multi_price_name_config +#: model:ir.ui.menu,name:product_multi_price.multi_price_name_menu +msgid "Price Field Names" +msgstr "Nomi campi prezzo" + +#. module: product_multi_price +#: model:ir.model,name:product_multi_price.model_product_pricelist +msgid "Pricelist" +msgstr "Listino" + +#. module: product_multi_price +#: model:ir.model,name:product_multi_price.model_product_pricelist_item +msgid "Pricelist Item" +msgstr "Articolo di listino" + +#. module: product_multi_price +#: sql_constraint:product.multi.price.name:0 +msgid "Prices Names must be unique per company" +msgstr "I nomi dei prezzi devono essere unici per azienda" + +#. module: product_multi_price +#: selection:product.pricelist.item,base:0 +msgid "Prices based on supplier info" +msgstr "Prezzi basati sulle informazioni del fornitore" + +#. module: product_multi_price +#: model:ir.model,name:product_multi_price.model_product_product +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__product_id +msgid "Product" +msgstr "Prodotto" + +#. module: product_multi_price +#: model_terms:ir.ui.view,arch_db:product_multi_price.product_multi_price_form_view +#: model_terms:ir.ui.view,arch_db:product_multi_price.product_multi_price_tree_view +msgid "Product Multi Price" +msgstr "Prezzi multipli prodotto" + +#. module: product_multi_price +#: model_terms:ir.ui.view,arch_db:product_multi_price.product_multi_price_name_tree_view +msgid "Product Multi Price Field Name" +msgstr "" + +#. module: product_multi_price +#: model:ir.model,name:product_multi_price.model_product_multi_price +msgid "Product Multiple Prices" +msgstr "Prezzi multipli prodotto" + +#. module: product_multi_price +#: model:ir.model,name:product_multi_price.model_product_template +msgid "Product Template" +msgstr "Modello prodotto" + +#. module: product_multi_price +#: selection:product.pricelist.item,base:0 +msgid "Public Price" +msgstr "Prezzo al pubblico" + +#. module: product_multi_price +#: model:res.groups,name:product_multi_price.group_show_multi_prices +msgid "Show multi prices" +msgstr "Mostrare prezzi multipli" From a873d23f91435c99726fab14c5dba7a46df65196 Mon Sep 17 00:00:00 2001 From: claudiagn Date: Tue, 13 Oct 2020 11:06:56 +0000 Subject: [PATCH 062/224] Translated using Weblate (Spanish) Currently translated at 100.0% (34 of 34 strings) Translation: product-attribute-12.0/product-attribute-12.0-product_multi_price Translate-URL: https://translation.odoo-community.org/projects/product-attribute-12-0/product-attribute-12-0-product_multi_price/es/ --- product_multi_price/i18n/es.po | 44 ++++++++++++++++------------------ 1 file changed, 21 insertions(+), 23 deletions(-) diff --git a/product_multi_price/i18n/es.po b/product_multi_price/i18n/es.po index e63c39f92dc..4a63311d19c 100644 --- a/product_multi_price/i18n/es.po +++ b/product_multi_price/i18n/es.po @@ -7,15 +7,15 @@ msgstr "" "Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-04-09 08:52+0000\n" -"PO-Revision-Date: 2020-04-09 10:54+0200\n" -"Last-Translator: <>\n" +"PO-Revision-Date: 2020-10-13 13:08+0000\n" +"Last-Translator: claudiagn \n" "Language-Team: \n" "Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: \n" -"X-Generator: Poedit 2.0.6\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 3.10\n" #. module: product_multi_price #: sql_constraint:product.multi.price:0 @@ -30,12 +30,16 @@ msgid "" "Cost Price : The base price will be the cost price.\n" "Other Pricelist : Computation of the base price based on another Pricelist." msgstr "" +"Precio base de cálculo.\n" +"Precio público: El precio base será el Precio de venta / público.\n" +"Precio de costo: el precio base será el precio de costo.\n" +"Otra lista de precios: cálculo del precio base basado en otra lista de " +"precios." #. module: product_multi_price #: model:ir.model.fields,field_description:product_multi_price.field_product_pricelist_item__base -#, fuzzy msgid "Based on" -msgstr "Creado en" +msgstr "Basado en" #. module: product_multi_price #: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__company_id @@ -46,12 +50,12 @@ msgstr "Compañía" #. module: product_multi_price #: selection:product.pricelist.item,base:0 msgid "Cost" -msgstr "" +msgstr "Coste" #. module: product_multi_price #: selection:product.pricelist.item,base:0 msgid "Cost Price Tax Included" -msgstr "" +msgstr "Precio de coste con impuesto incluido" #. module: product_multi_price #: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__create_uid @@ -75,7 +79,7 @@ msgstr "Nombre mostrado" #: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__id #: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name__id msgid "ID" -msgstr "ID (identificación)" +msgstr "ID" #. module: product_multi_price #: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price____last_update @@ -98,7 +102,7 @@ msgstr "Última actualización en" #. module: product_multi_price #: model:ir.model,name:product_multi_price.model_product_multi_price_name msgid "Multi Price Record Options" -msgstr "" +msgstr "Opciones de registro de precios múltiples" #. module: product_multi_price #: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__name @@ -107,9 +111,8 @@ msgstr "Nombre" #. module: product_multi_price #: selection:product.pricelist.item,base:0 -#, fuzzy msgid "Other Price" -msgstr "Otros precios" +msgstr "Otro precio" #. module: product_multi_price #: model:ir.model.fields,field_description:product_multi_price.field_product_pricelist_item__multi_price_name @@ -118,9 +121,8 @@ msgstr "Nombre del otro precio" #. module: product_multi_price #: selection:product.pricelist.item,base:0 -#, fuzzy msgid "Other Pricelist" -msgstr "Otros precios" +msgstr "Otra tarifa" #. module: product_multi_price #: model:ir.model.fields,field_description:product_multi_price.field_product_product__price_ids @@ -131,7 +133,7 @@ msgstr "Otros precios" #. module: product_multi_price #: selection:product.pricelist.item,base:0 msgid "Partner Prices on the product form" -msgstr "" +msgstr "Precios de socios en el formulario de producto" #. module: product_multi_price #: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__price @@ -156,7 +158,6 @@ msgstr "Tarifa" #. module: product_multi_price #: model:ir.model,name:product_multi_price.model_product_pricelist_item -#, fuzzy msgid "Pricelist Item" msgstr "Elemento de Tarifa" @@ -168,7 +169,7 @@ msgstr "Los Nombres de Precio deben ser únicos para cada compañía" #. module: product_multi_price #: selection:product.pricelist.item,base:0 msgid "Prices based on supplier info" -msgstr "" +msgstr "Precios basados en la información del proveedor" #. module: product_multi_price #: model:ir.model,name:product_multi_price.model_product_product @@ -189,9 +190,8 @@ msgstr "Nombre de Campo de Multi Precio de Producto" #. module: product_multi_price #: model:ir.model,name:product_multi_price.model_product_multi_price -#, fuzzy msgid "Product Multiple Prices" -msgstr "Multi Precio de Producto" +msgstr "Múltiples Precios de Producto" #. module: product_multi_price #: model:ir.model,name:product_multi_price.model_product_template @@ -200,15 +200,13 @@ msgstr "Plantilla de producto" #. module: product_multi_price #: selection:product.pricelist.item,base:0 -#, fuzzy msgid "Public Price" -msgstr "Multi Precio" +msgstr "Precio público" #. module: product_multi_price #: model:res.groups,name:product_multi_price.group_show_multi_prices -#, fuzzy msgid "Show multi prices" -msgstr "product.multi.price" +msgstr "Muestra precios múltiples" #~ msgid "product.multi.price.name" #~ msgstr "product.multi.price.name" From 885199d0da1dc3b1df998030c392d840a629d8bc Mon Sep 17 00:00:00 2001 From: Quentin Groulard Date: Fri, 16 Oct 2020 14:27:09 +0200 Subject: [PATCH 063/224] [IMP] product_multi_price: black, isort, prettier --- product_multi_price/__manifest__.py | 13 +- .../demo/multi_price_demo_data.xml | 5 +- product_multi_price/hooks.py | 13 +- .../models/product_multi_price.py | 49 +++--- .../models/product_pricelist.py | 28 ++-- product_multi_price/models/product_product.py | 51 +++--- .../models/product_template.py | 26 ++-- .../security/multi_price_security.xml | 20 ++- .../tests/test_product_multi_price.py | 147 +++++++++--------- .../views/multi_price_views.xml | 132 ++++++++-------- .../views/product_pricelist_views.xml | 13 +- product_multi_price/views/product_views.xml | 25 +-- 12 files changed, 267 insertions(+), 255 deletions(-) diff --git a/product_multi_price/__manifest__.py b/product_multi_price/__manifest__.py index a3f46cb6338..0f662e15b5e 100644 --- a/product_multi_price/__manifest__.py +++ b/product_multi_price/__manifest__.py @@ -4,14 +4,11 @@ { "name": "Product Multi Price", "version": "12.0.2.0.0", - 'author': 'Tecnativa,' - 'Odoo Community Association (OCA)', - 'website': 'https://github.com/OCA/product-attribute', + "author": "Tecnativa," "Odoo Community Association (OCA)", + "website": "https://github.com/OCA/product-attribute", "category": "Product Management", "license": "AGPL-3", - "depends": [ - "product", - ], + "depends": ["product"], "data": [ "security/ir.model.access.csv", "security/multi_price_security.xml", @@ -19,9 +16,7 @@ "views/product_pricelist_views.xml", "views/product_views.xml", ], - 'demo': [ - "demo/multi_price_demo_data.xml", - ], + "demo": ["demo/multi_price_demo_data.xml"], "post_init_hook": "post_init_hook", "installable": True, } diff --git a/product_multi_price/demo/multi_price_demo_data.xml b/product_multi_price/demo/multi_price_demo_data.xml index d2f2955c39f..9d9efab5fde 100644 --- a/product_multi_price/demo/multi_price_demo_data.xml +++ b/product_multi_price/demo/multi_price_demo_data.xml @@ -1,10 +1,7 @@ - - + - price_1 - diff --git a/product_multi_price/hooks.py b/product_multi_price/hooks.py index 6c519a3d57f..968eca26805 100644 --- a/product_multi_price/hooks.py +++ b/product_multi_price/hooks.py @@ -1,13 +1,14 @@ # Copyright 2020 Tecnativa - Ernesto Tejeda # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -from odoo import api, SUPERUSER_ID +from odoo import SUPERUSER_ID, api def post_init_hook(cr, registry): env = api.Environment(cr, SUPERUSER_ID, {}) - group_id = env.ref('product_multi_price.group_show_multi_prices').id - default_user = env.ref('base.default_user') - user = env['res.users'].with_context(active_test=False).search( - [("share", "=", False)]) - (user - default_user).write({'groups_id': [(4, group_id, None)]}) + group_id = env.ref("product_multi_price.group_show_multi_prices").id + default_user = env.ref("base.default_user") + user = ( + env["res.users"].with_context(active_test=False).search([("share", "=", False)]) + ) + (user - default_user).write({"groups_id": [(4, group_id, None)]}) diff --git a/product_multi_price/models/product_multi_price.py b/product_multi_price/models/product_multi_price.py index 8be0abf2db9..158dbde3ec6 100644 --- a/product_multi_price/models/product_multi_price.py +++ b/product_multi_price/models/product_multi_price.py @@ -1,60 +1,57 @@ # Copyright 2020 Tecnativa - David Vidal # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from odoo import api, fields, models + from odoo.addons import decimal_precision as dp class ProductMultiPrice(models.Model): - _name = 'product.multi.price' + _name = "product.multi.price" _description = "Product Multiple Prices" name = fields.Many2one( - comodel_name='product.multi.price.name', - required=True, - translate=True, + comodel_name="product.multi.price.name", required=True, translate=True, ) product_id = fields.Many2one( - comodel_name='product.product', - required=True, - ondelete='cascade', - ) - price = fields.Float( - digits=dp.get_precision('Product Price'), + comodel_name="product.product", required=True, ondelete="cascade", ) + price = fields.Float(digits=dp.get_precision("Product Price"),) company_id = fields.Many2one( - comodel_name='res.company', - related='name.company_id', + comodel_name="res.company", + related="name.company_id", store=True, readonly=True, ) _sql_constraints = [ - ('multi_price_uniq', 'unique(name, product_id, company_id)', - 'A field name cannot be assigned to a product twice for the same ' - 'company'), + ( + "multi_price_uniq", + "unique(name, product_id, company_id)", + "A field name cannot be assigned to a product twice for the same " + "company", + ), ] class ProductMultiPriceName(models.Model): - _name = 'product.multi.price.name' + _name = "product.multi.price.name" _description = "Multi Price Record Options" @api.model def _get_company(self): - return self._context.get('company_id', self.env.user.company_id.id) + return self._context.get("company_id", self.env.user.company_id.id) - name = fields.Char( - required=True, - string='Price Field Name', - ondelete='restrict' - ) + name = fields.Char(required=True, string="Price Field Name", ondelete="restrict") company_id = fields.Many2one( - comodel_name='res.company', + comodel_name="res.company", required=True, - default=lambda self: self._get_company() + default=lambda self: self._get_company(), ) _sql_constraints = [ - ('multi_price_name_uniq', 'unique(name, company_id)', - 'Prices Names must be unique per company'), + ( + "multi_price_name_uniq", + "unique(name, company_id)", + "Prices Names must be unique per company", + ), ] diff --git a/product_multi_price/models/product_pricelist.py b/product_multi_price/models/product_pricelist.py index 67b71dd869c..037eee8e527 100644 --- a/product_multi_price/models/product_pricelist.py +++ b/product_multi_price/models/product_pricelist.py @@ -4,34 +4,30 @@ class ProductPricelist(models.Model): - _inherit = 'product.pricelist' + _inherit = "product.pricelist" - def _compute_price_rule(self, products_qty_partner, date=False, - uom_id=False): + def _compute_price_rule(self, products_qty_partner, date=False, uom_id=False): """Recompute price after calling the atomic super method for getting proper prices when based on multi price. """ - rule_obj = self.env['product.pricelist.item'] - result = super()._compute_price_rule( - products_qty_partner, date, uom_id) + rule_obj = self.env["product.pricelist.item"] + result = super()._compute_price_rule(products_qty_partner, date, uom_id) # Make sure all rule records are fetched at once and put in cache - rule_obj.browse(x[1] for x in result.values()).mapped('price_discount') - for product, qty, _partner in products_qty_partner: + rule_obj.browse(x[1] for x in result.values()).mapped("price_discount") + for product, _qty, _partner in products_qty_partner: rule = rule_obj.browse(result[product.id][1]) - if rule.compute_price == 'formula' and rule.base == 'multi_price': + if rule.compute_price == "formula" and rule.base == "multi_price": result[product.id] = ( product._get_multiprice_pricelist_price(rule), - rule.id) + rule.id, + ) return result class ProductPricelistItem(models.Model): - _inherit = 'product.pricelist.item' + _inherit = "product.pricelist.item" - base = fields.Selection( - selection_add=[('multi_price', 'Other Price')], - ) + base = fields.Selection(selection_add=[("multi_price", "Other Price")],) multi_price_name = fields.Many2one( - comodel_name='product.multi.price.name', - string="Other Price Name", + comodel_name="product.multi.price.name", string="Other Price Name", ) diff --git a/product_multi_price/models/product_product.py b/product_multi_price/models/product_product.py index e937bdccc57..e72f936105b 100644 --- a/product_multi_price/models/product_product.py +++ b/product_multi_price/models/product_product.py @@ -1,58 +1,65 @@ # Copyright 2020 Tecnativa - David Vidal # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -from odoo import models, fields, tools +from odoo import fields, models, tools class ProductProduct(models.Model): _inherit = "product.product" price_ids = fields.One2many( - comodel_name='product.multi.price', - inverse_name='product_id', + comodel_name="product.multi.price", + inverse_name="product_id", string="Other Prices", ) + def _convert_to_price_uom(self, price): + qty_uom_id = self._context.get("uom") or self.uom_id.id + price_uom = self.env["uom.uom"].browse([qty_uom_id]) + return self.uom_id._compute_price(price, price_uom) + def _get_multiprice_pricelist_price(self, rule): """Method for getting the price from multi price.""" self.ensure_one() company = rule.company_id or self.env.user.company_id - price = self.env['product.multi.price'].sudo().search([ - ('company_id', '=', company.id), - ('name', '=', rule.multi_price_name.id), - ('product_id', '=', self.id), - ]).price or 0 + price = ( + self.env["product.multi.price"] + .sudo() + .search( + [ + ("company_id", "=", company.id), + ("name", "=", rule.multi_price_name.id), + ("product_id", "=", self.id), + ] + ) + .price + or 0 + ) if price: # We have to replicate this logic in this method as pricelist # method are atomic and we can't hack inside. # Verbatim copy of part of product.pricelist._compute_price_rule. - qty_uom_id = self._context.get('uom') or self.uom_id.id - price_uom = self.env['uom.uom'].browse([qty_uom_id]) - convert_to_price_uom = ( - lambda price: self.uom_id._compute_price( - price, price_uom)) price_limit = price price = (price - (price * (rule.price_discount / 100))) or 0.0 if rule.price_round: - price = tools.float_round( - price, precision_rounding=rule.price_round) + price = tools.float_round(price, precision_rounding=rule.price_round) if rule.price_surcharge: - price_surcharge = convert_to_price_uom(rule.price_surcharge) + price_surcharge = self._convert_to_price_uom(rule.price_surcharge) price += price_surcharge if rule.price_min_margin: - price_min_margin = convert_to_price_uom(rule.price_min_margin) + price_min_margin = self._convert_to_price_uom(rule.price_min_margin) price = max(price, price_limit + price_min_margin) if rule.price_max_margin: - price_max_margin = convert_to_price_uom(rule.price_max_margin) + price_max_margin = self._convert_to_price_uom(rule.price_max_margin) price = min(price, price_limit + price_max_margin) return price - def price_compute(self, price_type, uom=False, currency=False, - company=False): + def price_compute(self, price_type, uom=False, currency=False, company=False): """Return temporary prices when computation is done for multi price for avoiding error on super method. We will later fill these with the correct values. """ - if price_type == 'multi_price': + if price_type == "multi_price": return dict.fromkeys(self.ids, 1.0) return super().price_compute( - price_type, uom=uom, currency=currency, company=company) + price_type, uom=uom, currency=currency, company=company + ) diff --git a/product_multi_price/models/product_template.py b/product_multi_price/models/product_template.py index 81be41bc417..f12afc012fd 100644 --- a/product_multi_price/models/product_template.py +++ b/product_multi_price/models/product_template.py @@ -7,14 +7,13 @@ class ProductTemplate(models.Model): _inherit = "product.template" price_ids = fields.One2many( - comodel_name='product.multi.price', - compute='_compute_price_ids', - inverse='_inverse_price_ids', + comodel_name="product.multi.price", + compute="_compute_price_ids", + inverse="_inverse_price_ids", string="Other Prices", ) - @api.depends('product_variant_ids', - 'product_variant_ids.price_ids') + @api.depends("product_variant_ids", "product_variant_ids.price_ids") def _compute_price_ids(self): for p in self: if len(p.product_variant_ids) == 1: @@ -27,8 +26,7 @@ def _inverse_price_ids(self): def _get_multiprice_pricelist_price(self, rule): if len(self.product_variant_ids) == 1: - return ( - self.product_variant_ids._get_multiprice_pricelist_price(rule)) + return self.product_variant_ids._get_multiprice_pricelist_price(rule) return 0 @api.model @@ -37,19 +35,17 @@ def create(self, vals): one variant), after the variant creation, that is performed in super. """ template = super().create(vals) - if vals.get('price_ids'): - template.write({ - 'price_ids': vals.get('price_ids'), - }) + if vals.get("price_ids"): + template.write({"price_ids": vals.get("price_ids")}) return template - def price_compute(self, price_type, uom=False, currency=False, - company=False): + def price_compute(self, price_type, uom=False, currency=False, company=False): """Return temporary prices when computation is done for multi price for avoiding error on super method. We will later fill these with the correct values. """ - if price_type == 'multi_price': + if price_type == "multi_price": return dict.fromkeys(self.ids, 1.0) return super().price_compute( - price_type, uom=uom, currency=currency, company=company) + price_type, uom=uom, currency=currency, company=company + ) diff --git a/product_multi_price/security/multi_price_security.xml b/product_multi_price/security/multi_price_security.xml index dd7c04826ce..b7c6760211b 100644 --- a/product_multi_price/security/multi_price_security.xml +++ b/product_multi_price/security/multi_price_security.xml @@ -1,23 +1,27 @@ - + Show multi prices - + Multiple Price multi-company - - - ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] + + + ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] Multiple Price Field Name multi-company - - - ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] + + + ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] diff --git a/product_multi_price/tests/test_product_multi_price.py b/product_multi_price/tests/test_product_multi_price.py index bf8b90f0de7..2922a463e4b 100644 --- a/product_multi_price/tests/test_product_multi_price.py +++ b/product_multi_price/tests/test_product_multi_price.py @@ -4,87 +4,88 @@ class TestProductMultiPrice(SavepointCase): - @classmethod def setUpClass(cls): super().setUpClass() - cls.price_name_obj = cls.env['product.multi.price.name'] - cls.price_field_1 = cls.price_name_obj.create({'name': 'test_field_1'}) - cls.price_field_2 = cls.price_name_obj.create({'name': 'test_field_2'}) - prod_tmpl_obj = cls.env['product.template'] - cls.prod_1 = prod_tmpl_obj.create({ - 'name': 'Test Product Template', - 'price_ids': [ - (0, 0, { - 'name': cls.price_field_1.id, - 'price': 5.5, - }), - (0, 0, { - 'name': cls.price_field_2.id, - 'price': 20.0, - }), - ], - }) - cls.prod_att_1 = cls.env['product.attribute'].create({'name': 'Color'}) - cls.prod_attr1_v1 = cls.env['product.attribute.value'].create({ - 'name': 'red', 'attribute_id': cls.prod_att_1.id}) - cls.prod_attr1_v2 = cls.env['product.attribute.value'].create({ - 'name': 'blue', 'attribute_id': cls.prod_att_1.id}) - cls.prod_2 = prod_tmpl_obj.create({ - 'name': 'Test Product 2 With Variants', - 'attribute_line_ids': [(0, 0, { - 'attribute_id': cls.prod_att_1.id, - 'value_ids': [(6, 0, [ - cls.prod_attr1_v1.id, cls.prod_attr1_v2.id - ])], - })] - }) + cls.price_name_obj = cls.env["product.multi.price.name"] + cls.price_field_1 = cls.price_name_obj.create({"name": "test_field_1"}) + cls.price_field_2 = cls.price_name_obj.create({"name": "test_field_2"}) + prod_tmpl_obj = cls.env["product.template"] + cls.prod_1 = prod_tmpl_obj.create( + { + "name": "Test Product Template", + "price_ids": [ + (0, 0, {"name": cls.price_field_1.id, "price": 5.5}), + (0, 0, {"name": cls.price_field_2.id, "price": 20.0}), + ], + } + ) + cls.prod_att_1 = cls.env["product.attribute"].create({"name": "Color"}) + cls.prod_attr1_v1 = cls.env["product.attribute.value"].create( + {"name": "red", "attribute_id": cls.prod_att_1.id} + ) + cls.prod_attr1_v2 = cls.env["product.attribute.value"].create( + {"name": "blue", "attribute_id": cls.prod_att_1.id} + ) + cls.prod_2 = prod_tmpl_obj.create( + { + "name": "Test Product 2 With Variants", + "attribute_line_ids": [ + ( + 0, + 0, + { + "attribute_id": cls.prod_att_1.id, + "value_ids": [ + (6, 0, [cls.prod_attr1_v1.id, cls.prod_attr1_v2.id]) + ], + }, + ) + ], + } + ) cls.prod_prod_2_1 = cls.prod_2.product_variant_ids[0] cls.prod_prod_2_2 = cls.prod_2.product_variant_ids[1] - cls.prod_prod_2_1.write({ - 'price_ids': [ - (0, 0, { - 'name': cls.price_field_1.id, - 'price': 6.6, - }), - (0, 0, { - 'name': cls.price_field_2.id, - 'price': 7.7, - }), - ], - }) - cls.prod_prod_2_2.write({ - 'price_ids': [ - (0, 0, { - 'name': cls.price_field_1.id, - 'price': 8.8, - }), - (0, 0, { - 'name': cls.price_field_2.id, - 'price': 9.9, - }), - ], - }) - cls.pricelist = cls.env['product.pricelist'].create({ - 'name': 'Test pricelist', - 'item_ids': [ - (0, 0, { - 'compute_price': 'formula', - 'base': 'multi_price', - 'multi_price_name': cls.price_field_1.id, - 'price_discount': 10, - 'applied_on': '3_global', - })], - }) + cls.prod_prod_2_1.write( + { + "price_ids": [ + (0, 0, {"name": cls.price_field_1.id, "price": 6.6}), + (0, 0, {"name": cls.price_field_2.id, "price": 7.7}), + ], + } + ) + cls.prod_prod_2_2.write( + { + "price_ids": [ + (0, 0, {"name": cls.price_field_1.id, "price": 8.8}), + (0, 0, {"name": cls.price_field_2.id, "price": 9.9}), + ], + } + ) + cls.pricelist = cls.env["product.pricelist"].create( + { + "name": "Test pricelist", + "item_ids": [ + ( + 0, + 0, + { + "compute_price": "formula", + "base": "multi_price", + "multi_price_name": cls.price_field_1.id, + "price_discount": 10, + "applied_on": "3_global", + }, + ) + ], + } + ) def test_product_multi_price_pricelist(self): """Pricelists based on multi prices for templates or variants""" - price = self.prod_1.with_context( - pricelist=self.pricelist.id).price + price = self.prod_1.with_context(pricelist=self.pricelist.id).price self.assertAlmostEqual(price, 4.95) - price = self.prod_prod_2_1.with_context( - pricelist=self.pricelist.id).price + price = self.prod_prod_2_1.with_context(pricelist=self.pricelist.id).price self.assertAlmostEqual(price, 5.94) - price = self.prod_prod_2_2.with_context( - pricelist=self.pricelist.id).price + price = self.prod_prod_2_2.with_context(pricelist=self.pricelist.id).price self.assertAlmostEqual(price, 7.92) diff --git a/product_multi_price/views/multi_price_views.xml b/product_multi_price/views/multi_price_views.xml index e49ba0dd642..0a41ee3527d 100644 --- a/product_multi_price/views/multi_price_views.xml +++ b/product_multi_price/views/multi_price_views.xml @@ -1,63 +1,73 @@ - + - - product.multi.price - - - - - - - - - - - - product.multi.price - - - - - - - - - - - - - - - - product.multi.price - primary - - - - - - bottom - - - - - - product.multi.price.name - - - - - - - - - - Price Field Names - product.multi.price.name - form - {} - - - - + + product.multi.price + + + + + + + + + + + product.multi.price + +
    + + + + + + + + +
    +
    +
    + + product.multi.price + primary + + + + + + bottom + + + + + product.multi.price.name + + + + + + + + + Price Field Names + product.multi.price.name + form + {} + + +
    diff --git a/product_multi_price/views/product_pricelist_views.xml b/product_multi_price/views/product_pricelist_views.xml index 419f96cf5ae..ce85925d61b 100644 --- a/product_multi_price/views/product_pricelist_views.xml +++ b/product_multi_price/views/product_pricelist_views.xml @@ -1,14 +1,17 @@ - + - product.pricelist.item - + - + - diff --git a/product_multi_price/views/product_views.xml b/product_multi_price/views/product_views.xml index 22c045731a6..88a393472a9 100644 --- a/product_multi_price/views/product_views.xml +++ b/product_multi_price/views/product_views.xml @@ -1,13 +1,16 @@ - + - product.template - - + + - - product.product - - + + - - From 19cbf88ee9205e227ffd44714ef74f648c851613 Mon Sep 17 00:00:00 2001 From: Quentin Groulard Date: Fri, 16 Oct 2020 14:30:17 +0200 Subject: [PATCH 064/224] [MIG] product_multi_price: Migration to 13.0 --- product_multi_price/README.rst | 10 +-- product_multi_price/__manifest__.py | 2 +- product_multi_price/i18n/es.po | 62 +++++++---------- product_multi_price/i18n/it.po | 68 ++++++++----------- .../i18n/product_multi_price.pot | 53 ++++----------- .../migrations/12.0.2.0.0/post-migration.py | 7 -- .../13.0.1.0.0/noupdate_changes.xml | 13 ++++ .../migrations/13.0.1.0.0/post-migration.py | 11 +++ .../models/product_multi_price.py | 6 +- .../models/product_template.py | 2 + .../security/multi_price_security.xml | 4 +- .../static/description/index.html | 6 +- .../views/multi_price_views.xml | 1 - 13 files changed, 105 insertions(+), 140 deletions(-) delete mode 100644 product_multi_price/migrations/12.0.2.0.0/post-migration.py create mode 100644 product_multi_price/migrations/13.0.1.0.0/noupdate_changes.xml create mode 100644 product_multi_price/migrations/13.0.1.0.0/post-migration.py diff --git a/product_multi_price/README.rst b/product_multi_price/README.rst index 9d7443c3494..bdbeaa727f8 100644 --- a/product_multi_price/README.rst +++ b/product_multi_price/README.rst @@ -14,13 +14,13 @@ Product Multi Price :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fproduct--attribute-lightgray.png?logo=github - :target: https://github.com/OCA/product-attribute/tree/12.0/product_multi_price + :target: https://github.com/OCA/product-attribute/tree/13.0/product_multi_price :alt: OCA/product-attribute .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/product-attribute-12-0/product-attribute-12-0-product_multi_price + :target: https://translation.odoo-community.org/projects/product-attribute-13-0/product-attribute-13-0-product_multi_price :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/135/12.0 + :target: https://runbot.odoo-community.org/runbot/135/13.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -79,7 +79,7 @@ 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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -113,6 +113,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -This module is part of the `OCA/product-attribute `_ project on GitHub. +This module is part of the `OCA/product-attribute `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/product_multi_price/__manifest__.py b/product_multi_price/__manifest__.py index 0f662e15b5e..7a9bce320d4 100644 --- a/product_multi_price/__manifest__.py +++ b/product_multi_price/__manifest__.py @@ -3,7 +3,7 @@ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). { "name": "Product Multi Price", - "version": "12.0.2.0.0", + "version": "13.0.1.0.0", "author": "Tecnativa," "Odoo Community Association (OCA)", "website": "https://github.com/OCA/product-attribute", "category": "Product Management", diff --git a/product_multi_price/i18n/es.po b/product_multi_price/i18n/es.po index 4a63311d19c..a851307e56f 100644 --- a/product_multi_price/i18n/es.po +++ b/product_multi_price/i18n/es.po @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 11.0\n" +"Project-Id-Version: Odoo Server 13.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-04-09 08:52+0000\n" "PO-Revision-Date: 2020-10-13 13:08+0000\n" @@ -18,15 +18,16 @@ msgstr "" "X-Generator: Weblate 3.10\n" #. module: product_multi_price -#: sql_constraint:product.multi.price:0 +#: model:ir.model.constraint,message:product_multi_price.constraint_product_multi_price_multi_price_uniq msgid "A field name cannot be assigned to a product twice for the same company" msgstr "No puede haber un nombre de campo repetido en la misma compañía" #. module: product_multi_price #: model:ir.model.fields,help:product_multi_price.field_product_pricelist_item__base +#, fuzzy msgid "" "Base price for computation.\n" -"Public Price: The base price will be the Sale/public Price.\n" +"Sales Price: The base price will be the Sales Price.\n" "Cost Price : The base price will be the cost price.\n" "Other Pricelist : Computation of the base price based on another Pricelist." msgstr "" @@ -47,16 +48,6 @@ msgstr "Basado en" msgid "Company" msgstr "Compañía" -#. module: product_multi_price -#: selection:product.pricelist.item,base:0 -msgid "Cost" -msgstr "Coste" - -#. module: product_multi_price -#: selection:product.pricelist.item,base:0 -msgid "Cost Price Tax Included" -msgstr "Precio de coste con impuesto incluido" - #. module: product_multi_price #: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__create_uid #: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name__create_uid @@ -110,7 +101,7 @@ msgid "Name" msgstr "Nombre" #. module: product_multi_price -#: selection:product.pricelist.item,base:0 +#: model:ir.model.fields.selection,name:product_multi_price.selection__product_pricelist_item__base__multi_price msgid "Other Price" msgstr "Otro precio" @@ -119,22 +110,12 @@ msgstr "Otro precio" msgid "Other Price Name" msgstr "Nombre del otro precio" -#. module: product_multi_price -#: selection:product.pricelist.item,base:0 -msgid "Other Pricelist" -msgstr "Otra tarifa" - #. module: product_multi_price #: model:ir.model.fields,field_description:product_multi_price.field_product_product__price_ids #: model:ir.model.fields,field_description:product_multi_price.field_product_template__price_ids msgid "Other Prices" msgstr "Otros precios" -#. module: product_multi_price -#: selection:product.pricelist.item,base:0 -msgid "Partner Prices on the product form" -msgstr "Precios de socios en el formulario de producto" - #. module: product_multi_price #: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__price msgid "Price" @@ -158,19 +139,15 @@ msgstr "Tarifa" #. module: product_multi_price #: model:ir.model,name:product_multi_price.model_product_pricelist_item -msgid "Pricelist Item" +#, fuzzy +msgid "Pricelist Rule" msgstr "Elemento de Tarifa" #. module: product_multi_price -#: sql_constraint:product.multi.price.name:0 +#: model:ir.model.constraint,message:product_multi_price.constraint_product_multi_price_name_multi_price_name_uniq msgid "Prices Names must be unique per company" msgstr "Los Nombres de Precio deben ser únicos para cada compañía" -#. module: product_multi_price -#: selection:product.pricelist.item,base:0 -msgid "Prices based on supplier info" -msgstr "Precios basados en la información del proveedor" - #. module: product_multi_price #: model:ir.model,name:product_multi_price.model_product_product #: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__product_id @@ -198,15 +175,28 @@ msgstr "Múltiples Precios de Producto" msgid "Product Template" msgstr "Plantilla de producto" -#. module: product_multi_price -#: selection:product.pricelist.item,base:0 -msgid "Public Price" -msgstr "Precio público" - #. module: product_multi_price #: model:res.groups,name:product_multi_price.group_show_multi_prices msgid "Show multi prices" msgstr "Muestra precios múltiples" +#~ msgid "Cost" +#~ msgstr "Coste" + +#~ msgid "Cost Price Tax Included" +#~ msgstr "Precio de coste con impuesto incluido" + +#~ msgid "Other Pricelist" +#~ msgstr "Otra tarifa" + +#~ msgid "Partner Prices on the product form" +#~ msgstr "Precios de socios en el formulario de producto" + +#~ msgid "Prices based on supplier info" +#~ msgstr "Precios basados en la información del proveedor" + +#~ msgid "Public Price" +#~ msgstr "Precio público" + #~ msgid "product.multi.price.name" #~ msgstr "product.multi.price.name" diff --git a/product_multi_price/i18n/it.po b/product_multi_price/i18n/it.po index ee7e4f4c626..f9fad1e8609 100644 --- a/product_multi_price/i18n/it.po +++ b/product_multi_price/i18n/it.po @@ -1,10 +1,10 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * product_multi_price +# * product_multi_price # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 12.0\n" +"Project-Id-Version: Odoo Server 13.0\n" "Report-Msgid-Bugs-To: \n" "PO-Revision-Date: 2020-09-22 16:00+0000\n" "Last-Translator: Lorenzo Battistini \n" @@ -17,7 +17,7 @@ msgstr "" "X-Generator: Weblate 3.10\n" #. module: product_multi_price -#: sql_constraint:product.multi.price:0 +#: model:ir.model.constraint,message:product_multi_price.constraint_product_multi_price_multi_price_uniq msgid "A field name cannot be assigned to a product twice for the same company" msgstr "" "Un nome di campo non può essere assegnato a un prodotto due volte per la " @@ -25,14 +25,16 @@ msgstr "" #. module: product_multi_price #: model:ir.model.fields,help:product_multi_price.field_product_pricelist_item__base -msgid "Base price for computation.\n" -"Public Price: The base price will be the Sale/public Price.\n" +#, fuzzy +msgid "" +"Base price for computation.\n" +"Sales Price: The base price will be the Sales Price.\n" "Cost Price : The base price will be the cost price.\n" "Other Pricelist : Computation of the base price based on another Pricelist." msgstr "" "Prezzo di base per il calcolo.\n" -"Prezzo pubblico: il prezzo di base sarà il prezzo di vendita/prezzo pubblico." -"\n" +"Prezzo pubblico: il prezzo di base sarà il prezzo di vendita/prezzo " +"pubblico.\n" "Prezzo di costo : il prezzo di base sarà il prezzo di costo.\n" "Altro listino prezzi : calcolo del prezzo di base sulla base di un altro " "listino prezzi." @@ -48,16 +50,6 @@ msgstr "Basato su" msgid "Company" msgstr "Azienda" -#. module: product_multi_price -#: selection:product.pricelist.item,base:0 -msgid "Cost" -msgstr "Costo" - -#. module: product_multi_price -#: selection:product.pricelist.item,base:0 -msgid "Cost Price Tax Included" -msgstr "Prezzo di costo imposte incluse" - #. module: product_multi_price #: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__create_uid #: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name__create_uid @@ -111,7 +103,7 @@ msgid "Name" msgstr "Nome" #. module: product_multi_price -#: selection:product.pricelist.item,base:0 +#: model:ir.model.fields.selection,name:product_multi_price.selection__product_pricelist_item__base__multi_price msgid "Other Price" msgstr "Altro prezzo" @@ -120,22 +112,12 @@ msgstr "Altro prezzo" msgid "Other Price Name" msgstr "Nome altro prezzo" -#. module: product_multi_price -#: selection:product.pricelist.item,base:0 -msgid "Other Pricelist" -msgstr "Altro listino" - #. module: product_multi_price #: model:ir.model.fields,field_description:product_multi_price.field_product_product__price_ids #: model:ir.model.fields,field_description:product_multi_price.field_product_template__price_ids msgid "Other Prices" msgstr "Altri prezzi" -#. module: product_multi_price -#: selection:product.pricelist.item,base:0 -msgid "Partner Prices on the product form" -msgstr "" - #. module: product_multi_price #: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__price msgid "Price" @@ -159,19 +141,15 @@ msgstr "Listino" #. module: product_multi_price #: model:ir.model,name:product_multi_price.model_product_pricelist_item -msgid "Pricelist Item" +#, fuzzy +msgid "Pricelist Rule" msgstr "Articolo di listino" #. module: product_multi_price -#: sql_constraint:product.multi.price.name:0 +#: model:ir.model.constraint,message:product_multi_price.constraint_product_multi_price_name_multi_price_name_uniq msgid "Prices Names must be unique per company" msgstr "I nomi dei prezzi devono essere unici per azienda" -#. module: product_multi_price -#: selection:product.pricelist.item,base:0 -msgid "Prices based on supplier info" -msgstr "Prezzi basati sulle informazioni del fornitore" - #. module: product_multi_price #: model:ir.model,name:product_multi_price.model_product_product #: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__product_id @@ -199,12 +177,22 @@ msgstr "Prezzi multipli prodotto" msgid "Product Template" msgstr "Modello prodotto" -#. module: product_multi_price -#: selection:product.pricelist.item,base:0 -msgid "Public Price" -msgstr "Prezzo al pubblico" - #. module: product_multi_price #: model:res.groups,name:product_multi_price.group_show_multi_prices msgid "Show multi prices" msgstr "Mostrare prezzi multipli" + +#~ msgid "Cost" +#~ msgstr "Costo" + +#~ msgid "Cost Price Tax Included" +#~ msgstr "Prezzo di costo imposte incluse" + +#~ msgid "Other Pricelist" +#~ msgstr "Altro listino" + +#~ msgid "Prices based on supplier info" +#~ msgstr "Prezzi basati sulle informazioni del fornitore" + +#~ msgid "Public Price" +#~ msgstr "Prezzo al pubblico" diff --git a/product_multi_price/i18n/product_multi_price.pot b/product_multi_price/i18n/product_multi_price.pot index 3fa5ca50859..0f7e0845c8f 100644 --- a/product_multi_price/i18n/product_multi_price.pot +++ b/product_multi_price/i18n/product_multi_price.pot @@ -1,12 +1,12 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * product_multi_price +# * product_multi_price # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 12.0\n" +"Project-Id-Version: Odoo Server 13.0\n" "Report-Msgid-Bugs-To: \n" -"Last-Translator: <>\n" +"Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -14,14 +14,16 @@ msgstr "" "Plural-Forms: \n" #. module: product_multi_price -#: sql_constraint:product.multi.price:0 -msgid "A field name cannot be assigned to a product twice for the same company" +#: model:ir.model.constraint,message:product_multi_price.constraint_product_multi_price_multi_price_uniq +msgid "" +"A field name cannot be assigned to a product twice for the same company" msgstr "" #. module: product_multi_price #: model:ir.model.fields,help:product_multi_price.field_product_pricelist_item__base -msgid "Base price for computation.\n" -"Public Price: The base price will be the Sale/public Price.\n" +msgid "" +"Base price for computation.\n" +"Sales Price: The base price will be the Sales Price.\n" "Cost Price : The base price will be the cost price.\n" "Other Pricelist : Computation of the base price based on another Pricelist." msgstr "" @@ -37,16 +39,6 @@ msgstr "" msgid "Company" msgstr "" -#. module: product_multi_price -#: selection:product.pricelist.item,base:0 -msgid "Cost" -msgstr "" - -#. module: product_multi_price -#: selection:product.pricelist.item,base:0 -msgid "Cost Price Tax Included" -msgstr "" - #. module: product_multi_price #: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__create_uid #: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name__create_uid @@ -100,7 +92,7 @@ msgid "Name" msgstr "" #. module: product_multi_price -#: selection:product.pricelist.item,base:0 +#: model:ir.model.fields.selection,name:product_multi_price.selection__product_pricelist_item__base__multi_price msgid "Other Price" msgstr "" @@ -109,22 +101,12 @@ msgstr "" msgid "Other Price Name" msgstr "" -#. module: product_multi_price -#: selection:product.pricelist.item,base:0 -msgid "Other Pricelist" -msgstr "" - #. module: product_multi_price #: model:ir.model.fields,field_description:product_multi_price.field_product_product__price_ids #: model:ir.model.fields,field_description:product_multi_price.field_product_template__price_ids msgid "Other Prices" msgstr "" -#. module: product_multi_price -#: selection:product.pricelist.item,base:0 -msgid "Partner Prices on the product form" -msgstr "" - #. module: product_multi_price #: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__price msgid "Price" @@ -148,19 +130,14 @@ msgstr "" #. module: product_multi_price #: model:ir.model,name:product_multi_price.model_product_pricelist_item -msgid "Pricelist Item" +msgid "Pricelist Rule" msgstr "" #. module: product_multi_price -#: sql_constraint:product.multi.price.name:0 +#: model:ir.model.constraint,message:product_multi_price.constraint_product_multi_price_name_multi_price_name_uniq msgid "Prices Names must be unique per company" msgstr "" -#. module: product_multi_price -#: selection:product.pricelist.item,base:0 -msgid "Prices based on supplier info" -msgstr "" - #. module: product_multi_price #: model:ir.model,name:product_multi_price.model_product_product #: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__product_id @@ -188,13 +165,7 @@ msgstr "" msgid "Product Template" msgstr "" -#. module: product_multi_price -#: selection:product.pricelist.item,base:0 -msgid "Public Price" -msgstr "" - #. module: product_multi_price #: model:res.groups,name:product_multi_price.group_show_multi_prices msgid "Show multi prices" msgstr "" - diff --git a/product_multi_price/migrations/12.0.2.0.0/post-migration.py b/product_multi_price/migrations/12.0.2.0.0/post-migration.py deleted file mode 100644 index edf4a0f25ed..00000000000 --- a/product_multi_price/migrations/12.0.2.0.0/post-migration.py +++ /dev/null @@ -1,7 +0,0 @@ -# Copyright 2020 Tecnativa - Ernesto Tejeda -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl -from odoo.addons.product_multi_price.hooks import post_init_hook - - -def migrate(cr, version): - post_init_hook(cr, False) diff --git a/product_multi_price/migrations/13.0.1.0.0/noupdate_changes.xml b/product_multi_price/migrations/13.0.1.0.0/noupdate_changes.xml new file mode 100644 index 00000000000..fde32703ce3 --- /dev/null +++ b/product_multi_price/migrations/13.0.1.0.0/noupdate_changes.xml @@ -0,0 +1,13 @@ + + + + ['|',('company_id','=',False),('company_id','in',company_ids)] + + + ['|',('company_id','=',False),('company_id','in',company_ids)] + + diff --git a/product_multi_price/migrations/13.0.1.0.0/post-migration.py b/product_multi_price/migrations/13.0.1.0.0/post-migration.py new file mode 100644 index 00000000000..10bcb5bd068 --- /dev/null +++ b/product_multi_price/migrations/13.0.1.0.0/post-migration.py @@ -0,0 +1,11 @@ +# Copyright 2020 ACSONE SA/NV () +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from openupgradelib import openupgrade # pylint: disable=W7936 + + +@openupgrade.migrate() +def migrate(env, version): + openupgrade.load_data( + env.cr, "product_multi_price", "migrations/13.0.1.0.0/noupdate_changes.xml" + ) diff --git a/product_multi_price/models/product_multi_price.py b/product_multi_price/models/product_multi_price.py index 158dbde3ec6..06e8b178388 100644 --- a/product_multi_price/models/product_multi_price.py +++ b/product_multi_price/models/product_multi_price.py @@ -2,8 +2,6 @@ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from odoo import api, fields, models -from odoo.addons import decimal_precision as dp - class ProductMultiPrice(models.Model): _name = "product.multi.price" @@ -15,7 +13,7 @@ class ProductMultiPrice(models.Model): product_id = fields.Many2one( comodel_name="product.product", required=True, ondelete="cascade", ) - price = fields.Float(digits=dp.get_precision("Product Price"),) + price = fields.Float(digits="Product Price",) company_id = fields.Many2one( comodel_name="res.company", related="name.company_id", @@ -39,7 +37,7 @@ class ProductMultiPriceName(models.Model): @api.model def _get_company(self): - return self._context.get("company_id", self.env.user.company_id.id) + return self._context.get("company_id", self.env.company) name = fields.Char(required=True, string="Price Field Name", ondelete="restrict") company_id = fields.Many2one( diff --git a/product_multi_price/models/product_template.py b/product_multi_price/models/product_template.py index f12afc012fd..f80a2143de5 100644 --- a/product_multi_price/models/product_template.py +++ b/product_multi_price/models/product_template.py @@ -18,6 +18,8 @@ def _compute_price_ids(self): for p in self: if len(p.product_variant_ids) == 1: p.price_ids = p.product_variant_ids.price_ids + else: + p.price_ids = False def _inverse_price_ids(self): for p in self: diff --git a/product_multi_price/security/multi_price_security.xml b/product_multi_price/security/multi_price_security.xml index b7c6760211b..7f73c76ce5e 100644 --- a/product_multi_price/security/multi_price_security.xml +++ b/product_multi_price/security/multi_price_security.xml @@ -13,7 +13,7 @@ ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] + >['|',('company_id','=',False),('company_id','in',company_ids)]
    Multiple Price Field Name multi-company @@ -21,7 +21,7 @@ ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] + >['|',('company_id','=',False),('company_id','in',company_ids)] diff --git a/product_multi_price/static/description/index.html b/product_multi_price/static/description/index.html index c357803472d..30bdbd6f3a6 100644 --- a/product_multi_price/static/description/index.html +++ b/product_multi_price/static/description/index.html @@ -367,7 +367,7 @@

    Product Multi Price

    !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

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

    +

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

    This module allows to set multiple prices to products and base pricelist rules on them.

    Table of contents

    @@ -429,7 +429,7 @@

    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.

    +feedback.

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

    @@ -458,7 +458,7 @@

    Maintainers

    OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

    -

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

    +

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

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

    diff --git a/product_multi_price/views/multi_price_views.xml b/product_multi_price/views/multi_price_views.xml index 0a41ee3527d..6a50d8637e5 100644 --- a/product_multi_price/views/multi_price_views.xml +++ b/product_multi_price/views/multi_price_views.xml @@ -61,7 +61,6 @@ Price Field Names product.multi.price.name - form {} From 3063fb6c71cc9b425931255e7b38e30bf0fb31f3 Mon Sep 17 00:00:00 2001 From: claudiagn Date: Tue, 23 Feb 2021 17:00:46 +0000 Subject: [PATCH 065/224] Added translation using Weblate (Catalan) --- product_multi_price/i18n/ca.po | 181 +++++++++++++++++++++++++++++++++ 1 file changed, 181 insertions(+) create mode 100644 product_multi_price/i18n/ca.po diff --git a/product_multi_price/i18n/ca.po b/product_multi_price/i18n/ca.po new file mode 100644 index 00000000000..74a25dafc3f --- /dev/null +++ b/product_multi_price/i18n/ca.po @@ -0,0 +1,181 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_multi_price +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 13.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2021-02-23 18:45+0000\n" +"Last-Translator: claudiagn \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_multi_price +#: model:ir.model.constraint,message:product_multi_price.constraint_product_multi_price_multi_price_uniq +msgid "" +"A field name cannot be assigned to a product twice for the same company" +msgstr "" +"No es pot assignar un nom de camp a un producte dues vegades per a la " +"mateixa empresa" + +#. module: product_multi_price +#: model:ir.model.fields,help:product_multi_price.field_product_pricelist_item__base +msgid "" +"Base price for computation.\n" +"Sales Price: The base price will be the Sales Price.\n" +"Cost Price : The base price will be the cost price.\n" +"Other Pricelist : Computation of the base price based on another Pricelist." +msgstr "" +"Preu base de càlcul.\n" +"Preu de venda: el preu base serà el preu de venda.\n" +"Preu de cost: el preu base serà el preu de cost.\n" +"Una altra llista de preus: càlcul del preu base basat en una altra llista de " +"preus." + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_pricelist_item__base +msgid "Based on" +msgstr "Basat en" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__company_id +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name__company_id +msgid "Company" +msgstr "Companyia" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__create_uid +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name__create_uid +msgid "Created by" +msgstr "Creat per" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__create_date +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name__create_date +msgid "Created on" +msgstr "Creat el" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__display_name +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name__display_name +msgid "Display Name" +msgstr "Nom visible" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__id +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name__id +msgid "ID" +msgstr "ID" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price____last_update +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name____last_update +msgid "Last Modified on" +msgstr "Darrera modificació el" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__write_uid +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name__write_uid +msgid "Last Updated by" +msgstr "Darrera actualització per" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__write_date +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name__write_date +msgid "Last Updated on" +msgstr "Darrera actualització el" + +#. module: product_multi_price +#: model:ir.model,name:product_multi_price.model_product_multi_price_name +msgid "Multi Price Record Options" +msgstr "Opcions de registre de preus múltiples" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__name +msgid "Name" +msgstr "Nom" + +#. module: product_multi_price +#: model:ir.model.fields.selection,name:product_multi_price.selection__product_pricelist_item__base__multi_price +msgid "Other Price" +msgstr "Altre preu" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_pricelist_item__multi_price_name +msgid "Other Price Name" +msgstr "Nom de l'altre preu" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_product__price_ids +#: model:ir.model.fields,field_description:product_multi_price.field_product_template__price_ids +msgid "Other Prices" +msgstr "Altres preus" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__price +msgid "Price" +msgstr "Preu" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name__name +msgid "Price Field Name" +msgstr "Nom del camp del preu" + +#. module: product_multi_price +#: model:ir.actions.act_window,name:product_multi_price.action_multi_price_name_config +#: model:ir.ui.menu,name:product_multi_price.multi_price_name_menu +msgid "Price Field Names" +msgstr "Noms de camps de preus" + +#. module: product_multi_price +#: model:ir.model,name:product_multi_price.model_product_pricelist +msgid "Pricelist" +msgstr "Tarifa" + +#. module: product_multi_price +#: model:ir.model,name:product_multi_price.model_product_pricelist_item +msgid "Pricelist Rule" +msgstr "Regla de tarifa" + +#. module: product_multi_price +#: model:ir.model.constraint,message:product_multi_price.constraint_product_multi_price_name_multi_price_name_uniq +msgid "Prices Names must be unique per company" +msgstr "Els noms dels preus han de ser únics per empresa" + +#. module: product_multi_price +#: model:ir.model,name:product_multi_price.model_product_product +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__product_id +msgid "Product" +msgstr "Producte" + +#. module: product_multi_price +#: model_terms:ir.ui.view,arch_db:product_multi_price.product_multi_price_form_view +#: model_terms:ir.ui.view,arch_db:product_multi_price.product_multi_price_tree_view +msgid "Product Multi Price" +msgstr "Preu múltiple de producte" + +#. module: product_multi_price +#: model_terms:ir.ui.view,arch_db:product_multi_price.product_multi_price_name_tree_view +msgid "Product Multi Price Field Name" +msgstr "Nom del camp del preu múltiple del producte" + +#. module: product_multi_price +#: model:ir.model,name:product_multi_price.model_product_multi_price +msgid "Product Multiple Prices" +msgstr "Preus múltiples de productes" + +#. module: product_multi_price +#: model:ir.model,name:product_multi_price.model_product_template +msgid "Product Template" +msgstr "Plantilla de producte" + +#. module: product_multi_price +#: model:res.groups,name:product_multi_price.group_show_multi_prices +msgid "Show multi prices" +msgstr "Mostra preus múltiples" From 76f874cacfaf9cc43125580359c9fa354ce6527f Mon Sep 17 00:00:00 2001 From: claudiagn Date: Tue, 23 Feb 2021 17:00:35 +0000 Subject: [PATCH 066/224] Translated using Weblate (Spanish) Currently translated at 100.0% (28 of 28 strings) Translation: product-attribute-13.0/product-attribute-13.0-product_multi_price Translate-URL: https://translation.odoo-community.org/projects/product-attribute-13-0/product-attribute-13-0-product_multi_price/es/ --- product_multi_price/i18n/es.po | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/product_multi_price/i18n/es.po b/product_multi_price/i18n/es.po index a851307e56f..94e82d2b45e 100644 --- a/product_multi_price/i18n/es.po +++ b/product_multi_price/i18n/es.po @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: Odoo Server 13.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-04-09 08:52+0000\n" -"PO-Revision-Date: 2020-10-13 13:08+0000\n" +"PO-Revision-Date: 2021-02-23 18:45+0000\n" "Last-Translator: claudiagn \n" "Language-Team: \n" "Language: es\n" @@ -15,7 +15,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 3.10\n" +"X-Generator: Weblate 4.3.2\n" #. module: product_multi_price #: model:ir.model.constraint,message:product_multi_price.constraint_product_multi_price_multi_price_uniq @@ -24,7 +24,6 @@ msgstr "No puede haber un nombre de campo repetido en la misma compañía" #. module: product_multi_price #: model:ir.model.fields,help:product_multi_price.field_product_pricelist_item__base -#, fuzzy msgid "" "Base price for computation.\n" "Sales Price: The base price will be the Sales Price.\n" @@ -32,7 +31,7 @@ msgid "" "Other Pricelist : Computation of the base price based on another Pricelist." msgstr "" "Precio base de cálculo.\n" -"Precio público: El precio base será el Precio de venta / público.\n" +"Precio de venta: el precio base será el precio de venta.\n" "Precio de costo: el precio base será el precio de costo.\n" "Otra lista de precios: cálculo del precio base basado en otra lista de " "precios." @@ -139,9 +138,8 @@ msgstr "Tarifa" #. module: product_multi_price #: model:ir.model,name:product_multi_price.model_product_pricelist_item -#, fuzzy msgid "Pricelist Rule" -msgstr "Elemento de Tarifa" +msgstr "Regla de tarifa" #. module: product_multi_price #: model:ir.model.constraint,message:product_multi_price.constraint_product_multi_price_name_multi_price_name_uniq From 89f51a7a168d57d5e1d03c47042d803abdbb7a18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20Ernesto=20Garc=C3=ADa=20Medina?= Date: Fri, 24 Mar 2023 10:45:30 -0600 Subject: [PATCH 067/224] [IMP] product_multi_price: black, isort, prettier --- product_multi_price/models/product_multi_price.py | 12 +++++++++--- product_multi_price/models/product_pricelist.py | 7 +++++-- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/product_multi_price/models/product_multi_price.py b/product_multi_price/models/product_multi_price.py index 06e8b178388..a1e9a9f8cfa 100644 --- a/product_multi_price/models/product_multi_price.py +++ b/product_multi_price/models/product_multi_price.py @@ -8,12 +8,18 @@ class ProductMultiPrice(models.Model): _description = "Product Multiple Prices" name = fields.Many2one( - comodel_name="product.multi.price.name", required=True, translate=True, + comodel_name="product.multi.price.name", + required=True, + translate=True, ) product_id = fields.Many2one( - comodel_name="product.product", required=True, ondelete="cascade", + comodel_name="product.product", + required=True, + ondelete="cascade", + ) + price = fields.Float( + digits="Product Price", ) - price = fields.Float(digits="Product Price",) company_id = fields.Many2one( comodel_name="res.company", related="name.company_id", diff --git a/product_multi_price/models/product_pricelist.py b/product_multi_price/models/product_pricelist.py index 037eee8e527..d60bf23ff65 100644 --- a/product_multi_price/models/product_pricelist.py +++ b/product_multi_price/models/product_pricelist.py @@ -27,7 +27,10 @@ def _compute_price_rule(self, products_qty_partner, date=False, uom_id=False): class ProductPricelistItem(models.Model): _inherit = "product.pricelist.item" - base = fields.Selection(selection_add=[("multi_price", "Other Price")],) + base = fields.Selection( + selection_add=[("multi_price", "Other Price")], + ) multi_price_name = fields.Many2one( - comodel_name="product.multi.price.name", string="Other Price Name", + comodel_name="product.multi.price.name", + string="Other Price Name", ) From 98dd7fee71db6753c74ea8352f64a16ea3e84680 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20Ernesto=20Garc=C3=ADa=20Medina?= Date: Fri, 24 Mar 2023 14:23:59 -0600 Subject: [PATCH 068/224] [MIG] product_multi_price: Migration to 15.0 --- product_multi_price/README.rst | 10 +++++----- product_multi_price/__manifest__.py | 2 +- product_multi_price/i18n/product_multi_price.pot | 9 ++------- .../migrations/13.0.1.0.0/noupdate_changes.xml | 13 ------------- .../migrations/13.0.1.0.0/post-migration.py | 11 ----------- product_multi_price/models/product_multi_price.py | 8 +++----- product_multi_price/models/product_pricelist.py | 1 + product_multi_price/security/ir.model.access.csv | 6 +++--- product_multi_price/static/description/index.html | 6 +++--- .../tests/test_product_multi_price.py | 10 +++++++--- product_multi_price/views/multi_price_views.xml | 4 ++-- 11 files changed, 27 insertions(+), 53 deletions(-) delete mode 100644 product_multi_price/migrations/13.0.1.0.0/noupdate_changes.xml delete mode 100644 product_multi_price/migrations/13.0.1.0.0/post-migration.py diff --git a/product_multi_price/README.rst b/product_multi_price/README.rst index bdbeaa727f8..421d17152c9 100644 --- a/product_multi_price/README.rst +++ b/product_multi_price/README.rst @@ -14,13 +14,13 @@ Product Multi Price :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fproduct--attribute-lightgray.png?logo=github - :target: https://github.com/OCA/product-attribute/tree/13.0/product_multi_price + :target: https://github.com/OCA/product-attribute/tree/15.0/product_multi_price :alt: OCA/product-attribute .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/product-attribute-13-0/product-attribute-13-0-product_multi_price + :target: https://translation.odoo-community.org/projects/product-attribute-15-0/product-attribute-15-0-product_multi_price :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/135/13.0 + :target: https://runbot.odoo-community.org/runbot/135/15.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -79,7 +79,7 @@ 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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -113,6 +113,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -This module is part of the `OCA/product-attribute `_ project on GitHub. +This module is part of the `OCA/product-attribute `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/product_multi_price/__manifest__.py b/product_multi_price/__manifest__.py index 7a9bce320d4..473f31a74b4 100644 --- a/product_multi_price/__manifest__.py +++ b/product_multi_price/__manifest__.py @@ -3,7 +3,7 @@ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). { "name": "Product Multi Price", - "version": "13.0.1.0.0", + "version": "15.0.1.0.0", "author": "Tecnativa," "Odoo Community Association (OCA)", "website": "https://github.com/OCA/product-attribute", "category": "Product Management", diff --git a/product_multi_price/i18n/product_multi_price.pot b/product_multi_price/i18n/product_multi_price.pot index 0f7e0845c8f..56c2c649f3e 100644 --- a/product_multi_price/i18n/product_multi_price.pot +++ b/product_multi_price/i18n/product_multi_price.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 13.0\n" +"Project-Id-Version: Odoo Server 15.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: \n" "Language-Team: \n" @@ -113,6 +113,7 @@ msgid "Price" msgstr "" #. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__name_text #: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name__name msgid "Price Field Name" msgstr "" @@ -146,15 +147,9 @@ msgstr "" #. module: product_multi_price #: model_terms:ir.ui.view,arch_db:product_multi_price.product_multi_price_form_view -#: model_terms:ir.ui.view,arch_db:product_multi_price.product_multi_price_tree_view msgid "Product Multi Price" msgstr "" -#. module: product_multi_price -#: model_terms:ir.ui.view,arch_db:product_multi_price.product_multi_price_name_tree_view -msgid "Product Multi Price Field Name" -msgstr "" - #. module: product_multi_price #: model:ir.model,name:product_multi_price.model_product_multi_price msgid "Product Multiple Prices" diff --git a/product_multi_price/migrations/13.0.1.0.0/noupdate_changes.xml b/product_multi_price/migrations/13.0.1.0.0/noupdate_changes.xml deleted file mode 100644 index fde32703ce3..00000000000 --- a/product_multi_price/migrations/13.0.1.0.0/noupdate_changes.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - ['|',('company_id','=',False),('company_id','in',company_ids)] - - - ['|',('company_id','=',False),('company_id','in',company_ids)] - - diff --git a/product_multi_price/migrations/13.0.1.0.0/post-migration.py b/product_multi_price/migrations/13.0.1.0.0/post-migration.py deleted file mode 100644 index 10bcb5bd068..00000000000 --- a/product_multi_price/migrations/13.0.1.0.0/post-migration.py +++ /dev/null @@ -1,11 +0,0 @@ -# Copyright 2020 ACSONE SA/NV () -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). - -from openupgradelib import openupgrade # pylint: disable=W7936 - - -@openupgrade.migrate() -def migrate(env, version): - openupgrade.load_data( - env.cr, "product_multi_price", "migrations/13.0.1.0.0/noupdate_changes.xml" - ) diff --git a/product_multi_price/models/product_multi_price.py b/product_multi_price/models/product_multi_price.py index a1e9a9f8cfa..f3b70f34a4b 100644 --- a/product_multi_price/models/product_multi_price.py +++ b/product_multi_price/models/product_multi_price.py @@ -5,13 +5,11 @@ class ProductMultiPrice(models.Model): _name = "product.multi.price" + _rec_name = "name_text" _description = "Product Multiple Prices" - name = fields.Many2one( - comodel_name="product.multi.price.name", - required=True, - translate=True, - ) + name = fields.Many2one("product.multi.price.name", required=True) + name_text = fields.Char(related="name.name") product_id = fields.Many2one( comodel_name="product.product", required=True, diff --git a/product_multi_price/models/product_pricelist.py b/product_multi_price/models/product_pricelist.py index d60bf23ff65..11901accfa0 100644 --- a/product_multi_price/models/product_pricelist.py +++ b/product_multi_price/models/product_pricelist.py @@ -29,6 +29,7 @@ class ProductPricelistItem(models.Model): base = fields.Selection( selection_add=[("multi_price", "Other Price")], + ondelete={"multi_price": "set default"}, ) multi_price_name = fields.Many2one( comodel_name="product.multi.price.name", diff --git a/product_multi_price/security/ir.model.access.csv b/product_multi_price/security/ir.model.access.csv index c15ad02ac20..603077c94d3 100644 --- a/product_multi_price/security/ir.model.access.csv +++ b/product_multi_price/security/ir.model.access.csv @@ -1,4 +1,4 @@ "id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" -"multi price","product.multi.price","model_product_multi_price","base.group_user",1,1,1,1 -"multi price name read","product.multi.price.name","model_product_multi_price_name","base.group_user",1,0,0,0 -"multi price name admin","product.multi.price.name","model_product_multi_price_name","base.group_system",1,1,1,1 +multi_price,product.multi.price,model_product_multi_price,base.group_user,1,1,1,1 +multi_price_name_read,product.multi.price.name,model_product_multi_price_name,base.group_user,1,0,0,0 +multi_price_name_admin,product.multi.price.name,model_product_multi_price_name,base.group_system,1,1,1,1 diff --git a/product_multi_price/static/description/index.html b/product_multi_price/static/description/index.html index 30bdbd6f3a6..86d3c679f6d 100644 --- a/product_multi_price/static/description/index.html +++ b/product_multi_price/static/description/index.html @@ -367,7 +367,7 @@

    Product Multi Price

    !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

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

    +

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

    This module allows to set multiple prices to products and base pricelist rules on them.

    Table of contents

    @@ -429,7 +429,7 @@

    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.

    +feedback.

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

    @@ -458,7 +458,7 @@

    Maintainers

    OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

    -

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

    +

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

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

    diff --git a/product_multi_price/tests/test_product_multi_price.py b/product_multi_price/tests/test_product_multi_price.py index 2922a463e4b..048403dfc9b 100644 --- a/product_multi_price/tests/test_product_multi_price.py +++ b/product_multi_price/tests/test_product_multi_price.py @@ -1,9 +1,9 @@ # Copyright 2020 Tecnativa - David Vidal # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -from odoo.tests.common import SavepointCase +from odoo.tests.common import TransactionCase -class TestProductMultiPrice(SavepointCase): +class TestProductMultiPrice(TransactionCase): @classmethod def setUpClass(cls): super().setUpClass() @@ -16,7 +16,11 @@ def setUpClass(cls): "name": "Test Product Template", "price_ids": [ (0, 0, {"name": cls.price_field_1.id, "price": 5.5}), - (0, 0, {"name": cls.price_field_2.id, "price": 20.0}), + ( + 0, + 0, + {"name": cls.price_field_2.id, "price": 20.0}, + ), ], } ) diff --git a/product_multi_price/views/multi_price_views.xml b/product_multi_price/views/multi_price_views.xml index 6a50d8637e5..46dab3decea 100644 --- a/product_multi_price/views/multi_price_views.xml +++ b/product_multi_price/views/multi_price_views.xml @@ -3,7 +3,7 @@ product.multi.price - + @@ -52,7 +52,7 @@ product.multi.price.name - + From 4310dc32fe97b409db79077c5acbe622d1b8ccc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20Ernesto=20Garc=C3=ADa=20Medina?= Date: Thu, 18 May 2023 12:22:59 -0600 Subject: [PATCH 069/224] [FIX] product_multi_price: remove ondelete params from product.multi.price.name --- product_multi_price/README.rst | 15 +++--- product_multi_price/__manifest__.py | 2 +- product_multi_price/i18n/ca.po | 13 ++---- product_multi_price/i18n/es.po | 10 ++-- product_multi_price/i18n/it.po | 7 +-- .../models/product_multi_price.py | 2 +- .../static/description/index.html | 46 ++++++++++--------- 7 files changed, 45 insertions(+), 50 deletions(-) diff --git a/product_multi_price/README.rst b/product_multi_price/README.rst index 421d17152c9..48115ea3b9e 100644 --- a/product_multi_price/README.rst +++ b/product_multi_price/README.rst @@ -2,10 +2,13 @@ Product Multi Price =================== -.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:db3e0600440dcafca889e339211f83be9973bd8907045d52490e64e8787e1645 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png :target: https://odoo-community.org/page/development-status @@ -19,11 +22,11 @@ Product Multi Price .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png :target: https://translation.odoo-community.org/projects/product-attribute-15-0/product-attribute-15-0-product_multi_price :alt: Translate me on Weblate -.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/135/15.0 - :alt: Try me on Runbot +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/product-attribute&target_branch=15.0 + :alt: Try me on Runboat -|badge1| |badge2| |badge3| |badge4| |badge5| +|badge1| |badge2| |badge3| |badge4| |badge5| This module allows to set multiple prices to products and base pricelist rules on them. @@ -78,7 +81,7 @@ 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 +If you spotted it first, help us to smash it by providing a detailed and welcomed `feedback `_. Do not contact contributors directly about support or help with technical issues. diff --git a/product_multi_price/__manifest__.py b/product_multi_price/__manifest__.py index 473f31a74b4..72ac6f65ac4 100644 --- a/product_multi_price/__manifest__.py +++ b/product_multi_price/__manifest__.py @@ -3,7 +3,7 @@ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). { "name": "Product Multi Price", - "version": "15.0.1.0.0", + "version": "15.0.1.0.1", "author": "Tecnativa," "Odoo Community Association (OCA)", "website": "https://github.com/OCA/product-attribute", "category": "Product Management", diff --git a/product_multi_price/i18n/ca.po b/product_multi_price/i18n/ca.po index 74a25dafc3f..3b0c6630dd9 100644 --- a/product_multi_price/i18n/ca.po +++ b/product_multi_price/i18n/ca.po @@ -18,8 +18,7 @@ msgstr "" #. module: product_multi_price #: model:ir.model.constraint,message:product_multi_price.constraint_product_multi_price_multi_price_uniq -msgid "" -"A field name cannot be assigned to a product twice for the same company" +msgid "A field name cannot be assigned to a product twice for the same company" msgstr "" "No es pot assignar un nom de camp a un producte dues vegades per a la " "mateixa empresa" @@ -123,6 +122,7 @@ msgid "Price" msgstr "Preu" #. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__name_text #: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name__name msgid "Price Field Name" msgstr "Nom del camp del preu" @@ -156,15 +156,9 @@ msgstr "Producte" #. module: product_multi_price #: model_terms:ir.ui.view,arch_db:product_multi_price.product_multi_price_form_view -#: model_terms:ir.ui.view,arch_db:product_multi_price.product_multi_price_tree_view msgid "Product Multi Price" msgstr "Preu múltiple de producte" -#. module: product_multi_price -#: model_terms:ir.ui.view,arch_db:product_multi_price.product_multi_price_name_tree_view -msgid "Product Multi Price Field Name" -msgstr "Nom del camp del preu múltiple del producte" - #. module: product_multi_price #: model:ir.model,name:product_multi_price.model_product_multi_price msgid "Product Multiple Prices" @@ -179,3 +173,6 @@ msgstr "Plantilla de producte" #: model:res.groups,name:product_multi_price.group_show_multi_prices msgid "Show multi prices" msgstr "Mostra preus múltiples" + +#~ msgid "Product Multi Price Field Name" +#~ msgstr "Nom del camp del preu múltiple del producte" diff --git a/product_multi_price/i18n/es.po b/product_multi_price/i18n/es.po index 94e82d2b45e..a193a4efa7d 100644 --- a/product_multi_price/i18n/es.po +++ b/product_multi_price/i18n/es.po @@ -121,6 +121,7 @@ msgid "Price" msgstr "Precio" #. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__name_text #: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name__name msgid "Price Field Name" msgstr "Nombre de Campo de Precio" @@ -154,15 +155,9 @@ msgstr "Producto" #. module: product_multi_price #: model_terms:ir.ui.view,arch_db:product_multi_price.product_multi_price_form_view -#: model_terms:ir.ui.view,arch_db:product_multi_price.product_multi_price_tree_view msgid "Product Multi Price" msgstr "Multi Precio de Producto" -#. module: product_multi_price -#: model_terms:ir.ui.view,arch_db:product_multi_price.product_multi_price_name_tree_view -msgid "Product Multi Price Field Name" -msgstr "Nombre de Campo de Multi Precio de Producto" - #. module: product_multi_price #: model:ir.model,name:product_multi_price.model_product_multi_price msgid "Product Multiple Prices" @@ -178,6 +173,9 @@ msgstr "Plantilla de producto" msgid "Show multi prices" msgstr "Muestra precios múltiples" +#~ msgid "Product Multi Price Field Name" +#~ msgstr "Nombre de Campo de Multi Precio de Producto" + #~ msgid "Cost" #~ msgstr "Coste" diff --git a/product_multi_price/i18n/it.po b/product_multi_price/i18n/it.po index f9fad1e8609..75537503d3c 100644 --- a/product_multi_price/i18n/it.po +++ b/product_multi_price/i18n/it.po @@ -124,6 +124,7 @@ msgid "Price" msgstr "Prezzo" #. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__name_text #: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name__name msgid "Price Field Name" msgstr "Nome campo prezzo" @@ -158,15 +159,9 @@ msgstr "Prodotto" #. module: product_multi_price #: model_terms:ir.ui.view,arch_db:product_multi_price.product_multi_price_form_view -#: model_terms:ir.ui.view,arch_db:product_multi_price.product_multi_price_tree_view msgid "Product Multi Price" msgstr "Prezzi multipli prodotto" -#. module: product_multi_price -#: model_terms:ir.ui.view,arch_db:product_multi_price.product_multi_price_name_tree_view -msgid "Product Multi Price Field Name" -msgstr "" - #. module: product_multi_price #: model:ir.model,name:product_multi_price.model_product_multi_price msgid "Product Multiple Prices" diff --git a/product_multi_price/models/product_multi_price.py b/product_multi_price/models/product_multi_price.py index f3b70f34a4b..ce146f52ff1 100644 --- a/product_multi_price/models/product_multi_price.py +++ b/product_multi_price/models/product_multi_price.py @@ -43,7 +43,7 @@ class ProductMultiPriceName(models.Model): def _get_company(self): return self._context.get("company_id", self.env.company) - name = fields.Char(required=True, string="Price Field Name", ondelete="restrict") + name = fields.Char(required=True, string="Price Field Name") company_id = fields.Many2one( comodel_name="res.company", required=True, diff --git a/product_multi_price/static/description/index.html b/product_multi_price/static/description/index.html index 86d3c679f6d..d736bf143f1 100644 --- a/product_multi_price/static/description/index.html +++ b/product_multi_price/static/description/index.html @@ -1,20 +1,20 @@ - + - + Product Multi Price -
    -

    Product Supplierinfo for Customers

    +
    + + +Odoo Community Association + +
    +

    Product Supplierinfo for Customers

    -

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

    +

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

    This module allows to use supplier info structure, available in Purchase tab of the product form, also for defining customer information, allowing to define prices per customer and product.

    @@ -389,14 +394,14 @@

    Product Supplierinfo for Customers

    -

    Configuration

    +

    Configuration

    For these prices to be used in sale prices calculations, you will have to create a pricelist with a rule with option “Based on” with the value “Partner Prices: Take the price from the customer info on the ‘product form’)”.

    -

    Usage

    +

    Usage

    There’s a new section on Sales tab of the product form called “Customers”, where you can define records for customers with the same structure of the suppliers.

    @@ -404,7 +409,7 @@

    Usage

    from the supplierinfo at the product form.

    -

    Known issues / Roadmap

    +

    Known issues / Roadmap

    • Product prices through this method are only guaranteed on the standard sale order workflow. Other custom flows maybe don’t reflect the price.
    • @@ -412,7 +417,7 @@

      Known issues / Roadmap

    -

    Bug Tracker

    +

    Bug Tracker

    Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed @@ -420,16 +425,16 @@

    Bug Tracker

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

    -

    Credits

    +

    Credits

    -

    Authors

    +

    Authors

    • AvanzOSC
    • Tecnativa
    -

    Contributors

    +

    Contributors

    -

    Maintainers

    +

    Maintainers

    This module is maintained by the OCA.

    Odoo Community Association @@ -462,5 +467,6 @@

    Maintainers

    +
    From 63c3ad58c22afa69a8c8925d05ec19b0f4f6d50c Mon Sep 17 00:00:00 2001 From: bosd Date: Mon, 13 Oct 2025 19:14:05 +0200 Subject: [PATCH 074/224] [IMP] product_customerinfo: Change terms to customer Help texts incorrectly mentioned "vendor" instead of "customer" for fields: - customer_product_name - customer_product_code - quantity (min_qty) - price - validity (date_start/date_end) Popup windows when adding customer info lines showed generic titles like "Create Customer" instead of clearer titles like "Create Customer Info". When creating customer info from a specific product variant, the product variant field was not pre-populated. --- product_customerinfo/README.rst | 41 ++++++++++++------- .../models/product_customerinfo.py | 10 +++++ product_customerinfo/readme/DESCRIPTION.md | 11 +++-- .../static/description/index.html | 21 +++++++--- product_customerinfo/views/product_views.xml | 6 ++- 5 files changed, 63 insertions(+), 26 deletions(-) diff --git a/product_customerinfo/README.rst b/product_customerinfo/README.rst index a8244fff942..4ada588eb04 100644 --- a/product_customerinfo/README.rst +++ b/product_customerinfo/README.rst @@ -32,9 +32,19 @@ Product Supplierinfo for Customers |badge1| |badge2| |badge3| |badge4| |badge5| -This module allows to use supplier info structure, available in -*Purchase* tab of the product form, also for defining customer -information, allowing to define prices per customer and product. +This module allows you to define a customer-specific product data +structure (patterned after the standard supplier/vendor info) on the +product form. + +This structure enables defining customized information for each customer +and product, including: + +:: + + - Custom Price (Price-list price) + - Customer Product Name + - Customer Product Code + - Minimum Order Quantity (MOQ) **Table of contents** @@ -62,9 +72,10 @@ from the supplierinfo at the product form. Known issues / Roadmap ====================== -- Product prices through this method are only guaranteed on the standard - sale order workflow. Other custom flows maybe don't reflect the price. -- The minimum quantity will neither apply on sale orders. +- Product prices through this method are only guaranteed on the + standard sale order workflow. Other custom flows maybe don't reflect + the price. +- The minimum quantity will neither apply on sale orders. Bug Tracker =========== @@ -88,18 +99,18 @@ Authors Contributors ------------ -- Oihane Crucelaegui -- Aaron Henriquez -- Miquel Raïch -- `Tecnativa `__: +- Oihane Crucelaegui +- Aaron Henriquez +- Miquel Raïch +- `Tecnativa `__: - - Pedro M. Baeza - - Sergio Teruel - - Carlos Lopez + - Pedro M. Baeza + - Sergio Teruel + - Carlos Lopez -- `Komit `__: +- `Komit `__: - - Vang Nguyen Phu + - Vang Nguyen Phu Maintainers ----------- diff --git a/product_customerinfo/models/product_customerinfo.py b/product_customerinfo/models/product_customerinfo.py index da3df9f98d5..10dc93076e1 100644 --- a/product_customerinfo/models/product_customerinfo.py +++ b/product_customerinfo/models/product_customerinfo.py @@ -12,6 +12,16 @@ class ProductCustomerInfo(models.Model): partner_id = fields.Many2one(string="Customer", help="Customer of this product") product_name = fields.Char(string="Customer Product Name") product_code = fields.Char(string="Customer Product Code") + # Override fields with corrected help texts + min_qty = fields.Float( + help="The minimum quantity to purchase for this customer to benefit from the " + "price. Expressed in the customer's Product Unit of Measure if set, " + "otherwise in the default Product Unit of Measure." + ) + price = fields.Float(help="Price at which the product is sold to this customer.") + date_start = fields.Date(help="Start date for this customer price") + date_end = fields.Date(help="End date for this customer price") + product_uom = fields.Many2one(help="Customer specific unit of measure.") @api.model def get_import_templates(self): diff --git a/product_customerinfo/readme/DESCRIPTION.md b/product_customerinfo/readme/DESCRIPTION.md index 97cac008ac3..8cc025e20a4 100644 --- a/product_customerinfo/readme/DESCRIPTION.md +++ b/product_customerinfo/readme/DESCRIPTION.md @@ -1,3 +1,8 @@ -This module allows to use supplier info structure, available in -*Purchase* tab of the product form, also for defining customer -information, allowing to define prices per customer and product. +This module allows you to define a customer-specific product data structure (patterned after the standard supplier/vendor info) on the product form. + +This structure enables defining customized information for each customer and product, including: + + - Custom Price (Price-list price) + - Customer Product Name + - Customer Product Code + - Minimum Order Quantity (MOQ) diff --git a/product_customerinfo/static/description/index.html b/product_customerinfo/static/description/index.html index 6564e77d23f..a093ff433d4 100644 --- a/product_customerinfo/static/description/index.html +++ b/product_customerinfo/static/description/index.html @@ -374,10 +374,18 @@

    Product Supplierinfo for Customers

    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:7a01a3bac8aef2bd72c38ed73074413a5c54966d5dc2396b209408aac97cffa9 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

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

    -

    This module allows to use supplier info structure, available in -Purchase tab of the product form, also for defining customer -information, allowing to define prices per customer and product.

    +

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

    +

    This module allows you to define a customer-specific product data +structure (patterned after the standard supplier/vendor info) on the +product form.

    +

    This structure enables defining customized information for each customer +and product, including:

    +
    +- Custom Price (Price-list price)
    +- Customer Product Name
    +- Customer Product Code
    +- Minimum Order Quantity (MOQ)
    +

    Table of contents

      @@ -411,8 +419,9 @@

      Usage

      Known issues / Roadmap

        -
      • Product prices through this method are only guaranteed on the standard -sale order workflow. Other custom flows maybe don’t reflect the price.
      • +
      • Product prices through this method are only guaranteed on the +standard sale order workflow. Other custom flows maybe don’t reflect +the price.
      • The minimum quantity will neither apply on sale orders.
      diff --git a/product_customerinfo/views/product_views.xml b/product_customerinfo/views/product_views.xml index eae4ccfb464..63d74fe145a 100644 --- a/product_customerinfo/views/product_views.xml +++ b/product_customerinfo/views/product_views.xml @@ -115,6 +115,7 @@ context="{ 'default_product_tmpl_id': context.get('product_tmpl_id',id), 'product_template_invisible_variant': True, + 'form_view_ref': 'product_customerinfo.product_customerinfo_form_view' }" invisible="product_variant_count > 1" readonly="product_variant_count > 1" @@ -124,6 +125,7 @@ nolabel="1" context="{ 'default_product_tmpl_id': context.get('product_tmpl_id',id), + 'form_view_ref': 'product_customerinfo.product_customerinfo_form_view' }" invisible="product_variant_count <= 1" readonly="product_variant_count <= 1" @@ -139,12 +141,12 @@ {'default_product_tmpl_id': product_tmpl_id, 'product_template_invisible_variant': True} + >{'default_product_tmpl_id': product_tmpl_id, 'product_template_invisible_variant': True, 'form_view_ref': 'product_customerinfo.product_customerinfo_form_view'} {'default_product_tmpl_id': product_tmpl_id} + >{'default_product_tmpl_id': product_tmpl_id, 'default_product_id': id, 'form_view_ref': 'product_customerinfo.product_customerinfo_form_view'} From 186fc7c034b6243f17c65dda4789983f9042ffdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20BEAU?= Date: Sat, 19 Dec 2020 10:56:24 +0100 Subject: [PATCH 075/224] [ADD] add module product_form_pricelist --- product_form_pricelist/__init__.py | 1 + product_form_pricelist/__manifest__.py | 29 +++++++ product_form_pricelist/models/__init__.py | 3 + .../models/product_pricelist_item.py | 22 ++++++ .../models/product_template.py | 13 ++++ .../models/res_config_settings.py | 18 +++++ .../readme/CONFIGURATION.rst | 2 + .../readme/CONTRIBUTORS.rst | 1 + product_form_pricelist/readme/DESCRIPTION.rst | 2 + product_form_pricelist/readme/USAGE.rst | 4 + .../security/res_groups.xml | 9 +++ .../views/product_template_view.xml | 78 +++++++++++++++++++ product_form_pricelist/views/product_view.xml | 63 +++++++++++++++ .../views/res_config_settings_view.xml | 30 +++++++ 14 files changed, 275 insertions(+) create mode 100644 product_form_pricelist/__init__.py create mode 100644 product_form_pricelist/__manifest__.py create mode 100644 product_form_pricelist/models/__init__.py create mode 100644 product_form_pricelist/models/product_pricelist_item.py create mode 100644 product_form_pricelist/models/product_template.py create mode 100644 product_form_pricelist/models/res_config_settings.py create mode 100644 product_form_pricelist/readme/CONFIGURATION.rst create mode 100644 product_form_pricelist/readme/CONTRIBUTORS.rst create mode 100644 product_form_pricelist/readme/DESCRIPTION.rst create mode 100644 product_form_pricelist/readme/USAGE.rst create mode 100644 product_form_pricelist/security/res_groups.xml create mode 100644 product_form_pricelist/views/product_template_view.xml create mode 100644 product_form_pricelist/views/product_view.xml create mode 100644 product_form_pricelist/views/res_config_settings_view.xml diff --git a/product_form_pricelist/__init__.py b/product_form_pricelist/__init__.py new file mode 100644 index 00000000000..0650744f6bc --- /dev/null +++ b/product_form_pricelist/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/product_form_pricelist/__manifest__.py b/product_form_pricelist/__manifest__.py new file mode 100644 index 00000000000..7910c6e8c0e --- /dev/null +++ b/product_form_pricelist/__manifest__.py @@ -0,0 +1,29 @@ +# Copyright 2020 Akretion (https://www.akretion.com). +# @author Sébastien BEAU +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +{ + "name": "product_form_pricelist", + "summary": "Show/edit pricelist in product form", + "version": "14.0.1.0.0", + "category": "Product", + "website": "https://github.com/OCA/product-attribute", + "author": " Akretion,Odoo Community Association (OCA)", + "license": "AGPL-3", + "application": False, + "installable": True, + "external_dependencies": { + "python": [], + "bin": [], + }, + "depends": [ + "sale", + ], + "data": [ + "security/res_groups.xml", + "views/product_template_view.xml", + "views/product_view.xml", + "views/res_config_settings_view.xml", + ], + "demo": [], + "qweb": [], +} diff --git a/product_form_pricelist/models/__init__.py b/product_form_pricelist/models/__init__.py new file mode 100644 index 00000000000..586609a1395 --- /dev/null +++ b/product_form_pricelist/models/__init__.py @@ -0,0 +1,3 @@ +from . import product_template +from . import product_pricelist_item +from . import res_config_settings diff --git a/product_form_pricelist/models/product_pricelist_item.py b/product_form_pricelist/models/product_pricelist_item.py new file mode 100644 index 00000000000..03f50cc175a --- /dev/null +++ b/product_form_pricelist/models/product_pricelist_item.py @@ -0,0 +1,22 @@ +# Copyright 2020 Akretion (https://www.akretion.com). +# @author Sébastien BEAU +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import api, fields, models + + +class ProductPricelistItem(models.Model): + _inherit = "product.pricelist.item" + + applied_on = fields.Selection( + compute="_compute_applied_on", readonly=False, store=True + ) + + @api.depends("product_id") + def _compute_applied_on(self): + for record in self: + # make applied_on consistent (work with manual input and import) + if record.product_id: + record.applied_on = "0_product_variant" + elif not record.product_id and record.product_tmpl_id: + record.applied_on = "1_product" diff --git a/product_form_pricelist/models/product_template.py b/product_form_pricelist/models/product_template.py new file mode 100644 index 00000000000..ef95fef387d --- /dev/null +++ b/product_form_pricelist/models/product_template.py @@ -0,0 +1,13 @@ +# Copyright 2020 Akretion (https://www.akretion.com). +# @author Sébastien BEAU +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import fields, models + + +class ProductTemplate(models.Model): + _inherit = "product.template" + + fixed_pricelist_item_ids = fields.One2many( + "product.pricelist.item", "product_tmpl_id", "Fixed Pricelist Items" + ) diff --git a/product_form_pricelist/models/res_config_settings.py b/product_form_pricelist/models/res_config_settings.py new file mode 100644 index 00000000000..35f96ed6da6 --- /dev/null +++ b/product_form_pricelist/models/res_config_settings.py @@ -0,0 +1,18 @@ +# Copyright 2020 Akretion (https://www.akretion.com). +# @author Sébastien BEAU +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import fields, models + + +class ResConfigSettings(models.TransientModel): + _inherit = "res.config.settings" + + group_no_list_price = fields.Boolean( + "Hide field 'Sales price'", + help=( + "Tic this option, if you only when to use fixed price and hide " + "the native 'Sales Price' field" + ), + implied_group="product_form_pricelist.group_no_list_price", + ) diff --git a/product_form_pricelist/readme/CONFIGURATION.rst b/product_form_pricelist/readme/CONFIGURATION.rst new file mode 100644 index 00000000000..3617dfe956a --- /dev/null +++ b/product_form_pricelist/readme/CONFIGURATION.rst @@ -0,0 +1,2 @@ +If you only want to use fixed price on product and hide the "Sales price" field +You can tic the option in the sale config menu diff --git a/product_form_pricelist/readme/CONTRIBUTORS.rst b/product_form_pricelist/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000000..91fcd94cc93 --- /dev/null +++ b/product_form_pricelist/readme/CONTRIBUTORS.rst @@ -0,0 +1 @@ +* Sébastien Beau diff --git a/product_form_pricelist/readme/DESCRIPTION.rst b/product_form_pricelist/readme/DESCRIPTION.rst new file mode 100644 index 00000000000..12ed15f32d6 --- /dev/null +++ b/product_form_pricelist/readme/DESCRIPTION.rst @@ -0,0 +1,2 @@ +This module allow to fill directly from the product form the pricelist item for the product. +The type of pricelist item is always "fixed" diff --git a/product_form_pricelist/readme/USAGE.rst b/product_form_pricelist/readme/USAGE.rst new file mode 100644 index 00000000000..bc15b59618d --- /dev/null +++ b/product_form_pricelist/readme/USAGE.rst @@ -0,0 +1,4 @@ +To use this module: + +#. Go to Product Template view +#. Edit the fixed pricelist item diff --git a/product_form_pricelist/security/res_groups.xml b/product_form_pricelist/security/res_groups.xml new file mode 100644 index 00000000000..c399759cbd9 --- /dev/null +++ b/product_form_pricelist/security/res_groups.xml @@ -0,0 +1,9 @@ + + + + + Hide list price on product + + + + diff --git a/product_form_pricelist/views/product_template_view.xml b/product_form_pricelist/views/product_template_view.xml new file mode 100644 index 00000000000..db32b7e0458 --- /dev/null +++ b/product_form_pricelist/views/product_template_view.xml @@ -0,0 +1,78 @@ + + + + + product.template + + + + + + + + + + + + + + + + + + + + + + + product.template + + + + + 1 + + + + + + + product.template + + + +
      + 1 +
      +
      +
      + + + product.template + + + + + 1 + + + + +
      diff --git a/product_form_pricelist/views/product_view.xml b/product_form_pricelist/views/product_view.xml new file mode 100644 index 00000000000..931ea76028e --- /dev/null +++ b/product_form_pricelist/views/product_view.xml @@ -0,0 +1,63 @@ + + + + + product.product + + + + + 1 + + + + + + product.product + + + + + 1 + + + + + + product.product + + + + + + + + + product.product + + + + + + 1 + + + + + diff --git a/product_form_pricelist/views/res_config_settings_view.xml b/product_form_pricelist/views/res_config_settings_view.xml new file mode 100644 index 00000000000..c9e91cf937f --- /dev/null +++ b/product_form_pricelist/views/res_config_settings_view.xml @@ -0,0 +1,30 @@ + + + + + res.config.settings + + +
      +
      +
      + +
      +
      +
      +
      +
      +
      +
      + + + +
      From 46e05d78d3bd12abe537c374a8fe258f73e1375f Mon Sep 17 00:00:00 2001 From: beau sebastien Date: Fri, 8 Jan 2021 00:08:11 +0100 Subject: [PATCH 076/224] Apply suggestions from code review Co-authored-by: Hpar --- product_form_pricelist/models/res_config_settings.py | 2 +- product_form_pricelist/readme/CONFIGURATION.rst | 2 +- product_form_pricelist/views/product_template_view.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/product_form_pricelist/models/res_config_settings.py b/product_form_pricelist/models/res_config_settings.py index 35f96ed6da6..f64aa69d14e 100644 --- a/product_form_pricelist/models/res_config_settings.py +++ b/product_form_pricelist/models/res_config_settings.py @@ -11,7 +11,7 @@ class ResConfigSettings(models.TransientModel): group_no_list_price = fields.Boolean( "Hide field 'Sales price'", help=( - "Tic this option, if you only when to use fixed price and hide " + "Use fixed price and hide " "the native 'Sales Price' field" ), implied_group="product_form_pricelist.group_no_list_price", diff --git a/product_form_pricelist/readme/CONFIGURATION.rst b/product_form_pricelist/readme/CONFIGURATION.rst index 3617dfe956a..6f913126667 100644 --- a/product_form_pricelist/readme/CONFIGURATION.rst +++ b/product_form_pricelist/readme/CONFIGURATION.rst @@ -1,2 +1,2 @@ If you only want to use fixed price on product and hide the "Sales price" field -You can tic the option in the sale config menu +You can tick the option in the sale config menu diff --git a/product_form_pricelist/views/product_template_view.xml b/product_form_pricelist/views/product_template_view.xml index db32b7e0458..9eb348ca704 100644 --- a/product_form_pricelist/views/product_template_view.xml +++ b/product_form_pricelist/views/product_template_view.xml @@ -8,7 +8,7 @@ - + From 1c5fbc26b8158828f20bf95406940cc4add49096 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20BEAU?= Date: Fri, 8 Jan 2021 00:47:22 +0100 Subject: [PATCH 077/224] [FIX] fix setting the right applied on when importing data --- .../models/product_pricelist_item.py | 19 ++++++++--- .../models/res_config_settings.py | 5 +-- product_form_pricelist/tests/__init__.py | 1 + .../tests/test_pricelist.py | 34 +++++++++++++++++++ 4 files changed, 51 insertions(+), 8 deletions(-) create mode 100644 product_form_pricelist/tests/__init__.py create mode 100644 product_form_pricelist/tests/test_pricelist.py diff --git a/product_form_pricelist/models/product_pricelist_item.py b/product_form_pricelist/models/product_pricelist_item.py index 03f50cc175a..26b22115f49 100644 --- a/product_form_pricelist/models/product_pricelist_item.py +++ b/product_form_pricelist/models/product_pricelist_item.py @@ -9,14 +9,25 @@ class ProductPricelistItem(models.Model): _inherit = "product.pricelist.item" applied_on = fields.Selection( - compute="_compute_applied_on", readonly=False, store=True + compute="_compute_applied_on", + readonly=False, + store=True, ) - @api.depends("product_id") + @api.depends("product_id", "product_tmpl_id") def _compute_applied_on(self): + # make applied_on consistent with manual input for record in self: - # make applied_on consistent (work with manual input and import) if record.product_id: record.applied_on = "0_product_variant" - elif not record.product_id and record.product_tmpl_id: + elif record.product_tmpl_id: record.applied_on = "1_product" + + @api.model + def _add_missing_default_values(self, values): + # make applied_on consistent during import + if values.get("product_id"): + values["applied_on"] = "0_product_variant" + elif values.get("product_tmpl_id"): + values["applied_on"] = "1_product" + return super()._add_missing_default_values(values) diff --git a/product_form_pricelist/models/res_config_settings.py b/product_form_pricelist/models/res_config_settings.py index f64aa69d14e..da9bf65a9ba 100644 --- a/product_form_pricelist/models/res_config_settings.py +++ b/product_form_pricelist/models/res_config_settings.py @@ -10,9 +10,6 @@ class ResConfigSettings(models.TransientModel): group_no_list_price = fields.Boolean( "Hide field 'Sales price'", - help=( - "Use fixed price and hide " - "the native 'Sales Price' field" - ), + help=("Use fixed price and hide the native 'Sales Price' field"), implied_group="product_form_pricelist.group_no_list_price", ) diff --git a/product_form_pricelist/tests/__init__.py b/product_form_pricelist/tests/__init__.py new file mode 100644 index 00000000000..61e09273836 --- /dev/null +++ b/product_form_pricelist/tests/__init__.py @@ -0,0 +1 @@ +from . import test_pricelist diff --git a/product_form_pricelist/tests/test_pricelist.py b/product_form_pricelist/tests/test_pricelist.py new file mode 100644 index 00000000000..1d6d994283e --- /dev/null +++ b/product_form_pricelist/tests/test_pricelist.py @@ -0,0 +1,34 @@ +# Copyright 2021 Akretion (https://www.akretion.com). +# @author Sébastien BEAU +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + + +from odoo.tests import SavepointCase + + +class TestPricelist(SavepointCase): + @classmethod + def setUpClass(cls): + super().setUpClass() + cls.tmpl = cls.env["product.template"].create({"name": "Foo"}) + + def test_write_pricelist_item(self): + price = self.env["product.pricelist.item"].create( + { + "product_tmpl_id": self.tmpl.id, + "fixed_price": 100, + "applied_on": "1_product", + } + ) + price.product_id = self.tmpl.product_variant_ids.id + self.assertEqual(price.applied_on, "0_product_variant") + + def test_create_pricelist_item(self): + tmpl = self.env["product.template"].create({"name": "Foo"}) + price = self.env["product.pricelist.item"].create( + { + "product_tmpl_id": tmpl.id, + "fixed_price": 100, + } + ) + self.assertEqual(price.applied_on, "1_product") From 4f03c1e76105242f593c6716b87e6ef8318048f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20BEAU?= Date: Thu, 18 Feb 2021 16:50:22 +0100 Subject: [PATCH 078/224] [IMP] make import consistent --- .../models/product_pricelist_item.py | 15 ++++++++++-- .../tests/test_pricelist.py | 24 +++++++++++++++++++ 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/product_form_pricelist/models/product_pricelist_item.py b/product_form_pricelist/models/product_pricelist_item.py index 26b22115f49..fd7156087c6 100644 --- a/product_form_pricelist/models/product_pricelist_item.py +++ b/product_form_pricelist/models/product_pricelist_item.py @@ -9,17 +9,23 @@ class ProductPricelistItem(models.Model): _inherit = "product.pricelist.item" applied_on = fields.Selection( - compute="_compute_applied_on", + compute="_compute_applied_on_and_tmpl", + readonly=False, + store=True, + ) + product_tmpl_id = fields.Many2one( + compute="_compute_applied_on_and_tmpl", readonly=False, store=True, ) @api.depends("product_id", "product_tmpl_id") - def _compute_applied_on(self): + def _compute_applied_on_and_tmpl(self): # make applied_on consistent with manual input for record in self: if record.product_id: record.applied_on = "0_product_variant" + record.product_tmpl_id = record.product_id.product_tmpl_id elif record.product_tmpl_id: record.applied_on = "1_product" @@ -28,6 +34,11 @@ def _add_missing_default_values(self, values): # make applied_on consistent during import if values.get("product_id"): values["applied_on"] = "0_product_variant" + values["product_tmpl_id"] = ( + self.env["product.product"] + .browse(values["product_id"]) + .product_tmpl_id.id + ) elif values.get("product_tmpl_id"): values["applied_on"] = "1_product" return super()._add_missing_default_values(values) diff --git a/product_form_pricelist/tests/test_pricelist.py b/product_form_pricelist/tests/test_pricelist.py index 1d6d994283e..d242020857a 100644 --- a/product_form_pricelist/tests/test_pricelist.py +++ b/product_form_pricelist/tests/test_pricelist.py @@ -11,6 +11,7 @@ class TestPricelist(SavepointCase): def setUpClass(cls): super().setUpClass() cls.tmpl = cls.env["product.template"].create({"name": "Foo"}) + cls.variant = cls.tmpl.product_variant_ids def test_write_pricelist_item(self): price = self.env["product.pricelist.item"].create( @@ -32,3 +33,26 @@ def test_create_pricelist_item(self): } ) self.assertEqual(price.applied_on, "1_product") + + def test_create_variant_pricelist_item(self): + price = self.env["product.pricelist.item"].create( + { + "product_id": self.variant.id, + "fixed_price": 100, + } + ) + self.assertEqual(price.applied_on, "0_product_variant") + self.assertEqual(price.product_tmpl_id, self.tmpl) + + def test_write_variant_pricelist_item(self): + price = self.env["product.pricelist.item"].create( + { + "product_id": self.variant.id, + "fixed_price": 100, + } + ) + tmpl = self.env["product.template"].create({"name": "Foo"}) + variant = tmpl.product_variant_ids.id + price.product_id = variant + self.assertEqual(price.applied_on, "0_product_variant") + self.assertEqual(price.product_tmpl_id, tmpl) From fd756d4b9848895f21704043ae12cc516032ecc4 Mon Sep 17 00:00:00 2001 From: oca-travis Date: Fri, 5 Nov 2021 13:50:27 +0000 Subject: [PATCH 079/224] [UPD] Update product_form_pricelist.pot --- .../i18n/product_form_pricelist.pot | 110 ++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 product_form_pricelist/i18n/product_form_pricelist.pot diff --git a/product_form_pricelist/i18n/product_form_pricelist.pot b/product_form_pricelist/i18n/product_form_pricelist.pot new file mode 100644 index 00000000000..8d6de113928 --- /dev/null +++ b/product_form_pricelist/i18n/product_form_pricelist.pot @@ -0,0 +1,110 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_form_pricelist +# +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: product_form_pricelist +#: model:ir.model.fields,field_description:product_form_pricelist.field_product_pricelist_item__applied_on +msgid "Apply On" +msgstr "" + +#. module: product_form_pricelist +#: model:ir.model,name:product_form_pricelist.model_res_config_settings +msgid "Config Settings" +msgstr "" + +#. module: product_form_pricelist +#: model:ir.model.fields,field_description:product_form_pricelist.field_product_pricelist_item__display_name +#: model:ir.model.fields,field_description:product_form_pricelist.field_product_template__display_name +#: model:ir.model.fields,field_description:product_form_pricelist.field_res_config_settings__display_name +msgid "Display Name" +msgstr "" + +#. module: product_form_pricelist +#: model_terms:ir.ui.view,arch_db:product_form_pricelist.product_template_view_form +msgid "Fixed Price" +msgstr "" + +#. module: product_form_pricelist +#: model:ir.model.fields,field_description:product_form_pricelist.field_product_product__fixed_pricelist_item_ids +#: model:ir.model.fields,field_description:product_form_pricelist.field_product_template__fixed_pricelist_item_ids +msgid "Fixed Pricelist Items" +msgstr "" + +#. module: product_form_pricelist +#: model_terms:ir.ui.view,arch_db:product_form_pricelist.res_config_settings_view_form +msgid "Hide 'Sales Price' in product form" +msgstr "" + +#. module: product_form_pricelist +#: model:ir.model.fields,field_description:product_form_pricelist.field_res_config_settings__group_no_list_price +msgid "Hide field 'Sales price'" +msgstr "" + +#. module: product_form_pricelist +#: model:res.groups,name:product_form_pricelist.group_no_list_price +msgid "Hide list price on product" +msgstr "" + +#. module: product_form_pricelist +#: model:ir.model.fields,field_description:product_form_pricelist.field_product_pricelist_item__id +#: model:ir.model.fields,field_description:product_form_pricelist.field_product_template__id +#: model:ir.model.fields,field_description:product_form_pricelist.field_res_config_settings__id +msgid "ID" +msgstr "" + +#. module: product_form_pricelist +#: model_terms:ir.ui.view,arch_db:product_form_pricelist.res_config_settings_view_form +msgid "" +"In case that you only manage your price using fixed pricelist, you can hide " +"the field 'Sales Price'" +msgstr "" + +#. module: product_form_pricelist +#: model:ir.model.fields,field_description:product_form_pricelist.field_product_pricelist_item____last_update +#: model:ir.model.fields,field_description:product_form_pricelist.field_product_template____last_update +#: model:ir.model.fields,field_description:product_form_pricelist.field_res_config_settings____last_update +msgid "Last Modified on" +msgstr "" + +#. module: product_form_pricelist +#: model:ir.model.fields,help:product_form_pricelist.field_product_pricelist_item__applied_on +msgid "Pricelist Item applicable on selected option" +msgstr "" + +#. module: product_form_pricelist +#: model:ir.model,name:product_form_pricelist.model_product_pricelist_item +msgid "Pricelist Rule" +msgstr "" + +#. module: product_form_pricelist +#: model:ir.model.fields,field_description:product_form_pricelist.field_product_pricelist_item__product_tmpl_id +msgid "Product" +msgstr "" + +#. module: product_form_pricelist +#: model:ir.model,name:product_form_pricelist.model_product_template +msgid "Product Template" +msgstr "" + +#. module: product_form_pricelist +#: model:ir.model.fields,help:product_form_pricelist.field_product_pricelist_item__product_tmpl_id +msgid "" +"Specify a template if this rule only applies to one product template. Keep " +"empty otherwise." +msgstr "" + +#. module: product_form_pricelist +#: model:ir.model.fields,help:product_form_pricelist.field_res_config_settings__group_no_list_price +msgid "Use fixed price and hide the native 'Sales Price' field" +msgstr "" From 0b733f04ddb78845e6bf1e128d746a709c029d50 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Fri, 5 Nov 2021 14:38:15 +0000 Subject: [PATCH 080/224] [UPD] README.rst --- product_form_pricelist/README.rst | 82 ++++ .../static/description/index.html | 429 ++++++++++++++++++ 2 files changed, 511 insertions(+) create mode 100644 product_form_pricelist/README.rst create mode 100644 product_form_pricelist/static/description/index.html diff --git a/product_form_pricelist/README.rst b/product_form_pricelist/README.rst new file mode 100644 index 00000000000..b6ae225c3ba --- /dev/null +++ b/product_form_pricelist/README.rst @@ -0,0 +1,82 @@ +====================== +product_form_pricelist +====================== + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! 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--attribute-lightgray.png?logo=github + :target: https://github.com/OCA/product-attribute/tree/14.0/product_form_pricelist + :alt: OCA/product-attribute +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/product-attribute-14-0/product-attribute-14-0-product_form_pricelist + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/135/14.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module allow to fill directly from the product form the pricelist item for the product. +The type of pricelist item is always "fixed" + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +To use this module: + +#. Go to Product Template view +#. Edit the fixed pricelist item + +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 +~~~~~~~ + +* Akretion + +Contributors +~~~~~~~~~~~~ + +* Sébastien Beau + +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +This module is part of the `OCA/product-attribute `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/product_form_pricelist/static/description/index.html b/product_form_pricelist/static/description/index.html new file mode 100644 index 00000000000..3b6099a0705 --- /dev/null +++ b/product_form_pricelist/static/description/index.html @@ -0,0 +1,429 @@ + + + + + + +product_form_pricelist + + + +
      +

      product_form_pricelist

      + + +

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

      +

      This module allow to fill directly from the product form the pricelist item for the product. +The type of pricelist item is always “fixed”

      +

      Table of contents

      + +
      +

      Usage

      +

      To use this module:

      +
        +
      1. Go to Product Template view
      2. +
      3. Edit the fixed pricelist item
      4. +
      +
      +
      +

      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

      +
        +
      • Akretion
      • +
      +
      +
      +

      Contributors

      + +
      +
      +

      Maintainers

      +

      This module is maintained by the OCA.

      +Odoo Community Association +

      OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use.

      +

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

      +

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

      +
      +
      +
      + + From 0e61540c9cd7aa93ba065b56dcf118d574135211 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Fri, 5 Nov 2021 14:38:15 +0000 Subject: [PATCH 081/224] [ADD] icon.png --- .../static/description/icon.png | Bin 0 -> 9455 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 product_form_pricelist/static/description/icon.png diff --git a/product_form_pricelist/static/description/icon.png b/product_form_pricelist/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..3a0328b516c4980e8e44cdb63fd945757ddd132d GIT binary patch literal 9455 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 z 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 Xviia!U7SGha1wx#SCgwmn*{w2TRX*I literal 0 HcmV?d00001 From e6fb64e903cfda1b52c436560a45ef20b445c2f4 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Fri, 5 Nov 2021 14:38:15 +0000 Subject: [PATCH 082/224] product_form_pricelist 14.0.1.0.1 --- product_form_pricelist/__manifest__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/product_form_pricelist/__manifest__.py b/product_form_pricelist/__manifest__.py index 7910c6e8c0e..99116283087 100644 --- a/product_form_pricelist/__manifest__.py +++ b/product_form_pricelist/__manifest__.py @@ -4,7 +4,7 @@ { "name": "product_form_pricelist", "summary": "Show/edit pricelist in product form", - "version": "14.0.1.0.0", + "version": "14.0.1.0.1", "category": "Product", "website": "https://github.com/OCA/product-attribute", "author": " Akretion,Odoo Community Association (OCA)", From ebb07cbfe5b101cbb68523fd50763e3c89bd4439 Mon Sep 17 00:00:00 2001 From: oca-travis Date: Mon, 16 May 2022 20:53:54 +0000 Subject: [PATCH 083/224] [UPD] Update product_form_pricelist.pot --- product_form_pricelist/i18n/product_form_pricelist.pot | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/product_form_pricelist/i18n/product_form_pricelist.pot b/product_form_pricelist/i18n/product_form_pricelist.pot index 8d6de113928..a11b53295a9 100644 --- a/product_form_pricelist/i18n/product_form_pricelist.pot +++ b/product_form_pricelist/i18n/product_form_pricelist.pot @@ -14,6 +14,7 @@ msgstr "" "Plural-Forms: \n" #. module: product_form_pricelist +#: model:ir.model.fields,field_description:product_form_pricelist.field_product_pricelist_assortment_item__applied_on #: model:ir.model.fields,field_description:product_form_pricelist.field_product_pricelist_item__applied_on msgid "Apply On" msgstr "" @@ -78,6 +79,7 @@ msgid "Last Modified on" msgstr "" #. module: product_form_pricelist +#: model:ir.model.fields,help:product_form_pricelist.field_product_pricelist_assortment_item__applied_on #: model:ir.model.fields,help:product_form_pricelist.field_product_pricelist_item__applied_on msgid "Pricelist Item applicable on selected option" msgstr "" @@ -88,6 +90,7 @@ msgid "Pricelist Rule" msgstr "" #. module: product_form_pricelist +#: model:ir.model.fields,field_description:product_form_pricelist.field_product_pricelist_assortment_item__product_tmpl_id #: model:ir.model.fields,field_description:product_form_pricelist.field_product_pricelist_item__product_tmpl_id msgid "Product" msgstr "" @@ -98,6 +101,7 @@ msgid "Product Template" msgstr "" #. module: product_form_pricelist +#: model:ir.model.fields,help:product_form_pricelist.field_product_pricelist_assortment_item__product_tmpl_id #: model:ir.model.fields,help:product_form_pricelist.field_product_pricelist_item__product_tmpl_id msgid "" "Specify a template if this rule only applies to one product template. Keep " From 66f4a269ba883ca22a21360a4aaf90c7cfcb8e04 Mon Sep 17 00:00:00 2001 From: Francesco Foresti Date: Wed, 5 Jul 2023 09:53:23 +0000 Subject: [PATCH 084/224] Added translation using Weblate (Italian) Translated using Weblate (Italian) Currently translated at 100.0% (17 of 17 strings) Translation: product-attribute-14.0/product-attribute-14.0-product_form_pricelist Translate-URL: https://translation.odoo-community.org/projects/product-attribute-14-0/product-attribute-14-0-product_form_pricelist/it/ --- product_form_pricelist/i18n/it.po | 121 ++++++++++++++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 product_form_pricelist/i18n/it.po diff --git a/product_form_pricelist/i18n/it.po b/product_form_pricelist/i18n/it.po new file mode 100644 index 00000000000..b15561b610e --- /dev/null +++ b/product_form_pricelist/i18n/it.po @@ -0,0 +1,121 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_form_pricelist +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2023-07-05 12:10+0000\n" +"Last-Translator: Francesco Foresti \n" +"Language-Team: none\n" +"Language: it\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.17\n" + +#. module: product_form_pricelist +#: model:ir.model.fields,field_description:product_form_pricelist.field_product_pricelist_assortment_item__applied_on +#: model:ir.model.fields,field_description:product_form_pricelist.field_product_pricelist_item__applied_on +msgid "Apply On" +msgstr "Applica a" + +#. module: product_form_pricelist +#: model:ir.model,name:product_form_pricelist.model_res_config_settings +msgid "Config Settings" +msgstr "Impostazioni configurazione" + +#. module: product_form_pricelist +#: model:ir.model.fields,field_description:product_form_pricelist.field_product_pricelist_item__display_name +#: model:ir.model.fields,field_description:product_form_pricelist.field_product_template__display_name +#: model:ir.model.fields,field_description:product_form_pricelist.field_res_config_settings__display_name +msgid "Display Name" +msgstr "Nome visualizzato" + +#. module: product_form_pricelist +#: model_terms:ir.ui.view,arch_db:product_form_pricelist.product_template_view_form +msgid "Fixed Price" +msgstr "Prezzo fisso" + +#. module: product_form_pricelist +#: model:ir.model.fields,field_description:product_form_pricelist.field_product_product__fixed_pricelist_item_ids +#: model:ir.model.fields,field_description:product_form_pricelist.field_product_template__fixed_pricelist_item_ids +msgid "Fixed Pricelist Items" +msgstr "Articoli listino fisso" + +#. module: product_form_pricelist +#: model_terms:ir.ui.view,arch_db:product_form_pricelist.res_config_settings_view_form +msgid "Hide 'Sales Price' in product form" +msgstr "Nascondi \"Prezzo di vendita\" in maschera prodotto" + +#. module: product_form_pricelist +#: model:ir.model.fields,field_description:product_form_pricelist.field_res_config_settings__group_no_list_price +msgid "Hide field 'Sales price'" +msgstr "Nascondi campo \"Prezzo di vendita\"" + +#. module: product_form_pricelist +#: model:res.groups,name:product_form_pricelist.group_no_list_price +msgid "Hide list price on product" +msgstr "Nascondi prezzo di vendita sul prodotto" + +#. module: product_form_pricelist +#: model:ir.model.fields,field_description:product_form_pricelist.field_product_pricelist_item__id +#: model:ir.model.fields,field_description:product_form_pricelist.field_product_template__id +#: model:ir.model.fields,field_description:product_form_pricelist.field_res_config_settings__id +msgid "ID" +msgstr "ID" + +#. module: product_form_pricelist +#: model_terms:ir.ui.view,arch_db:product_form_pricelist.res_config_settings_view_form +msgid "" +"In case that you only manage your price using fixed pricelist, you can hide " +"the field 'Sales Price'" +msgstr "" +"In caso si gestiscano i prezzi utilizzando i listini prezzi fissi, puoi " +"nascondere il campo \"Prezzo di vendita\"" + +#. module: product_form_pricelist +#: model:ir.model.fields,field_description:product_form_pricelist.field_product_pricelist_item____last_update +#: model:ir.model.fields,field_description:product_form_pricelist.field_product_template____last_update +#: model:ir.model.fields,field_description:product_form_pricelist.field_res_config_settings____last_update +msgid "Last Modified on" +msgstr "Ultima modifica il" + +#. module: product_form_pricelist +#: model:ir.model.fields,help:product_form_pricelist.field_product_pricelist_assortment_item__applied_on +#: model:ir.model.fields,help:product_form_pricelist.field_product_pricelist_item__applied_on +msgid "Pricelist Item applicable on selected option" +msgstr "Riga listino applicabile all'opzione selezionata" + +#. module: product_form_pricelist +#: model:ir.model,name:product_form_pricelist.model_product_pricelist_item +msgid "Pricelist Rule" +msgstr "Regola listino prezzi" + +#. module: product_form_pricelist +#: model:ir.model.fields,field_description:product_form_pricelist.field_product_pricelist_assortment_item__product_tmpl_id +#: model:ir.model.fields,field_description:product_form_pricelist.field_product_pricelist_item__product_tmpl_id +msgid "Product" +msgstr "Prodotto" + +#. module: product_form_pricelist +#: model:ir.model,name:product_form_pricelist.model_product_template +msgid "Product Template" +msgstr "Modello prodotto" + +#. module: product_form_pricelist +#: model:ir.model.fields,help:product_form_pricelist.field_product_pricelist_assortment_item__product_tmpl_id +#: model:ir.model.fields,help:product_form_pricelist.field_product_pricelist_item__product_tmpl_id +msgid "" +"Specify a template if this rule only applies to one product template. Keep " +"empty otherwise." +msgstr "" +"Specifica un modello prodotto se questa regola si applica solo ad un modello " +"prodotto, altrimenti lascia vuoto." + +#. module: product_form_pricelist +#: model:ir.model.fields,help:product_form_pricelist.field_res_config_settings__group_no_list_price +msgid "Use fixed price and hide the native 'Sales Price' field" +msgstr "Usa prezzo fisso e nascondi il campo standard \"Prezzo di vendita\"" From 00b43ce40633267954465e03e08b4ff8f76b2049 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Sun, 3 Sep 2023 15:20:46 +0000 Subject: [PATCH 085/224] [UPD] README.rst --- product_form_pricelist/README.rst | 15 +++++--- .../static/description/index.html | 38 ++++++++++--------- 2 files changed, 29 insertions(+), 24 deletions(-) diff --git a/product_form_pricelist/README.rst b/product_form_pricelist/README.rst index b6ae225c3ba..c4aac82739e 100644 --- a/product_form_pricelist/README.rst +++ b/product_form_pricelist/README.rst @@ -2,10 +2,13 @@ product_form_pricelist ====================== -.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:7a6d9356a792ca0862383aa32f1668a4c75e08b499ccce4231012b796ed8f2ec + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png :target: https://odoo-community.org/page/development-status @@ -19,11 +22,11 @@ product_form_pricelist .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png :target: https://translation.odoo-community.org/projects/product-attribute-14-0/product-attribute-14-0-product_form_pricelist :alt: Translate me on Weblate -.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/135/14.0 - :alt: Try me on Runbot +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/product-attribute&target_branch=14.0 + :alt: Try me on Runboat -|badge1| |badge2| |badge3| |badge4| |badge5| +|badge1| |badge2| |badge3| |badge4| |badge5| This module allow to fill directly from the product form the pricelist item for the product. The type of pricelist item is always "fixed" @@ -46,7 +49,7 @@ 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 +If you spotted it first, help us to smash it by providing a detailed and welcomed `feedback `_. Do not contact contributors directly about support or help with technical issues. diff --git a/product_form_pricelist/static/description/index.html b/product_form_pricelist/static/description/index.html index 3b6099a0705..1a6fc4b845f 100644 --- a/product_form_pricelist/static/description/index.html +++ b/product_form_pricelist/static/description/index.html @@ -1,20 +1,20 @@ - + - + product_form_pricelist -
      -

      product_form_pricelist

      +
      + + +Odoo Community Association + +
      +

      product_form_pricelist

      -

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

      +

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

      This module allow to fill directly from the product form the pricelist item for the product. The type of pricelist item is always “fixed”

      Table of contents

      @@ -386,7 +391,7 @@

      product_form_pricelist

    -

    Usage

    +

    Usage

    To use this module:

    1. Go to Product Template view
    2. @@ -394,7 +399,7 @@

      Usage

    -

    Bug Tracker

    +

    Bug Tracker

    Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed @@ -402,21 +407,21 @@

    Bug Tracker

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

    + From 55aa2652e2e1836f8e82289ef2825421cb941eb9 Mon Sep 17 00:00:00 2001 From: Bosd Date: Fri, 29 Aug 2025 11:25:29 +0000 Subject: [PATCH 092/224] Added translation using Weblate (Dutch) Translated using Weblate (Dutch) Currently translated at 100.0% (13 of 13 strings) Translation: product-attribute-17.0/product-attribute-17.0-product_form_pricelist Translate-URL: https://translation.odoo-community.org/projects/product-attribute-17-0/product-attribute-17-0-product_form_pricelist/nl/ --- product_form_pricelist/i18n/nl.po | 97 +++++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 product_form_pricelist/i18n/nl.po diff --git a/product_form_pricelist/i18n/nl.po b/product_form_pricelist/i18n/nl.po new file mode 100644 index 00000000000..ccac47e6148 --- /dev/null +++ b/product_form_pricelist/i18n/nl.po @@ -0,0 +1,97 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_form_pricelist +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 17.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2025-08-29 13:43+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 5.10.4\n" + +#. module: product_form_pricelist +#: model:ir.model.fields,field_description:product_form_pricelist.field_product_pricelist_assortment_item__applied_on +#: model:ir.model.fields,field_description:product_form_pricelist.field_product_pricelist_item__applied_on +msgid "Apply On" +msgstr "Toepassen op" + +#. module: product_form_pricelist +#: model:ir.model,name:product_form_pricelist.model_res_config_settings +msgid "Config Settings" +msgstr "Configuratie-instellingen" + +#. module: product_form_pricelist +#: model_terms:ir.ui.view,arch_db:product_form_pricelist.product_template_view_form +msgid "Fixed Price" +msgstr "Vaste prijs" + +#. module: product_form_pricelist +#: model:ir.model.fields,field_description:product_form_pricelist.field_product_product__fixed_pricelist_item_ids +#: model:ir.model.fields,field_description:product_form_pricelist.field_product_template__fixed_pricelist_item_ids +msgid "Fixed Pricelist Items" +msgstr "Vaste prijslijstitems" + +#. module: product_form_pricelist +#: model_terms:ir.ui.view,arch_db:product_form_pricelist.res_config_settings_view_form +msgid "Hide 'Sales Price' in product form" +msgstr "Verkoopprijs verbergen in het productformulier" + +#. module: product_form_pricelist +#: model:ir.model.fields,field_description:product_form_pricelist.field_res_config_settings__group_no_list_price +msgid "Hide field 'Sales price'" +msgstr "Veld 'Verkoopprijs' verbergen" + +#. module: product_form_pricelist +#: model:res.groups,name:product_form_pricelist.group_no_list_price +msgid "Hide list price on product" +msgstr "Catalogusprijs verbergen op product" + +#. module: product_form_pricelist +#: model_terms:ir.ui.view,arch_db:product_form_pricelist.res_config_settings_view_form +msgid "" +"In case that you only manage your price using fixed pricelist, you can hide " +"the field 'Sales Price'" +msgstr "" +"Als u uw prijzen uitsluitend beheert via een vaste prijslijst, kunt u het " +"veld 'Verkoopprijs' verbergen" + +#. module: product_form_pricelist +#: model:ir.model.fields,help:product_form_pricelist.field_product_pricelist_assortment_item__applied_on +#: model:ir.model.fields,help:product_form_pricelist.field_product_pricelist_item__applied_on +msgid "Pricelist Item applicable on selected option" +msgstr "Prijslijstitem van toepassing op geselecteerde optie" + +#. module: product_form_pricelist +#: model:ir.model,name:product_form_pricelist.model_product_pricelist_item +msgid "Pricelist Rule" +msgstr "Prijslijstregel" + +#. module: product_form_pricelist +#: model:ir.model,name:product_form_pricelist.model_product_template +#: model:ir.model.fields,field_description:product_form_pricelist.field_product_pricelist_assortment_item__product_tmpl_id +#: model:ir.model.fields,field_description:product_form_pricelist.field_product_pricelist_item__product_tmpl_id +msgid "Product" +msgstr "Product" + +#. module: product_form_pricelist +#: model:ir.model.fields,help:product_form_pricelist.field_product_pricelist_assortment_item__product_tmpl_id +#: model:ir.model.fields,help:product_form_pricelist.field_product_pricelist_item__product_tmpl_id +msgid "" +"Specify a template if this rule only applies to one product template. Keep " +"empty otherwise." +msgstr "" +"Specificeer een sjabloon als deze regel alleen van toepassing is op één " +"productsjabloon. Anders leeg laten." + +#. module: product_form_pricelist +#: model:ir.model.fields,help:product_form_pricelist.field_res_config_settings__group_no_list_price +msgid "Use fixed price and hide the native 'Sales Price' field" +msgstr "" +"Gebruik een vaste prijs en verberg het oorspronkelijke veld 'Verkoopprijs'" From f8de1722987cf1f66a749eb8547ae7838f1992a2 Mon Sep 17 00:00:00 2001 From: oca-ci Date: Wed, 29 Oct 2025 13:38:16 +0000 Subject: [PATCH 093/224] [UPD] Update product_customerinfo.pot --- .../i18n/product_customerinfo.pot | 30 +++++++++---------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/product_customerinfo/i18n/product_customerinfo.pot b/product_customerinfo/i18n/product_customerinfo.pot index 90bdf911f33..a2c975e15af 100644 --- a/product_customerinfo/i18n/product_customerinfo.pot +++ b/product_customerinfo/i18n/product_customerinfo.pot @@ -107,15 +107,13 @@ msgid "Customer of this product" msgstr "" #. module: product_customerinfo -#: model_terms:ir.ui.view,arch_db:product_customerinfo.product_template_form_view -msgid "Customers" +#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__product_uom +msgid "Customer specific unit of measure." msgstr "" #. module: product_customerinfo -#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__product_uom -msgid "" -"Default unit of measure used for purchase orders. It must be in the same " -"category as the default unit of measure." +#: model_terms:ir.ui.view,arch_db:product_customerinfo.product_template_form_view +msgid "Customers" msgstr "" #. module: product_customerinfo @@ -145,7 +143,7 @@ msgstr "" #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__date_end -msgid "End date for this vendor price" +msgid "End date for this customer price" msgstr "" #. module: product_customerinfo @@ -214,6 +212,11 @@ msgstr "" msgid "Price List" msgstr "" +#. module: product_customerinfo +#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__price +msgid "Price at which the product is sold to this customer." +msgstr "" + #. module: product_customerinfo #: model:ir.model,name:product_customerinfo.model_product_pricelist_item msgid "Pricelist Rule" @@ -260,7 +263,7 @@ msgstr "" #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__date_start -msgid "Start date for this vendor price" +msgid "Start date for this customer price" msgstr "" #. module: product_customerinfo @@ -268,17 +271,12 @@ msgstr "" msgid "Supplier Pricelist" msgstr "" -#. module: product_customerinfo -#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__price -msgid "The price to purchase a product" -msgstr "" - #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__min_qty msgid "" -"The quantity to purchase from this vendor to benefit from the price, " -"expressed in the vendor Product Unit of Measure if not any, in the default " -"unit of measure of the product otherwise." +"The minimum quantity to purchase for this customer to benefit from the " +"price. Expressed in the customer's Product Unit of Measure if set, otherwise" +" in the default Product Unit of Measure." msgstr "" #. module: product_customerinfo From 94d7c3e9498133309d7be264b653126080decb1f Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Wed, 29 Oct 2025 13:43:13 +0000 Subject: [PATCH 094/224] [BOT] post-merge updates --- README.md | 2 +- product_customerinfo/README.rst | 27 +++++++++---------- product_customerinfo/__manifest__.py | 2 +- .../static/description/index.html | 9 +++---- 4 files changed, 19 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index ce9d7371538..97e22ef7d90 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ addon | version | maintainers | summary [product_code_unique](product_code_unique/) | 18.0.1.0.0 | | Set Product Internal Reference as Unique [product_company_default](product_company_default/) | 18.0.1.0.0 | | Product Company Default [product_cost_security](product_cost_security/) | 18.0.1.0.0 | sergio-teruel rafaelbn yajo | Product cost security restriction view -[product_customerinfo](product_customerinfo/) | 18.0.1.1.1 | luisg123v | Allows to define prices for customers in the products +[product_customerinfo](product_customerinfo/) | 18.0.1.2.0 | luisg123v | Allows to define prices for customers in the products [product_dimension](product_dimension/) | 18.0.1.0.0 | | Product Dimension [product_drained_weight](product_drained_weight/) | 18.0.1.0.0 | | Add 'Drained Weight' on product models [product_get_price_helper](product_get_price_helper/) | 18.0.1.1.0 | | This module provides a helper function to compute product prices. diff --git a/product_customerinfo/README.rst b/product_customerinfo/README.rst index 4ada588eb04..d5635db8fcb 100644 --- a/product_customerinfo/README.rst +++ b/product_customerinfo/README.rst @@ -11,7 +11,7 @@ Product Supplierinfo for Customers !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:7a01a3bac8aef2bd72c38ed73074413a5c54966d5dc2396b209408aac97cffa9 + !! source digest: sha256:aad262a0eaa80bca01b2f21e35b9ce969972ba624af80d62ac787e0a45e75525 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png @@ -72,10 +72,9 @@ from the supplierinfo at the product form. Known issues / Roadmap ====================== -- Product prices through this method are only guaranteed on the - standard sale order workflow. Other custom flows maybe don't reflect - the price. -- The minimum quantity will neither apply on sale orders. +- Product prices through this method are only guaranteed on the standard + sale order workflow. Other custom flows maybe don't reflect the price. +- The minimum quantity will neither apply on sale orders. Bug Tracker =========== @@ -99,18 +98,18 @@ Authors Contributors ------------ -- Oihane Crucelaegui -- Aaron Henriquez -- Miquel Raïch -- `Tecnativa `__: +- Oihane Crucelaegui +- Aaron Henriquez +- Miquel Raïch +- `Tecnativa `__: - - Pedro M. Baeza - - Sergio Teruel - - Carlos Lopez + - Pedro M. Baeza + - Sergio Teruel + - Carlos Lopez -- `Komit `__: +- `Komit `__: - - Vang Nguyen Phu + - Vang Nguyen Phu Maintainers ----------- diff --git a/product_customerinfo/__manifest__.py b/product_customerinfo/__manifest__.py index 464f06dec03..1b069e6fa5e 100644 --- a/product_customerinfo/__manifest__.py +++ b/product_customerinfo/__manifest__.py @@ -6,7 +6,7 @@ { "name": "Product Supplierinfo for Customers", "summary": "Allows to define prices for customers in the products", - "version": "18.0.1.1.1", + "version": "18.0.1.2.0", "development_status": "Production/Stable", "author": "AvanzOSC, Tecnativa, Odoo Community Association (OCA)", "website": "https://github.com/OCA/product-attribute", diff --git a/product_customerinfo/static/description/index.html b/product_customerinfo/static/description/index.html index a093ff433d4..02a13030adc 100644 --- a/product_customerinfo/static/description/index.html +++ b/product_customerinfo/static/description/index.html @@ -372,9 +372,9 @@

    Product Supplierinfo for Customers

    !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:7a01a3bac8aef2bd72c38ed73074413a5c54966d5dc2396b209408aac97cffa9 +!! source digest: sha256:aad262a0eaa80bca01b2f21e35b9ce969972ba624af80d62ac787e0a45e75525 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

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

    +

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

    This module allows you to define a customer-specific product data structure (patterned after the standard supplier/vendor info) on the product form.

    @@ -419,9 +419,8 @@

    Usage

    Known issues / Roadmap

      -
    • Product prices through this method are only guaranteed on the -standard sale order workflow. Other custom flows maybe don’t reflect -the price.
    • +
    • Product prices through this method are only guaranteed on the standard +sale order workflow. Other custom flows maybe don’t reflect the price.
    • The minimum quantity will neither apply on sale orders.
    From 2f7b297dfe84a5f1b93caa704e719f07a5cf2b85 Mon Sep 17 00:00:00 2001 From: Weblate Date: Wed, 29 Oct 2025 13:43:51 +0000 Subject: [PATCH 095/224] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: product-attribute-18.0/product-attribute-18.0-product_customerinfo Translate-URL: https://translation.odoo-community.org/projects/product-attribute-18-0/product-attribute-18-0-product_customerinfo/ --- product_customerinfo/i18n/ca.po | 57 ++++++++++++++++---------- product_customerinfo/i18n/de.po | 32 +++++++-------- product_customerinfo/i18n/es.po | 66 +++++++++++++++++++----------- product_customerinfo/i18n/fr.po | 66 +++++++++++++++++++----------- product_customerinfo/i18n/it.po | 66 +++++++++++++++++++----------- product_customerinfo/i18n/nl.po | 30 +++++++------- product_customerinfo/i18n/nl_NL.po | 66 +++++++++++++++++++----------- product_customerinfo/i18n/pt_BR.po | 66 +++++++++++++++++++----------- product_customerinfo/i18n/sl.po | 32 +++++++-------- 9 files changed, 289 insertions(+), 192 deletions(-) diff --git a/product_customerinfo/i18n/ca.po b/product_customerinfo/i18n/ca.po index f240915a5a8..503e65fa063 100644 --- a/product_customerinfo/i18n/ca.po +++ b/product_customerinfo/i18n/ca.po @@ -109,18 +109,16 @@ msgstr "Nom del producte del client" msgid "Customer of this product" msgstr "Client d’aquest producte" +#. module: product_customerinfo +#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__product_uom +msgid "Customer specific unit of measure." +msgstr "" + #. module: product_customerinfo #: model_terms:ir.ui.view,arch_db:product_customerinfo.product_template_form_view msgid "Customers" msgstr "Clients" -#. module: product_customerinfo -#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__product_uom -msgid "" -"Default unit of measure used for purchase orders. It must be in the same " -"category as the default unit of measure." -msgstr "" - #. module: product_customerinfo #: model:ir.model.fields,field_description:product_customerinfo.field_product_customerinfo__delay msgid "Delivery Lead Time" @@ -148,8 +146,8 @@ msgstr "Data final" #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__date_end -msgid "End date for this vendor price" -msgstr "Data de finalització d’aquest preu de venda" +msgid "End date for this customer price" +msgstr "" #. module: product_customerinfo #: model_terms:ir.ui.view,arch_db:product_customerinfo.product_customerinfo_search_view @@ -222,6 +220,11 @@ msgstr "Preu" msgid "Price List" msgstr "Llista de preu" +#. module: product_customerinfo +#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__price +msgid "Price at which the product is sold to this customer." +msgstr "" + #. module: product_customerinfo #: model:ir.model,name:product_customerinfo.model_product_pricelist_item msgid "Pricelist Rule" @@ -268,29 +271,21 @@ msgstr "Data d'inici" #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__date_start -msgid "Start date for this vendor price" -msgstr "Data d'inici d'aquest preu de venda" +msgid "Start date for this customer price" +msgstr "" #. module: product_customerinfo #: model:ir.model,name:product_customerinfo.model_product_supplierinfo msgid "Supplier Pricelist" msgstr "Llista de preus del proveïdor" -#. module: product_customerinfo -#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__price -msgid "The price to purchase a product" -msgstr "El preu per comprar un producte" - #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__min_qty msgid "" -"The quantity to purchase from this vendor to benefit from the price, " -"expressed in the vendor Product Unit of Measure if not any, in the default " -"unit of measure of the product otherwise." +"The minimum quantity to purchase for this customer to benefit from the " +"price. Expressed in the customer's Product Unit of Measure if set, otherwise " +"in the default Product Unit of Measure." msgstr "" -"La quantitat que s'ha de comprar a aquest proveïdor per beneficiar-se del " -"preu, expressada en la unitat de mesura del producte del proveïdor, si no, a " -"la unitat de mesura per defecte del producte." #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__product_code @@ -336,6 +331,24 @@ msgstr "Client variant" msgid "to" msgstr "a" +#~ msgid "End date for this vendor price" +#~ msgstr "Data de finalització d’aquest preu de venda" + +#~ msgid "Start date for this vendor price" +#~ msgstr "Data d'inici d'aquest preu de venda" + +#~ msgid "The price to purchase a product" +#~ msgstr "El preu per comprar un producte" + +#~ msgid "" +#~ "The quantity to purchase from this vendor to benefit from the price, " +#~ "expressed in the vendor Product Unit of Measure if not any, in the " +#~ "default unit of measure of the product otherwise." +#~ msgstr "" +#~ "La quantitat que s'ha de comprar a aquest proveïdor per beneficiar-se del " +#~ "preu, expressada en la unitat de mesura del producte del proveïdor, si " +#~ "no, a la unitat de mesura per defecte del producte." + #~ msgid "Customer Information" #~ msgstr "Informació de client" diff --git a/product_customerinfo/i18n/de.po b/product_customerinfo/i18n/de.po index 720ca4411c6..de2653a091c 100644 --- a/product_customerinfo/i18n/de.po +++ b/product_customerinfo/i18n/de.po @@ -116,18 +116,16 @@ msgstr "Produktbezeichnung des Partners" msgid "Customer of this product" msgstr "Artikelnummer des Partners" +#. module: product_customerinfo +#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__product_uom +msgid "Customer specific unit of measure." +msgstr "" + #. module: product_customerinfo #: model_terms:ir.ui.view,arch_db:product_customerinfo.product_template_form_view msgid "Customers" msgstr "Kunden" -#. module: product_customerinfo -#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__product_uom -msgid "" -"Default unit of measure used for purchase orders. It must be in the same " -"category as the default unit of measure." -msgstr "" - #. module: product_customerinfo #: model:ir.model.fields,field_description:product_customerinfo.field_product_customerinfo__delay msgid "Delivery Lead Time" @@ -155,7 +153,7 @@ msgstr "" #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__date_end -msgid "End date for this vendor price" +msgid "End date for this customer price" msgstr "" #. module: product_customerinfo @@ -226,6 +224,11 @@ msgstr "Preisliste" msgid "Price List" msgstr "Preisliste" +#. module: product_customerinfo +#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__price +msgid "Price at which the product is sold to this customer." +msgstr "" + #. module: product_customerinfo #: model:ir.model,name:product_customerinfo.model_product_pricelist_item #, fuzzy @@ -275,7 +278,7 @@ msgstr "" #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__date_start -msgid "Start date for this vendor price" +msgid "Start date for this customer price" msgstr "" #. module: product_customerinfo @@ -284,17 +287,12 @@ msgstr "" msgid "Supplier Pricelist" msgstr "Preisliste" -#. module: product_customerinfo -#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__price -msgid "The price to purchase a product" -msgstr "" - #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__min_qty msgid "" -"The quantity to purchase from this vendor to benefit from the price, " -"expressed in the vendor Product Unit of Measure if not any, in the default " -"unit of measure of the product otherwise." +"The minimum quantity to purchase for this customer to benefit from the " +"price. Expressed in the customer's Product Unit of Measure if set, otherwise " +"in the default Product Unit of Measure." msgstr "" #. module: product_customerinfo diff --git a/product_customerinfo/i18n/es.po b/product_customerinfo/i18n/es.po index aae98ac3beb..7855f486a97 100644 --- a/product_customerinfo/i18n/es.po +++ b/product_customerinfo/i18n/es.po @@ -112,20 +112,16 @@ msgstr "Nombre Producto Cliente" msgid "Customer of this product" msgstr "Cliente de este producto" +#. module: product_customerinfo +#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__product_uom +msgid "Customer specific unit of measure." +msgstr "" + #. module: product_customerinfo #: model_terms:ir.ui.view,arch_db:product_customerinfo.product_template_form_view msgid "Customers" msgstr "Clientes" -#. module: product_customerinfo -#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__product_uom -msgid "" -"Default unit of measure used for purchase orders. It must be in the same " -"category as the default unit of measure." -msgstr "" -"Unidad de medida por defecto utilizada para los pedidos de compra. Debe " -"pertenecer a la misma categoría que la unidad de medida por defecto." - #. module: product_customerinfo #: model:ir.model.fields,field_description:product_customerinfo.field_product_customerinfo__delay msgid "Delivery Lead Time" @@ -153,8 +149,8 @@ msgstr "Fecha final" #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__date_end -msgid "End date for this vendor price" -msgstr "Fecha final para este precio de proveedor" +msgid "End date for this customer price" +msgstr "" #. module: product_customerinfo #: model_terms:ir.ui.view,arch_db:product_customerinfo.product_customerinfo_search_view @@ -227,6 +223,11 @@ msgstr "Precio" msgid "Price List" msgstr "Tarifa" +#. module: product_customerinfo +#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__price +msgid "Price at which the product is sold to this customer." +msgstr "" + #. module: product_customerinfo #: model:ir.model,name:product_customerinfo.model_product_pricelist_item msgid "Pricelist Rule" @@ -273,29 +274,21 @@ msgstr "Fecha inicial" #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__date_start -msgid "Start date for this vendor price" -msgstr "Fecha inicial para este precio de proveedor" +msgid "Start date for this customer price" +msgstr "" #. module: product_customerinfo #: model:ir.model,name:product_customerinfo.model_product_supplierinfo msgid "Supplier Pricelist" msgstr "Tarifa de proveedor" -#. module: product_customerinfo -#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__price -msgid "The price to purchase a product" -msgstr "El precio al que se compra un producto" - #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__min_qty msgid "" -"The quantity to purchase from this vendor to benefit from the price, " -"expressed in the vendor Product Unit of Measure if not any, in the default " -"unit of measure of the product otherwise." +"The minimum quantity to purchase for this customer to benefit from the " +"price. Expressed in the customer's Product Unit of Measure if set, otherwise " +"in the default Product Unit of Measure." msgstr "" -"Cantidad mínima a comprar de este proveedor, expresada en la unidad de " -"producto del proveedor si existe o, en otro caso, en la unidad de medida por " -"defecto del producto." #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__product_code @@ -341,6 +334,31 @@ msgstr "Variante de cliente" msgid "to" msgstr "para" +#~ msgid "" +#~ "Default unit of measure used for purchase orders. It must be in the same " +#~ "category as the default unit of measure." +#~ msgstr "" +#~ "Unidad de medida por defecto utilizada para los pedidos de compra. Debe " +#~ "pertenecer a la misma categoría que la unidad de medida por defecto." + +#~ msgid "End date for this vendor price" +#~ msgstr "Fecha final para este precio de proveedor" + +#~ msgid "Start date for this vendor price" +#~ msgstr "Fecha inicial para este precio de proveedor" + +#~ msgid "The price to purchase a product" +#~ msgstr "El precio al que se compra un producto" + +#~ msgid "" +#~ "The quantity to purchase from this vendor to benefit from the price, " +#~ "expressed in the vendor Product Unit of Measure if not any, in the " +#~ "default unit of measure of the product otherwise." +#~ msgstr "" +#~ "Cantidad mínima a comprar de este proveedor, expresada en la unidad de " +#~ "producto del proveedor si existe o, en otro caso, en la unidad de medida " +#~ "por defecto del producto." + #~ msgid "Customer Information" #~ msgstr "Información de Cliente" diff --git a/product_customerinfo/i18n/fr.po b/product_customerinfo/i18n/fr.po index 2986d2b7540..4a49f527ba8 100644 --- a/product_customerinfo/i18n/fr.po +++ b/product_customerinfo/i18n/fr.po @@ -113,20 +113,16 @@ msgstr "Nom du produit client" msgid "Customer of this product" msgstr "Client de ce produit" +#. module: product_customerinfo +#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__product_uom +msgid "Customer specific unit of measure." +msgstr "" + #. module: product_customerinfo #: model_terms:ir.ui.view,arch_db:product_customerinfo.product_template_form_view msgid "Customers" msgstr "Clients" -#. module: product_customerinfo -#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__product_uom -msgid "" -"Default unit of measure used for purchase orders. It must be in the same " -"category as the default unit of measure." -msgstr "" -"Unité de mesure par défaut utilisée pour les commandes. Elle doit appartenir " -"à la même catégorie que l'unité de mesure par défaut." - #. module: product_customerinfo #: model:ir.model.fields,field_description:product_customerinfo.field_product_customerinfo__delay msgid "Delivery Lead Time" @@ -154,8 +150,8 @@ msgstr "Date de fin" #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__date_end -msgid "End date for this vendor price" -msgstr "Date de fin pour ce prix fournisseur" +msgid "End date for this customer price" +msgstr "" #. module: product_customerinfo #: model_terms:ir.ui.view,arch_db:product_customerinfo.product_customerinfo_search_view @@ -229,6 +225,11 @@ msgstr "Prix" msgid "Price List" msgstr "Liste de prix" +#. module: product_customerinfo +#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__price +msgid "Price at which the product is sold to this customer." +msgstr "" + #. module: product_customerinfo #: model:ir.model,name:product_customerinfo.model_product_pricelist_item msgid "Pricelist Rule" @@ -275,29 +276,21 @@ msgstr "Date de début" #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__date_start -msgid "Start date for this vendor price" -msgstr "Date de début pour ce prix fournisseur" +msgid "Start date for this customer price" +msgstr "" #. module: product_customerinfo #: model:ir.model,name:product_customerinfo.model_product_supplierinfo msgid "Supplier Pricelist" msgstr "Liste de prix fournisseur" -#. module: product_customerinfo -#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__price -msgid "The price to purchase a product" -msgstr "Le prix d'achat d'un produit" - #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__min_qty msgid "" -"The quantity to purchase from this vendor to benefit from the price, " -"expressed in the vendor Product Unit of Measure if not any, in the default " -"unit of measure of the product otherwise." +"The minimum quantity to purchase for this customer to benefit from the " +"price. Expressed in the customer's Product Unit of Measure if set, otherwise " +"in the default Product Unit of Measure." msgstr "" -"La quantité à acheter à ce vendeur pour bénéficier du prix, exprimée dans " -"l'unité de mesure du produit du vendeur s'il n'y en a pas, dans l'unité de " -"mesure par défaut du produit dans le cas contraire." #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__product_code @@ -343,6 +336,31 @@ msgstr "Variante Client" msgid "to" msgstr "à" +#~ msgid "" +#~ "Default unit of measure used for purchase orders. It must be in the same " +#~ "category as the default unit of measure." +#~ msgstr "" +#~ "Unité de mesure par défaut utilisée pour les commandes. Elle doit " +#~ "appartenir à la même catégorie que l'unité de mesure par défaut." + +#~ msgid "End date for this vendor price" +#~ msgstr "Date de fin pour ce prix fournisseur" + +#~ msgid "Start date for this vendor price" +#~ msgstr "Date de début pour ce prix fournisseur" + +#~ msgid "The price to purchase a product" +#~ msgstr "Le prix d'achat d'un produit" + +#~ msgid "" +#~ "The quantity to purchase from this vendor to benefit from the price, " +#~ "expressed in the vendor Product Unit of Measure if not any, in the " +#~ "default unit of measure of the product otherwise." +#~ msgstr "" +#~ "La quantité à acheter à ce vendeur pour bénéficier du prix, exprimée dans " +#~ "l'unité de mesure du produit du vendeur s'il n'y en a pas, dans l'unité " +#~ "de mesure par défaut du produit dans le cas contraire." + #~ msgid "Customer Information" #~ msgstr "Informations du client" diff --git a/product_customerinfo/i18n/it.po b/product_customerinfo/i18n/it.po index 47dcaf4c6ca..bc2e9797e35 100644 --- a/product_customerinfo/i18n/it.po +++ b/product_customerinfo/i18n/it.po @@ -114,20 +114,16 @@ msgstr "Nome prodotto cliente" msgid "Customer of this product" msgstr "Cliente di questo prodotto" +#. module: product_customerinfo +#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__product_uom +msgid "Customer specific unit of measure." +msgstr "" + #. module: product_customerinfo #: model_terms:ir.ui.view,arch_db:product_customerinfo.product_template_form_view msgid "Customers" msgstr "Clienti" -#. module: product_customerinfo -#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__product_uom -msgid "" -"Default unit of measure used for purchase orders. It must be in the same " -"category as the default unit of measure." -msgstr "" -"Unità di misura predefinita utilizzata per ordini di acquisto. Deve essere " -"della stessa categoria dell'unità di misura predefinita." - #. module: product_customerinfo #: model:ir.model.fields,field_description:product_customerinfo.field_product_customerinfo__delay msgid "Delivery Lead Time" @@ -155,8 +151,8 @@ msgstr "Data fine" #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__date_end -msgid "End date for this vendor price" -msgstr "Data di fine per questo prezzo fornitore" +msgid "End date for this customer price" +msgstr "" #. module: product_customerinfo #: model_terms:ir.ui.view,arch_db:product_customerinfo.product_customerinfo_search_view @@ -229,6 +225,11 @@ msgstr "Prezzo" msgid "Price List" msgstr "Listino prezzi" +#. module: product_customerinfo +#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__price +msgid "Price at which the product is sold to this customer." +msgstr "" + #. module: product_customerinfo #: model:ir.model,name:product_customerinfo.model_product_pricelist_item msgid "Pricelist Rule" @@ -275,29 +276,21 @@ msgstr "Data inizio" #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__date_start -msgid "Start date for this vendor price" -msgstr "Data di inizio per il prezzo di questo fornitore" +msgid "Start date for this customer price" +msgstr "" #. module: product_customerinfo #: model:ir.model,name:product_customerinfo.model_product_supplierinfo msgid "Supplier Pricelist" msgstr "Listino prezzi fornitore" -#. module: product_customerinfo -#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__price -msgid "The price to purchase a product" -msgstr "Prezzo di acquisto di un prodotto" - #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__min_qty msgid "" -"The quantity to purchase from this vendor to benefit from the price, " -"expressed in the vendor Product Unit of Measure if not any, in the default " -"unit of measure of the product otherwise." +"The minimum quantity to purchase for this customer to benefit from the " +"price. Expressed in the customer's Product Unit of Measure if set, otherwise " +"in the default Product Unit of Measure." msgstr "" -"La quantità da acquistare da questo fornitore per beneficiare del prezzo, " -"espresso nell'unità di misura del prodotto del fornitore se non presente, " -"altrimenti nell'unità di misura del prodotto." #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__product_code @@ -343,6 +336,31 @@ msgstr "Variante cliente" msgid "to" msgstr "a" +#~ msgid "" +#~ "Default unit of measure used for purchase orders. It must be in the same " +#~ "category as the default unit of measure." +#~ msgstr "" +#~ "Unità di misura predefinita utilizzata per ordini di acquisto. Deve " +#~ "essere della stessa categoria dell'unità di misura predefinita." + +#~ msgid "End date for this vendor price" +#~ msgstr "Data di fine per questo prezzo fornitore" + +#~ msgid "Start date for this vendor price" +#~ msgstr "Data di inizio per il prezzo di questo fornitore" + +#~ msgid "The price to purchase a product" +#~ msgstr "Prezzo di acquisto di un prodotto" + +#~ msgid "" +#~ "The quantity to purchase from this vendor to benefit from the price, " +#~ "expressed in the vendor Product Unit of Measure if not any, in the " +#~ "default unit of measure of the product otherwise." +#~ msgstr "" +#~ "La quantità da acquistare da questo fornitore per beneficiare del prezzo, " +#~ "espresso nell'unità di misura del prodotto del fornitore se non presente, " +#~ "altrimenti nell'unità di misura del prodotto." + #~ msgid "Customer Information" #~ msgstr "Informazioni cliente" diff --git a/product_customerinfo/i18n/nl.po b/product_customerinfo/i18n/nl.po index dd4c0f89cc3..6df2fc23e15 100644 --- a/product_customerinfo/i18n/nl.po +++ b/product_customerinfo/i18n/nl.po @@ -108,15 +108,13 @@ msgid "Customer of this product" msgstr "" #. module: product_customerinfo -#: model_terms:ir.ui.view,arch_db:product_customerinfo.product_template_form_view -msgid "Customers" +#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__product_uom +msgid "Customer specific unit of measure." msgstr "" #. module: product_customerinfo -#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__product_uom -msgid "" -"Default unit of measure used for purchase orders. It must be in the same " -"category as the default unit of measure." +#: model_terms:ir.ui.view,arch_db:product_customerinfo.product_template_form_view +msgid "Customers" msgstr "" #. module: product_customerinfo @@ -146,7 +144,7 @@ msgstr "" #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__date_end -msgid "End date for this vendor price" +msgid "End date for this customer price" msgstr "" #. module: product_customerinfo @@ -215,6 +213,11 @@ msgstr "" msgid "Price List" msgstr "" +#. module: product_customerinfo +#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__price +msgid "Price at which the product is sold to this customer." +msgstr "" + #. module: product_customerinfo #: model:ir.model,name:product_customerinfo.model_product_pricelist_item msgid "Pricelist Rule" @@ -261,7 +264,7 @@ msgstr "" #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__date_start -msgid "Start date for this vendor price" +msgid "Start date for this customer price" msgstr "" #. module: product_customerinfo @@ -269,17 +272,12 @@ msgstr "" msgid "Supplier Pricelist" msgstr "" -#. module: product_customerinfo -#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__price -msgid "The price to purchase a product" -msgstr "" - #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__min_qty msgid "" -"The quantity to purchase from this vendor to benefit from the price, " -"expressed in the vendor Product Unit of Measure if not any, in the default " -"unit of measure of the product otherwise." +"The minimum quantity to purchase for this customer to benefit from the " +"price. Expressed in the customer's Product Unit of Measure if set, otherwise " +"in the default Product Unit of Measure." msgstr "" #. module: product_customerinfo diff --git a/product_customerinfo/i18n/nl_NL.po b/product_customerinfo/i18n/nl_NL.po index 6a2c8dd0b21..8e03e3b5dac 100644 --- a/product_customerinfo/i18n/nl_NL.po +++ b/product_customerinfo/i18n/nl_NL.po @@ -114,20 +114,16 @@ msgstr "Naam van het product van de klant" msgid "Customer of this product" msgstr "Klant van dit product" +#. module: product_customerinfo +#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__product_uom +msgid "Customer specific unit of measure." +msgstr "" + #. module: product_customerinfo #: model_terms:ir.ui.view,arch_db:product_customerinfo.product_template_form_view msgid "Customers" msgstr "Klanten" -#. module: product_customerinfo -#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__product_uom -msgid "" -"Default unit of measure used for purchase orders. It must be in the same " -"category as the default unit of measure." -msgstr "" -"Standaard meeteenheid die gebruikt wordt voor aankooporders. Deze moet in " -"dezelfde categorie vallen als de standaard meeteenheid." - #. module: product_customerinfo #: model:ir.model.fields,field_description:product_customerinfo.field_product_customerinfo__delay msgid "Delivery Lead Time" @@ -155,8 +151,8 @@ msgstr "Einddatum" #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__date_end -msgid "End date for this vendor price" -msgstr "Einddatum voor deze leveranciersprijs" +msgid "End date for this customer price" +msgstr "" #. module: product_customerinfo #: model_terms:ir.ui.view,arch_db:product_customerinfo.product_customerinfo_search_view @@ -229,6 +225,11 @@ msgstr "Prijs" msgid "Price List" msgstr "Prijslijst" +#. module: product_customerinfo +#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__price +msgid "Price at which the product is sold to this customer." +msgstr "" + #. module: product_customerinfo #: model:ir.model,name:product_customerinfo.model_product_pricelist_item msgid "Pricelist Rule" @@ -275,29 +276,21 @@ msgstr "Startdatum" #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__date_start -msgid "Start date for this vendor price" -msgstr "Startdatum voor deze leveranciersprijs" +msgid "Start date for this customer price" +msgstr "" #. module: product_customerinfo #: model:ir.model,name:product_customerinfo.model_product_supplierinfo msgid "Supplier Pricelist" msgstr "Leveranciersprijslijst" -#. module: product_customerinfo -#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__price -msgid "The price to purchase a product" -msgstr "De prijs om een product aan te schaffen" - #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__min_qty msgid "" -"The quantity to purchase from this vendor to benefit from the price, " -"expressed in the vendor Product Unit of Measure if not any, in the default " -"unit of measure of the product otherwise." +"The minimum quantity to purchase for this customer to benefit from the " +"price. Expressed in the customer's Product Unit of Measure if set, otherwise " +"in the default Product Unit of Measure." msgstr "" -"De hoeveelheid om van deze leverancier te kopen om van de prijs te " -"profiteren, uitgedrukt in de meeteenheid van het product van de leverancier, " -"of anders in de standaard meeteenheid van het product." #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__product_code @@ -342,3 +335,28 @@ msgstr "Variant Klant" #: model_terms:ir.ui.view,arch_db:product_customerinfo.product_customerinfo_form_view msgid "to" msgstr "tot" + +#~ msgid "" +#~ "Default unit of measure used for purchase orders. It must be in the same " +#~ "category as the default unit of measure." +#~ msgstr "" +#~ "Standaard meeteenheid die gebruikt wordt voor aankooporders. Deze moet in " +#~ "dezelfde categorie vallen als de standaard meeteenheid." + +#~ msgid "End date for this vendor price" +#~ msgstr "Einddatum voor deze leveranciersprijs" + +#~ msgid "Start date for this vendor price" +#~ msgstr "Startdatum voor deze leveranciersprijs" + +#~ msgid "The price to purchase a product" +#~ msgstr "De prijs om een product aan te schaffen" + +#~ msgid "" +#~ "The quantity to purchase from this vendor to benefit from the price, " +#~ "expressed in the vendor Product Unit of Measure if not any, in the " +#~ "default unit of measure of the product otherwise." +#~ msgstr "" +#~ "De hoeveelheid om van deze leverancier te kopen om van de prijs te " +#~ "profiteren, uitgedrukt in de meeteenheid van het product van de " +#~ "leverancier, of anders in de standaard meeteenheid van het product." diff --git a/product_customerinfo/i18n/pt_BR.po b/product_customerinfo/i18n/pt_BR.po index 9d5b5ea6c9a..c3f0b8ec2b2 100644 --- a/product_customerinfo/i18n/pt_BR.po +++ b/product_customerinfo/i18n/pt_BR.po @@ -109,20 +109,16 @@ msgstr "Nome Produto no Cliente" msgid "Customer of this product" msgstr "Cliente deste Produto" +#. module: product_customerinfo +#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__product_uom +msgid "Customer specific unit of measure." +msgstr "" + #. module: product_customerinfo #: model_terms:ir.ui.view,arch_db:product_customerinfo.product_template_form_view msgid "Customers" msgstr "Clientes" -#. module: product_customerinfo -#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__product_uom -msgid "" -"Default unit of measure used for purchase orders. It must be in the same " -"category as the default unit of measure." -msgstr "" -"Unidade de medida padrão usada para ordens de compra. Ele deve estar na " -"mesma categoria que a unidade de medida padrão." - #. module: product_customerinfo #: model:ir.model.fields,field_description:product_customerinfo.field_product_customerinfo__delay msgid "Delivery Lead Time" @@ -150,8 +146,8 @@ msgstr "Data Final" #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__date_end -msgid "End date for this vendor price" -msgstr "Data final para preço do fornecedor" +msgid "End date for this customer price" +msgstr "" #. module: product_customerinfo #: model_terms:ir.ui.view,arch_db:product_customerinfo.product_customerinfo_search_view @@ -224,6 +220,11 @@ msgstr "Preço" msgid "Price List" msgstr "Lista de Preços" +#. module: product_customerinfo +#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__price +msgid "Price at which the product is sold to this customer." +msgstr "" + #. module: product_customerinfo #: model:ir.model,name:product_customerinfo.model_product_pricelist_item msgid "Pricelist Rule" @@ -270,29 +271,21 @@ msgstr "Data Inicio" #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__date_start -msgid "Start date for this vendor price" -msgstr "Data de início para este preço de fornecedor" +msgid "Start date for this customer price" +msgstr "" #. module: product_customerinfo #: model:ir.model,name:product_customerinfo.model_product_supplierinfo msgid "Supplier Pricelist" msgstr "Lista Preço Fornecedor" -#. module: product_customerinfo -#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__price -msgid "The price to purchase a product" -msgstr "O preço para comprar um produto" - #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__min_qty msgid "" -"The quantity to purchase from this vendor to benefit from the price, " -"expressed in the vendor Product Unit of Measure if not any, in the default " -"unit of measure of the product otherwise." +"The minimum quantity to purchase for this customer to benefit from the " +"price. Expressed in the customer's Product Unit of Measure if set, otherwise " +"in the default Product Unit of Measure." msgstr "" -"A quantidade a comprar deste fornecedor para se beneficiar do preço, " -"expressa na unidade de medida do produto do fornecedor, se não houver, na " -"unidade de medida padrão do produto, caso contrário." #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__product_code @@ -338,6 +331,31 @@ msgstr "Variação Cliente" msgid "to" msgstr "para" +#~ msgid "" +#~ "Default unit of measure used for purchase orders. It must be in the same " +#~ "category as the default unit of measure." +#~ msgstr "" +#~ "Unidade de medida padrão usada para ordens de compra. Ele deve estar na " +#~ "mesma categoria que a unidade de medida padrão." + +#~ msgid "End date for this vendor price" +#~ msgstr "Data final para preço do fornecedor" + +#~ msgid "Start date for this vendor price" +#~ msgstr "Data de início para este preço de fornecedor" + +#~ msgid "The price to purchase a product" +#~ msgstr "O preço para comprar um produto" + +#~ msgid "" +#~ "The quantity to purchase from this vendor to benefit from the price, " +#~ "expressed in the vendor Product Unit of Measure if not any, in the " +#~ "default unit of measure of the product otherwise." +#~ msgstr "" +#~ "A quantidade a comprar deste fornecedor para se beneficiar do preço, " +#~ "expressa na unidade de medida do produto do fornecedor, se não houver, na " +#~ "unidade de medida padrão do produto, caso contrário." + #~ msgid "Customer Information" #~ msgstr "Informação do Cliente" diff --git a/product_customerinfo/i18n/sl.po b/product_customerinfo/i18n/sl.po index 1a5a2b46d0d..35198727e6b 100644 --- a/product_customerinfo/i18n/sl.po +++ b/product_customerinfo/i18n/sl.po @@ -117,18 +117,16 @@ msgstr "Partnerjev naziv proizvoda" msgid "Customer of this product" msgstr "Partnerjeva koda proizvoda" +#. module: product_customerinfo +#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__product_uom +msgid "Customer specific unit of measure." +msgstr "" + #. module: product_customerinfo #: model_terms:ir.ui.view,arch_db:product_customerinfo.product_template_form_view msgid "Customers" msgstr "Kupci" -#. module: product_customerinfo -#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__product_uom -msgid "" -"Default unit of measure used for purchase orders. It must be in the same " -"category as the default unit of measure." -msgstr "" - #. module: product_customerinfo #: model:ir.model.fields,field_description:product_customerinfo.field_product_customerinfo__delay msgid "Delivery Lead Time" @@ -156,7 +154,7 @@ msgstr "" #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__date_end -msgid "End date for this vendor price" +msgid "End date for this customer price" msgstr "" #. module: product_customerinfo @@ -227,6 +225,11 @@ msgstr "Cenik" msgid "Price List" msgstr "Cenik" +#. module: product_customerinfo +#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__price +msgid "Price at which the product is sold to this customer." +msgstr "" + #. module: product_customerinfo #: model:ir.model,name:product_customerinfo.model_product_pricelist_item #, fuzzy @@ -276,7 +279,7 @@ msgstr "" #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__date_start -msgid "Start date for this vendor price" +msgid "Start date for this customer price" msgstr "" #. module: product_customerinfo @@ -285,17 +288,12 @@ msgstr "" msgid "Supplier Pricelist" msgstr "Cenik" -#. module: product_customerinfo -#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__price -msgid "The price to purchase a product" -msgstr "" - #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__min_qty msgid "" -"The quantity to purchase from this vendor to benefit from the price, " -"expressed in the vendor Product Unit of Measure if not any, in the default " -"unit of measure of the product otherwise." +"The minimum quantity to purchase for this customer to benefit from the " +"price. Expressed in the customer's Product Unit of Measure if set, otherwise " +"in the default Product Unit of Measure." msgstr "" #. module: product_customerinfo From b7175feb6020d4207c5c37cdd05ad4b79063167b Mon Sep 17 00:00:00 2001 From: oca-ci Date: Wed, 29 Oct 2025 13:54:25 +0000 Subject: [PATCH 096/224] [UPD] Update product_multi_price.pot --- .../i18n/product_multi_price.pot | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/product_multi_price/i18n/product_multi_price.pot b/product_multi_price/i18n/product_multi_price.pot index 56c2c649f3e..2baed4fafff 100644 --- a/product_multi_price/i18n/product_multi_price.pot +++ b/product_multi_price/i18n/product_multi_price.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 15.0\n" +"Project-Id-Version: Odoo Server 18.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: \n" "Language-Team: \n" @@ -24,8 +24,8 @@ msgstr "" msgid "" "Base price for computation.\n" "Sales Price: The base price will be the Sales Price.\n" -"Cost Price : The base price will be the cost price.\n" -"Other Pricelist : Computation of the base price based on another Pricelist." +"Cost Price: The base price will be the cost price.\n" +"Other Pricelist: Computation of the base price based on another Pricelist." msgstr "" #. module: product_multi_price @@ -63,12 +63,6 @@ msgstr "" msgid "ID" msgstr "" -#. module: product_multi_price -#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price____last_update -#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name____last_update -msgid "Last Modified on" -msgstr "" - #. module: product_multi_price #: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__write_uid #: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name__write_uid @@ -140,7 +134,7 @@ msgid "Prices Names must be unique per company" msgstr "" #. module: product_multi_price -#: model:ir.model,name:product_multi_price.model_product_product +#: model:ir.model,name:product_multi_price.model_product_template #: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__product_id msgid "Product" msgstr "" @@ -156,8 +150,8 @@ msgid "Product Multiple Prices" msgstr "" #. module: product_multi_price -#: model:ir.model,name:product_multi_price.model_product_template -msgid "Product Template" +#: model:ir.model,name:product_multi_price.model_product_product +msgid "Product Variant" msgstr "" #. module: product_multi_price From c914cd05e5edf1cefff409a274a22508c405bb67 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Wed, 29 Oct 2025 13:59:25 +0000 Subject: [PATCH 097/224] [BOT] post-merge updates --- README.md | 1 + product_multi_price/README.rst | 8 +++-- .../static/description/index.html | 32 +++++++++++-------- setup/_metapackage/pyproject.toml | 3 +- 4 files changed, 28 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 97e22ef7d90..18ada43a7d5 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,7 @@ addon | version | maintainers | summary [product_manufacturer](product_manufacturer/) | 18.0.1.0.0 | | Adds manufacturers and attributes on the product view. [product_medical](product_medical/) | 18.0.1.0.0 | | Base structure to handle medical products [product_multi_category](product_multi_category/) | 18.0.1.0.0 | | Product - Many Categories +[product_multi_price](product_multi_price/) | 18.0.1.0.0 | | Product Multi Price [product_net_weight](product_net_weight/) | 18.0.1.0.0 | legalsylvain | Add 'Net Weight' on product models [product_origin](product_origin/) | 18.0.1.0.0 | rousseldenis legalsylvain | Adds the origin of the product [product_packaging_calculator](product_packaging_calculator/) | 18.0.1.0.0 | | Compute product quantity to pick by packaging diff --git a/product_multi_price/README.rst b/product_multi_price/README.rst index 998e9f84762..77617dc0a5f 100644 --- a/product_multi_price/README.rst +++ b/product_multi_price/README.rst @@ -1,3 +1,7 @@ +.. image:: https://odoo-community.org/readme-banner-image + :target: https://odoo-community.org/get-involved?utm_source=readme + :alt: Odoo Community Association + =================== Product Multi Price =================== @@ -7,13 +11,13 @@ Product Multi Price !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:db3e0600440dcafca889e339211f83be9973bd8907045d52490e64e8787e1645 + !! source digest: sha256:20ddf77147c5a6e85360c94f27abef3ce118015fac382a8c4797bf991a5932c3 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |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 +.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fproduct--attribute-lightgray.png?logo=github diff --git a/product_multi_price/static/description/index.html b/product_multi_price/static/description/index.html index 25b86379f9e..7cffb396f35 100644 --- a/product_multi_price/static/description/index.html +++ b/product_multi_price/static/description/index.html @@ -3,7 +3,7 @@ -Product Multi Price +README.rst -
    -

    Product Multi Price

    +
    + + +Odoo Community Association + +
    +

    Product Multi Price

    -

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

    +

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

    This module allows to set multiple prices to products and base pricelist rules on them.

    Table of contents

    @@ -388,7 +393,7 @@

    Product Multi Price

    -

    Configuration

    +

    Configuration

    To configure multiple prices you need to set multi prices field names first. To do so, you need admin permissions. Then go to:

      @@ -401,7 +406,7 @@

      Configuration

      multiple prices in the product form view.

    -

    Usage

    +

    Usage

    To use this module, you need to:

    1. Go to the product page.
    2. @@ -419,7 +424,7 @@

      Usage

    -

    Known issues / Roadmap

    +

    Known issues / Roadmap

    • Add mechanisms that allow to set multiprices values from external flows. For example: having AVCO, FIFO and Standard prices computed @@ -427,7 +432,7 @@

      Known issues / Roadmap

    -

    Bug Tracker

    +

    Bug Tracker

    Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed @@ -435,15 +440,15 @@

    Bug Tracker

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

    -

    Credits

    +

    Credits

    -

    Authors

    +

    Authors

    • Tecnativa
    -

    Contributors

    +

    Contributors

    -

    Maintainers

    +

    Maintainers

    This module is maintained by the OCA.

    Odoo Community Association @@ -467,5 +472,6 @@

    Maintainers

    +
    diff --git a/setup/_metapackage/pyproject.toml b/setup/_metapackage/pyproject.toml index 2fd09597647..3bbed9f0ece 100644 --- a/setup/_metapackage/pyproject.toml +++ b/setup/_metapackage/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "odoo-addons-oca-product-attribute" -version = "18.0.20250917.0" +version = "18.0.20251029.0" dependencies = [ "odoo-addon-product_assortment==18.0.*", "odoo-addon-product_attachment_zipped_download==18.0.*", @@ -30,6 +30,7 @@ dependencies = [ "odoo-addon-product_manufacturer==18.0.*", "odoo-addon-product_medical==18.0.*", "odoo-addon-product_multi_category==18.0.*", + "odoo-addon-product_multi_price==18.0.*", "odoo-addon-product_net_weight==18.0.*", "odoo-addon-product_origin==18.0.*", "odoo-addon-product_packaging_calculator==18.0.*", From 6a08186ea178c9946793d263ce84c6577a036621 Mon Sep 17 00:00:00 2001 From: mymage Date: Thu, 30 Oct 2025 08:45:42 +0000 Subject: [PATCH 098/224] Translated using Weblate (Italian) Currently translated at 100.0% (55 of 55 strings) Translation: product-attribute-18.0/product-attribute-18.0-product_customerinfo Translate-URL: https://translation.odoo-community.org/projects/product-attribute-18-0/product-attribute-18-0-product_customerinfo/it/ --- product_customerinfo/i18n/it.po | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/product_customerinfo/i18n/it.po b/product_customerinfo/i18n/it.po index bc2e9797e35..9914637b367 100644 --- a/product_customerinfo/i18n/it.po +++ b/product_customerinfo/i18n/it.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 16.0\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2024-08-30 14:06+0000\n" +"PO-Revision-Date: 2025-10-30 11:42+0000\n" "Last-Translator: mymage \n" "Language-Team: none\n" "Language: it\n" @@ -14,7 +14,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 5.6.2\n" +"X-Generator: Weblate 5.10.4\n" #. module: product_customerinfo #: model_terms:ir.ui.view,arch_db:product_customerinfo.product_customerinfo_search_view @@ -117,7 +117,7 @@ msgstr "Cliente di questo prodotto" #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__product_uom msgid "Customer specific unit of measure." -msgstr "" +msgstr "Unità di misura specifica per utente." #. module: product_customerinfo #: model_terms:ir.ui.view,arch_db:product_customerinfo.product_template_form_view @@ -152,7 +152,7 @@ msgstr "Data fine" #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__date_end msgid "End date for this customer price" -msgstr "" +msgstr "Data fine per questo prezzo cliente" #. module: product_customerinfo #: model_terms:ir.ui.view,arch_db:product_customerinfo.product_customerinfo_search_view @@ -228,7 +228,7 @@ msgstr "Listino prezzi" #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__price msgid "Price at which the product is sold to this customer." -msgstr "" +msgstr "Prezzo a cui questo prodotto è venduto a questo cliente." #. module: product_customerinfo #: model:ir.model,name:product_customerinfo.model_product_pricelist_item @@ -277,7 +277,7 @@ msgstr "Data inizio" #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__date_start msgid "Start date for this customer price" -msgstr "" +msgstr "Data inizio per questo prezzo cliente" #. module: product_customerinfo #: model:ir.model,name:product_customerinfo.model_product_supplierinfo @@ -291,6 +291,9 @@ msgid "" "price. Expressed in the customer's Product Unit of Measure if set, otherwise " "in the default Product Unit of Measure." msgstr "" +"Quantità minima da acquistare affinché questo cliente possa beneficiare del " +"prezzo. Espressa nell'unità di misura del prodotto del cliente, se " +"impostata, altrimenti nell'unità di misura del prodotto predefinita." #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__product_code From 8edb1eee364a231e68a14974e9d3dc88f88ed8ff Mon Sep 17 00:00:00 2001 From: CarlosRoca13 Date: Wed, 29 Oct 2025 08:46:31 +0100 Subject: [PATCH 099/224] [FIX] product_pricelist_direct_print: show only defined products is not showing the correct products The ANDs on the domains is excluding products that are defined but aren't on the categories added to the pricelist, so this is not correct. Set ORs to wor as is was working in last versions. --- .../wizards/product_pricelist_print.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/product_pricelist_direct_print/wizards/product_pricelist_print.py b/product_pricelist_direct_print/wizards/product_pricelist_print.py index 0303cbac9f0..739ef74311b 100644 --- a/product_pricelist_direct_print/wizards/product_pricelist_print.py +++ b/product_pricelist_direct_print/wizards/product_pricelist_print.py @@ -312,38 +312,38 @@ def _compute_context_active_model(self): def get_products_domain(self): domain = [("sale_ok", "=", True)] if self.show_only_defined_products: - aux_domain = [] + aux_domain = [(0, "=", 1)] items_dic = {"categ_ids": [], "product_ids": [], "variant_ids": []} for item in self.pricelist_id.item_ids: if item.applied_on == "0_product_variant": items_dic["variant_ids"].append(item.product_id.id) if item.applied_on == "1_product": items_dic["product_ids"].append(item.product_tmpl_id.id) - if item.applied_on == "2_product_category" and item.categ_id.parent_id: + if item.applied_on == "2_product_category": items_dic["categ_ids"].append(item.categ_id.id) if items_dic["categ_ids"]: - aux_domain = expression.AND( + aux_domain = expression.OR( [aux_domain, [("categ_id", "in", items_dic["categ_ids"])]] ) if items_dic["product_ids"]: if self.show_variants: - aux_domain = expression.AND( + aux_domain = expression.OR( [ aux_domain, [("product_tmpl_id", "in", items_dic["product_ids"])], ] ) else: - aux_domain = expression.AND( + aux_domain = expression.OR( [aux_domain, [("id", "in", items_dic["product_ids"])]] ) if items_dic["variant_ids"]: if self.show_variants: - aux_domain = expression.AND( + aux_domain = expression.OR( [aux_domain, [("id", "in", items_dic["variant_ids"])]] ) else: - aux_domain = expression.AND( + aux_domain = expression.OR( [ aux_domain, [("product_variant_ids", "in", items_dic["variant_ids"])], From e80a17c5b4b8293dc49777075b4de38b6e853dfb Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Fri, 31 Oct 2025 07:17:54 +0000 Subject: [PATCH 100/224] [BOT] post-merge updates --- README.md | 2 +- product_pricelist_direct_print/README.rst | 2 +- product_pricelist_direct_print/__manifest__.py | 2 +- product_pricelist_direct_print/static/description/index.html | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 18ada43a7d5..84898166197 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ addon | version | maintainers | summary [product_packaging_unit_price_calculator](product_packaging_unit_price_calculator/) | 18.0.1.0.0 | | Wizard to calculate a unit price from a packaging price [product_pricelist_alternative](product_pricelist_alternative/) | 18.0.1.0.0 | | Calculate product price based on alternative pricelists [product_pricelist_by_contact](product_pricelist_by_contact/) | 18.0.1.0.0 | | Product Pricelist Per Contact -[product_pricelist_direct_print](product_pricelist_direct_print/) | 18.0.1.0.0 | legalsylvain | Print price list from menu option, product templates, products variants or price lists +[product_pricelist_direct_print](product_pricelist_direct_print/) | 18.0.1.0.1 | legalsylvain | Print price list from menu option, product templates, products variants or price lists [product_pricelist_direct_print_company_group](product_pricelist_direct_print_company_group/) | 18.0.1.0.0 | | Print Pricelist items using the company group model [product_pricelist_direct_print_website_sale](product_pricelist_direct_print_website_sale/) | 18.0.1.0.0 | CarlosRoca13 | Extend Product Pricelist Direct Print for filter by public categories [product_pricelist_direct_print_xlsx](product_pricelist_direct_print_xlsx/) | 18.0.1.0.0 | | Print price list in XLSX format diff --git a/product_pricelist_direct_print/README.rst b/product_pricelist_direct_print/README.rst index a653ff3bff1..5eeb84de085 100644 --- a/product_pricelist_direct_print/README.rst +++ b/product_pricelist_direct_print/README.rst @@ -11,7 +11,7 @@ Product Pricelist Direct Print !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:95226b4451545bcbfb63c1ffb5bc6d39fd01b2ce00ddfdd40fb929f0e5aa8dcd + !! source digest: sha256:59906ddc4c56bc5358664bfdbc0be952dfcd27ddb93a9d1bbfdeb2b1350fa910 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png diff --git a/product_pricelist_direct_print/__manifest__.py b/product_pricelist_direct_print/__manifest__.py index 79f3c38f733..abe875b6214 100644 --- a/product_pricelist_direct_print/__manifest__.py +++ b/product_pricelist_direct_print/__manifest__.py @@ -5,7 +5,7 @@ "name": "Product Pricelist Direct Print", "summary": "Print price list from menu option, product templates, " "products variants or price lists", - "version": "18.0.1.0.0", + "version": "18.0.1.0.1", "category": "Product", "website": "https://github.com/OCA/product-attribute", "author": "Tecnativa, GRAP, Odoo Community Association (OCA)", diff --git a/product_pricelist_direct_print/static/description/index.html b/product_pricelist_direct_print/static/description/index.html index 652d33e794d..dfb0c428e31 100644 --- a/product_pricelist_direct_print/static/description/index.html +++ b/product_pricelist_direct_print/static/description/index.html @@ -372,7 +372,7 @@

    Product Pricelist Direct Print

    !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:95226b4451545bcbfb63c1ffb5bc6d39fd01b2ce00ddfdd40fb929f0e5aa8dcd +!! source digest: sha256:59906ddc4c56bc5358664bfdbc0be952dfcd27ddb93a9d1bbfdeb2b1350fa910 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

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

    Print price list from menu option, product templates, products variants From 2fb98bc3c194359827ce5931c403654772ce43a0 Mon Sep 17 00:00:00 2001 From: eLBati Date: Tue, 21 Jun 2016 10:00:44 +0200 Subject: [PATCH 101/224] ADD product_pricelist_item_list_view This module adds a new menu item "Pricelist rules" to list and search every pricelist rule. This is useful when you have many rules and you want to search among them. For instance, if you have many fixed price rules associated to product variants, without this module you could not easly find a variant's price. --- product_pricelist_item_list_view/README.rst | 54 +++++++ product_pricelist_item_list_view/__init__.py | 3 + .../__openerp__.py | 21 +++ .../static/description/icon.png | Bin 0 -> 9455 bytes .../views/pricelist_view.xml | 133 ++++++++++++++++++ 5 files changed, 211 insertions(+) create mode 100644 product_pricelist_item_list_view/README.rst create mode 100644 product_pricelist_item_list_view/__init__.py create mode 100644 product_pricelist_item_list_view/__openerp__.py create mode 100644 product_pricelist_item_list_view/static/description/icon.png create mode 100644 product_pricelist_item_list_view/views/pricelist_view.xml diff --git a/product_pricelist_item_list_view/README.rst b/product_pricelist_item_list_view/README.rst new file mode 100644 index 00000000000..56d89145842 --- /dev/null +++ b/product_pricelist_item_list_view/README.rst @@ -0,0 +1,54 @@ +.. image:: https://img.shields.io/badge/licence-LGPL--3-blue.svg + :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html + :alt: License: LGPL-3 + +========================= +Pricelist rules list view +========================= + +This module adds a new menu item "Pricelist rules" to list and search every pricelist rule. +This is useful when you have many rules and you want to search among them. +For instance, if you have many fixed price rules associated to product variants, without this module you could not easily find a variant's price. + +Usage +===== + +.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas + :alt: Try me on Runbot + :target: https://runbot.odoo-community.org/runbot/135/9.0 + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues +`_. In case of trouble, please +check there if your issue has already been reported. If you spotted it first, +help us smashing it by providing a detailed and welcomed feedback. + +Credits +======= + +Images +------ + +* Odoo Community Association: `Icon `_. + +Contributors +------------ + +* Lorenzo Battistini + +Maintainer +---------- + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +This module is maintained by the OCA. + +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. + +To contribute to this module, please visit https://odoo-community.org. diff --git a/product_pricelist_item_list_view/__init__.py b/product_pricelist_item_list_view/__init__.py new file mode 100644 index 00000000000..cae79a6c4a5 --- /dev/null +++ b/product_pricelist_item_list_view/__init__.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- +# Copyright 2016 Lorenzo Battistini - Agile Business Group +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). diff --git a/product_pricelist_item_list_view/__openerp__.py b/product_pricelist_item_list_view/__openerp__.py new file mode 100644 index 00000000000..1a03b1a4ee3 --- /dev/null +++ b/product_pricelist_item_list_view/__openerp__.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +# Copyright 2016 Lorenzo Battistini - Agile Business Group +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). + +{ + "name": "Pricelist rules list view", + "summary": "View and search the list of pricelist items", + "version": "9.0.1.0.0", + "category": "Sales Management", + "website": "https://www.agilebg.com", + "author": "Agile Business Group, Odoo Community Association (OCA)", + "license": "LGPL-3", + "application": False, + "installable": True, + "depends": [ + "product", + ], + "data": [ + 'views/pricelist_view.xml', + ], +} diff --git a/product_pricelist_item_list_view/static/description/icon.png b/product_pricelist_item_list_view/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..3a0328b516c4980e8e44cdb63fd945757ddd132d GIT binary patch literal 9455 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 z z?n?eq1XP>p-IM$Z^C;2L3itnbJZAip*Zo0aw2bs8@(s^~*8T9go!%dHcAz2lM;`yp zD=7&xjFV$S&5uDaiScyD?B-i1ze`+CoRtz`Wn+Zl&#s4&}MO{@N!ufrzjG$B79)Y2d3tBk&)TxUTw@QS0TEL_?njX|@vq?Uz(nBFK5Pq7*xj#u*R&i|?7+6# z+|r_n#SW&LXhtheZdah{ZVoqwyT{D>MC3nkFF#N)xLi{p7J1jXlmVeb;cP5?e(=f# zuT7fvjSbjS781v?7{)-X3*?>tq?)Yd)~|1{BDS(pqC zC}~H#WXlkUW*H5CDOo<)#x7%RY)A;ShGhI5s*#cRDA8YgqG(HeKDx+#(ZQ?386dv! zlXCO)w91~Vw4AmOcATuV653fa9R$fyK8ul%rG z-wfS zihugoZyr38Im?Zuh6@RcF~t1anQu7>#lPpb#}4cOA!EM11`%f*07RqOVkmX{p~KJ9 z^zP;K#|)$`^Rb{rnHGH{~>1(fawV0*Z#)}M`m8-?ZJV<+e}s9wE# z)l&az?w^5{)`S(%MRzxdNqrs1n*-=jS^_jqE*5XDrA0+VE`5^*p3CuM<&dZEeCjoz zR;uu_H9ZPZV|fQq`Cyw4nscrVwi!fE6ciMmX$!_hN7uF;jjKG)d2@aC4ropY)8etW=xJvni)8eHi`H$%#zn^WJ5NLc-rqk|u&&4Z6fD_m&JfSI1Bvb?b<*n&sfl0^t z=HnmRl`XrFvMKB%9}>PaA`m-fK6a0(8=qPkWS5bb4=v?XcWi&hRY?O5HdulRi4?fN zlsJ*N-0Qw+Yic@s0(2uy%F@ib;GjXt01Fmx5XbRo6+n|pP(&nodMoap^z{~q ziEeaUT@Mxe3vJSfI6?uLND(CNr=#^W<1b}jzW58bIfyWTDle$mmS(|x-0|2UlX+9k zQ^EX7Nw}?EzVoBfT(-LT|=9N@^hcn-_p&sqG z&*oVs2JSU+N4ZD`FhCAWaS;>|wH2G*Id|?pa#@>tyxX`+4HyIArWDvVrX)2WAOQff z0qyHu&-S@i^MS-+j--!pr4fPBj~_8({~e1bfcl0wI1kaoN>mJL6KUPQm5N7lB(ui1 zE-o%kq)&djzWJ}ob<-GfDlkB;F31j-VHKvQUGQ3sp`CwyGJk_i!y^sD0fqC@$9|jO zOqN!r!8-p==F@ZVP=U$qSpY(gQ0)59P1&t@y?5rvg<}E+GB}26NYPp4f2YFQrQtot5mn3wu_qprZ=>Ig-$ zbW26Ws~IgY>}^5w`vTB(G`PTZaDiGBo5o(tp)qli|NeV( z@H_=R8V39rt5J5YB2Ky?4eJJ#b`_iBe2ot~6%7mLt5t8Vwi^Jy7|jWXqa3amOIoRb zOr}WVFP--DsS`1WpN%~)t3R!arKF^Q$e12KEqU36AWwnCBICpH4XCsfnyrHr>$I$4 z!DpKX$OKLWarN7nv@!uIA+~RNO)l$$w}p(;b>mx8pwYvu;dD_unryX_NhT8*Tj>BTrTTL&!?O+%Rv;b?B??gSzdp?6Uug9{ zd@V08Z$BdI?fpoCS$)t4mg4rT8Q_I}h`0d-vYZ^|dOB*Q^S|xqTV*vIg?@fVFSmMpaw0qtTRbx} z({Pg?#{2`sc9)M5N$*N|4;^t$+QP?#mov zGVC@I*lBVrOU-%2y!7%)fAKjpEFsgQc4{amtiHb95KQEwvf<(3T<9-Zm$xIew#P22 zc2Ix|App^>v6(3L_MCU0d3W##AB0M~3D00EWoKZqsJYT(#@w$Y_H7G22M~ApVFTRHMI_3be)Lkn#0F*V8Pq zc}`Cjy$bE;FJ6H7p=0y#R>`}-m4(0F>%@P|?7fx{=R^uFdISRnZ2W_xQhD{YuR3t< z{6yxu=4~JkeA;|(J6_nv#>Nvs&FuLA&PW^he@t(UwFFE8)|a!R{`E`K`i^ZnyE4$k z;(749Ix|oi$c3QbEJ3b~D_kQsPz~fIUKym($a_7dJ?o+40*OLl^{=&oq$<#Q(yyrp z{J-FAniyAw9tPbe&IhQ|a`DqFTVQGQ&Gq3!C2==4x{6EJwiPZ8zub-iXoUtkJiG{} zPaR&}_fn8_z~(=;5lD-aPWD3z8PZS@AaUiomF!G8I}Mf>e~0g#BelA-5#`cj;O5>N Xviia!U7SGha1wx#SCgwmn*{w2TRX*I literal 0 HcmV?d00001 diff --git a/product_pricelist_item_list_view/views/pricelist_view.xml b/product_pricelist_item_list_view/views/pricelist_view.xml new file mode 100644 index 00000000000..86ec763dc74 --- /dev/null +++ b/product_pricelist_item_list_view/views/pricelist_view.xml @@ -0,0 +1,133 @@ + + + + product.pricelist.item.search + product.pricelist.item + + + + + + + + + + + + + + product.pricelist.item.tree + product.pricelist.item + 99 + + + + + + + + + + + + + + product.pricelist.item.form + product.pricelist.item + 99 + +

    +

    + + + + + + + + + + + + + + + + + + + +
    +

    The computed price is expressed in the default Unit of Measure of the product.

    +
    + + + + + +
    +
    + + + Pricelist Rules + ir.actions.act_window + product.pricelist.item + form + tree,form + + +

    + Click to create a pricelist rule. +

    + Each rule include a set of applicability criteria (date range, + product category...) and a computation that easily helps to achieve + any kind of pricing. +

    +
    +
    + + + + + tree + + + + + + form + + + + From 191149e81dae4ab830cdba52c86bdcec3b7b2bfd Mon Sep 17 00:00:00 2001 From: OCA Transbot Date: Sat, 11 Nov 2017 07:24:00 +0100 Subject: [PATCH 102/224] OCA Transbot updated translations from Transifex --- product_pricelist_item_list_view/i18n/ca.po | 100 ++++++++++++++++++++ product_pricelist_item_list_view/i18n/de.po | 100 ++++++++++++++++++++ product_pricelist_item_list_view/i18n/es.po | 100 ++++++++++++++++++++ product_pricelist_item_list_view/i18n/fr.po | 100 ++++++++++++++++++++ 4 files changed, 400 insertions(+) create mode 100644 product_pricelist_item_list_view/i18n/ca.po create mode 100644 product_pricelist_item_list_view/i18n/de.po create mode 100644 product_pricelist_item_list_view/i18n/es.po create mode 100644 product_pricelist_item_list_view/i18n/fr.po diff --git a/product_pricelist_item_list_view/i18n/ca.po b/product_pricelist_item_list_view/i18n/ca.po new file mode 100644 index 00000000000..b3277c3d26a --- /dev/null +++ b/product_pricelist_item_list_view/i18n/ca.po @@ -0,0 +1,100 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_pricelist_item_list_view +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-11-03 15:37+0000\n" +"PO-Revision-Date: 2017-11-03 15:37+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Catalan (https://www.transifex.com/oca/teams/23907/ca/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: ca\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: product_pricelist_item_list_view +#: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_form_view +msgid "" +"Public Price - \n" +" Cost - \n" +" Other Pricelist - " +msgstr "" + +#. module: product_pricelist_item_list_view +#: model:ir.actions.act_window,help:product_pricelist_item_list_view.product_pricelist_items_action +msgid "Click to create a pricelist rule." +msgstr "" + +#. module: product_pricelist_item_list_view +#: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_form_view +msgid "Compute Price" +msgstr "" + +#. module: product_pricelist_item_list_view +#: model:ir.actions.act_window,help:product_pricelist_item_list_view.product_pricelist_items_action +msgid "" +"Each rule include a set of applicability criteria (date range,\n" +" product category...) and a computation that easily helps to achieve\n" +" any kind of pricing." +msgstr "" + +#. module: product_pricelist_item_list_view +#: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_form_view +msgid "Max. Margin" +msgstr "" + +#. module: product_pricelist_item_list_view +#: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_form_view +msgid "Min. Margin" +msgstr "" + +#. module: product_pricelist_item_list_view +#: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_form_view +msgid "New Price =" +msgstr "" + +#. module: product_pricelist_item_list_view +#: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_form_view +msgid "Price Computation" +msgstr "" + +#. module: product_pricelist_item_list_view +#: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_form_view +msgid "Pricelist Items" +msgstr "" + +#. module: product_pricelist_item_list_view +#: model:ir.actions.act_window,name:product_pricelist_item_list_view.product_pricelist_items_action +#: model:ir.ui.menu,name:product_pricelist_item_list_view.product_pricelist_items_action_menu +#: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_search_view +#: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_tree_view +msgid "Pricelist Rules" +msgstr "" + +#. module: product_pricelist_item_list_view +#: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_form_view +msgid "Product" +msgstr "Producte" + +#. module: product_pricelist_item_list_view +#: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_form_view +msgid "Product Variant" +msgstr "" + +#. module: product_pricelist_item_list_view +#: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_form_view +msgid "Rounding Method" +msgstr "" + +#. module: product_pricelist_item_list_view +#: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_form_view +msgid "" +"The computed price is expressed in the default Unit of Measure of the " +"product." +msgstr "" diff --git a/product_pricelist_item_list_view/i18n/de.po b/product_pricelist_item_list_view/i18n/de.po new file mode 100644 index 00000000000..dd1775c5bfb --- /dev/null +++ b/product_pricelist_item_list_view/i18n/de.po @@ -0,0 +1,100 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_pricelist_item_list_view +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-11-03 15:37+0000\n" +"PO-Revision-Date: 2017-11-03 15:37+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: product_pricelist_item_list_view +#: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_form_view +msgid "" +"Public Price - \n" +" Cost - \n" +" Other Pricelist - " +msgstr "" + +#. module: product_pricelist_item_list_view +#: model:ir.actions.act_window,help:product_pricelist_item_list_view.product_pricelist_items_action +msgid "Click to create a pricelist rule." +msgstr "" + +#. module: product_pricelist_item_list_view +#: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_form_view +msgid "Compute Price" +msgstr "" + +#. module: product_pricelist_item_list_view +#: model:ir.actions.act_window,help:product_pricelist_item_list_view.product_pricelist_items_action +msgid "" +"Each rule include a set of applicability criteria (date range,\n" +" product category...) and a computation that easily helps to achieve\n" +" any kind of pricing." +msgstr "" + +#. module: product_pricelist_item_list_view +#: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_form_view +msgid "Max. Margin" +msgstr "" + +#. module: product_pricelist_item_list_view +#: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_form_view +msgid "Min. Margin" +msgstr "" + +#. module: product_pricelist_item_list_view +#: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_form_view +msgid "New Price =" +msgstr "" + +#. module: product_pricelist_item_list_view +#: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_form_view +msgid "Price Computation" +msgstr "" + +#. module: product_pricelist_item_list_view +#: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_form_view +msgid "Pricelist Items" +msgstr "" + +#. module: product_pricelist_item_list_view +#: model:ir.actions.act_window,name:product_pricelist_item_list_view.product_pricelist_items_action +#: model:ir.ui.menu,name:product_pricelist_item_list_view.product_pricelist_items_action_menu +#: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_search_view +#: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_tree_view +msgid "Pricelist Rules" +msgstr "" + +#. module: product_pricelist_item_list_view +#: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_form_view +msgid "Product" +msgstr "Produkt" + +#. module: product_pricelist_item_list_view +#: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_form_view +msgid "Product Variant" +msgstr "" + +#. module: product_pricelist_item_list_view +#: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_form_view +msgid "Rounding Method" +msgstr "" + +#. module: product_pricelist_item_list_view +#: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_form_view +msgid "" +"The computed price is expressed in the default Unit of Measure of the " +"product." +msgstr "" diff --git a/product_pricelist_item_list_view/i18n/es.po b/product_pricelist_item_list_view/i18n/es.po new file mode 100644 index 00000000000..60ec1499e97 --- /dev/null +++ b/product_pricelist_item_list_view/i18n/es.po @@ -0,0 +1,100 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_pricelist_item_list_view +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-11-03 15:37+0000\n" +"PO-Revision-Date: 2017-11-03 15:37+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: es\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: product_pricelist_item_list_view +#: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_form_view +msgid "" +"Public Price - \n" +" Cost - \n" +" Other Pricelist - " +msgstr "" + +#. module: product_pricelist_item_list_view +#: model:ir.actions.act_window,help:product_pricelist_item_list_view.product_pricelist_items_action +msgid "Click to create a pricelist rule." +msgstr "" + +#. module: product_pricelist_item_list_view +#: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_form_view +msgid "Compute Price" +msgstr "" + +#. module: product_pricelist_item_list_view +#: model:ir.actions.act_window,help:product_pricelist_item_list_view.product_pricelist_items_action +msgid "" +"Each rule include a set of applicability criteria (date range,\n" +" product category...) and a computation that easily helps to achieve\n" +" any kind of pricing." +msgstr "" + +#. module: product_pricelist_item_list_view +#: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_form_view +msgid "Max. Margin" +msgstr "" + +#. module: product_pricelist_item_list_view +#: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_form_view +msgid "Min. Margin" +msgstr "" + +#. module: product_pricelist_item_list_view +#: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_form_view +msgid "New Price =" +msgstr "" + +#. module: product_pricelist_item_list_view +#: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_form_view +msgid "Price Computation" +msgstr "" + +#. module: product_pricelist_item_list_view +#: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_form_view +msgid "Pricelist Items" +msgstr "" + +#. module: product_pricelist_item_list_view +#: model:ir.actions.act_window,name:product_pricelist_item_list_view.product_pricelist_items_action +#: model:ir.ui.menu,name:product_pricelist_item_list_view.product_pricelist_items_action_menu +#: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_search_view +#: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_tree_view +msgid "Pricelist Rules" +msgstr "" + +#. module: product_pricelist_item_list_view +#: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_form_view +msgid "Product" +msgstr "Producto" + +#. module: product_pricelist_item_list_view +#: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_form_view +msgid "Product Variant" +msgstr "" + +#. module: product_pricelist_item_list_view +#: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_form_view +msgid "Rounding Method" +msgstr "" + +#. module: product_pricelist_item_list_view +#: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_form_view +msgid "" +"The computed price is expressed in the default Unit of Measure of the " +"product." +msgstr "" diff --git a/product_pricelist_item_list_view/i18n/fr.po b/product_pricelist_item_list_view/i18n/fr.po new file mode 100644 index 00000000000..824761ebb09 --- /dev/null +++ b/product_pricelist_item_list_view/i18n/fr.po @@ -0,0 +1,100 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_pricelist_item_list_view +# +# Translators: +# leemannd , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-11-03 15:37+0000\n" +"PO-Revision-Date: 2017-11-03 15:37+0000\n" +"Last-Translator: leemannd , 2017\n" +"Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: fr\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. module: product_pricelist_item_list_view +#: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_form_view +msgid "" +"Public Price - \n" +" Cost - \n" +" Other Pricelist - " +msgstr "" + +#. module: product_pricelist_item_list_view +#: model:ir.actions.act_window,help:product_pricelist_item_list_view.product_pricelist_items_action +msgid "Click to create a pricelist rule." +msgstr "" + +#. module: product_pricelist_item_list_view +#: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_form_view +msgid "Compute Price" +msgstr "" + +#. module: product_pricelist_item_list_view +#: model:ir.actions.act_window,help:product_pricelist_item_list_view.product_pricelist_items_action +msgid "" +"Each rule include a set of applicability criteria (date range,\n" +" product category...) and a computation that easily helps to achieve\n" +" any kind of pricing." +msgstr "" + +#. module: product_pricelist_item_list_view +#: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_form_view +msgid "Max. Margin" +msgstr "" + +#. module: product_pricelist_item_list_view +#: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_form_view +msgid "Min. Margin" +msgstr "" + +#. module: product_pricelist_item_list_view +#: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_form_view +msgid "New Price =" +msgstr "" + +#. module: product_pricelist_item_list_view +#: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_form_view +msgid "Price Computation" +msgstr "" + +#. module: product_pricelist_item_list_view +#: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_form_view +msgid "Pricelist Items" +msgstr "" + +#. module: product_pricelist_item_list_view +#: model:ir.actions.act_window,name:product_pricelist_item_list_view.product_pricelist_items_action +#: model:ir.ui.menu,name:product_pricelist_item_list_view.product_pricelist_items_action_menu +#: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_search_view +#: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_tree_view +msgid "Pricelist Rules" +msgstr "" + +#. module: product_pricelist_item_list_view +#: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_form_view +msgid "Product" +msgstr "Produit" + +#. module: product_pricelist_item_list_view +#: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_form_view +msgid "Product Variant" +msgstr "" + +#. module: product_pricelist_item_list_view +#: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_form_view +msgid "Rounding Method" +msgstr "" + +#. module: product_pricelist_item_list_view +#: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_form_view +msgid "" +"The computed price is expressed in the default Unit of Measure of the " +"product." +msgstr "" From 57964260db60d87fb26caf12b7f438270fffd69a Mon Sep 17 00:00:00 2001 From: oca-travis Date: Sat, 23 Jun 2018 18:25:22 +0000 Subject: [PATCH 103/224] [UPD] Update product_pricelist_item_list_view.pot --- product_pricelist_item_list_view/i18n/ca.po | 16 ++-- product_pricelist_item_list_view/i18n/de.po | 16 ++-- product_pricelist_item_list_view/i18n/es.po | 16 ++-- product_pricelist_item_list_view/i18n/fr.po | 16 ++-- .../i18n/product_pricelist_item_list_view.pot | 92 +++++++++++++++++++ 5 files changed, 132 insertions(+), 24 deletions(-) create mode 100644 product_pricelist_item_list_view/i18n/product_pricelist_item_list_view.pot diff --git a/product_pricelist_item_list_view/i18n/ca.po b/product_pricelist_item_list_view/i18n/ca.po index b3277c3d26a..8cadec25f7b 100644 --- a/product_pricelist_item_list_view/i18n/ca.po +++ b/product_pricelist_item_list_view/i18n/ca.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * product_pricelist_item_list_view -# +# # Translators: # OCA Transbot , 2017 msgid "" @@ -12,18 +12,21 @@ msgstr "" "PO-Revision-Date: 2017-11-03 15:37+0000\n" "Last-Translator: OCA Transbot , 2017\n" "Language-Team: Catalan (https://www.transifex.com/oca/teams/23907/ca/)\n" +"Language: ca\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: ca\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: product_pricelist_item_list_view #: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_form_view msgid "" -"Public Price - \n" -" Cost - \n" -" Other Pricelist - " +"Public Price " +"- \n" +" Cost - \n" +" Other Pricelist - " msgstr "" #. module: product_pricelist_item_list_view @@ -40,7 +43,8 @@ msgstr "" #: model:ir.actions.act_window,help:product_pricelist_item_list_view.product_pricelist_items_action msgid "" "Each rule include a set of applicability criteria (date range,\n" -" product category...) and a computation that easily helps to achieve\n" +" product category...) and a computation that easily helps to " +"achieve\n" " any kind of pricing." msgstr "" diff --git a/product_pricelist_item_list_view/i18n/de.po b/product_pricelist_item_list_view/i18n/de.po index dd1775c5bfb..47c73fab859 100644 --- a/product_pricelist_item_list_view/i18n/de.po +++ b/product_pricelist_item_list_view/i18n/de.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * product_pricelist_item_list_view -# +# # Translators: # OCA Transbot , 2017 msgid "" @@ -12,18 +12,21 @@ msgstr "" "PO-Revision-Date: 2017-11-03 15:37+0000\n" "Last-Translator: OCA Transbot , 2017\n" "Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: product_pricelist_item_list_view #: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_form_view msgid "" -"Public Price - \n" -" Cost - \n" -" Other Pricelist - " +"Public Price " +"- \n" +" Cost - \n" +" Other Pricelist - " msgstr "" #. module: product_pricelist_item_list_view @@ -40,7 +43,8 @@ msgstr "" #: model:ir.actions.act_window,help:product_pricelist_item_list_view.product_pricelist_items_action msgid "" "Each rule include a set of applicability criteria (date range,\n" -" product category...) and a computation that easily helps to achieve\n" +" product category...) and a computation that easily helps to " +"achieve\n" " any kind of pricing." msgstr "" diff --git a/product_pricelist_item_list_view/i18n/es.po b/product_pricelist_item_list_view/i18n/es.po index 60ec1499e97..70aa33e7c16 100644 --- a/product_pricelist_item_list_view/i18n/es.po +++ b/product_pricelist_item_list_view/i18n/es.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * product_pricelist_item_list_view -# +# # Translators: # OCA Transbot , 2017 msgid "" @@ -12,18 +12,21 @@ msgstr "" "PO-Revision-Date: 2017-11-03 15:37+0000\n" "Last-Translator: OCA Transbot , 2017\n" "Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n" +"Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: es\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: product_pricelist_item_list_view #: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_form_view msgid "" -"Public Price - \n" -" Cost - \n" -" Other Pricelist - " +"Public Price " +"- \n" +" Cost - \n" +" Other Pricelist - " msgstr "" #. module: product_pricelist_item_list_view @@ -40,7 +43,8 @@ msgstr "" #: model:ir.actions.act_window,help:product_pricelist_item_list_view.product_pricelist_items_action msgid "" "Each rule include a set of applicability criteria (date range,\n" -" product category...) and a computation that easily helps to achieve\n" +" product category...) and a computation that easily helps to " +"achieve\n" " any kind of pricing." msgstr "" diff --git a/product_pricelist_item_list_view/i18n/fr.po b/product_pricelist_item_list_view/i18n/fr.po index 824761ebb09..64f6c1c14d2 100644 --- a/product_pricelist_item_list_view/i18n/fr.po +++ b/product_pricelist_item_list_view/i18n/fr.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * product_pricelist_item_list_view -# +# # Translators: # leemannd , 2017 msgid "" @@ -12,18 +12,21 @@ msgstr "" "PO-Revision-Date: 2017-11-03 15:37+0000\n" "Last-Translator: leemannd , 2017\n" "Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n" +"Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: fr\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #. module: product_pricelist_item_list_view #: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_form_view msgid "" -"Public Price - \n" -" Cost - \n" -" Other Pricelist - " +"Public Price " +"- \n" +" Cost - \n" +" Other Pricelist - " msgstr "" #. module: product_pricelist_item_list_view @@ -40,7 +43,8 @@ msgstr "" #: model:ir.actions.act_window,help:product_pricelist_item_list_view.product_pricelist_items_action msgid "" "Each rule include a set of applicability criteria (date range,\n" -" product category...) and a computation that easily helps to achieve\n" +" product category...) and a computation that easily helps to " +"achieve\n" " any kind of pricing." msgstr "" diff --git a/product_pricelist_item_list_view/i18n/product_pricelist_item_list_view.pot b/product_pricelist_item_list_view/i18n/product_pricelist_item_list_view.pot new file mode 100644 index 00000000000..6f72fcc598f --- /dev/null +++ b/product_pricelist_item_list_view/i18n/product_pricelist_item_list_view.pot @@ -0,0 +1,92 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_pricelist_item_list_view +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: product_pricelist_item_list_view +#: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_form_view +msgid "Public Price - \n" +" Cost - \n" +" Other Pricelist - " +msgstr "" + +#. module: product_pricelist_item_list_view +#: model:ir.actions.act_window,help:product_pricelist_item_list_view.product_pricelist_items_action +msgid "Click to create a pricelist rule." +msgstr "" + +#. module: product_pricelist_item_list_view +#: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_form_view +msgid "Compute Price" +msgstr "" + +#. module: product_pricelist_item_list_view +#: model:ir.actions.act_window,help:product_pricelist_item_list_view.product_pricelist_items_action +msgid "Each rule include a set of applicability criteria (date range,\n" +" product category...) and a computation that easily helps to achieve\n" +" any kind of pricing." +msgstr "" + +#. module: product_pricelist_item_list_view +#: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_form_view +msgid "Max. Margin" +msgstr "" + +#. module: product_pricelist_item_list_view +#: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_form_view +msgid "Min. Margin" +msgstr "" + +#. module: product_pricelist_item_list_view +#: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_form_view +msgid "New Price =" +msgstr "" + +#. module: product_pricelist_item_list_view +#: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_form_view +msgid "Price Computation" +msgstr "" + +#. module: product_pricelist_item_list_view +#: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_form_view +msgid "Pricelist Items" +msgstr "" + +#. module: product_pricelist_item_list_view +#: model:ir.actions.act_window,name:product_pricelist_item_list_view.product_pricelist_items_action +#: model:ir.ui.menu,name:product_pricelist_item_list_view.product_pricelist_items_action_menu +#: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_search_view +#: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_tree_view +msgid "Pricelist Rules" +msgstr "" + +#. module: product_pricelist_item_list_view +#: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_form_view +msgid "Product" +msgstr "" + +#. module: product_pricelist_item_list_view +#: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_form_view +msgid "Product Variant" +msgstr "" + +#. module: product_pricelist_item_list_view +#: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_form_view +msgid "Rounding Method" +msgstr "" + +#. module: product_pricelist_item_list_view +#: model:ir.ui.view,arch_db:product_pricelist_item_list_view.product_pricelist_item_form_view +msgid "The computed price is expressed in the default Unit of Measure of the product." +msgstr "" + From 8fdeb5a2bcecbe29bc8841d360c97930b1c6655c Mon Sep 17 00:00:00 2001 From: Lois Rilo Date: Mon, 16 Oct 2023 11:06:42 +0200 Subject: [PATCH 104/224] [IMP] product_pricelist_item_list_view: pre-commit stuff --- product_pricelist_item_list_view/__init__.py | 1 - .../__openerp__.py | 5 +- .../views/pricelist_view.xml | 151 +++++++++++------- 3 files changed, 98 insertions(+), 59 deletions(-) diff --git a/product_pricelist_item_list_view/__init__.py b/product_pricelist_item_list_view/__init__.py index cae79a6c4a5..f73da262af3 100644 --- a/product_pricelist_item_list_view/__init__.py +++ b/product_pricelist_item_list_view/__init__.py @@ -1,3 +1,2 @@ -# -*- coding: utf-8 -*- # Copyright 2016 Lorenzo Battistini - Agile Business Group # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). diff --git a/product_pricelist_item_list_view/__openerp__.py b/product_pricelist_item_list_view/__openerp__.py index 1a03b1a4ee3..c5a9de6c83a 100644 --- a/product_pricelist_item_list_view/__openerp__.py +++ b/product_pricelist_item_list_view/__openerp__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2016 Lorenzo Battistini - Agile Business Group # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). @@ -7,7 +6,7 @@ "summary": "View and search the list of pricelist items", "version": "9.0.1.0.0", "category": "Sales Management", - "website": "https://www.agilebg.com", + "website": "https://github.com/OCA/product-attribute", "author": "Agile Business Group, Odoo Community Association (OCA)", "license": "LGPL-3", "application": False, @@ -16,6 +15,6 @@ "product", ], "data": [ - 'views/pricelist_view.xml', + "views/pricelist_view.xml", ], } diff --git a/product_pricelist_item_list_view/views/pricelist_view.xml b/product_pricelist_item_list_view/views/pricelist_view.xml index 86ec763dc74..c24c311841f 100644 --- a/product_pricelist_item_list_view/views/pricelist_view.xml +++ b/product_pricelist_item_list_view/views/pricelist_view.xml @@ -1,17 +1,17 @@ - + product.pricelist.item.search product.pricelist.item - - - - - - - + + + + + + + @@ -21,13 +21,13 @@ 99 - - - - - - - + + + + + + +
    @@ -37,61 +37,98 @@ 99
    -

    +

    - - - - - + + + + + - - - + + + - + -