diff --git a/partner_pricelist_tracking/README.rst b/partner_pricelist_tracking/README.rst new file mode 100644 index 00000000000..951c39cadef --- /dev/null +++ b/partner_pricelist_tracking/README.rst @@ -0,0 +1,99 @@ +=============================== +Track partner pricelist changes +=============================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:f2afe3376b385917abff45cd577f46ef9e5955e22c4d2fb2ea0be9ccc0697096 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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%2Fpartner--contact-lightgray.png?logo=github + :target: https://github.com/OCA/partner-contact/tree/18.0/partner_pricelist_tracking + :alt: OCA/partner-contact +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/partner-contact-18-0/partner-contact-18-0-partner_pricelist_tracking + :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/partner-contact&target_branch=18.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +When we change the country or the state of the partner, Odoo tries to +match a proper pricelist for the country, which will be the first it +finds with a country group containing such country. The user could be +unaware of this change (that could be right or not) and the partner +would be left with a wrong pricelist. So we enable traceability to at +least be able to log those changes and give the users the chance to +amend them. We could also want to log manual changes overtime. + +**Table of contents** + +.. contents:: + :local: + +Configuration +============= + +Remember to activate developer mode and check the basic pricelist +checkbox in user permissions + +Known issues / Roadmap +====================== + +- The tracking log when the pricelist is changed due to country change, + is not complete. It logs the original pricelist, but it doesn't log + the destination one. At least we get the message. For manual changes, + the full tracking is registered. + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +------- + +* Tecnativa + +Contributors +------------ + +- `Tecnativa `__: + + - David Vidal + - Stefan Ungureanu + +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/partner-contact `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/partner_pricelist_tracking/__init__.py b/partner_pricelist_tracking/__init__.py new file mode 100644 index 00000000000..0650744f6bc --- /dev/null +++ b/partner_pricelist_tracking/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/partner_pricelist_tracking/__manifest__.py b/partner_pricelist_tracking/__manifest__.py new file mode 100644 index 00000000000..80930adaa8d --- /dev/null +++ b/partner_pricelist_tracking/__manifest__.py @@ -0,0 +1,13 @@ +# Copyright 2022 Tecnativa - David Vidal +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). +{ + "name": "Track partner pricelist changes", + "version": "18.0.1.0.0", + "category": "Partner Management", + "author": "Tecnativa, Odoo Community Association (OCA)", + "website": "https://github.com/OCA/partner-contact", + "license": "AGPL-3", + "depends": ["product"], + "data": [], + "installable": True, +} diff --git a/partner_pricelist_tracking/i18n/es.po b/partner_pricelist_tracking/i18n/es.po new file mode 100644 index 00000000000..33cb1dc190e --- /dev/null +++ b/partner_pricelist_tracking/i18n/es.po @@ -0,0 +1,38 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * partner_pricelist_tracking +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 15.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2024-03-21 20:33+0000\n" +"Last-Translator: Ivorra78 \n" +"Language-Team: none\n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.17\n" + +#. module: partner_pricelist_tracking +#: model:ir.model,name:partner_pricelist_tracking.model_res_partner +msgid "Contact" +msgstr "Contacto" + +#. module: partner_pricelist_tracking +#: model:ir.model.fields,field_description:partner_pricelist_tracking.field_res_partner__property_product_pricelist +#: model:ir.model.fields,field_description:partner_pricelist_tracking.field_res_users__property_product_pricelist +msgid "Pricelist" +msgstr "Lista de Precios" + +#. module: partner_pricelist_tracking +#: model:ir.model.fields,help:partner_pricelist_tracking.field_res_partner__property_product_pricelist +#: model:ir.model.fields,help:partner_pricelist_tracking.field_res_users__property_product_pricelist +msgid "" +"This pricelist will be used, instead of the default one, for sales to the " +"current partner" +msgstr "" +"Esta lista de precios se utilizará, en lugar de la predeterminada, para las " +"ventas al socio actual" diff --git a/partner_pricelist_tracking/i18n/partner_pricelist_tracking.pot b/partner_pricelist_tracking/i18n/partner_pricelist_tracking.pot new file mode 100644 index 00000000000..501421d81c3 --- /dev/null +++ b/partner_pricelist_tracking/i18n/partner_pricelist_tracking.pot @@ -0,0 +1,33 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * partner_pricelist_tracking +# +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: partner_pricelist_tracking +#: model:ir.model,name:partner_pricelist_tracking.model_res_partner +msgid "Contact" +msgstr "" + +#. module: partner_pricelist_tracking +#: model:ir.model.fields,field_description:partner_pricelist_tracking.field_res_partner__property_product_pricelist +#: model:ir.model.fields,field_description:partner_pricelist_tracking.field_res_users__property_product_pricelist +msgid "Pricelist" +msgstr "" + +#. module: partner_pricelist_tracking +#: model:ir.model.fields,help:partner_pricelist_tracking.field_res_partner__property_product_pricelist +#: model:ir.model.fields,help:partner_pricelist_tracking.field_res_users__property_product_pricelist +msgid "" +"This pricelist will be used, instead of the default one, for sales to the " +"current partner" +msgstr "" diff --git a/partner_pricelist_tracking/models/__init__.py b/partner_pricelist_tracking/models/__init__.py new file mode 100644 index 00000000000..91fed54d404 --- /dev/null +++ b/partner_pricelist_tracking/models/__init__.py @@ -0,0 +1 @@ +from . import res_partner diff --git a/partner_pricelist_tracking/models/res_partner.py b/partner_pricelist_tracking/models/res_partner.py new file mode 100644 index 00000000000..e04e7800c20 --- /dev/null +++ b/partner_pricelist_tracking/models/res_partner.py @@ -0,0 +1,16 @@ +# Copyright 2022 Tecnativa - David Vidal +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +from odoo import fields, models + + +class ResPartner(models.Model): + _inherit = "res.partner" + + # When we change the country or the state of the partner, Odoo tries to match + # a proper pricelist for the country, which will be the first it finds with + # a country group containing such country. The user could be unaware of this + # change (that could be right or not) and the partner would be left with a + # wrong pricelist. So we enable traceability to at least be able to log those + # changes and give the users the chance to amend them. We could also want to log + # manual changes overtime. + property_product_pricelist = fields.Many2one(tracking=True) diff --git a/partner_pricelist_tracking/pyproject.toml b/partner_pricelist_tracking/pyproject.toml new file mode 100644 index 00000000000..4231d0cccb3 --- /dev/null +++ b/partner_pricelist_tracking/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/partner_pricelist_tracking/readme/CONFIGURE.md b/partner_pricelist_tracking/readme/CONFIGURE.md new file mode 100644 index 00000000000..3809b3940d7 --- /dev/null +++ b/partner_pricelist_tracking/readme/CONFIGURE.md @@ -0,0 +1,2 @@ +Remember to activate developer mode and check the basic pricelist +checkbox in user permissions diff --git a/partner_pricelist_tracking/readme/CONTRIBUTORS.md b/partner_pricelist_tracking/readme/CONTRIBUTORS.md new file mode 100644 index 00000000000..795db3599a9 --- /dev/null +++ b/partner_pricelist_tracking/readme/CONTRIBUTORS.md @@ -0,0 +1,3 @@ +- [Tecnativa](https://www.tecnativa.com): + - David Vidal + - Stefan Ungureanu diff --git a/partner_pricelist_tracking/readme/DESCRIPTION.md b/partner_pricelist_tracking/readme/DESCRIPTION.md new file mode 100644 index 00000000000..553170cfd9e --- /dev/null +++ b/partner_pricelist_tracking/readme/DESCRIPTION.md @@ -0,0 +1,7 @@ +When we change the country or the state of the partner, Odoo tries to +match a proper pricelist for the country, which will be the first it +finds with a country group containing such country. The user could be +unaware of this change (that could be right or not) and the partner +would be left with a wrong pricelist. So we enable traceability to at +least be able to log those changes and give the users the chance to +amend them. We could also want to log manual changes overtime. diff --git a/partner_pricelist_tracking/readme/ROADMAP.md b/partner_pricelist_tracking/readme/ROADMAP.md new file mode 100644 index 00000000000..b430a9d526e --- /dev/null +++ b/partner_pricelist_tracking/readme/ROADMAP.md @@ -0,0 +1,4 @@ +- The tracking log when the pricelist is changed due to country change, + is not complete. It logs the original pricelist, but it doesn't log + the destination one. At least we get the message. For manual changes, + the full tracking is registered. diff --git a/partner_pricelist_tracking/static/description/icon.png b/partner_pricelist_tracking/static/description/icon.png new file mode 100644 index 00000000000..3a0328b516c Binary files /dev/null and b/partner_pricelist_tracking/static/description/icon.png differ diff --git a/partner_pricelist_tracking/static/description/index.html b/partner_pricelist_tracking/static/description/index.html new file mode 100644 index 00000000000..c7519f3f263 --- /dev/null +++ b/partner_pricelist_tracking/static/description/index.html @@ -0,0 +1,449 @@ + + + + + +Track partner pricelist changes + + + +
+

Track partner pricelist changes

+ + +

Beta License: AGPL-3 OCA/partner-contact Translate me on Weblate Try me on Runboat

+

When we change the country or the state of the partner, Odoo tries to +match a proper pricelist for the country, which will be the first it +finds with a country group containing such country. The user could be +unaware of this change (that could be right or not) and the partner +would be left with a wrong pricelist. So we enable traceability to at +least be able to log those changes and give the users the chance to +amend them. We could also want to log manual changes overtime.

+

Table of contents

+ +
+

Configuration

+

Remember to activate developer mode and check the basic pricelist +checkbox in user permissions

+
+
+

Known issues / Roadmap

+
    +
  • The tracking log when the pricelist is changed due to country change, +is not complete. It logs the original pricelist, but it doesn’t log +the destination one. At least we get the message. For manual changes, +the full tracking is registered.
  • +
+
+
+

Bug Tracker

+

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

+

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

+
+
+

Credits

+
+

Authors

+
    +
  • Tecnativa
  • +
+
+
+

Contributors

+
    +
  • Tecnativa:
      +
    • David Vidal
    • +
    • Stefan Ungureanu
    • +
    +
  • +
+
+
+

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/partner-contact project on GitHub.

+

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

+
+
+
+ +