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

[17.0][MIG] website_sale_product_attribute_value_filter_existing: Migration to 17.0 #925

Open
wants to merge 28 commits into
base: 17.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
efca3c2
[IMP] : black, isort, prettier
CarlosRoca13 Jun 2, 2020
29e994d
[MIG] website_sale_product_attribute_value_filter_existing: Migration…
CarlosRoca13 Jun 2, 2020
ed432b3
[FIX] website_sale_product_attribute_value_filter_existing: developme…
sbidoul Oct 18, 2020
812e085
Added translation using Weblate (Spanish)
claudiagn Feb 25, 2021
4fd6ecf
Added translation using Weblate (Catalan)
claudiagn Feb 25, 2021
fad7d83
Added translation using Weblate (Dutch)
bosd Apr 5, 2021
1161092
[IMP] website_sale_product_attribute_value_filter_existing: black, is…
miguel-S73 Jun 25, 2021
10e575e
[MIG] website_sale_product_attribute_value_filter_existing: Migration…
miguel-S73 Jun 25, 2021
74fb443
[IMP] website_sale_product_attribute_value_filter_existing: black, is…
CarlosRoca13 Nov 2, 2022
c046db9
[MIG] website_sale_product_attribute_value_filter_existing: Migration…
CarlosRoca13 Nov 2, 2022
07c95fd
[UPD] README.rst
OCA-git-bot Mar 6, 2023
fe8b0c3
Update translation files
weblate Mar 6, 2023
1b97d34
[16.0][MIG] website_sale_product_attribute_value_filter_existing: Mig…
anothingguy Mar 24, 2023
9a3ecb4
[UPD] Update website_sale_product_attribute_value_filter_existing.pot
Apr 5, 2023
d2c6c1c
[UPD] README.rst
OCA-git-bot Apr 5, 2023
d800bed
[FIX] website_sale_product_attribute_value_filter_existing: match sig…
aleuffre May 10, 2023
7fc8b88
website_sale_product_attribute_value_filter_existing 16.0.1.0.1
OCA-git-bot May 11, 2023
2dec94b
[UPD] README.rst
OCA-git-bot Sep 3, 2023
162ba73
[FIX] website_sale_product_attribute_value_filter_existing: fix test …
pilarvargas-tecnativa Oct 20, 2023
07a3484
[BOT] post-merge updates
OCA-git-bot Oct 23, 2023
ccdd822
[IMP] website_sale_product_attribute_value_filter_existing: test perf…
josep-tecnativa Oct 18, 2023
4dba144
[BOT] post-merge updates
OCA-git-bot Oct 23, 2023
d3e9b84
Added translation using Weblate (Italian)
mymage May 8, 2024
e45e22e
[IMP] website_sale_product_attribute_value_filter_existing: adds filt…
lef-adhoc Jun 6, 2024
1326a88
[BOT] post-merge updates
OCA-git-bot Jun 18, 2024
00f9477
[FIX] website_sale_product_attribute_value_filter_existing: Hide attr…
pilarvargas-tecnativa Sep 12, 2024
5c7efff
[IMP] website_sale_product_attribute_value_filter_existing: pre-commi…
lef-adhoc Jun 19, 2024
aafd92d
[MIG] website_sale_product_attribute_value_filter_existing: Migration…
lef-adhoc Jun 19, 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
91 changes: 91 additions & 0 deletions website_sale_product_attribute_value_filter_existing/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
=====================================
Website Sale Attribute Value Existing
=====================================

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

.. |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/licence-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%2Fe--commerce-lightgray.png?logo=github
:target: https://github.com/OCA/e-commerce/tree/17.0/website_sale_product_attribute_value_filter_existing
:alt: OCA/e-commerce
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/e-commerce-17-0/e-commerce-17-0-website_sale_product_attribute_value_filter_existing
: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/e-commerce&target_branch=17.0
:alt: Try me on Runboat

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

This module extends the functionality of website sale module to allow
hide product attributes values which exist but not used on any variants.

**Table of contents**

.. contents::
:local:

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/e-commerce/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/e-commerce/issues/new?body=module:%20website_sale_product_attribute_value_filter_existing%0Aversion:%2017.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>`__:

- Victor M.M. Torres
- Sergio Teruel
- Carlos Roca

- `Trobz <https://trobz.com>`__:

- Hoang Diep <[email protected]>

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

The migration of this module from 15.0 to 16.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/e-commerce <https://github.com/OCA/e-commerce/tree/17.0/website_sale_product_attribute_value_filter_existing>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
from . import controllers
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright 2019 Tecnativa - Victor M.M. Torres
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
{
"name": "Website Sale Attribute Value Existing",
"summary": "Allow hide attributes values not used in variants",
"version": "17.0.1.0.0",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change should be in the migration commit, not in the pre-commit one

"development_status": "Production/Stable",
"category": "Website",
"website": "https://github.com/OCA/e-commerce",
"author": "Tecnativa, Odoo Community Association (OCA)",
"license": "LGPL-3",
"application": False,
"installable": True,
"depends": [
"website_sale",
],
"data": ["views/templates.xml"],
"assets": {
"web.assets_tests": [
"/website_sale_product_attribute_value_filter_existing/static/src/js/"
"website_sale_product_attribute_value_filter_existing_tour.esm.js",
]
},
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
from . import main
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Copyright 2019 Tecnativa - Sergio Teruel
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
from odoo import http
from odoo.http import request
from odoo.tools import lazy

from odoo.addons.website_sale.controllers.main import WebsiteSale


class ProductAttributeValues(WebsiteSale):
@http.route()
def shop(
self,
page=0,
category=None,
search="",
min_price=0.0,
max_price=0.0,
ppg=False,
**post,
):
res = super().shop(
page=page,
category=category,
search=search,
min_price=min_price,
max_price=max_price,
ppg=ppg,
**post,
)

# getting existing templates by "search_product" in qcontext
# without searching again
templates = res.qcontext["search_product"]
ProductTemplateAttributeLine = request.env["product.template.attribute.line"]
attribute_values = lazy(
lambda: ProductTemplateAttributeLine.search(
[("product_tmpl_id", "in", templates.ids)]
)
)
res.qcontext["attr_values_used"] = attribute_values.mapped("value_ids")
return res
Empty file.
Empty file.
14 changes: 14 additions & 0 deletions website_sale_product_attribute_value_filter_existing/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: Automatically generated\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"
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.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"
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
* Go to Website Shop
* Active product attributes filter on theme panel option of shopping page
- Click edit button on shopping page (or directly go url: http://{your-domain}/@/shop)
- On tab `Customize`, enable attributes filter to show attribute values left of the layout.
* System only display the attribute values if used.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
- [Tecnativa](https://www.tecnativa.com):
- Victor M.M. Torres
- Sergio Teruel
- Carlos Roca

- [Trobz](https://trobz.com):
- Hoang Diep \<<[email protected]>\>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
The migration of this module from 15.0 to 16.0 was financially supported
by Camptocamp
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This module extends the functionality of website sale module to allow
hide product attributes values which exist but not used on any variants.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading