Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
7b4cfc9
[14.0][REF] product_attribute_value_price_import: rename to product_a…
ilyasProgrammer Jun 14, 2022
da6cb98
Added translation using Weblate (Italian)
francesco-ooops Jun 15, 2022
24f604d
[IMP] product_attribute_value_menu: merge module product_attribute_va…
JordiMForgeFlow Aug 12, 2022
767457f
[13.0][IMP]product_attribute_value_menu: Products related
GuillemCForgeFlow Mar 1, 2022
f02cb85
[MIG] product_attribute_value_menu: Migration to 15.0
JasminSForgeFlow Aug 30, 2022
7d1e5db
[FIX] product_attribute_value_menu: deprecated use of <act_window>
MiquelRForgeFlow Sep 13, 2022
3bd4e3b
[MIG] product_attribute_value_menu: Migration to 16.0
neuby001 Jun 5, 2023
6c723ee
[FIX]product_attribute_value_menu: Add depends on compute
GuillemCForgeFlow Sep 1, 2022
993f619
Translated using Weblate (Italian)
mymage Nov 23, 2023
f553eec
Translated using Weblate (Italian)
francesco-ooops Dec 14, 2023
ed29268
Added translation using Weblate (Spanish)
Ivorra78 Dec 29, 2023
6d14d7c
Translated using Weblate (Italian)
mymage Apr 29, 2024
f93f819
[IMP] product_attribute_value_menu: Add title to button to avoid warning
victoralmau Jun 6, 2024
edb1ca4
[IMP] product_attribute_value_menu: pre-commit auto fixes
victoralmau Mar 20, 2025
0cfc492
[MIG] product_attribute_value_menu: Migration to 18.0
victoralmau Mar 20, 2025
8578dd2
Update translation files
weblate Mar 24, 2025
71a6dc8
[MIG] product_attribute_value_menu: Migration to 19.0
bizzappdev Dec 25, 2025
db90c35
[IMP] product_attribute_value_menu: Added test cases
bizzappdev Dec 26, 2025
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
114 changes: 114 additions & 0 deletions product_attribute_value_menu/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

============================
Product Attribute Value Menu
============================

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

.. |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-LGPL--3-blue.png
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: LGPL-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_attribute_value_menu
: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_attribute_value_menu
: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 adds:

- A menu item in Sales > Configuration called *Attribute Values Extra
Prices* where user can see/edit all extra prices set for each
attribute value in each product template. It also allows extra prices
to be imported via standard csv/xlsx import.
- A menu item in Sales and Inventory Applications called *Attribute
Values*, located under the *Attributes*' one. The new menu item
contains all the Attribute Values on a tree view, having the attribute
associated with a link and the value.

**Table of contents**

.. contents::
:local:

Usage
=====

- Got to: Sales -> Configuration -> Attribute Values Extra Prices to
manage extra price lines.
- You can edit *Extra Price* right in the list view.

To update values through spreadsheet, it is recommended to:

- export records' external ID and relevant fields necessary to work on
the spreadsheet (product template, attribute, attribute value, value
price extra).
- re-import records using only columns External ID and Value price
extra.

To acces the attribute value view, simply go to Sales/Inventory >
Configuration > Attribute Values.

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_attribute_value_menu%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
-------

* Ilyas
* Ooops404

Contributors
------------

- `Ooops404 <https://www.ooops404.com>`__:

- Ilyas <irazor147@gmail.com>

- `ForgeFlow <http://www.forgeflow.com>`__:

- Guillem Casassas <guillem.casassas@forgeflow.com>

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/19.0/product_attribute_value_menu>`_ 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_attribute_value_menu/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
16 changes: 16 additions & 0 deletions product_attribute_value_menu/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "Product Attribute Value Menu",
"summary": """Product attributes values tree and form. Import attribute values.""",
"version": "19.0.1.0.0",
"website": "https://github.com/OCA/product-attribute",
"author": "Ilyas, Ooops404, Odoo Community Association (OCA)",
"license": "LGPL-3",
"category": "Stock",
"depends": ["sale_stock"],
"data": [
"views/product_template_attribute_value_views.xml",
"views/product_attribute_value_views.xml",
],
"installable": True,
"application": False,
}
60 changes: 60 additions & 0 deletions product_attribute_value_menu/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * product_attribute_value_menu
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-12-29 17:34+0000\n"
"Last-Translator: Ivorra78 <informatica@totmaterial.es>\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: product_attribute_value_menu
#: model_terms:ir.ui.view,arch_db:product_attribute_value_menu.product_attribute_value_search_view
msgid "Attribute"
msgstr "Atributo"

#. module: product_attribute_value_menu
#: model:ir.model,name:product_attribute_value_menu.model_product_attribute_value
msgid "Attribute Value"
msgstr "Valor del Atributo"

#. module: product_attribute_value_menu
#: model:ir.actions.act_window,name:product_attribute_value_menu.import_product_attribute_value_action
#: model:ir.ui.menu,name:product_attribute_value_menu.import_product_attribute_value_configuration_action_menu
msgid "Attribute Values Extra Prices"
msgstr "Valores de los Atributos Precios Extra"

#. module: product_attribute_value_menu
#: model:ir.actions.act_window,name:product_attribute_value_menu.attribute_value_action
#: model:ir.ui.menu,name:product_attribute_value_menu.sale_menu_product_archived_attribute_action
#: model:ir.ui.menu,name:product_attribute_value_menu.stock_menu_product_archived_attribute_action
msgid "Attributes Values"
msgstr "Valores del Atributo"

#. module: product_attribute_value_menu
#: model_terms:ir.ui.view,arch_db:product_attribute_value_menu.product_attribute_value_search_view
msgid "Group By"
msgstr "Grupo por"

#. module: product_attribute_value_menu
#: model:ir.model.fields,field_description:product_attribute_value_menu.field_product_attribute_value__product_count
msgid "Product"
msgstr "Producto"

#. module: product_attribute_value_menu
#: model_terms:ir.ui.view,arch_db:product_attribute_value_menu.pt_attribute_value_inherit_view_form
msgid "Product Attribute"
msgstr "Atributo de Producto"

#. module: product_attribute_value_menu
#: model_terms:ir.ui.view,arch_db:product_attribute_value_menu.product_attribute_value_tree_view
msgid "Products"
msgstr "Productos"
75 changes: 75 additions & 0 deletions product_attribute_value_menu/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * product_attribute_value_menu
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2024-04-29 17:37+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 4.17\n"

#. module: product_attribute_value_menu
#: model_terms:ir.ui.view,arch_db:product_attribute_value_menu.product_attribute_value_search_view
msgid "Attribute"
msgstr "Attributo"

#. module: product_attribute_value_menu
#: model:ir.model,name:product_attribute_value_menu.model_product_attribute_value
msgid "Attribute Value"
msgstr "Valore attributo"

#. module: product_attribute_value_menu
#: model:ir.actions.act_window,name:product_attribute_value_menu.import_product_attribute_value_action
#: model:ir.ui.menu,name:product_attribute_value_menu.import_product_attribute_value_configuration_action_menu
msgid "Attribute Values Extra Prices"
msgstr "Prezzi extra valori attributo"

#. module: product_attribute_value_menu
#: model:ir.actions.act_window,name:product_attribute_value_menu.attribute_value_action
#: model:ir.ui.menu,name:product_attribute_value_menu.sale_menu_product_archived_attribute_action
#: model:ir.ui.menu,name:product_attribute_value_menu.stock_menu_product_archived_attribute_action
msgid "Attributes Values"
msgstr "Valori attributo"

#. module: product_attribute_value_menu
#: model_terms:ir.ui.view,arch_db:product_attribute_value_menu.product_attribute_value_search_view
msgid "Group By"
msgstr "Raggruppa per"

#. module: product_attribute_value_menu
#: model:ir.model.fields,field_description:product_attribute_value_menu.field_product_attribute_value__product_count
msgid "Product"
msgstr "Prodotto"

#. module: product_attribute_value_menu
#: model_terms:ir.ui.view,arch_db:product_attribute_value_menu.pt_attribute_value_inherit_view_form
msgid "Product Attribute"
msgstr "Attributo prodotto"

#. module: product_attribute_value_menu
#: model_terms:ir.ui.view,arch_db:product_attribute_value_menu.product_attribute_value_tree_view
msgid "Products"
msgstr "Prodotti"

#~ msgid "Attribute Values"
#~ msgstr "Valori attributo"

#~ msgid "Attributes"
#~ msgstr "Attributi"

#~ msgid "Display Name"
#~ msgstr "Nome visualizzato"

#~ msgid "ID"
#~ msgstr "ID"

#~ msgid "Last Modified on"
#~ msgstr "Ultima modifica il"
57 changes: 57 additions & 0 deletions product_attribute_value_menu/i18n/product_attribute_value_menu.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * product_attribute_value_menu
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 18.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: product_attribute_value_menu
#: model_terms:ir.ui.view,arch_db:product_attribute_value_menu.product_attribute_value_search_view
msgid "Attribute"
msgstr ""

#. module: product_attribute_value_menu
#: model:ir.model,name:product_attribute_value_menu.model_product_attribute_value
msgid "Attribute Value"
msgstr ""

#. module: product_attribute_value_menu
#: model:ir.actions.act_window,name:product_attribute_value_menu.import_product_attribute_value_action
#: model:ir.ui.menu,name:product_attribute_value_menu.import_product_attribute_value_configuration_action_menu
msgid "Attribute Values Extra Prices"
msgstr ""

#. module: product_attribute_value_menu
#: model:ir.actions.act_window,name:product_attribute_value_menu.attribute_value_action
#: model:ir.ui.menu,name:product_attribute_value_menu.sale_menu_product_archived_attribute_action
#: model:ir.ui.menu,name:product_attribute_value_menu.stock_menu_product_archived_attribute_action
msgid "Attributes Values"
msgstr ""

#. module: product_attribute_value_menu
#: model_terms:ir.ui.view,arch_db:product_attribute_value_menu.product_attribute_value_search_view
msgid "Group By"
msgstr ""

#. module: product_attribute_value_menu
#: model:ir.model.fields,field_description:product_attribute_value_menu.field_product_attribute_value__product_count
msgid "Product"
msgstr ""

#. module: product_attribute_value_menu
#: model_terms:ir.ui.view,arch_db:product_attribute_value_menu.pt_attribute_value_inherit_view_form
msgid "Product Attribute"
msgstr ""

#. module: product_attribute_value_menu
#: model_terms:ir.ui.view,arch_db:product_attribute_value_menu.product_attribute_value_tree_view
msgid "Products"
msgstr ""
1 change: 1 addition & 0 deletions product_attribute_value_menu/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import product_attribute_value
37 changes: 37 additions & 0 deletions product_attribute_value_menu/models/product_attribute_value.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Copyright 2022 ForgeFlow, S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import api, fields, models


class ProductAttributeValue(models.Model):
_inherit = "product.attribute.value"

product_count = fields.Integer(string="Product", compute="_compute_product_count")

@api.depends("pav_attribute_line_ids")
def _compute_product_count(self):
for value in self:
value.product_count = len(value.pav_attribute_line_ids)

def action_view_product(self):
action = self.env["ir.actions.act_window"]._for_xml_id(
"product.product_template_action"
)
products = self.pav_attribute_line_ids.mapped("product_tmpl_id")

if len(products) > 1:
action["domain"] = [("id", "in", products.ids)]
elif products:
form_view = [
(self.env.ref("product.product_template_only_form_view").id, "form")
]
if "views" in action:
action["views"] = form_view + [
(state, view) for state, view in action["views"] if view != "form"
]
else:
action["views"] = form_view
action["res_id"] = products.id
action["context"] = self.env.context
return action
3 changes: 3 additions & 0 deletions product_attribute_value_menu/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
4 changes: 4 additions & 0 deletions product_attribute_value_menu/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- [Ooops404](https://www.ooops404.com):
- Ilyas \<<irazor147@gmail.com>\>
- [ForgeFlow](http://www.forgeflow.com):
- Guillem Casassas \<<guillem.casassas@forgeflow.com>\>
10 changes: 10 additions & 0 deletions product_attribute_value_menu/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
This module adds:

- A menu item in Sales \> Configuration called *Attribute Values Extra
Prices* where user can see/edit all extra prices set for each
attribute value in each product template. It also allows extra prices
to be imported via standard csv/xlsx import.
- A menu item in Sales and Inventory Applications called *Attribute
Values*, located under the *Attributes*' one. The new menu item
contains all the Attribute Values on a tree view, having the attribute
associated with a link and the value.
Loading