Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0][MIG] product_multi_price: Migration to 16.0 #1783

Open
wants to merge 26 commits into
base: 16.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
1b016c7
[ADD] product_multi_price: New Module
chienandalu Mar 30, 2020
19dc50a
[IMP] product_multi_price: Several improvements
pedrobaeza Apr 9, 2020
5238e17
[FIX] product_multi_price: portal and public user error
chienandalu Apr 17, 2020
aa9f586
[FIX] product_multi_price: Widget selection doesn't work inside tree …
pedrobaeza Apr 27, 2020
23e1832
[MIG] product_multi_price: Migration to 12.0
chienandalu Jun 25, 2020
56bc638
[IMP] product_multi_price: add show multi-price access group.
Jul 31, 2020
26fef5a
Added translation using Weblate (Italian)
eLBati Sep 22, 2020
204760d
Translated using Weblate (Italian)
eLBati Sep 22, 2020
fef0642
Translated using Weblate (Spanish)
claudiagn Oct 13, 2020
edd3a66
[IMP] product_multi_price: black, isort, prettier
qgroulard Oct 16, 2020
248011d
[MIG] product_multi_price: Migration to 13.0
qgroulard Oct 16, 2020
9ddea47
Added translation using Weblate (Catalan)
claudiagn Feb 23, 2021
1b4674f
Translated using Weblate (Spanish)
claudiagn Feb 23, 2021
1c5b37c
Translated using Weblate (Catalan)
claudiagn Feb 23, 2021
503d1b2
[IMP] product_multi_price: black, isort, prettier
ernesto-garcia-tecnativa Mar 24, 2023
221a3ae
[MIG] product_multi_price: Migration to 15.0
ernesto-garcia-tecnativa Mar 24, 2023
3f97ea2
[UPD] Update product_multi_price.pot
Apr 10, 2023
4d7f980
[UPD] README.rst
OCA-git-bot Apr 10, 2023
e770ff7
[FIX] product_multi_price: remove ondelete params from product.multi.…
ernesto-garcia-tecnativa May 18, 2023
d696050
product_multi_price 15.0.1.0.1
OCA-git-bot May 19, 2023
50099f9
[UPD] README.rst
OCA-git-bot Sep 3, 2023
9b03575
Update translation files
weblate Oct 9, 2023
b63d17f
Translated using Weblate (Italian)
mymage Oct 30, 2023
c82b30c
Translated using Weblate (Italian)
mymage Nov 4, 2023
8367cfc
[IMP] product_multi_price: pre-commit stuff
HeliconiaSolutions Nov 26, 2024
2ba1415
[MIG] product_multi_price: Migration to 16.0
HeliconiaSolutions Nov 26, 2024
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
122 changes: 122 additions & 0 deletions product_multi_price/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
===================
Product Multi Price
===================

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

.. |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_multi_price
:alt: OCA/product-attribute
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/product-attribute-16-0/product-attribute-16-0-product_multi_price
: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 allows to set multiple prices to products and base pricelist
rules on them.

**Table of contents**

.. contents::
:local:

Configuration
=============

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

#. *Settings > Technical > Database Structure > Price Field Names*
#. Create the multi price fields you need.

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

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

Usage
=====

To use this module, you need to:

#. Go to the product page.
#. In the general tab, there's a list called *Other Prices*.
#. You can add one for every price name available.

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

#. Add a rule and choose *formula* as the computing method.
#. In the *Based on* dropdown list, select *Other Price*.
#. A new list appear: *Other Price Name*. Pick the one you need.
#. Configure the formula.
#. Now the rule is based on that price for the products that have it
configured. Otherwise, it will return 0.

Known issues / Roadmap
======================

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

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <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_multi_price%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
* Heliconia Solutions

Contributors
~~~~~~~~~~~~

* `Tecnativa <https://www.tecnativa.com>`_

* David Vidal
* Pedro M. Baeza
* Ernesto Tejeda

Maintainers
~~~~~~~~~~~

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

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

This module is part of the `OCA/product-attribute <https://github.com/OCA/product-attribute/tree/16.0/product_multi_price>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 2 additions & 0 deletions product_multi_price/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import models
from .hooks import post_init_hook
23 changes: 23 additions & 0 deletions product_multi_price/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright 2020 Tecnativa - David Vidal
# Copyright 2020 Tecnativa - Pedro M. Baeza
# Copyright 2024 Heliconia Solutions
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Product Multi Price",
"version": "16.0.1.0.0",
"author": "Tecnativa," "Heliconia Solutions, " "Odoo Community Association (OCA)",
"website": "https://github.com/OCA/product-attribute",
"category": "Product Management",
"license": "AGPL-3",
"depends": ["product"],
"data": [
"security/ir.model.access.csv",
"security/multi_price_security.xml",
"views/multi_price_views.xml",
"views/product_pricelist_views.xml",
"views/product_views.xml",
],
"demo": ["demo/multi_price_demo_data.xml"],
"post_init_hook": "post_init_hook",
"installable": True,
}
7 changes: 7 additions & 0 deletions product_multi_price/demo/multi_price_demo_data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo noupdate="1">
<record id="price_1" model="product.multi.price.name">
<field name="name">price_1</field>
<field name="company_id" ref="base.main_company" />
</record>
</odoo>
15 changes: 15 additions & 0 deletions product_multi_price/hooks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright 2020 Tecnativa - Ernesto Tejeda
# Copyright 2024 Heliconia Solutions
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import SUPERUSER_ID, Command, api


def post_init_hook(cr, registry):
env = api.Environment(cr, SUPERUSER_ID, {})
group_id = env.ref("product_multi_price.group_show_multi_prices").id
default_user = env.ref("base.default_user")
user = (
env["res.users"].with_context(active_test=False).search([("share", "=", False)])
)
(user - default_user).write({"groups_id": [Command.link(group_id)]})
181 changes: 181 additions & 0 deletions product_multi_price/i18n/ca.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,181 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * product_multi_price
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 13.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2021-02-23 18:45+0000\n"
"Last-Translator: claudiagn <[email protected]>\n"
"Language-Team: none\n"
"Language: ca\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.3.2\n"

#. module: product_multi_price
#: model:ir.model.constraint,message:product_multi_price.constraint_product_multi_price_multi_price_uniq
msgid ""
"A field name cannot be assigned to a product twice for the same company"
msgstr ""
"No es pot assignar un nom de camp a un producte dues vegades per a la "
"mateixa empresa"

#. module: product_multi_price
#: model:ir.model.fields,help:product_multi_price.field_product_pricelist_item__base
msgid ""
"Base price for computation.\n"
"Sales Price: The base price will be the Sales Price.\n"
"Cost Price : The base price will be the cost price.\n"
"Other Pricelist : Computation of the base price based on another Pricelist."
msgstr ""
"Preu base de càlcul.\n"
"Preu de venda: el preu base serà el preu de venda.\n"
"Preu de cost: el preu base serà el preu de cost.\n"
"Una altra llista de preus: càlcul del preu base basat en una altra llista de "
"preus."

#. module: product_multi_price
#: model:ir.model.fields,field_description:product_multi_price.field_product_pricelist_item__base
msgid "Based on"
msgstr "Basat en"

#. module: product_multi_price
#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__company_id
#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name__company_id
msgid "Company"
msgstr "Companyia"

#. module: product_multi_price
#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__create_uid
#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name__create_uid
msgid "Created by"
msgstr "Creat per"

#. module: product_multi_price
#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__create_date
#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name__create_date
msgid "Created on"
msgstr "Creat el"

#. module: product_multi_price
#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__display_name
#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name__display_name
msgid "Display Name"
msgstr "Nom visible"

#. module: product_multi_price
#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__id
#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name__id
msgid "ID"
msgstr "ID"

#. module: product_multi_price
#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price____last_update
#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name____last_update
msgid "Last Modified on"
msgstr "Darrera modificació el"

#. module: product_multi_price
#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__write_uid
#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name__write_uid
msgid "Last Updated by"
msgstr "Darrera actualització per"

#. module: product_multi_price
#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__write_date
#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name__write_date
msgid "Last Updated on"
msgstr "Darrera actualització el"

#. module: product_multi_price
#: model:ir.model,name:product_multi_price.model_product_multi_price_name
msgid "Multi Price Record Options"
msgstr "Opcions de registre de preus múltiples"

#. module: product_multi_price
#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__name
msgid "Name"
msgstr "Nom"

#. module: product_multi_price
#: model:ir.model.fields.selection,name:product_multi_price.selection__product_pricelist_item__base__multi_price
msgid "Other Price"
msgstr "Altre preu"

#. module: product_multi_price
#: model:ir.model.fields,field_description:product_multi_price.field_product_pricelist_item__multi_price_name
msgid "Other Price Name"
msgstr "Nom de l'altre preu"

#. module: product_multi_price
#: model:ir.model.fields,field_description:product_multi_price.field_product_product__price_ids
#: model:ir.model.fields,field_description:product_multi_price.field_product_template__price_ids
msgid "Other Prices"
msgstr "Altres preus"

#. module: product_multi_price
#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__price
msgid "Price"
msgstr "Preu"

#. module: product_multi_price
#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name__name
msgid "Price Field Name"
msgstr "Nom del camp del preu"

#. module: product_multi_price
#: model:ir.actions.act_window,name:product_multi_price.action_multi_price_name_config
#: model:ir.ui.menu,name:product_multi_price.multi_price_name_menu
msgid "Price Field Names"
msgstr "Noms de camps de preus"

#. module: product_multi_price
#: model:ir.model,name:product_multi_price.model_product_pricelist
msgid "Pricelist"
msgstr "Tarifa"

#. module: product_multi_price
#: model:ir.model,name:product_multi_price.model_product_pricelist_item
msgid "Pricelist Rule"
msgstr "Regla de tarifa"

#. module: product_multi_price
#: model:ir.model.constraint,message:product_multi_price.constraint_product_multi_price_name_multi_price_name_uniq
msgid "Prices Names must be unique per company"
msgstr "Els noms dels preus han de ser únics per empresa"

#. module: product_multi_price
#: model:ir.model,name:product_multi_price.model_product_product
#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price__product_id
msgid "Product"
msgstr "Producte"

#. module: product_multi_price
#: model_terms:ir.ui.view,arch_db:product_multi_price.product_multi_price_form_view
#: model_terms:ir.ui.view,arch_db:product_multi_price.product_multi_price_tree_view
msgid "Product Multi Price"
msgstr "Preu múltiple de producte"

#. module: product_multi_price
#: model_terms:ir.ui.view,arch_db:product_multi_price.product_multi_price_name_tree_view
msgid "Product Multi Price Field Name"
msgstr "Nom del camp del preu múltiple del producte"

#. module: product_multi_price
#: model:ir.model,name:product_multi_price.model_product_multi_price
msgid "Product Multiple Prices"
msgstr "Preus múltiples de productes"

#. module: product_multi_price
#: model:ir.model,name:product_multi_price.model_product_template
msgid "Product Template"
msgstr "Plantilla de producte"

#. module: product_multi_price
#: model:res.groups,name:product_multi_price.group_show_multi_prices
msgid "Show multi prices"
msgstr "Mostra preus múltiples"
Loading