Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
119 changes: 119 additions & 0 deletions website_sale_product_matrix/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

===========================
Product matrix in eCommerce
===========================

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

.. |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-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%2Fe--commerce-lightgray.png?logo=github
:target: https://github.com/OCA/e-commerce/tree/19.0/website_sale_product_matrix
: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-19-0/e-commerce-19-0-website_sale_product_matrix
: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=19.0
:alt: Try me on Runboat

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

With this module we'll be able to use the product matrix in the
eCommerce so our customers can easily add products to their carts.

**Table of contents**

.. contents::
:local:

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

To configure this module, you need to:

- Go to a product with variants or create one.
- In the *Attributes and variants* tab, *Sales Variant Selection*
section, select **Order grid entry**.

Usage
=====

To use this module, you need to:

1. Go to the configured product web page.
2. You'll se the matrix where you can add units to the cart.

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

This module doesn't have any effect on the wishlist: adding a
matrix-configured product from the wishlist page falls back to the
regular product configurator instead of opening the matrix. A glue
module such as ``website_sale_wishlist_product_matrix`` would be needed
to fix this.

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

* Tecnativa

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

- Tecnativa (https://www.tecnativa.com)

- David Vidal
- Pilar Vargas
- Cristina Hidalgo

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.

.. |maintainer-pilarvargas-tecnativa| image:: https://github.com/pilarvargas-tecnativa.png?size=40px
:target: https://github.com/pilarvargas-tecnativa
:alt: pilarvargas-tecnativa

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-pilarvargas-tecnativa|

This module is part of the `OCA/e-commerce <https://github.com/OCA/e-commerce/tree/19.0/website_sale_product_matrix>`_ 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 website_sale_product_matrix/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import controllers
24 changes: 24 additions & 0 deletions website_sale_product_matrix/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright 2024 Tecnativa - David Vidal
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "Product matrix in eCommerce",
"version": "19.0.1.0.0",
"author": "Tecnativa, Odoo Community Association (OCA)",
"license": "AGPL-3",
"website": "https://github.com/OCA/e-commerce",
"category": "Website",
"maintainers": ["pilarvargas-tecnativa"],
"depends": [
"sale_product_matrix",
"website_sale",
],
"data": [
"templates/product_template.xml",
],
"assets": {
"web.assets_frontend": [
"website_sale_product_matrix/static/src/js/**/*.js",
"website_sale_product_matrix/static/src/scss/**/*.scss",
],
},
}
1 change: 1 addition & 0 deletions website_sale_product_matrix/controllers/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import main
27 changes: 27 additions & 0 deletions website_sale_product_matrix/controllers/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Copyright 2025 Tecnativa - David Vidal
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo.http import request, route

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


class WebsiteSaleProductMatrix(WebsiteSale):
@route(
["/shop/cart/update_from_matrix"],
type="http",
auth="public",
methods=["POST"],
website=True,
)
def cart_update_from_matrix(self, product_template_id, grid, **kw):
"""This route is called when adding a product to cart from the product matrix"""
sale_order = request.cart or request.website._create_cart()
sale_order.update(
{
"grid_product_tmpl_id": int(product_template_id),
"grid_update": True,
"grid": grid,
}
)
sale_order._apply_grid()
return request.redirect("/shop/cart")
57 changes: 57 additions & 0 deletions website_sale_product_matrix/i18n/ca.po
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:
# * website_sale_product_matrix
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2026-05-05 15:14+0000\n"
"Last-Translator: Anonymous <noreply@weblate.org>\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 5.15.2\n"

#. module: website_sale_product_matrix
#: model_terms:ir.ui.view,arch_db:website_sale_product_matrix.product
msgid "<i class=\"fa fa-cart-plus mr-2\"/> Configure options"
msgstr "<i class=\"fa fa-cart-plus mr-2\"/> Afegir a la cistella"

#. module: website_sale_product_matrix
#: model_terms:ir.ui.view,arch_db:website_sale_product_matrix.product
msgid "<i class=\"fa fa-shopping-cart mr-2\"/>UPDATE CART WITH OPTIONS"
msgstr "<i class=\"fa fa-shopping-cart mr-2\"/>ACTUALITZAR CISTELLA AMB OPCIONS"

#. module: website_sale_product_matrix
#: model_terms:ir.ui.view,arch_db:website_sale_product_matrix.product
msgid "<span aria-hidden=\"true\">&amp;times;</span>"
msgstr "<span aria-hidden=\"true\">&amp;times;</span>"

#. module: website_sale_product_matrix
#: model_terms:ir.ui.view,arch_db:website_sale_product_matrix.product_matrix
msgid "Add one"
msgstr "Afegir-ne un"

#. module: website_sale_product_matrix
#: model_terms:ir.ui.view,arch_db:website_sale_product_matrix.product
msgid "Close"
msgstr "Tancar"

#. module: website_sale_product_matrix
#: model_terms:ir.ui.view,arch_db:website_sale_product_matrix.product
msgid "Configure product options"
msgstr "Configurar opcions de producte"

#. module: website_sale_product_matrix
#: model_terms:ir.ui.view,arch_db:website_sale_product_matrix.product_matrix
msgid "Not available"
msgstr "No disponible"

#. module: website_sale_product_matrix
#: model_terms:ir.ui.view,arch_db:website_sale_product_matrix.product_matrix
msgid "Remove one"
msgstr "Eliminar-ne un"
58 changes: 58 additions & 0 deletions website_sale_product_matrix/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * website_sale_product_matrix
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-07-10 06:26+0000\n"
"PO-Revision-Date: 2026-05-05 15:14+0000\n"
"Last-Translator: Anonymous <noreply@weblate.org>\n"
"Language-Team: \n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 5.15.2\n"

#. module: website_sale_product_matrix
#: model_terms:ir.ui.view,arch_db:website_sale_product_matrix.product
msgid "<i class=\"fa fa-cart-plus mr-2\"/> Configure options"
msgstr "<i class=\"fa fa-cart-plus mr-2\"/> Añadir al carro"

#. module: website_sale_product_matrix
#: model_terms:ir.ui.view,arch_db:website_sale_product_matrix.product
msgid "<i class=\"fa fa-shopping-cart mr-2\"/>UPDATE CART WITH OPTIONS"
msgstr "<i class=\"fa fa-shopping-cart mr-2\"/>ACTUALIZAR CARRO CON OPCIONES"

#. module: website_sale_product_matrix
#: model_terms:ir.ui.view,arch_db:website_sale_product_matrix.product
msgid "<span aria-hidden=\"true\">&amp;times;</span>"
msgstr "<span aria-hidden=\"true\">&amp;times;</span>"

#. module: website_sale_product_matrix
#: model_terms:ir.ui.view,arch_db:website_sale_product_matrix.product_matrix
msgid "Add one"
msgstr "Añadir uno"

#. module: website_sale_product_matrix
#: model_terms:ir.ui.view,arch_db:website_sale_product_matrix.product
msgid "Close"
msgstr "Cerrar"

#. module: website_sale_product_matrix
#: model_terms:ir.ui.view,arch_db:website_sale_product_matrix.product
msgid "Configure product options"
msgstr "Añadir opciones de producto"

#. module: website_sale_product_matrix
#: model_terms:ir.ui.view,arch_db:website_sale_product_matrix.product_matrix
msgid "Not available"
msgstr "No disponible"

#. module: website_sale_product_matrix
#: model_terms:ir.ui.view,arch_db:website_sale_product_matrix.product_matrix
msgid "Remove one"
msgstr "Eliminar uno"
52 changes: 52 additions & 0 deletions website_sale_product_matrix/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * website_sale_product_matrix
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 17.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2026-05-05 15:14+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 5.15.2\n"

#. module: website_sale_product_matrix
#: model_terms:ir.ui.view,arch_db:website_sale_product_matrix.product
msgid "<i class=\"fa fa-cart-plus mr-2\"/> Configure options"
msgstr "<i class=\"fa fa-cart-plus mr-2\"/> Opzioni configurazione"

#. module: website_sale_product_matrix
#: model_terms:ir.ui.view,arch_db:website_sale_product_matrix.product
msgid "<i class=\"fa fa-shopping-cart me-2\"/>UPDATE CART WITH OPTIONS"
msgstr "<i class=\"fa fa-shopping-cart me-2\"/>AGGIORNA CARRELLO CON OPZIONI"

#. module: website_sale_product_matrix
#: model_terms:ir.ui.view,arch_db:website_sale_product_matrix.product_matrix
msgid "Add one"
msgstr "Aggiungi uno"

#. module: website_sale_product_matrix
#: model_terms:ir.ui.view,arch_db:website_sale_product_matrix.product
msgid "Close"
msgstr "Chiudi"

#. module: website_sale_product_matrix
#: model_terms:ir.ui.view,arch_db:website_sale_product_matrix.product
msgid "Configure product options"
msgstr "Configura opzioni prodotto"

#. module: website_sale_product_matrix
#: model_terms:ir.ui.view,arch_db:website_sale_product_matrix.product_matrix
msgid "Not available"
msgstr "Non disponibile"

#. module: website_sale_product_matrix
#: model_terms:ir.ui.view,arch_db:website_sale_product_matrix.product_matrix
msgid "Remove one"
msgstr "Rimuovi uno"
49 changes: 49 additions & 0 deletions website_sale_product_matrix/i18n/website_sale_product_matrix.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * website_sale_product_matrix
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 19.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: website_sale_product_matrix
#: model_terms:ir.ui.view,arch_db:website_sale_product_matrix.cta_wrapper
msgid "<i class=\"fa fa-cart-plus mr-2\"/> Configure options"
msgstr ""

#. module: website_sale_product_matrix
#: model_terms:ir.ui.view,arch_db:website_sale_product_matrix.product
msgid "<i class=\"fa fa-shopping-cart me-2\"/>UPDATE CART WITH OPTIONS"
msgstr ""

#. module: website_sale_product_matrix
#: model_terms:ir.ui.view,arch_db:website_sale_product_matrix.product_matrix
msgid "Add one"
msgstr ""

#. module: website_sale_product_matrix
#: model_terms:ir.ui.view,arch_db:website_sale_product_matrix.product
msgid "Close"
msgstr ""

#. module: website_sale_product_matrix
#: model_terms:ir.ui.view,arch_db:website_sale_product_matrix.product
msgid "Configure product options"
msgstr ""

#. module: website_sale_product_matrix
#: model_terms:ir.ui.view,arch_db:website_sale_product_matrix.product_matrix
msgid "Not available"
msgstr ""

#. module: website_sale_product_matrix
#: model_terms:ir.ui.view,arch_db:website_sale_product_matrix.product_matrix
msgid "Remove one"
msgstr ""
Loading
Loading