Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
407deb5
[10.0][ADD] product_assortment
rousseldenis Aug 27, 2018
81b7790
[FIX][10.0] product_assortment travis warning
tbaden May 4, 2019
e39bf5a
[12.0][MIG] product_assortment
rousseldenis Jun 3, 2019
ac68d4b
[IMP] product_assortment: black, isort
Oct 18, 2019
27765db
[MIG] product_assortment: Migration to 13.0
Oct 21, 2019
ed5d88e
[FIX] avoid errors when trying to open assortment products
benwillig Jul 23, 2020
2cc790c
[FIX] product_assortment: development_status
sbidoul Oct 18, 2020
a942d3b
[IMP] product_assortment: added partners to products assortments
CarlosRoca13 Dec 23, 2020
50e932d
[FIX] product_assortment: Avoid errors on invalid models
pedrobaeza Jan 13, 2021
27728d6
Added translation using Weblate (Catalan)
claudiagn Feb 23, 2021
d446518
Translated using Weblate (Catalan)
claudiagn Feb 23, 2021
d8fe582
[14.0][MIG] product_assortment
xavier-bouquiaux Mar 24, 2021
42b3d2d
[14.0][IMP] product_assortment: Fallback to create() for model_id
rousseldenis May 18, 2021
1ddc218
fix ir_filters
Kev-Roche Jun 17, 2021
299f2d2
[FIX] remove useless depends on domain leading to orm crash
Nov 10, 2021
0d28c77
[IMP] product_assortment: Allow to use assortment based on partner do…
sergio-teruel Jul 7, 2021
0e3cf7b
[IMP] product_assortment: add icon to menu
CarlosRoca13 Aug 5, 2021
a5d2047
[FIX] product_assortment: use safe_eval.datetime
hailangvn Nov 23, 2021
5d6cbdb
[FIX] Fix access right issues when using actions
sebalix Jan 29, 2022
36e7c75
Translated using Weblate (Catalan)
Noel000 Mar 22, 2022
080e9ab
Added translation using Weblate (Italian)
SicurSam Apr 21, 2022
efe0dc6
[MIG] product_assortment: Migration to 15.0
CarlosRoca13 May 24, 2022
a327d00
[IMP] product_assortment: Add blacklist product domain to exclude som…
sergio-teruel May 24, 2022
c0bd3e7
[MIG] product_assortment: Migration to 16.0
marielejeune Sep 15, 2022
787e54a
[MIG] product_assortment: Fix form view
lmignon Oct 19, 2022
4e154da
[UPD] Update product_assortment.pot
Oct 19, 2022
4c0a391
[UPD] README.rst
OCA-git-bot Oct 19, 2022
bef84a3
product_assortment 16.0.1.0.1
OCA-git-bot Oct 19, 2022
02e8cab
Update translation files
weblate Oct 19, 2022
2bee41c
Added translation using Weblate (German)
marylla Nov 4, 2022
4a4fade
Translated using Weblate (German)
marylla Nov 4, 2022
20e69ef
[FIX] product_assortment unit tests: invalidate_cache() is deprecated
marielejeune Nov 14, 2022
1e467c4
product_assortment 16.0.1.0.2
OCA-git-bot Nov 15, 2022
378e1e1
[UPD] Update product_assortment.pot
Nov 21, 2022
ae283bf
Update translation files
weblate Nov 21, 2022
fe01fea
Translated using Weblate (Spanish)
Ivorra78 Aug 22, 2023
15e4009
[UPD] README.rst
OCA-git-bot Sep 3, 2023
e72e955
Update translation files
weblate Oct 9, 2023
e1c6caf
[FIX] product_assortment: Product black_list_domain invalidates white…
carlosdauden Feb 20, 2023
874a263
[IMP] product_assortment: Add new methods to improve performance usin…
carlosdauden Feb 20, 2023
a31c659
[IMP] product_assortment: New field applied_assortments_ids to avoid …
carlosdauden Jun 5, 2023
09f7e76
[UPD] Update product_assortment.pot
Jul 11, 2024
5b72fe3
[BOT] post-merge updates
OCA-git-bot Jul 11, 2024
8f7c489
Update translation files
weblate Jul 11, 2024
80cf6ce
Translated using Weblate (Italian)
mymage Jul 15, 2024
641877d
Added translation using Weblate (French)
samibc2c Nov 7, 2024
b44365a
Translated using Weblate (French)
samibc2c Nov 7, 2024
2eb63ac
Added translation using Weblate (Dutch)
bosd Feb 2, 2025
b2c476e
Translated using Weblate (Dutch)
bosd Feb 2, 2025
35a305a
[FIX] product_assortment ir_filters create vals_list
santostelmo Feb 12, 2025
cdb524a
[BOT] post-merge updates
OCA-git-bot Feb 13, 2025
ab10d76
[IMP] product_assortment: pre-commit auto fixes
PieterPaulussen Feb 28, 2025
d95f0a2
[MIG] product_assortment: Migration to 18.0
PieterPaulussen Feb 28, 2025
673a748
[IMP] product_assortment: Add test for assortment update
rlimaeco Mar 5, 2025
2eb59cf
[UPD] Update product_assortment.pot
Mar 6, 2025
0882339
[BOT] post-merge updates
OCA-git-bot Mar 6, 2025
44e8fd5
Translated using Weblate (Dutch)
bosd Mar 8, 2025
51d068b
[FIX] product_assortment: Typerror, Incorrect keyeowrd vals_list
bosd Aug 17, 2025
6e36f23
[BOT] post-merge updates
OCA-git-bot Aug 18, 2025
161a9ee
[IMP] product_assortment: Add demo data for product_assortment module
CarlosRoca13 Dec 13, 2021
6e94d67
[FIX] product_assortment: All assortments are applied to original par…
carlosdauden Mar 21, 2024
3da6ee8
[IMP] product_assortment: Add security group to only show assortments…
sergio-teruel Sep 30, 2024
bc1c997
[IMP] product_assortment: Migration leftovers to 18.0
bosd Feb 1, 2025
4658a4d
[FIX] product_assortment: Show all applied assortments from partner s…
bosd Feb 1, 2025
80d4b85
[MIG] product_assortment: Migration to 19.0
bizzappdev Jan 13, 2026
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
145 changes: 145 additions & 0 deletions product_assortment/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

==================
Product Assortment
==================

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

.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
:target: https://odoo-community.org/page/development-status
:alt: Production/Stable
.. |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_assortment
: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_assortment
: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 addon intends to manage product assortment. In Odoo you can only
define some filters defined by a domain but it can be sometimes really
complicated. With this addon you will be able to define a domain but
also add some products to include or to exclude through a allowed list
and a restricted list. This is done by overriding ir.capability but
without influencing its standard behaviour.

**Table of contents**

.. contents::
:local:

Usage
=====

To use this module, you need to:

1. Enter the menu through the Product Assortment Icon
2. Create a new filter where you can define your domain and add allowed
and restricted products

Changelog
=========

10.0.1.0.0 (2018-08-27)
-----------------------

- [10.0][ADD] productassortment

.. _section-1:

12.0.1.0.0 (2019-06-03)
-----------------------

- [12.0][MIG] productassortment

.. _section-2:

14.0.1.0.0 (2019-06-03)
-----------------------

- [14.0][MIG] productassortment

.. _section-3:

16.0.1.0.0 (2022-09-15)
-----------------------

- [16.0][MIG] product_assortment

.. _section-4:

18.0.1.0.0 (2025-03-06)
-----------------------

- [18.0][MIG] product_assortment
- Forward port demo data
- Forward port Only Show assortments to managers
- Forward port Fix All assortments are applied to original partner when
partner is duplicated
- Adjust test code to new API behavior, for info: odoo/odoo@450f5c9
- added test for combined black list and whitelisted product
- Fix: Navigating to the product assortment using the smartbutton on
the partner does not show all applicable assortments. (The
assortments with the partner defined as a domain where missing.)

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

* ACSONE SA/NV

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

- Denis Roussel <denis.roussel@acsone.eu>
- Cédric Pigeon <cedric.pigeon@acsone.eu>
- Xavier Bouquiaux <xavier.bouquiaux@acsone.eu>
- `Tecnativa <https://www.tecnativa.com>`__:

- Carlos Roca
- Sergio Teruel

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_assortment>`_ 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_assortment/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
23 changes: 23 additions & 0 deletions product_assortment/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright 2021 ACSONE SA/NV
# Copyright 2023 Tecnativa - Carlos Dauden
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Product Assortment",
"summary": """
Adds the ability to manage products assortment""",
"version": "19.0.1.0.0",
"license": "AGPL-3",
"development_status": "Production/Stable",
"author": "ACSONE SA/NV,Odoo Community Association (OCA)",
"website": "https://github.com/OCA/product-attribute",
"depends": ["base", "product"],
"data": [
"data/ir_cron.xml",
"security/product_assortment_security.xml",
"views/product_assortment.xml",
"views/res_partner_view.xml",
],
"demo": ["demo/assortments.xml"],
"installable": True,
}
30 changes: 30 additions & 0 deletions product_assortment/data/ir_cron.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo noupdate="1">
<!-- Force to recompute all partners to take into account changes in related partner fields models.
P.E.: Domain includes tag_ids.name contains "**" and user changes tag name from tags view -->
<record
id="action_product_assortment_recompute_all_partners"
model="ir.actions.server"
>
<field name="name">Product assortment recompute all partners</field>
<field name="model_id" ref="model_ir_filters" />
<field name="binding_model_id" ref="model_ir_filters" />
<field name="state">code</field>
<field name="code">model.search([])._compute_all_partner_ids()</field>
</record>

<!-- Cron to recompute all partners. (Not active by default). -->
<record id="ir_cron_product_assortment_recompute_all_partners" model="ir.cron">
<field
name="ir_actions_server_id"
ref="action_product_assortment_recompute_all_partners"
/>
<field name="interval_number">1</field>
<field name="interval_type">days</field>
<field name="active" eval="False" />
<field
name="nextcall"
eval="(DateTime.now().replace(hour=3, minute=0, second=0) + timedelta(days=1)).strftime('%Y-%m-%d %H:%M:%S')"
/>
</record>
</odoo>
40 changes: 40 additions & 0 deletions product_assortment/demo/assortments.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?xml version='1.0' encoding='utf-8' ?>
<!-- Copyright 2021 Tecnativa - Carlos Roca
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<!-- oca-hooks:disable=xml-dangerous-filter-wo-user -->
<odoo>
<record id="product_assortment_1" model="ir.filters">
<field name="model_id">product.product</field>
<field name="is_assortment" eval="True" />
<field name="name">Assortment Desk</field>
<field name="active" eval="True" />
<field
name="domain"
>["|","|",("default_code","ilike","desk"),("name","ilike","desk"),("barcode","ilike","desk")]</field>
<field name="partner_domain" eval="[('id', '=', ref('base.partner_admin'))]" />
</record>
<record id="product_assortment_2" model="ir.filters">
<field name="model_id">product.product</field>
<field name="is_assortment" eval="True" />
<field name="name">Assortment Chair</field>
<field name="active" eval="True" />
<field
name="domain"
>["|","|",("default_code","ilike","chair"),("name","ilike","chair"),("barcode","ilike","chair")]</field>
<field name="partner_domain" eval="[('id', '=', ref('base.partner_demo'))]" />
</record>
<record id="product_assortment_3" model="ir.filters">
<field name="model_id">product.product</field>
<field name="is_assortment" eval="True" />
<field name="name">Assortment Service</field>
<field name="active" eval="True" />
<field
name="domain"
eval="[('categ_id', 'child_of', ref('product.product_category_3'))]"
/>
<field
name="partner_domain"
eval="[('id', '=', ref('base.partner_demo_portal'))]"
/>
</record>
</odoo>
Loading