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

[18.0][MIG] product_variant_change_attribute_value: Migration to 18.0 #377

Open
wants to merge 26 commits into
base: 18.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
c1aefca
[13.0][ADD] product_variant_change_attribute_value
TDu Apr 29, 2021
281e3be
product_variant_change_attribute_value: cleanup
simahawk Aug 5, 2021
8185937
product_variant_change_attribute_value: reorganize code
simahawk Aug 5, 2021
95850e5
product_variant_change_attribute_value: fix test load
simahawk Aug 5, 2021
caa3f40
product_variant_change_attribute_value: misc code imp
simahawk Aug 5, 2021
bde99ff
product_variant_change_attribute_value: convert act_window rec
simahawk Aug 6, 2021
583caa9
product_variant_change_attribute_value: tests mute logger
simahawk Aug 6, 2021
dda4a69
product_variant_change_attribute_value: clean all vals by att at once
simahawk Aug 6, 2021
e558e04
product_variant_change_attribute_value: add test for delete all values
simahawk Aug 6, 2021
115da49
product_variant_change_attribute_value: order actions, handle ondelet…
simahawk Aug 6, 2021
47aab6c
product_variant_change_attribute_value: handle delete all
simahawk Aug 6, 2021
66f501f
product_variant_change_attribute_value: add attr filter
simahawk Aug 9, 2021
d086aa8
product_variant_change_attribute_value: improve tests
simahawk Aug 9, 2021
90fcf44
product_variant_change_attribute_value: add README placeholder
simahawk Aug 9, 2021
7f530d7
product_variant_change_attribute_value: fix perf
simahawk Aug 12, 2021
a56a3fb
product_variant_change_attribute_value: add ROADMAP
simahawk Aug 12, 2021
2206775
product_variant_change_attribute_value: improve view
simahawk Aug 12, 2021
905ce62
product_variant_change_attribute_value: fix tests
simahawk Aug 13, 2021
9655b66
product_variant_change_attribute_value: fix tests
simahawk Aug 16, 2021
eb0b039
product_variant_change_attribute_value: cleanup + speed improvement
mmequignon Dec 1, 2021
42e8ed9
product_variant_change_attribute_value: prevent product combination c…
mmequignon Dec 1, 2021
b10e8da
product_variant_change_attribute_valu: black, isort, prettier
mmequignon Jan 5, 2022
798776f
mig product_variant_change_attribute_value
mmequignon Jan 5, 2022
dea304e
[IMP] add feature remove all attributes
Jan 11, 2022
7616f9a
[IMP] product_variant_change_attribute_value: pre-commit auto fixes
Kimkhoi3010 Dec 3, 2024
077f3ba
[MIG] product_variant_change_attribute_value: Migration to 18.0
Kimkhoi3010 Dec 3, 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
103 changes: 103 additions & 0 deletions product_variant_change_attribute_value/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
======================================
Product Variant Change Attribute Value
======================================

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

.. |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--variant-lightgray.png?logo=github
:target: https://github.com/OCA/product-variant/tree/18.0/product_variant_change_attribute_value
:alt: OCA/product-variant
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/product-variant-18-0/product-variant-18-0-product_variant_change_attribute_value
: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-variant&target_branch=18.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

In standard Odoo there is no way to change the attribute values assigned
to a product variant.

This module adds a wizard to change or remove attribute values on all
product variant selected.

When an attribute value is removed from all variants of a template, it
will also be removed from the configuration of the template.

**Table of contents**

.. contents::
:local:

Usage
=====

The wizard can be access from the product variant tree view through the
context action menu Change attribute values assigned

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

Rename to shorter name in v14. Eg: product_attribute_manager or similar.

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/product-variant/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-variant/issues/new?body=module:%20product_variant_change_attribute_value%0Aversion:%2018.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
-------

* Camptocamp SA

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

- Thierry Ducrest <[email protected]>
- Khoi (Kien Kim) <[email protected]>

Other credits
-------------

The migration of this module from 14.0 to 18.0 was financially supported
by:

- Camptocamp

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-variant <https://github.com/OCA/product-variant/tree/18.0/product_variant_change_attribute_value>`_ 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_variant_change_attribute_value/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import wizards
18 changes: 18 additions & 0 deletions product_variant_change_attribute_value/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright 2021 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)

{
"name": "Product Variant Change Attribute Value",
"version": "18.0.1.0.0",
"author": "Camptocamp SA, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/product-variant",
"license": "AGPL-3",
"category": "Product Variant",
"depends": ["product"],
"data": [
"security/ir.model.access.csv",
"wizards/product_variant_attribute_value_wizard.xml",
],
"demo": ["demo/product_demo.xml"],
"installable": True,
}
38 changes: 38 additions & 0 deletions product_variant_change_attribute_value/demo/product_demo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<!-- Data similar to `product` module but re-defined here to be isolated -->
<record id="product_product_1_product_template" model="product.template">
<field name="name">Custom Desk</field>
<field name="categ_id" ref="product.product_category_5" />
<field name="standard_price">100.0</field>
<field name="list_price">100.0</field>
<field name="type">consu</field>
<field name="weight">1.0</field>
<field name="uom_id" ref="uom.product_uom_unit" />
<field name="uom_po_id" ref="uom.product_uom_unit" />
</record>

<!-- the product template attribute lines have to be defined before creating the variants -->
<record
id="product_1_attribute_1_product_template_attribute_line"
model="product.template.attribute.line"
>
<field name="product_tmpl_id" ref="product_product_1_product_template" />
<field name="attribute_id" ref="product.product_attribute_1" />
<field
name="value_ids"
eval="[(6, 0, [ref('product.product_attribute_value_1'), ref('product.product_attribute_value_2')])]"
/>
</record>
<record
id="product_1_attribute_2_product_template_attribute_line"
model="product.template.attribute.line"
>
<field name="product_tmpl_id" ref="product_product_1_product_template" />
<field name="attribute_id" ref="product.product_attribute_2" />
<field
name="value_ids"
eval="[(6, 0, [ref('product.product_attribute_value_3'), ref('product.product_attribute_value_4')])]"
/>
</record>
</odoo>
3 changes: 3 additions & 0 deletions product_variant_change_attribute_value/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
2 changes: 2 additions & 0 deletions product_variant_change_attribute_value/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Thierry Ducrest \<<[email protected]>\>
- Khoi (Kien Kim) \<<[email protected]>\>
3 changes: 3 additions & 0 deletions product_variant_change_attribute_value/readme/CREDITS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
The migration of this module from 14.0 to 18.0 was financially supported by:

- Camptocamp
8 changes: 8 additions & 0 deletions product_variant_change_attribute_value/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
In standard Odoo there is no way to change the attribute values assigned
to a product variant.

This module adds a wizard to change or remove attribute values on all
product variant selected.

When an attribute value is removed from all variants of a template, it
will also be removed from the configuration of the template.
1 change: 1 addition & 0 deletions product_variant_change_attribute_value/readme/ROADMAP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Rename to shorter name in v14. Eg: product_attribute_manager or similar.
2 changes: 2 additions & 0 deletions product_variant_change_attribute_value/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
The wizard can be access from the product variant tree view through the
context action menu Change attribute values assigned
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_variant_attribute_value_action_employee,variant.attribute.value.action employee,model_variant_attribute_value_action,base.group_user,1,0,0,0
access_variant_attribute_value_action_manager,variant.attribute.value.action manager,model_variant_attribute_value_action,base.group_system,1,1,1,1
access_variant_attribute_value_wizard_employee,variant.attribute.value.wizard employee,model_variant_attribute_value_wizard,base.group_user,1,0,0,0
access_variant_attribute_value_wizard_manager,variant.attribute.value.wizard manager,model_variant_attribute_value_wizard,base.group_system,1,1,1,1
Loading
Loading