diff --git a/sale_order_price_recalculation/README.rst b/sale_order_price_recalculation/README.rst new file mode 100644 index 00000000000..48b4f0e48d9 --- /dev/null +++ b/sale_order_price_recalculation/README.rst @@ -0,0 +1,116 @@ +=================================== +Price recalculation in sales orders +=================================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:f6f1dd938d1e2639548cdc7f7fbef897ba5fad51ddd802d69634835d46f407ab + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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%2Fsale--workflow-lightgray.png?logo=github + :target: https://github.com/OCA/sale-workflow/tree/16.0/sale_order_price_recalculation + :alt: OCA/sale-workflow +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_order_price_recalculation + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/sale-workflow&target_branch=16.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module add 2 buttons on sale orders (below sale order lines) that: + +* Recalculates the prices of the order lines that contain a product in them. +* Reset product descriptions from current product information. + +It is launched manually as a button to get the user decide if he/she wants to +recalculate prices when pricelist is changed or after duplicating a sale order +to update or not sales information. + +**Table of contents** + +.. contents:: + :local: + +Installation +============ + +You need to install sale_management module for accessing the needed menus. + +Usage +===== + +Inside a sale order, you can click on "Recalculate prices" to launch a +recalculation of all the prices of the lines, losing previous custom prices. + +The second "Reset descriptions" will get descriptions from products, losing +custom descriptions. + +.. image:: https://raw.githubusercontent.com/sale_order_price_recalculation/static/description/sale_order_price_recalculation.png + :alt: Sale order price recalculation + +Known issues / Roadmap +====================== + +* In a sale order with lot of lines, the recalculation may slow down, because + sale general data (amount untaxed, amount taxed...) are recalculated for + each line. + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* AvanzOSC +* Grupo Vermon +* Tecnativa + +Contributors +~~~~~~~~~~~~ + +* Carlos Sánchez Cifuentes +* Pedro M. Baeza +* Oihane Crucelaegui +* Pierre Verkest +* Vicent Cubells +* David Vidal +* Duc, Dao Dong (https://komit-consulting.com) +* Raf Ven + +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/sale-workflow `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/sale_order_price_recalculation/__init__.py b/sale_order_price_recalculation/__init__.py new file mode 100644 index 00000000000..0650744f6bc --- /dev/null +++ b/sale_order_price_recalculation/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/sale_order_price_recalculation/__manifest__.py b/sale_order_price_recalculation/__manifest__.py new file mode 100644 index 00000000000..efd567f26f8 --- /dev/null +++ b/sale_order_price_recalculation/__manifest__.py @@ -0,0 +1,23 @@ +# Copyright 2014 Carlos Sánchez Cifuentes +# Copyright 2015-2020 Tecnativa - Pedro M. Baeza +# Copyright 2015 Oihane Crucelaegui +# Copyright 2016 Vicent Cubells +# Copyright 2017 David Vidal +# Copyright 2018 Duc Dao Dong +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html +{ + "name": "Price recalculation in sales orders", + "summary": "Recalculate prices / Reset descriptions on sale order lines", + "version": "16.0.1.0.0", + "category": "Sales Management", + "website": "https://github.com/OCA/sale-workflow", + "author": "AvanzOSC," + "Grupo Vermon," + "Tecnativa," + "Odoo Community Association (OCA)", + "license": "AGPL-3", + "application": False, + "installable": True, + "depends": ["sale"], + "data": ["views/sale_order_view.xml"], +} diff --git a/sale_order_price_recalculation/i18n/ca.po b/sale_order_price_recalculation/i18n/ca.po new file mode 100644 index 00000000000..217fe75365d --- /dev/null +++ b/sale_order_price_recalculation/i18n/ca.po @@ -0,0 +1,39 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_order_price_recalculation +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-04-25 02:52+0000\n" +"PO-Revision-Date: 2017-04-25 02:52+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" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: sale_order_price_recalculation +#: model_terms:ir.ui.view,arch_db:sale_order_price_recalculation.view_order_form +msgid "Recalculate prices" +msgstr "" + +#. module: sale_order_price_recalculation +#: model_terms:ir.ui.view,arch_db:sale_order_price_recalculation.view_order_form +msgid "Reset descriptions" +msgstr "" + +#. module: sale_order_price_recalculation +#: model:ir.model,name:sale_order_price_recalculation.model_sale_order +msgid "Sales Order" +msgstr "" + +#, fuzzy +#~| msgid "Sales Order" +#~ msgid "Sale Order" +#~ msgstr "Comandes de venda" diff --git a/sale_order_price_recalculation/i18n/de.po b/sale_order_price_recalculation/i18n/de.po new file mode 100644 index 00000000000..a524fc696bc --- /dev/null +++ b/sale_order_price_recalculation/i18n/de.po @@ -0,0 +1,38 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_order_price_recalculation +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: sale-workflow (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-09-09 12:27+0000\n" +"PO-Revision-Date: 2019-07-15 16:43+0000\n" +"Last-Translator: Maria Sparenberg \n" +"Language-Team: German (http://www.transifex.com/oca/OCA-sale-workflow-8-0/" +"language/de/)\n" +"Language: de\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.7.1\n" + +#. module: sale_order_price_recalculation +#: model_terms:ir.ui.view,arch_db:sale_order_price_recalculation.view_order_form +msgid "Recalculate prices" +msgstr "Preise neu berechnen" + +#. module: sale_order_price_recalculation +#: model_terms:ir.ui.view,arch_db:sale_order_price_recalculation.view_order_form +msgid "Reset descriptions" +msgstr "Beschreibung zurücksetzen" + +#. module: sale_order_price_recalculation +#: model:ir.model,name:sale_order_price_recalculation.model_sale_order +msgid "Sales Order" +msgstr "" + +#~ msgid "Sale Order" +#~ msgstr "Verkaufsauftrag" diff --git a/sale_order_price_recalculation/i18n/el_GR.po b/sale_order_price_recalculation/i18n/el_GR.po new file mode 100644 index 00000000000..1d54d97580e --- /dev/null +++ b/sale_order_price_recalculation/i18n/el_GR.po @@ -0,0 +1,40 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_order_price_recalculation +# +# Translators: +# Kostas Goutoudis , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-04-25 02:52+0000\n" +"PO-Revision-Date: 2017-04-25 02:52+0000\n" +"Last-Translator: Kostas Goutoudis , 2017\n" +"Language-Team: Greek (Greece) (https://www.transifex.com/oca/teams/23907/" +"el_GR/)\n" +"Language: el_GR\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: sale_order_price_recalculation +#: model_terms:ir.ui.view,arch_db:sale_order_price_recalculation.view_order_form +msgid "Recalculate prices" +msgstr "" + +#. module: sale_order_price_recalculation +#: model_terms:ir.ui.view,arch_db:sale_order_price_recalculation.view_order_form +msgid "Reset descriptions" +msgstr "" + +#. module: sale_order_price_recalculation +#: model:ir.model,name:sale_order_price_recalculation.model_sale_order +msgid "Sales Order" +msgstr "" + +#, fuzzy +#~| msgid "Sales Order" +#~ msgid "Sale Order" +#~ msgstr "Εντολή Πώλησης" diff --git a/sale_order_price_recalculation/i18n/es.po b/sale_order_price_recalculation/i18n/es.po new file mode 100644 index 00000000000..8fe1387cc43 --- /dev/null +++ b/sale_order_price_recalculation/i18n/es.po @@ -0,0 +1,38 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_order_price_recalculation +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: sale-workflow (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-09-09 12:27+0000\n" +"PO-Revision-Date: 2022-05-31 06:38+0000\n" +"Last-Translator: Pedro M. Baeza \n" +"Language-Team: Spanish (http://www.transifex.com/oca/OCA-sale-workflow-8-0/" +"language/es/)\n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.3.2\n" + +#. module: sale_order_price_recalculation +#: model_terms:ir.ui.view,arch_db:sale_order_price_recalculation.view_order_form +msgid "Recalculate prices" +msgstr "Recalcular precios" + +#. module: sale_order_price_recalculation +#: model_terms:ir.ui.view,arch_db:sale_order_price_recalculation.view_order_form +msgid "Reset descriptions" +msgstr "Restablecer descripciones" + +#. module: sale_order_price_recalculation +#: model:ir.model,name:sale_order_price_recalculation.model_sale_order +msgid "Sales Order" +msgstr "" + +#~ msgid "Sale Order" +#~ msgstr "Pedido de venta" diff --git a/sale_order_price_recalculation/i18n/es_ES.po b/sale_order_price_recalculation/i18n/es_ES.po new file mode 100644 index 00000000000..b1c49b5ccac --- /dev/null +++ b/sale_order_price_recalculation/i18n/es_ES.po @@ -0,0 +1,40 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_order_price_recalculation +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-04-25 02:52+0000\n" +"PO-Revision-Date: 2017-04-25 02:52+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Spanish (Spain) (https://www.transifex.com/oca/teams/23907/" +"es_ES/)\n" +"Language: es_ES\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: sale_order_price_recalculation +#: model_terms:ir.ui.view,arch_db:sale_order_price_recalculation.view_order_form +msgid "Recalculate prices" +msgstr "Recalcular precios" + +#. module: sale_order_price_recalculation +#: model_terms:ir.ui.view,arch_db:sale_order_price_recalculation.view_order_form +msgid "Reset descriptions" +msgstr "Restablecer descripciones" + +#. module: sale_order_price_recalculation +#: model:ir.model,name:sale_order_price_recalculation.model_sale_order +msgid "Sales Order" +msgstr "" + +#, fuzzy +#~| msgid "Sales Order" +#~ msgid "Sale Order" +#~ msgstr "Pedido de venta" diff --git a/sale_order_price_recalculation/i18n/es_VE.po b/sale_order_price_recalculation/i18n/es_VE.po new file mode 100644 index 00000000000..1b50521b349 --- /dev/null +++ b/sale_order_price_recalculation/i18n/es_VE.po @@ -0,0 +1,40 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_order_price_recalculation +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-04-25 02:52+0000\n" +"PO-Revision-Date: 2017-04-25 02:52+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Spanish (Venezuela) (https://www.transifex.com/oca/" +"teams/23907/es_VE/)\n" +"Language: es_VE\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: sale_order_price_recalculation +#: model_terms:ir.ui.view,arch_db:sale_order_price_recalculation.view_order_form +msgid "Recalculate prices" +msgstr "" + +#. module: sale_order_price_recalculation +#: model_terms:ir.ui.view,arch_db:sale_order_price_recalculation.view_order_form +msgid "Reset descriptions" +msgstr "" + +#. module: sale_order_price_recalculation +#: model:ir.model,name:sale_order_price_recalculation.model_sale_order +msgid "Sales Order" +msgstr "" + +#, fuzzy +#~| msgid "Sales Order" +#~ msgid "Sale Order" +#~ msgstr "Pedidos de venta" diff --git a/sale_order_price_recalculation/i18n/fi.po b/sale_order_price_recalculation/i18n/fi.po new file mode 100644 index 00000000000..bb544662fdc --- /dev/null +++ b/sale_order_price_recalculation/i18n/fi.po @@ -0,0 +1,39 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_order_price_recalculation +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: sale-workflow (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-09-09 12:27+0000\n" +"PO-Revision-Date: 2015-09-03 07:09+0000\n" +"Last-Translator: <>\n" +"Language-Team: Finnish (http://www.transifex.com/oca/OCA-sale-workflow-8-0/" +"language/fi/)\n" +"Language: fi\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: sale_order_price_recalculation +#: model_terms:ir.ui.view,arch_db:sale_order_price_recalculation.view_order_form +msgid "Recalculate prices" +msgstr "" + +#. module: sale_order_price_recalculation +#: model_terms:ir.ui.view,arch_db:sale_order_price_recalculation.view_order_form +msgid "Reset descriptions" +msgstr "" + +#. module: sale_order_price_recalculation +#: model:ir.model,name:sale_order_price_recalculation.model_sale_order +msgid "Sales Order" +msgstr "" + +#, fuzzy +#~| msgid "Sales Order" +#~ msgid "Sale Order" +#~ msgstr "Myyntitilaus" diff --git a/sale_order_price_recalculation/i18n/fr.po b/sale_order_price_recalculation/i18n/fr.po new file mode 100644 index 00000000000..9d2c8bfd621 --- /dev/null +++ b/sale_order_price_recalculation/i18n/fr.po @@ -0,0 +1,39 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_order_price_recalculation +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: sale-workflow (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-09-09 12:27+0000\n" +"PO-Revision-Date: 2015-09-03 07:09+0000\n" +"Last-Translator: <>\n" +"Language-Team: French (http://www.transifex.com/oca/OCA-sale-workflow-8-0/" +"language/fr/)\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" + +#. module: sale_order_price_recalculation +#: model_terms:ir.ui.view,arch_db:sale_order_price_recalculation.view_order_form +msgid "Recalculate prices" +msgstr "" + +#. module: sale_order_price_recalculation +#: model_terms:ir.ui.view,arch_db:sale_order_price_recalculation.view_order_form +msgid "Reset descriptions" +msgstr "" + +#. module: sale_order_price_recalculation +#: model:ir.model,name:sale_order_price_recalculation.model_sale_order +msgid "Sales Order" +msgstr "" + +#, fuzzy +#~| msgid "Sales Order" +#~ msgid "Sale Order" +#~ msgstr "Bon de commande" diff --git a/sale_order_price_recalculation/i18n/hr.po b/sale_order_price_recalculation/i18n/hr.po new file mode 100644 index 00000000000..2e91aaf9376 --- /dev/null +++ b/sale_order_price_recalculation/i18n/hr.po @@ -0,0 +1,40 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_order_price_recalculation +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: sale-workflow (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-11-22 23:35+0000\n" +"PO-Revision-Date: 2015-09-03 07:09+0000\n" +"Last-Translator: <>\n" +"Language-Team: Croatian (http://www.transifex.com/oca/OCA-sale-workflow-8-0/" +"language/hr/)\n" +"Language: hr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" + +#. module: sale_order_price_recalculation +#: model_terms:ir.ui.view,arch_db:sale_order_price_recalculation.view_order_form +msgid "Recalculate prices" +msgstr "" + +#. module: sale_order_price_recalculation +#: model_terms:ir.ui.view,arch_db:sale_order_price_recalculation.view_order_form +msgid "Reset descriptions" +msgstr "" + +#. module: sale_order_price_recalculation +#: model:ir.model,name:sale_order_price_recalculation.model_sale_order +msgid "Sales Order" +msgstr "" + +#, fuzzy +#~| msgid "Sales Order" +#~ msgid "Sale Order" +#~ msgstr "Prodajni nalog" diff --git a/sale_order_price_recalculation/i18n/hr_HR.po b/sale_order_price_recalculation/i18n/hr_HR.po new file mode 100644 index 00000000000..672803aba8b --- /dev/null +++ b/sale_order_price_recalculation/i18n/hr_HR.po @@ -0,0 +1,41 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_order_price_recalculation +# +# Translators: +# Bole , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-04-25 02:52+0000\n" +"PO-Revision-Date: 2017-04-25 02:52+0000\n" +"Last-Translator: Bole , 2017\n" +"Language-Team: Croatian (Croatia) (https://www.transifex.com/oca/teams/23907/" +"hr_HR/)\n" +"Language: hr_HR\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" + +#. module: sale_order_price_recalculation +#: model_terms:ir.ui.view,arch_db:sale_order_price_recalculation.view_order_form +msgid "Recalculate prices" +msgstr "" + +#. module: sale_order_price_recalculation +#: model_terms:ir.ui.view,arch_db:sale_order_price_recalculation.view_order_form +msgid "Reset descriptions" +msgstr "" + +#. module: sale_order_price_recalculation +#: model:ir.model,name:sale_order_price_recalculation.model_sale_order +msgid "Sales Order" +msgstr "" + +#, fuzzy +#~| msgid "Sales Order" +#~ msgid "Sale Order" +#~ msgstr "Prodjani nalog" diff --git a/sale_order_price_recalculation/i18n/hu.po b/sale_order_price_recalculation/i18n/hu.po new file mode 100644 index 00000000000..ce7296667bc --- /dev/null +++ b/sale_order_price_recalculation/i18n/hu.po @@ -0,0 +1,39 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_order_price_recalculation +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-04-25 02:52+0000\n" +"PO-Revision-Date: 2017-04-25 02:52+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Hungarian (https://www.transifex.com/oca/teams/23907/hu/)\n" +"Language: hu\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: sale_order_price_recalculation +#: model_terms:ir.ui.view,arch_db:sale_order_price_recalculation.view_order_form +msgid "Recalculate prices" +msgstr "" + +#. module: sale_order_price_recalculation +#: model_terms:ir.ui.view,arch_db:sale_order_price_recalculation.view_order_form +msgid "Reset descriptions" +msgstr "" + +#. module: sale_order_price_recalculation +#: model:ir.model,name:sale_order_price_recalculation.model_sale_order +msgid "Sales Order" +msgstr "" + +#, fuzzy +#~| msgid "Sales Order" +#~ msgid "Sale Order" +#~ msgstr "Vevői megrendelés" diff --git a/sale_order_price_recalculation/i18n/it.po b/sale_order_price_recalculation/i18n/it.po new file mode 100644 index 00000000000..0128460a8d7 --- /dev/null +++ b/sale_order_price_recalculation/i18n/it.po @@ -0,0 +1,38 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_order_price_recalculation +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-04-25 02:52+0000\n" +"PO-Revision-Date: 2020-04-24 12:19+0000\n" +"Last-Translator: Francesco Foresti \n" +"Language-Team: Italian (https://www.transifex.com/oca/teams/23907/it/)\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: sale_order_price_recalculation +#: model_terms:ir.ui.view,arch_db:sale_order_price_recalculation.view_order_form +msgid "Recalculate prices" +msgstr "Ricalcola prezzi" + +#. module: sale_order_price_recalculation +#: model_terms:ir.ui.view,arch_db:sale_order_price_recalculation.view_order_form +msgid "Reset descriptions" +msgstr "Resetta descrizioni" + +#. module: sale_order_price_recalculation +#: model:ir.model,name:sale_order_price_recalculation.model_sale_order +msgid "Sales Order" +msgstr "" + +#~ msgid "Sale Order" +#~ msgstr "Ordine di vendita" diff --git a/sale_order_price_recalculation/i18n/nl.po b/sale_order_price_recalculation/i18n/nl.po new file mode 100644 index 00000000000..df177c051d8 --- /dev/null +++ b/sale_order_price_recalculation/i18n/nl.po @@ -0,0 +1,39 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_order_price_recalculation +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: sale-workflow (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-10-23 08:14+0000\n" +"PO-Revision-Date: 2015-09-03 07:09+0000\n" +"Last-Translator: <>\n" +"Language-Team: Dutch (http://www.transifex.com/oca/OCA-sale-workflow-8-0/" +"language/nl/)\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" + +#. module: sale_order_price_recalculation +#: model_terms:ir.ui.view,arch_db:sale_order_price_recalculation.view_order_form +msgid "Recalculate prices" +msgstr "" + +#. module: sale_order_price_recalculation +#: model_terms:ir.ui.view,arch_db:sale_order_price_recalculation.view_order_form +msgid "Reset descriptions" +msgstr "" + +#. module: sale_order_price_recalculation +#: model:ir.model,name:sale_order_price_recalculation.model_sale_order +msgid "Sales Order" +msgstr "" + +#, fuzzy +#~| msgid "Sales Order" +#~ msgid "Sale Order" +#~ msgstr "Verkooporder" diff --git a/sale_order_price_recalculation/i18n/nl_NL.po b/sale_order_price_recalculation/i18n/nl_NL.po new file mode 100644 index 00000000000..a38b1acb021 --- /dev/null +++ b/sale_order_price_recalculation/i18n/nl_NL.po @@ -0,0 +1,40 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_order_price_recalculation +# +# Translators: +# Peter Hageman , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-08-10 02:45+0000\n" +"PO-Revision-Date: 2017-08-10 02:45+0000\n" +"Last-Translator: Peter Hageman , 2017\n" +"Language-Team: Dutch (Netherlands) (https://www.transifex.com/oca/" +"teams/23907/nl_NL/)\n" +"Language: nl_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" + +#. module: sale_order_price_recalculation +#: model_terms:ir.ui.view,arch_db:sale_order_price_recalculation.view_order_form +msgid "Recalculate prices" +msgstr "" + +#. module: sale_order_price_recalculation +#: model_terms:ir.ui.view,arch_db:sale_order_price_recalculation.view_order_form +msgid "Reset descriptions" +msgstr "" + +#. module: sale_order_price_recalculation +#: model:ir.model,name:sale_order_price_recalculation.model_sale_order +msgid "Sales Order" +msgstr "" + +#, fuzzy +#~| msgid "Sales Order" +#~ msgid "Sale Order" +#~ msgstr "Verkooporder" diff --git a/sale_order_price_recalculation/i18n/pt.po b/sale_order_price_recalculation/i18n/pt.po new file mode 100644 index 00000000000..994ba8e7983 --- /dev/null +++ b/sale_order_price_recalculation/i18n/pt.po @@ -0,0 +1,39 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_order_price_recalculation +# +# Translators: +# Daniel Reis , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-04-25 02:52+0000\n" +"PO-Revision-Date: 2017-04-25 02:52+0000\n" +"Last-Translator: Daniel Reis , 2017\n" +"Language-Team: Portuguese (https://www.transifex.com/oca/teams/23907/pt/)\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" + +#. module: sale_order_price_recalculation +#: model_terms:ir.ui.view,arch_db:sale_order_price_recalculation.view_order_form +msgid "Recalculate prices" +msgstr "" + +#. module: sale_order_price_recalculation +#: model_terms:ir.ui.view,arch_db:sale_order_price_recalculation.view_order_form +msgid "Reset descriptions" +msgstr "" + +#. module: sale_order_price_recalculation +#: model:ir.model,name:sale_order_price_recalculation.model_sale_order +msgid "Sales Order" +msgstr "" + +#, fuzzy +#~| msgid "Sales Order" +#~ msgid "Sale Order" +#~ msgstr "Ordem de Venda" diff --git a/sale_order_price_recalculation/i18n/pt_BR.po b/sale_order_price_recalculation/i18n/pt_BR.po new file mode 100644 index 00000000000..ab8df7b32be --- /dev/null +++ b/sale_order_price_recalculation/i18n/pt_BR.po @@ -0,0 +1,39 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_order_price_recalculation +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-04-25 02:52+0000\n" +"PO-Revision-Date: 2019-09-17 14:07+0000\n" +"Last-Translator: Rodrigo Macedo \n" +"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/" +"teams/23907/pt_BR/)\n" +"Language: pt_BR\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.8\n" + +#. module: sale_order_price_recalculation +#: model_terms:ir.ui.view,arch_db:sale_order_price_recalculation.view_order_form +msgid "Recalculate prices" +msgstr "Recalcular preços" + +#. module: sale_order_price_recalculation +#: model_terms:ir.ui.view,arch_db:sale_order_price_recalculation.view_order_form +msgid "Reset descriptions" +msgstr "Redefinir descrições" + +#. module: sale_order_price_recalculation +#: model:ir.model,name:sale_order_price_recalculation.model_sale_order +msgid "Sales Order" +msgstr "" + +#~ msgid "Sale Order" +#~ msgstr "Ordem de Venda" diff --git a/sale_order_price_recalculation/i18n/ro.po b/sale_order_price_recalculation/i18n/ro.po new file mode 100644 index 00000000000..f9f8691ff5a --- /dev/null +++ b/sale_order_price_recalculation/i18n/ro.po @@ -0,0 +1,40 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_order_price_recalculation +# +# Translators: +# Dorin Hongu , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-04-25 02:52+0000\n" +"PO-Revision-Date: 2017-04-25 02:52+0000\n" +"Last-Translator: Dorin Hongu , 2017\n" +"Language-Team: Romanian (https://www.transifex.com/oca/teams/23907/ro/)\n" +"Language: ro\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?" +"2:1));\n" + +#. module: sale_order_price_recalculation +#: model_terms:ir.ui.view,arch_db:sale_order_price_recalculation.view_order_form +msgid "Recalculate prices" +msgstr "" + +#. module: sale_order_price_recalculation +#: model_terms:ir.ui.view,arch_db:sale_order_price_recalculation.view_order_form +msgid "Reset descriptions" +msgstr "" + +#. module: sale_order_price_recalculation +#: model:ir.model,name:sale_order_price_recalculation.model_sale_order +msgid "Sales Order" +msgstr "" + +#, fuzzy +#~| msgid "Sales Order" +#~ msgid "Sale Order" +#~ msgstr "Comandă vânzare" diff --git a/sale_order_price_recalculation/i18n/sale_order_price_recalculation.pot b/sale_order_price_recalculation/i18n/sale_order_price_recalculation.pot new file mode 100644 index 00000000000..9311bbd926d --- /dev/null +++ b/sale_order_price_recalculation/i18n/sale_order_price_recalculation.pot @@ -0,0 +1,29 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_order_price_recalculation +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 15.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: sale_order_price_recalculation +#: model_terms:ir.ui.view,arch_db:sale_order_price_recalculation.view_order_form +msgid "Recalculate prices" +msgstr "" + +#. module: sale_order_price_recalculation +#: model_terms:ir.ui.view,arch_db:sale_order_price_recalculation.view_order_form +msgid "Reset descriptions" +msgstr "" + +#. module: sale_order_price_recalculation +#: model:ir.model,name:sale_order_price_recalculation.model_sale_order +msgid "Sales Order" +msgstr "" diff --git a/sale_order_price_recalculation/i18n/sl.po b/sale_order_price_recalculation/i18n/sl.po new file mode 100644 index 00000000000..381ba2877ea --- /dev/null +++ b/sale_order_price_recalculation/i18n/sl.po @@ -0,0 +1,42 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_order_price_recalculation +# +# Translators: +# Matjaž Mozetič , 2015 +msgid "" +msgstr "" +"Project-Id-Version: sale-workflow (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-09-09 12:27+0000\n" +"PO-Revision-Date: 2015-09-07 14:31+0000\n" +"Last-Translator: Matjaž Mozetič \n" +"Language-Team: Slovenian (http://www.transifex.com/oca/OCA-sale-workflow-8-0/" +"language/sl/)\n" +"Language: sl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n" +"%100==4 ? 2 : 3);\n" + +#. module: sale_order_price_recalculation +#: model_terms:ir.ui.view,arch_db:sale_order_price_recalculation.view_order_form +#, fuzzy +msgid "Recalculate prices" +msgstr "(Preračun cen)" + +#. module: sale_order_price_recalculation +#: model_terms:ir.ui.view,arch_db:sale_order_price_recalculation.view_order_form +msgid "Reset descriptions" +msgstr "" + +#. module: sale_order_price_recalculation +#: model:ir.model,name:sale_order_price_recalculation.model_sale_order +msgid "Sales Order" +msgstr "" + +#, fuzzy +#~| msgid "Sales Order" +#~ msgid "Sale Order" +#~ msgstr "Prodajni nalog" diff --git a/sale_order_price_recalculation/i18n/tr.po b/sale_order_price_recalculation/i18n/tr.po new file mode 100644 index 00000000000..2ac0b9ff70a --- /dev/null +++ b/sale_order_price_recalculation/i18n/tr.po @@ -0,0 +1,39 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_order_price_recalculation +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: sale-workflow (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-12-05 23:35+0000\n" +"PO-Revision-Date: 2015-09-03 07:09+0000\n" +"Last-Translator: <>\n" +"Language-Team: Turkish (http://www.transifex.com/oca/OCA-sale-workflow-8-0/" +"language/tr/)\n" +"Language: tr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. module: sale_order_price_recalculation +#: model_terms:ir.ui.view,arch_db:sale_order_price_recalculation.view_order_form +msgid "Recalculate prices" +msgstr "" + +#. module: sale_order_price_recalculation +#: model_terms:ir.ui.view,arch_db:sale_order_price_recalculation.view_order_form +msgid "Reset descriptions" +msgstr "" + +#. module: sale_order_price_recalculation +#: model:ir.model,name:sale_order_price_recalculation.model_sale_order +msgid "Sales Order" +msgstr "" + +#, fuzzy +#~| msgid "Sales Order" +#~ msgid "Sale Order" +#~ msgstr "Sipariş Emri" diff --git a/sale_order_price_recalculation/i18n/tr_TR.po b/sale_order_price_recalculation/i18n/tr_TR.po new file mode 100644 index 00000000000..7480411863a --- /dev/null +++ b/sale_order_price_recalculation/i18n/tr_TR.po @@ -0,0 +1,41 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_order_price_recalculation +# +# Translators: +# Ozge Altinisik , 2017 +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-04-25 02:52+0000\n" +"PO-Revision-Date: 2017-04-25 02:52+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Turkish (Turkey) (https://www.transifex.com/oca/teams/23907/" +"tr_TR/)\n" +"Language: tr_TR\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#. module: sale_order_price_recalculation +#: model_terms:ir.ui.view,arch_db:sale_order_price_recalculation.view_order_form +msgid "Recalculate prices" +msgstr "Fiyatları yeniden hesapla" + +#. module: sale_order_price_recalculation +#: model_terms:ir.ui.view,arch_db:sale_order_price_recalculation.view_order_form +msgid "Reset descriptions" +msgstr "Açıklamaları yeniden ayarla" + +#. module: sale_order_price_recalculation +#: model:ir.model,name:sale_order_price_recalculation.model_sale_order +msgid "Sales Order" +msgstr "" + +#, fuzzy +#~| msgid "Sales Order" +#~ msgid "Sale Order" +#~ msgstr "Satış emri" diff --git a/sale_order_price_recalculation/i18n/vi_VN.po b/sale_order_price_recalculation/i18n/vi_VN.po new file mode 100644 index 00000000000..e7028c6e18f --- /dev/null +++ b/sale_order_price_recalculation/i18n/vi_VN.po @@ -0,0 +1,40 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_order_price_recalculation +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-04-25 02:52+0000\n" +"PO-Revision-Date: 2017-04-25 02:52+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Vietnamese (Viet Nam) (https://www.transifex.com/oca/" +"teams/23907/vi_VN/)\n" +"Language: vi_VN\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#. module: sale_order_price_recalculation +#: model_terms:ir.ui.view,arch_db:sale_order_price_recalculation.view_order_form +msgid "Recalculate prices" +msgstr "" + +#. module: sale_order_price_recalculation +#: model_terms:ir.ui.view,arch_db:sale_order_price_recalculation.view_order_form +msgid "Reset descriptions" +msgstr "" + +#. module: sale_order_price_recalculation +#: model:ir.model,name:sale_order_price_recalculation.model_sale_order +msgid "Sales Order" +msgstr "" + +#, fuzzy +#~| msgid "Sales Order" +#~ msgid "Sale Order" +#~ msgstr "Đơn hàng Bán" diff --git a/sale_order_price_recalculation/i18n/zh_CN.po b/sale_order_price_recalculation/i18n/zh_CN.po new file mode 100644 index 00000000000..57a9e43bcf2 --- /dev/null +++ b/sale_order_price_recalculation/i18n/zh_CN.po @@ -0,0 +1,38 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_order_price_recalculation +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: sale-workflow (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-09-09 12:27+0000\n" +"PO-Revision-Date: 2019-09-01 11:23+0000\n" +"Last-Translator: 黎伟杰 <674416404@qq.com>\n" +"Language-Team: Chinese (China) (http://www.transifex.com/oca/OCA-sale-" +"workflow-8-0/language/zh_CN/)\n" +"Language: zh_CN\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: Weblate 3.8\n" + +#. module: sale_order_price_recalculation +#: model_terms:ir.ui.view,arch_db:sale_order_price_recalculation.view_order_form +msgid "Recalculate prices" +msgstr "重新计算价格" + +#. module: sale_order_price_recalculation +#: model_terms:ir.ui.view,arch_db:sale_order_price_recalculation.view_order_form +msgid "Reset descriptions" +msgstr "重置说明" + +#. module: sale_order_price_recalculation +#: model:ir.model,name:sale_order_price_recalculation.model_sale_order +msgid "Sales Order" +msgstr "" + +#~ msgid "Sale Order" +#~ msgstr "销售订单" diff --git a/sale_order_price_recalculation/models/__init__.py b/sale_order_price_recalculation/models/__init__.py new file mode 100644 index 00000000000..13b179ea649 --- /dev/null +++ b/sale_order_price_recalculation/models/__init__.py @@ -0,0 +1,2 @@ +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html +from . import sale_order diff --git a/sale_order_price_recalculation/models/sale_order.py b/sale_order_price_recalculation/models/sale_order.py new file mode 100644 index 00000000000..61534a86b14 --- /dev/null +++ b/sale_order_price_recalculation/models/sale_order.py @@ -0,0 +1,17 @@ +# Copyright 2014 Carlos Sánchez Cifuentes +# Copyright 2015-2020 Tecnativa - Pedro M. Baeza +# Copyright 2015 Oihane Crucelaegui +# Copyright 2016 Vicent Cubells +# Copyright 2017 David Vidal +# Copyright 2023 glueckkanja AG - CRogos +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html +from odoo import models + + +class SaleOrder(models.Model): + _inherit = "sale.order" + + def action_update_names(self): + lines = self.mapped("order_line") + lines._compute_name() + return True diff --git a/sale_order_price_recalculation/readme/CONTRIBUTORS.rst b/sale_order_price_recalculation/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000000..e0ff132d464 --- /dev/null +++ b/sale_order_price_recalculation/readme/CONTRIBUTORS.rst @@ -0,0 +1,8 @@ +* Carlos Sánchez Cifuentes +* Pedro M. Baeza +* Oihane Crucelaegui +* Pierre Verkest +* Vicent Cubells +* David Vidal +* Duc, Dao Dong (https://komit-consulting.com) +* Raf Ven diff --git a/sale_order_price_recalculation/readme/DESCRIPTION.rst b/sale_order_price_recalculation/readme/DESCRIPTION.rst new file mode 100644 index 00000000000..c77552863c6 --- /dev/null +++ b/sale_order_price_recalculation/readme/DESCRIPTION.rst @@ -0,0 +1,8 @@ +This module add 2 buttons on sale orders (below sale order lines) that: + +* Recalculates the prices of the order lines that contain a product in them. +* Reset product descriptions from current product information. + +It is launched manually as a button to get the user decide if he/she wants to +recalculate prices when pricelist is changed or after duplicating a sale order +to update or not sales information. diff --git a/sale_order_price_recalculation/readme/INSTALL.rst b/sale_order_price_recalculation/readme/INSTALL.rst new file mode 100644 index 00000000000..4da360f7c83 --- /dev/null +++ b/sale_order_price_recalculation/readme/INSTALL.rst @@ -0,0 +1 @@ +You need to install sale_management module for accessing the needed menus. diff --git a/sale_order_price_recalculation/readme/ROADMAP.rst b/sale_order_price_recalculation/readme/ROADMAP.rst new file mode 100644 index 00000000000..b6e8ca7e9f3 --- /dev/null +++ b/sale_order_price_recalculation/readme/ROADMAP.rst @@ -0,0 +1,3 @@ +* In a sale order with lot of lines, the recalculation may slow down, because + sale general data (amount untaxed, amount taxed...) are recalculated for + each line. diff --git a/sale_order_price_recalculation/readme/USAGE.rst b/sale_order_price_recalculation/readme/USAGE.rst new file mode 100644 index 00000000000..742a1c76833 --- /dev/null +++ b/sale_order_price_recalculation/readme/USAGE.rst @@ -0,0 +1,8 @@ +Inside a sale order, you can click on "Recalculate prices" to launch a +recalculation of all the prices of the lines, losing previous custom prices. + +The second "Reset descriptions" will get descriptions from products, losing +custom descriptions. + +.. image:: /sale_order_price_recalculation/static/description/sale_order_price_recalculation.png + :alt: Sale order price recalculation diff --git a/sale_order_price_recalculation/static/description/icon.png b/sale_order_price_recalculation/static/description/icon.png new file mode 100644 index 00000000000..3a0328b516c Binary files /dev/null and b/sale_order_price_recalculation/static/description/icon.png differ diff --git a/sale_order_price_recalculation/static/description/index.html b/sale_order_price_recalculation/static/description/index.html new file mode 100644 index 00000000000..af4076e3728 --- /dev/null +++ b/sale_order_price_recalculation/static/description/index.html @@ -0,0 +1,460 @@ + + + + + + +Price recalculation in sales orders + + + +
+

Price recalculation in sales orders

+ + +

Beta License: AGPL-3 OCA/sale-workflow Translate me on Weblate Try me on Runboat

+

This module add 2 buttons on sale orders (below sale order lines) that:

+
    +
  • Recalculates the prices of the order lines that contain a product in them.
  • +
  • Reset product descriptions from current product information.
  • +
+

It is launched manually as a button to get the user decide if he/she wants to +recalculate prices when pricelist is changed or after duplicating a sale order +to update or not sales information.

+

Table of contents

+ +
+

Installation

+

You need to install sale_management module for accessing the needed menus.

+
+
+

Usage

+

Inside a sale order, you can click on “Recalculate prices” to launch a +recalculation of all the prices of the lines, losing previous custom prices.

+

The second “Reset descriptions” will get descriptions from products, losing +custom descriptions.

+Sale order price recalculation +
+
+

Known issues / Roadmap

+
    +
  • In a sale order with lot of lines, the recalculation may slow down, because +sale general data (amount untaxed, amount taxed…) are recalculated for +each line.
  • +
+
+
+

Bug Tracker

+

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

+

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

+
+
+

Credits

+
+

Authors

+
    +
  • AvanzOSC
  • +
  • Grupo Vermon
  • +
  • Tecnativa
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

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

+

This module is part of the OCA/sale-workflow project on GitHub.

+

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

+
+
+
+ + diff --git a/sale_order_price_recalculation/static/description/sale_order_price_recalculation.png b/sale_order_price_recalculation/static/description/sale_order_price_recalculation.png new file mode 100644 index 00000000000..57dadfbb56c Binary files /dev/null and b/sale_order_price_recalculation/static/description/sale_order_price_recalculation.png differ diff --git a/sale_order_price_recalculation/tests/__init__.py b/sale_order_price_recalculation/tests/__init__.py new file mode 100644 index 00000000000..67291450a01 --- /dev/null +++ b/sale_order_price_recalculation/tests/__init__.py @@ -0,0 +1,2 @@ +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html +from . import test_sale_order_price_recalculation diff --git a/sale_order_price_recalculation/tests/test_sale_order_price_recalculation.py b/sale_order_price_recalculation/tests/test_sale_order_price_recalculation.py new file mode 100644 index 00000000000..26cce2daa23 --- /dev/null +++ b/sale_order_price_recalculation/tests/test_sale_order_price_recalculation.py @@ -0,0 +1,67 @@ +# Copyright 2015 Pedro M. Baeza +# Copyright 2016 Vicent Cubells +# Copyright 2017 David Vidal +# Copyright 2018 Duc Dao Dong +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html +from odoo.tests import common + + +class TestSaleOrderPriceRecalculation(common.TransactionCase): + def setUp(self): + super(TestSaleOrderPriceRecalculation, self).setUp() + # Enable group_discount_per_so_line for admin user + group = self.env.ref("product.group_discount_per_so_line") + group.users = [(4, self.env.user.id)] + self.partner = self.env["res.partner"].create({"name": "Test partner"}) + uom_id = self.env.ref("uom.product_uom_kgm") + self.product = self.env["product.product"].create( + { + "name": "Jacket - Color: Black - Size: XL", + "uom_id": uom_id.id, + "uom_po_id": uom_id.id, + } + ) + self.pricelist = self.env["product.pricelist"].create( + { + "name": "Test pricelist", + "item_ids": [ + ( + 0, + 0, + { + "applied_on": "3_global", + "compute_price": "formula", + "base": "list_price", + }, + ), + ], + } + ) + self.sale_order = self.env["sale.order"].create( + { + "partner_id": self.partner.id, + "partner_invoice_id": self.partner.id, + "partner_shipping_id": self.partner.id, + "pricelist_id": self.pricelist.id, + } + ) + line_vals = { + "product_id": self.product.id, + "product_template_id": self.product.product_tmpl_id.id, + "name": self.product.name, + "product_uom_qty": 1.0, + "product_uom": self.product.uom_id.id, + "price_unit": self.product.lst_price, + "order_id": self.sale_order.id, + } + self.sale_order_line = self.env["sale.order.line"].create(line_vals) + + def test_name_recalculation(self): + self.sale_order_line.price_unit = 150.0 + initial_price = self.sale_order_line.price_unit + self.assertEqual(self.sale_order_line.name, self.product.name) + self.sale_order_line.name = "Custom Jacket" + self.sale_order.action_update_names() + self.assertNotEqual("Custom Jacket", self.sale_order_line.name) + # Check the price wasn't reset + self.assertEqual(initial_price, self.sale_order_line.price_unit) diff --git a/sale_order_price_recalculation/views/sale_order_view.xml b/sale_order_price_recalculation/views/sale_order_view.xml new file mode 100644 index 00000000000..fa2ae9ce5e3 --- /dev/null +++ b/sale_order_price_recalculation/views/sale_order_view.xml @@ -0,0 +1,28 @@ + + + + sale.order.form - Add recompute buttons + sale.order + + + +