Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
134 changes: 134 additions & 0 deletions product_list_price_from_pricelist/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

============================================
Compute product sales price from a pricelist
============================================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:4096c6f8dcaff5d0774538747316d929fc1884be26c01d0345519720ec0121b5
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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/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
:target: https://github.com/OCA/product-attribute/tree/19.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-19-0/product-attribute-19-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=19.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.
- Optionally and only with a multi-company environment enabled, set the
Main company for compute sale price to restrict the computation to a
specific company.
- Save the configuration

The module creates a cron job to update the product list price every
day. The cron job is disabled by default. To enable it, go to Settings
-> Technical -> Automation -> Scheduled Actions and search for Product
sale price: Update price from pricelist.

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:%2019.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/19.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.
1 change: 1 addition & 0 deletions product_list_price_from_pricelist/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
14 changes: 14 additions & 0 deletions product_list_price_from_pricelist/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "Compute product sales price from a pricelist",
"version": "19.0.1.0.0",
"author": "Tecnativa, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/product-attribute",
"depends": [
"sale",
],
"data": ["data/cron.xml", "views/res_config_settings_views.xml"],
"maintainers": ["carlos-lopez-tecnativa"],
"installable": True,
"auto_install": False,
"license": "AGPL-3",
}
13 changes: 13 additions & 0 deletions product_list_price_from_pricelist/data/cron.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo noupdate="1">
<record forcecreate="True" id="ir_cron_update_product_sale_price" model="ir.cron">
<field name="name">Product sale price: Update price from pricelist</field>
<field name="model_id" ref="base.model_res_company" />
<field name="state">code</field>
<field name="code">model._cron_update_product_list_price()</field>
<field name="user_id" ref="base.user_root" />
<field name="interval_number">1</field>
<field name="interval_type">days</field>
<field name="active" eval="False" />
</record>
</odoo>
101 changes: 101 additions & 0 deletions product_list_price_from_pricelist/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# 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-23 17:33+0000\n"
"PO-Revision-Date: 2025-01-23 12:33-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 product 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 compañía coincide con la compañía del producto "
"(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,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:ir.actions.server,name:product_list_price_from_pricelist.ir_cron_update_product_sale_price_ir_actions_server
#: model:ir.cron,cron_name:product_list_price_from_pricelist.ir_cron_update_product_sale_price
msgid "Product sale price: Update price from pricelist"
msgstr "Precio de venta de productos: Actualizar precio desde tarifas de venta"

#. 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 "Recomputing pricelist"
msgstr "Lista de precio para calcular precio de venta"

#. 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 sales price for all the 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"
104 changes: 104 additions & 0 deletions product_list_price_from_pricelist/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# 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"
"PO-Revision-Date: 2025-03-18 19:06+0000\n"
"Last-Translator: mymage <stefano.consolaro@mymage.it>\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 5.10.2\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 ""
"Si è sicuri di voler aggiornare i prezzi di tutti i prodotti? Questa "
"operazione non può essere invertita."

#. module: product_list_price_from_pricelist
#: model:ir.model,name:product_list_price_from_pricelist.model_res_company
msgid "Companies"
msgstr "Aziende"

#. module: product_list_price_from_pricelist
#: model:ir.model,name:product_list_price_from_pricelist.model_res_config_settings
msgid "Config Settings"
msgstr "Impostazioni configurazione"

#. 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 product matches the company specified here or is empty.\n"
" Otherwise, prices will be computed based on the current company."
msgstr ""
"Se impostato, i prezzi saranno calcolati solo se l'azienda nel prodotto "
"corrisponde all'azienda specificata qui o è vuota. \n"
" In caso contrario, i prezzi saranno "
"calcolati in base all'azienda corrente."

#. 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 "Azienda principale per il calcolo del prezzo di vendita"

#. module: product_list_price_from_pricelist
#: model:ir.model,name:product_list_price_from_pricelist.model_product_pricelist
msgid "Pricelist"
msgstr "Listino"

#. module: product_list_price_from_pricelist
#: model:ir.model,name:product_list_price_from_pricelist.model_product_pricelist_item
msgid "Pricelist Rule"
msgstr "Regola listino prezzi"

#. 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 "Listino utilizzato per calcolare il prezzo di tutti i prodotti"

#. module: product_list_price_from_pricelist
#: model:ir.actions.server,name:product_list_price_from_pricelist.ir_cron_update_product_sale_price_ir_actions_server
#: model:ir.cron,cron_name:product_list_price_from_pricelist.ir_cron_update_product_sale_price
msgid "Product sale price: Update price from pricelist"
msgstr "Prezzo di vendita prodotto: aggiorna il prezzo dal listino"

#. 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 "Recomputing pricelist"
msgstr "Ricalcola listino"

#. 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 sales price for all the products.\n"
" <br/>"
msgstr ""
"Imposta il listino per calcolare il prezzo di vendita per tutti i prodotti.\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 "Aggiorna prezzi prodotto"

#. 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 ""
"Attenzione: i prezzi vengono sempre calcolati per una quantità pari a 1, "
"pertanto le regole con una quantità minima superiore a quella non verranno "
"prese in considerazione"
Loading
Loading