Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
6469d1b
purchase_order_secondary_unit: New module to allow buy in secondary u…
sergio-teruel Oct 25, 2018
147cd9b
[MIG] purchase_order_secondary_unit v11 to v12
Nikul-Chaudhary Jan 27, 2019
c94ca6f
[IMP] purchase_order_secondary_unit: black, isort
ps-tubtim Jan 13, 2020
ab6d7c7
[MIG] purchase_order_secondary_unit: Migration to 13.0
ps-tubtim Jan 13, 2020
c0bf061
[IMP] purchase_order_secondary_unit: more clear string field
sergio-teruel Dec 18, 2020
4e9d6a6
[13.0][FIX] purchase_order_secondary_unit, error selecting 2nd_uom wh…
kittiu Jan 19, 2021
76b51e3
[MIG] purchase_order_secondary_unit: Migration to 14.0
SurachetS Feb 2, 2021
1ea7dcb
Added translation using Weblate (Japanese)
kakurai8 Dec 28, 2021
aac20d3
Added translation using Weblate (French)
kh-badep May 11, 2022
c986da4
[IMP] purchase_order_secondary_unit: Less code. Use product_secondary…
sergio-teruel Jan 12, 2021
da031e7
[FIX] po_secondary_unit: Drop 0 qty test check on pol with secondary UoM
HviorForgeFlow May 16, 2022
95d1c66
Added translation using Weblate (German)
marylla Jun 10, 2022
34c928e
[IMP] purchase_order_secondary_unit: black, isort, prettier
BT-mgomez Sep 28, 2022
23fb998
[15.0][MIG] purchase_order_secondary_unit: Migration to 15.0
BT-mgomez Sep 28, 2022
44cc5f6
[IMP] purchase_order_secondary_unit: Compatibility with product variants
Feb 20, 2023
2602056
[FIX] purchase_order_secondary_unit: Split tests
HviorForgeFlow Apr 26, 2023
76d90af
[IMP] purchase_order_secondary_unit: Add secondary units to purchase …
sergio-teruel Apr 26, 2023
17db4fd
[FIX] purchase_order_secondary_unit: User can changes secondary uom i…
sergio-teruel Sep 6, 2023
bb82308
[FIX] purchase_order_secondary_unit: Set product unit of measure for …
pilarvargas-tecnativa Sep 18, 2023
f21b390
[IMP] purchase_order_secondary_unit: Require secondary_uom_id when se…
carlosdauden Jan 6, 2024
b54aba5
[MIG] purchase_order_secondary_unit: Migration to v16
yajo Aug 23, 2023
286e30f
[FIX] purchase_order_secondary_unit: bug calling super()
dalonsod Mar 27, 2024
3acaced
[FIX] purchase_order_secondary_unit: precompute for some fields & sec…
acsonefho Oct 30, 2023
50536ea
[IMP] purchase_order_secondary_unit: make the secondary unit and seco…
pilarvargas-tecnativa Jun 19, 2024
2e4c5ad
[FIX] purchase_order_secondary_unit: Error when user try to select a …
sergio-teruel Nov 11, 2024
efd7611
Update translation files
weblate Nov 14, 2024
f883fc4
Added translation using Weblate (Italian)
mymage Nov 14, 2024
0884c15
[IMP] purchase_order_secondary_unit: pre-commit auto fixes
dalonsod Dec 17, 2024
a31fa4e
[MIG] purchase_order_secondary_unit: Migration to 17.0
mmrondon Dec 17, 2024
d5286e1
[IMP] purchase_order_secondary_unit: pre-commit auto fixes
Feb 24, 2025
35cbd5a
[MIG] purchase_order_secondary_unit: Migration to 18.0
Feb 24, 2025
c79f690
[UPD] Update purchase_order_secondary_unit.pot
Mar 8, 2025
d7faf1a
[BOT] post-merge updates
OCA-git-bot Mar 8, 2025
b9661af
Added translation using Weblate (Portuguese (Brazil))
marcelsavegnago Jun 26, 2025
01aa80e
Added translation using Weblate (Croatian)
uvid-vlado Sep 29, 2025
915aea2
Translated using Weblate (Croatian)
uvid-vlado Sep 29, 2025
977e48f
[FIX] purchase_order_secondary_unit: attrs is deprecated
pilarvargas-tecnativa Nov 13, 2025
292d58e
[BOT] post-merge updates
OCA-git-bot Nov 13, 2025
25ab52c
[IMP] purchase_order_secondary_unit: add vendor pricelist support and…
yostashiro Jan 11, 2026
62d2ec1
[IMP] purchase_order_secondary_unit: pass secondary_uom_id to account…
AungKoKoLin1997 Jan 20, 2026
59b9185
[UPD] Update purchase_order_secondary_unit.pot
Jan 27, 2026
52ba729
[BOT] post-merge updates
OCA-git-bot Jan 27, 2026
ebc9364
Update translation files
weblate Jan 27, 2026
42c84bb
Translated using Weblate (Italian)
mymage Jan 28, 2026
c85bef6
[FIX] purchase_order_secondary_unit: revert report features requiring…
yostashiro Feb 16, 2026
065b45f
[BOT] post-merge updates
OCA-git-bot Feb 16, 2026
96b8acb
Translated using Weblate (Japanese)
nobuQuartile Feb 19, 2026
6904aea
[MIG] purchase_order_secondary_unit: Migration to 19.0
JochenDeBie Feb 26, 2026
d579c05
[DON'T MERGE] test-requirements.txt
JochenDeBie Feb 26, 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
135 changes: 135 additions & 0 deletions purchase_order_secondary_unit/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

=============================
Purchase Order Secondary Unit
=============================

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

.. |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%2Fpurchase--workflow-lightgray.png?logo=github
:target: https://github.com/OCA/purchase-workflow/tree/19.0/purchase_order_secondary_unit
:alt: OCA/purchase-workflow
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/purchase-workflow-19-0/purchase-workflow-19-0-purchase_order_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/purchase-workflow&target_branch=19.0
:alt: Try me on Runboat

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

This module extends the functionality of purchase orders to allow buy
products in secondary unit of distinct category.

Users can enter quantities and prices in secondary units on purchase
order lines. Vendor pricelist records are also extended to support
secondary unit pricing.

Purchase reports and the Purchase Order portal are adjusted to display
quantities and prices in secondary units based on company configuration.

**Table of contents**

.. contents::
:local:

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

For configuration of displaying secondary unit information in purchase
reports and the Purchase Order portal, see the guidelines provided in
product_secondary_unit.

Usage
=====

To use this module you need to:

1. Go to a *Product > General Information tab*.
2. Create any record in "Secondary unit of measure".
3. Set the conversion factor.
4. Go to *Purchase > Quotation > Create*.
5. Change secondary qty and secondary uom in line, and quantity
(product_qty) will be changed (according to the conversion factor).

**Vendor Pricelist Integration**

- When adding a vendor to a product's pricelist (via *Purchase tab >
Vendors*), the secondary unit of measure is automatically defaulted
from the product variant's purchase secondary UOM, or from the
product template if not set on the variant.
- When a new vendor pricelist record is created from purchase order
confirmation, the secondary UOM from the purchase order line is
automatically stored in the vendor pricelist entry.

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

Updating existing vendor pricelist records from purchase order
confirmation does not currently support secondary UOM or secondary UOM
pricing. This is not included in the current scope and may be considered
in future improvements.

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/purchase-workflow/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/purchase-workflow/issues/new?body=module:%20purchase_order_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
- Ernesto Tejeda

- Nikul Chaudhary <nikulchaudhary2112@gmail.com>
- Pimolnat Suntian <pimolnats@ecosoft.co.th>
- Miguel Ángel Gómez <miguel.gomez@braintec.com>
- `Quartile <https://www.quartile.co>`__:

- Yoshi Tashiro

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/purchase-workflow <https://github.com/OCA/purchase-workflow/tree/19.0/purchase_order_secondary_unit>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 2 additions & 0 deletions purchase_order_secondary_unit/__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 models
23 changes: 23 additions & 0 deletions purchase_order_secondary_unit/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright 2018 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Purchase Order Secondary Unit",
"summary": "Purchase product in a secondary unit",
"version": "19.0.1.0.0",
"development_status": "Beta",
"category": "Purchase",
"website": "https://github.com/OCA/purchase-workflow",
"author": "Tecnativa, Odoo Community Association (OCA)",
"license": "AGPL-3",
"application": False,
"installable": True,
"auto_install": True,
"depends": ["purchase", "product_secondary_unit"],
"data": [
"views/product_views.xml",
"views/product_supplierinfo_views.xml",
"views/purchase_order_views.xml",
"reports/purchase_order_templates.xml",
"reports/purchase_quotation_templates.xml",
],
}
110 changes: 110 additions & 0 deletions purchase_order_secondary_unit/i18n/de.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * purchase_order_secondary_unit
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2022-06-10 11:05+0000\n"
"Last-Translator: Maria Sparenberg <maria.sparenberg@gmx.net>\n"
"Language-Team: none\n"
"Language: de\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 4.3.2\n"

#. module: purchase_order_secondary_unit
#: model_terms:ir.ui.view,arch_db:purchase_order_secondary_unit.purchase_order_portal_content_secondary_uom
#: model_terms:ir.ui.view,arch_db:purchase_order_secondary_unit.report_purchaseorder_document
#: model_terms:ir.ui.view,arch_db:purchase_order_secondary_unit.report_purchasequotation_document
msgid "<strong>Second Qty</strong>"
msgstr ""

#. module: purchase_order_secondary_unit
#: model:ir.model.fields,field_description:purchase_order_secondary_unit.field_product_product__purchase_secondary_uom_id
#: model:ir.model.fields,field_description:purchase_order_secondary_unit.field_product_template__purchase_secondary_uom_id
msgid "Default secondary unit for purchases"
msgstr "Einkauf 2. ME"

#. module: purchase_order_secondary_unit
#: model:ir.model.fields,help:purchase_order_secondary_unit.field_product_product__purchase_secondary_uom_id
msgid ""
"In order to set a value, please first add at least one record in 'Secondary "
"Unit of Measure'"
msgstr ""

#. module: purchase_order_secondary_unit
#: model:ir.model.fields,field_description:purchase_order_secondary_unit.field_purchase_order_line__product_packaging_id
msgid "Packaging"
msgstr ""

#. module: purchase_order_secondary_unit
#: model:ir.model.fields,field_description:purchase_order_secondary_unit.field_purchase_order_line__product_packaging_qty
msgid "Packaging Quantity"
msgstr ""

#. module: purchase_order_secondary_unit
#: model:ir.model,name:purchase_order_secondary_unit.model_product_template
msgid "Product"
msgstr ""

#. module: purchase_order_secondary_unit
#: model:ir.model,name:purchase_order_secondary_unit.model_product_product
msgid "Product Variant"
msgstr ""

#. module: purchase_order_secondary_unit
#: model:ir.model,name:purchase_order_secondary_unit.model_purchase_order
msgid "Purchase Order"
msgstr ""

#. module: purchase_order_secondary_unit
#: model:ir.model,name:purchase_order_secondary_unit.model_purchase_order_line
msgid "Purchase Order Line"
msgstr "Bestellposition"

#. module: purchase_order_secondary_unit
#: model:ir.model.fields,field_description:purchase_order_secondary_unit.field_purchase_order_line__product_qty
msgid "Quantity"
msgstr "Menge"

#. module: purchase_order_secondary_unit
#: model:ir.model.fields,field_description:purchase_order_secondary_unit.field_purchase_order_line__secondary_uom_id
msgid "Second unit"
msgstr "2. ME"

#. module: purchase_order_secondary_unit
#: model:ir.model.fields,field_description:purchase_order_secondary_unit.field_product_supplierinfo__secondary_uom_price
#: model:ir.model.fields,field_description:purchase_order_secondary_unit.field_purchase_order_line__secondary_uom_price
msgid "Secondary Price"
msgstr ""

#. module: purchase_order_secondary_unit
#: model:ir.model.fields,field_description:purchase_order_secondary_unit.field_purchase_order_line__secondary_uom_qty
msgid "Secondary Qty"
msgstr "Menge (2. ME)"

#. module: purchase_order_secondary_unit
#: model:ir.model.fields,field_description:purchase_order_secondary_unit.field_product_supplierinfo__secondary_uom_id
msgid "Secondary Unit"
msgstr ""

#. module: purchase_order_secondary_unit
#: model:ir.model,name:purchase_order_secondary_unit.model_product_supplierinfo
msgid "Supplier Pricelist"
msgstr ""

#~ msgid "Product Template"
#~ msgstr "Produktvorlage"

#~ msgid "Display Name"
#~ msgstr "Anzeigename"

#~ msgid "ID"
#~ msgstr "ID"

#~ msgid "Last Modified on"
#~ msgstr "Zuletzt geändert am"
104 changes: 104 additions & 0 deletions purchase_order_secondary_unit/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * purchase_order_secondary_unit
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-04-26 21:13+0000\n"
"PO-Revision-Date: 2023-10-28 19:59+0000\n"
"Last-Translator: Ivorra78 <informatica@totmaterial.es>\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 4.17\n"

#. module: purchase_order_secondary_unit
#: model_terms:ir.ui.view,arch_db:purchase_order_secondary_unit.purchase_order_portal_content_secondary_uom
#: model_terms:ir.ui.view,arch_db:purchase_order_secondary_unit.report_purchaseorder_document
#: model_terms:ir.ui.view,arch_db:purchase_order_secondary_unit.report_purchasequotation_document
msgid "<strong>Second Qty</strong>"
msgstr "<strong>Segunda Ctd</strong>"

#. module: purchase_order_secondary_unit
#: model:ir.model.fields,field_description:purchase_order_secondary_unit.field_product_product__purchase_secondary_uom_id
#: model:ir.model.fields,field_description:purchase_order_secondary_unit.field_product_template__purchase_secondary_uom_id
msgid "Default secondary unit for purchases"
msgstr "Ud de compra secundaria por defecto"

#. module: purchase_order_secondary_unit
#: model:ir.model.fields,help:purchase_order_secondary_unit.field_product_product__purchase_secondary_uom_id
msgid ""
"In order to set a value, please first add at least one record in 'Secondary "
"Unit of Measure'"
msgstr ""
"Para establecer un valor, añada primero al menos un registro en 'Unidad de "
"Medida Secundaria'"

#. module: purchase_order_secondary_unit
#: model:ir.model.fields,field_description:purchase_order_secondary_unit.field_purchase_order_line__product_packaging_id
msgid "Packaging"
msgstr ""

#. module: purchase_order_secondary_unit
#: model:ir.model.fields,field_description:purchase_order_secondary_unit.field_purchase_order_line__product_packaging_qty
msgid "Packaging Quantity"
msgstr ""

#. module: purchase_order_secondary_unit
#: model:ir.model,name:purchase_order_secondary_unit.model_product_template
msgid "Product"
msgstr "Producto"

#. module: purchase_order_secondary_unit
#: model:ir.model,name:purchase_order_secondary_unit.model_product_product
msgid "Product Variant"
msgstr ""

#. module: purchase_order_secondary_unit
#: model:ir.model,name:purchase_order_secondary_unit.model_purchase_order
msgid "Purchase Order"
msgstr ""

#. module: purchase_order_secondary_unit
#: model:ir.model,name:purchase_order_secondary_unit.model_purchase_order_line
msgid "Purchase Order Line"
msgstr "Línea pedido de compra"

#. module: purchase_order_secondary_unit
#: model:ir.model.fields,field_description:purchase_order_secondary_unit.field_purchase_order_line__product_qty
msgid "Quantity"
msgstr "Cantidad"

#. module: purchase_order_secondary_unit
#: model:ir.model.fields,field_description:purchase_order_secondary_unit.field_purchase_order_line__secondary_uom_id
msgid "Second unit"
msgstr "Unidad secundaria"

#. module: purchase_order_secondary_unit
#: model:ir.model.fields,field_description:purchase_order_secondary_unit.field_product_supplierinfo__secondary_uom_price
#: model:ir.model.fields,field_description:purchase_order_secondary_unit.field_purchase_order_line__secondary_uom_price
msgid "Secondary Price"
msgstr ""

#. module: purchase_order_secondary_unit
#: model:ir.model.fields,field_description:purchase_order_secondary_unit.field_purchase_order_line__secondary_uom_qty
msgid "Secondary Qty"
msgstr "Cdad. secundaria"

#. module: purchase_order_secondary_unit
#: model:ir.model.fields,field_description:purchase_order_secondary_unit.field_product_supplierinfo__secondary_uom_id
msgid "Secondary Unit"
msgstr ""

#. module: purchase_order_secondary_unit
#: model:ir.model,name:purchase_order_secondary_unit.model_product_supplierinfo
msgid "Supplier Pricelist"
msgstr ""

#~ msgid "Product Template"
#~ msgstr "Plantilla de producto"
Loading
Loading