-
-
Notifications
You must be signed in to change notification settings - Fork 717
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ADD] product_list_price_from_pricelist: Automatically compute produc…
…t list prices based on a pricelist.
- Loading branch information
1 parent
7cbaea7
commit aefa06b
Showing
20 changed files
with
1,410 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
============================================ | ||
Compute product sales price from a pricelist | ||
============================================ | ||
|
||
.. | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! source digest: sha256:1033e6116f2ea3d86c1b0a87d872a082b85b265a83f24fd660f9425936d37b6b | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
.. |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/16.0/product_list_price_from_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-16-0/product-attribute-16-0-product_list_price_from_pricelist | ||
:alt: Translate me on Weblate | ||
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png | ||
:target: https://runboat.odoo-community.org/builds?repo=OCA/product-attribute&target_branch=16.0 | ||
:alt: Try me on Runboat | ||
|
||
|badge1| |badge2| |badge3| |badge4| |badge5| | ||
|
||
This module enables the automatic computation of a product's sale price based on the configuration of a pricelist. | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Configuration | ||
============= | ||
|
||
- Go to `Sales` -> `Products` -> `Pricelists`. | ||
- Create a new pricelist and add at least one rule. | ||
- Specify the product template or category for the rule. | ||
- Set the `computation mode` and save | ||
|
||
**Note**: Ensure the minimum quantity is not great than 1 for the rule to apply effectively. | ||
|
||
- Go to `Sales` -> `Configuration` -> `Settings`. | ||
- In the `Pricing` section, select the `Pricelist to compute sale price` created in the previous step. | ||
- Save the configuration | ||
|
||
Usage | ||
===== | ||
|
||
**To update product prices according to the pricelist rules** | ||
|
||
- Stay in the settings configuration with the selected Pricelist. | ||
- Click the **Update Product Prices** button to apply the rules and update the sale prices of all products. | ||
|
||
Known issues / Roadmap | ||
====================== | ||
|
||
The `list_price` field is not `company-dependent`, meaning that if a product is shared across multiple companies, the same list price will apply to all of them. | ||
To minimize errors, you can set a primary company to take precedence. This can be configured in the settings under the field `Main company for computing sale price`. | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/product-attribute/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 <https://github.com/OCA/product-attribute/issues/new?body=module:%20product_list_price_from_pricelist%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. | ||
|
||
Do not contact contributors directly about support or help with technical issues. | ||
|
||
Credits | ||
======= | ||
|
||
Authors | ||
~~~~~~~ | ||
|
||
* Tecnativa | ||
|
||
Contributors | ||
~~~~~~~~~~~~ | ||
|
||
* `Tecnativa <https://www.tecnativa.com>`_ | ||
|
||
* Pedro M. Baeza | ||
* Carlos López | ||
|
||
Maintainers | ||
~~~~~~~~~~~ | ||
|
||
This module is maintained by the OCA. | ||
|
||
.. image:: https://odoo-community.org/logo.png | ||
:alt: Odoo Community Association | ||
:target: https://odoo-community.org | ||
|
||
OCA, or the Odoo Community Association, is a nonprofit organization whose | ||
mission is to support the collaborative development of Odoo features and | ||
promote its widespread use. | ||
|
||
.. |maintainer-carlos-lopez-tecnativa| image:: https://github.com/carlos-lopez-tecnativa.png?size=40px | ||
:target: https://github.com/carlos-lopez-tecnativa | ||
:alt: carlos-lopez-tecnativa | ||
|
||
Current `maintainer <https://odoo-community.org/page/maintainer-role>`__: | ||
|
||
|maintainer-carlos-lopez-tecnativa| | ||
|
||
This module is part of the `OCA/product-attribute <https://github.com/OCA/product-attribute/tree/16.0/product_list_price_from_pricelist>`_ project on GitHub. | ||
|
||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"name": "Compute product sales price from a pricelist", | ||
"version": "16.0.1.0.0", | ||
"author": "Tecnativa, Odoo Community Association (OCA)", | ||
"website": "https://github.com/OCA/product-attribute", | ||
"depends": [ | ||
"sale", | ||
], | ||
"data": ["views/res_config_settings_views.xml"], | ||
"maintainers": ["carlos-lopez-tecnativa"], | ||
"installable": True, | ||
"auto_install": False, | ||
"license": "AGPL-3", | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * product_list_price_from_pricelist | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 16.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2025-01-22 14:42+0000\n" | ||
"PO-Revision-Date: 2025-01-22 09:46-0500\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: 8bit\n" | ||
"Plural-Forms: nplurals=2; plural=(n != 1);\n" | ||
"X-Generator: Poedit 3.5\n" | ||
|
||
#. module: product_list_price_from_pricelist | ||
#: model_terms:ir.ui.view,arch_db:product_list_price_from_pricelist.view_res_config_settings_form | ||
msgid "" | ||
"Are you sure you want to update the prices for all products?. This operations cannot be undone." | ||
msgstr "" | ||
"¿Estás seguro de actualizar el precio de venta en todos los productos?. Esta operación no puede " | ||
"revertirse." | ||
|
||
#. module: product_list_price_from_pricelist | ||
#: model:ir.model,name:product_list_price_from_pricelist.model_res_company | ||
msgid "Companies" | ||
msgstr "Compañías" | ||
|
||
#. module: product_list_price_from_pricelist | ||
#: model:ir.model,name:product_list_price_from_pricelist.model_res_config_settings | ||
msgid "Config Settings" | ||
msgstr "Ajustes de configuración" | ||
|
||
#. module: product_list_price_from_pricelist | ||
#: model_terms:ir.ui.view,arch_db:product_list_price_from_pricelist.view_res_config_settings_form | ||
msgid "" | ||
"If set, prices will be computed only if the company in the pricelist matches the company specified " | ||
"here or is empty.\n" | ||
" Otherwise, prices will be computed based on the current company." | ||
msgstr "" | ||
"Si está configurada, los precios serán calculados solo si la esta compañía coincide con la compañía " | ||
"de la lista de precios (o si esta vacía).\n" | ||
" De lo contrario, los precios se calcularan basados en la " | ||
"compañía actual." | ||
|
||
#. module: product_list_price_from_pricelist | ||
#: model:ir.model.fields,field_description:product_list_price_from_pricelist.field_res_config_settings__main_company_compute_price_id | ||
msgid "Main company for compute sale price" | ||
msgstr "Compañía principal para calcular precios de venta" | ||
|
||
#. module: product_list_price_from_pricelist | ||
#: model:ir.model,name:product_list_price_from_pricelist.model_product_pricelist | ||
msgid "Pricelist" | ||
msgstr "Lista de precios" | ||
|
||
#. module: product_list_price_from_pricelist | ||
#: model:ir.model,name:product_list_price_from_pricelist.model_product_pricelist_item | ||
msgid "Pricelist Rule" | ||
msgstr "Regla de la lista de precios" | ||
|
||
#. module: product_list_price_from_pricelist | ||
#: model:ir.model.fields,field_description:product_list_price_from_pricelist.field_res_company__base_pricelist_compute_price_id | ||
#: model:ir.model.fields,field_description:product_list_price_from_pricelist.field_res_config_settings__base_pricelist_compute_price_id | ||
msgid "Pricelist to compute sale price" | ||
msgstr "Lista de precio para calcular precio de venta" | ||
|
||
#. module: product_list_price_from_pricelist | ||
#: model:ir.model.fields,help:product_list_price_from_pricelist.field_res_company__base_pricelist_compute_price_id | ||
#: model:ir.model.fields,help:product_list_price_from_pricelist.field_res_config_settings__base_pricelist_compute_price_id | ||
msgid "Pricelist used to calculate the price of all products" | ||
msgstr "Lista de precio usada para calcular el precio de venta de todos los productos" | ||
|
||
#. module: product_list_price_from_pricelist | ||
#: model_terms:ir.ui.view,arch_db:product_list_price_from_pricelist.view_res_config_settings_form | ||
msgid "" | ||
"Set the base pricelist to compute the sale price for all products.\n" | ||
" <br/>" | ||
msgstr "" | ||
"Configure la tarifa de precios base para calcular el precio de venta de los productos.\n" | ||
" <br/>" | ||
|
||
#. module: product_list_price_from_pricelist | ||
#: model_terms:ir.ui.view,arch_db:product_list_price_from_pricelist.view_res_config_settings_form | ||
msgid "Update product prices" | ||
msgstr "Actualizar precio de venta en productos" | ||
|
||
#. module: product_list_price_from_pricelist | ||
#: model_terms:ir.ui.view,arch_db:product_list_price_from_pricelist.view_res_config_settings_form | ||
msgid "" | ||
"WARNING: Prices are always computed for a quantity of 1, so rules with a minimum quantity higher " | ||
"than that won't be taken into account" | ||
msgstr "" | ||
"ADVERTENCIA: Los precios siempre se calculan para la cantidad de 1, las reglas con cantidad mínima " | ||
"mayor a esto no serán tomadas en cuenta" |
86 changes: 86 additions & 0 deletions
86
product_list_price_from_pricelist/i18n/product_list_price_from_pricelist.pot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * product_list_price_from_pricelist | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 16.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2025-01-22 14:42+0000\n" | ||
"PO-Revision-Date: 2025-01-22 14:42+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_list_price_from_pricelist | ||
#: model_terms:ir.ui.view,arch_db:product_list_price_from_pricelist.view_res_config_settings_form | ||
msgid "" | ||
"Are you sure you want to update the prices for all products?. This " | ||
"operations cannot be undone." | ||
msgstr "" | ||
|
||
#. module: product_list_price_from_pricelist | ||
#: model:ir.model,name:product_list_price_from_pricelist.model_res_company | ||
msgid "Companies" | ||
msgstr "" | ||
|
||
#. module: product_list_price_from_pricelist | ||
#: model:ir.model,name:product_list_price_from_pricelist.model_res_config_settings | ||
msgid "Config Settings" | ||
msgstr "" | ||
|
||
#. module: product_list_price_from_pricelist | ||
#: model_terms:ir.ui.view,arch_db:product_list_price_from_pricelist.view_res_config_settings_form | ||
msgid "" | ||
"If set, prices will be computed only if the company in the pricelist matches the company specified here or is empty.\n" | ||
" Otherwise, prices will be computed based on the current company." | ||
msgstr "" | ||
|
||
#. module: product_list_price_from_pricelist | ||
#: model:ir.model.fields,field_description:product_list_price_from_pricelist.field_res_config_settings__main_company_compute_price_id | ||
msgid "Main company for compute sale price" | ||
msgstr "" | ||
|
||
#. module: product_list_price_from_pricelist | ||
#: model:ir.model,name:product_list_price_from_pricelist.model_product_pricelist | ||
msgid "Pricelist" | ||
msgstr "" | ||
|
||
#. module: product_list_price_from_pricelist | ||
#: model:ir.model,name:product_list_price_from_pricelist.model_product_pricelist_item | ||
msgid "Pricelist Rule" | ||
msgstr "" | ||
|
||
#. module: product_list_price_from_pricelist | ||
#: model:ir.model.fields,field_description:product_list_price_from_pricelist.field_res_company__base_pricelist_compute_price_id | ||
#: model:ir.model.fields,field_description:product_list_price_from_pricelist.field_res_config_settings__base_pricelist_compute_price_id | ||
msgid "Pricelist to compute sale price" | ||
msgstr "" | ||
|
||
#. module: product_list_price_from_pricelist | ||
#: model:ir.model.fields,help:product_list_price_from_pricelist.field_res_company__base_pricelist_compute_price_id | ||
#: model:ir.model.fields,help:product_list_price_from_pricelist.field_res_config_settings__base_pricelist_compute_price_id | ||
msgid "Pricelist used to calculate the price of all products" | ||
msgstr "" | ||
|
||
#. module: product_list_price_from_pricelist | ||
#: model_terms:ir.ui.view,arch_db:product_list_price_from_pricelist.view_res_config_settings_form | ||
msgid "" | ||
"Set the base pricelist to compute the sale price for all products.\n" | ||
" <br/>" | ||
msgstr "" | ||
|
||
#. module: product_list_price_from_pricelist | ||
#: model_terms:ir.ui.view,arch_db:product_list_price_from_pricelist.view_res_config_settings_form | ||
msgid "Update product prices" | ||
msgstr "" | ||
|
||
#. module: product_list_price_from_pricelist | ||
#: model_terms:ir.ui.view,arch_db:product_list_price_from_pricelist.view_res_config_settings_form | ||
msgid "" | ||
"WARNING: Prices are always computed for a quantity of 1, so rules with a " | ||
"minimum quantity higher than that won't be taken into account" | ||
msgstr "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from . import res_company | ||
from . import res_config_settings | ||
from . import product_pricelist |
Oops, something went wrong.