Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
016c378
[11.0][ADD] website_sale_secondary_unit: New module
sergio-teruel Mar 4, 2019
93fa645
[11.0][FIX] website_sale_secondary_unit: Crash if product_uom not com…
sergio-teruel Apr 16, 2019
4982a74
[11.0][FIX] website_sale_secondary_unit: Fix tour tests
sergio-teruel Apr 18, 2019
b698839
[11.0][IMP] website_sale_secondary_unit: Display product uom after pr…
sergio-teruel Jun 14, 2019
37049f2
[MIG] website_sale_secondary_unit: Migration to v12.0
sergio-teruel Oct 24, 2019
a82c7eb
[FIX] website_sale_secondary_unit: Fix quantity position in cart lines
sergio-teruel May 4, 2020
2596eb3
[IMP] website_sale_secondary_unit: Set default secondary uom for prod…
sergio-teruel Jul 21, 2020
2e97a10
Added translation using Weblate (German)
AndreVolksdorf Aug 11, 2020
027ddf9
[IMP] website_sale_secondary_unit: black, isort, prettier
CarlosRoca13 Feb 17, 2021
9d0e673
[MIG] website_sale_secondary_unit: Migration to v13.0
CarlosRoca13 Feb 17, 2021
0060d00
[FIX] website_sale_secondary_unit: Adjust to upstream changes
pedrobaeza Apr 5, 2021
87a79b8
[FIX] website_sale_secondary_unit: Remove sudo access to avoid to dis…
sergio-teruel Jul 15, 2021
d728049
FIX: script for delete view before update
celm1990 Sep 10, 2021
91dc5da
[FIX] website_sale_secondary_unit: Fixed price computation
CarlosRoca13 May 14, 2021
91c1058
[IMP] website_sale_secondary_unit: black, isort, prettier
CarlosRoca13 May 26, 2022
64cf756
[MIG] website_sale_secondary_unit: Migration to 15.0
CarlosRoca13 May 27, 2022
ae0e2be
[IMP] website_sale_secondary_unit: mobile UX
chienandalu Dec 20, 2022
9fa66e5
Translated using Weblate (Italian)
francesco-ooops Apr 7, 2023
7793451
Translated using Weblate (Spanish)
Ivorra78 Jul 5, 2023
229f6fc
Translated using Weblate (Italian)
mymage Jul 18, 2023
41a22ee
[FIX] website_sale_secondary_unit: t-esc directives are deprecated
pilarvargas-tecnativa Sep 13, 2023
f308510
[IMP] website_sale_secondary_unit: Hide/show uom name in secondary qu…
pilarvargas-tecnativa Sep 13, 2023
6d152fa
Translated using Weblate (Italian)
mymage Sep 22, 2023
e96134a
Translated using Weblate (Spanish)
Ivorra78 Oct 4, 2023
dbb12b2
[IMP] website_sale_b2x_alt_price: test performance improvement
josep-tecnativa Oct 18, 2023
de7da7d
[IMP] website_sale_secondary_unit: test performance improvement
josep-tecnativa Oct 18, 2023
ee4f748
Translated using Weblate (Italian)
mymage Oct 29, 2023
1b18948
[IMP] website_sale_secondary_unit: pre-commit auto fixes
carlos-lopez-tecnativa Jan 9, 2025
f76de9b
[MIG] website_sale_secondary_unit: Migration to version 17.0
carlos-lopez-tecnativa Jan 10, 2025
d962662
Translated using Weblate (Italian)
mymage Jan 15, 2025
7ee5a5e
[IMP] website_sale_secondary_unit: pre-commit auto fixes
pilarvargas-tecnativa Aug 21, 2025
89baed6
[MIG] website_sale_secondary_unit: Migration to version 18.0
pilarvargas-tecnativa Aug 21, 2025
a2c2811
[FIX] website_sale_secondary_unit: avoid reassigning event parameter
Kimkhoi3010 Jan 19, 2026
2133f36
Translated using Weblate (French)
weblate Feb 25, 2026
5c53664
Translated using Weblate (Spanish)
weblate Feb 25, 2026
d42ca9f
Translated using Weblate (Catalan)
weblate Feb 25, 2026
56b53b9
Translated using Weblate (Italian)
weblate Feb 25, 2026
2c53354
Translated using Weblate (German)
weblate Feb 25, 2026
c4fdd8e
Translated using Weblate (Italian)
mymage Apr 8, 2026
e27fd7d
Translated using Weblate (Spanish)
Ed-Spain Apr 22, 2026
c9faf20
[FIX] website_sale_*: remove deprecated test key from tour
pilarvargas-tecnativa Jul 21, 2026
9a2a421
[MIG] website_sale_secondary_unit: Migration to 19.0
CarlosRoca13 Aug 20, 2026
b3e0cc1
[IMP] website_sale_secondary_unit: secondary unit selector in the pro…
CarlosRoca13 Aug 26, 2026
9ead7eb
[IMP] website_sale_secondary_unit: add support to reorder button
CarlosRoca13 Aug 27, 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
126 changes: 126 additions & 0 deletions website_sale_secondary_unit/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

===========================
Website Sale Secondary Unit
===========================

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

.. |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_secondary_unit
: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_secondary_unit
: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|

This module extends the functionality of ``sale_order_secondary_unit``
to allow selling products in the online store using the secondary units
defined on the product.

Odoo ships a similar feature based on ``uom.uom`` records shared by all
products (the *Packagings* field). Secondary units are instead defined
per product and keep both quantities (product unit and secondary unit)
on the sale order line, which is useful when each product has its own
packing sizes.

**Table of contents**

.. contents::
:local:

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

To define the secondary units, you should activate *Units of Measure &
Packagings* in *Inventory > Configuration > Settings* for the user that
will be responsible of this function.

Usage
=====

To use this module you need to:

- Go to *'Website > eCommerce > Products'*.
- Select a template.
- On the *General Information* tab, fill in the *Secondary Unit of
Measure* lines that you need and tick *Website published* on the ones
that must be offered in the shop.
- Go to the Website Shop and open that product: next to the quantity
selector you will see a selectable option with all the secondary units
published for the product. The quantity you type is then counted in
the selected unit (e.g. ``2`` + ``Box 5 Units`` adds 10 units to the
cart).
- If you do not want to sell in the base product unit and only allow
selling in a secondary unit, you can disable the option *'Allow to
sell in unit of measure'* in the *eCommerce Shop* section of the
product form.

The same selector is shown in the *Configure* dialog that is opened for
products having optional products or several variants.

Each secondary unit gets its own cart line, so the same product can be
bought in several units at once.

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_secondary_unit%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>`__:

- Sergio Teruel
- Carlos Roca
- Pilar Vargas
- Carlos Lopez

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/19.0/website_sale_secondary_unit>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
4 changes: 4 additions & 0 deletions website_sale_secondary_unit/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from . import controllers
from . import models
from .hooks import post_init_hook
33 changes: 33 additions & 0 deletions website_sale_secondary_unit/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Copyright 2019 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Website Sale Secondary Unit",
"summary": "Allow manage secondary units in website shop",
"version": "19.0.1.0.0",
"development_status": "Beta",
"category": "Website",
"website": "https://github.com/OCA/e-commerce",
"author": "Tecnativa, Odoo Community Association (OCA)",
"license": "AGPL-3",
"application": False,
"installable": True,
"depends": ["website_sale", "sale_order_secondary_unit"],
"data": [
"security/ir.model.access.csv",
"security/website_sale_secondary_unit.xml",
"views/product_secondary_unit_views.xml",
"views/product_template_views.xml",
"views/templates.xml",
],
"demo": ["data/demo.xml"],
"post_init_hook": "post_init_hook",
"assets": {
"web.assets_frontend": [
"/website_sale_secondary_unit/static/src/js/**/*.esm.js",
"/website_sale_secondary_unit/static/src/js/**/*.xml",
],
"web.assets_tests": [
"/website_sale_secondary_unit/static/tests/tours/**/*.esm.js",
],
},
}
2 changes: 2 additions & 0 deletions website_sale_secondary_unit/controllers/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from . import main
Loading
Loading