Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
ecae913
[ADD][12.0] new module product_net_weight.
legalsylvain Aug 3, 2021
286f410
[ADD] icon.png
OCA-git-bot Aug 19, 2021
91de48b
[IMP]product_net_weight: black, isort, prettier
manuelregidor Jan 11, 2022
0343225
[MIG]product_net_weight: Migration to 14.0
manuelregidor Jan 11, 2022
cf021e1
[MIG][15.0] Standard migration product_net_weight
flachica May 25, 2022
3d52bab
[UPD] Update product_net_weight.pot
May 29, 2022
f80d8b5
[UPD] README.rst
OCA-git-bot May 29, 2022
1cfe9ff
product_net_weight 15.0.1.0.1
OCA-git-bot May 29, 2022
d04f4ac
[UPD] Update product_net_weight.pot
Oct 20, 2022
d32c89d
Update translation files
weblate Oct 20, 2022
9990fe0
[FIX] product_net_weight: Fix digits parameter.
victoralmau Nov 22, 2022
9dd2b9e
product_net_weight 15.0.1.0.2
OCA-git-bot Nov 22, 2022
16dc9ad
Added translation using Weblate (Spanish)
carlosdauden Jan 9, 2023
9d4e1d2
Translated using Weblate (Spanish)
carlosdauden Jan 9, 2023
7bc509b
[MIG] product_net_weight: Migration to 16.0
RabbitJon-S73 Feb 27, 2023
626faff
[IMP] product_net_weight: Adapt module like Odoo manage weight field …
sergio-teruel Mar 1, 2023
e365997
[UPD] Update product_net_weight.pot
Jun 7, 2023
121288a
[UPD] README.rst
OCA-git-bot Jun 7, 2023
2a88a86
Update translation files
weblate Jun 7, 2023
c054957
Translated using Weblate (Spanish)
Ivorra78 Aug 22, 2023
73e614e
[UPD] README.rst
OCA-git-bot Sep 3, 2023
b6151a4
Added translation using Weblate (Italian)
mymage Oct 29, 2023
d820f74
Translated using Weblate (Italian)
mymage Oct 29, 2023
622045d
[IMP] product_net_weight: pre-commit auto fixes
remihb Jul 3, 2024
3075551
[MIG] product_net_weight: Migration to 17.0
remihb Jul 3, 2024
a6fa26b
[MIG] product_net_weight: adjust form layout
rf-ife Oct 5, 2024
84b20d6
[UPD] Update product_net_weight.pot
Oct 9, 2024
68203e0
[BOT] post-merge updates
OCA-git-bot Oct 9, 2024
e265f34
[IMP] product_net_weight: pre-commit auto fixes for v18 migration
alexis-via Nov 27, 2024
1eb185c
[MIG] product_net_weight to v18
alexis-via Nov 27, 2024
738c22c
[UPD] Update product_net_weight.pot
Dec 28, 2024
ae46768
[BOT] post-merge updates
OCA-git-bot Dec 28, 2024
b535253
[IMP] product_net_weight: pre-commit auto fixes
Oct 2, 2025
5594186
[MIG] product_net_weight: Migration to 19.0
Oct 2, 2025
704c547
Merge PR #2094 into 19.0
OCA-git-bot Oct 2, 2025
3b4e063
[UPD] Update product_net_weight.pot
Oct 2, 2025
c1f77f5
[BOT] post-merge updates
OCA-git-bot Oct 2, 2025
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
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ repos:
hooks:
- id: whool-init
- repo: https://github.com/oca/maintainer-tools
rev: f9b919b9868143135a9c9cb03021089cabba8223
rev: f70373fca6830e6536c3967ba5794311602b4bd4
hooks:
# update the NOT INSTALLABLE ADDONS section above
- id: oca-update-pre-commit-excluded-addons
Expand Down Expand Up @@ -117,13 +117,13 @@ repos:
- id: mixed-line-ending
args: ["--fix=lf"]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.13.0
rev: v0.13.2
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
- repo: https://github.com/OCA/pylint-odoo
rev: v9.3.15
rev: v9.3.18
hooks:
- id: pylint_odoo
name: pylint with optional checks
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ product-attribute

[//]: # (addons)

This part will be replaced when running the oca-gen-addons-table script from OCA/maintainer-tools.
Available addons
----------------
addon | version | maintainers | summary
--- | --- | --- | ---
[product_net_weight](product_net_weight/) | 19.0.1.0.0 | <a href='https://github.com/legalsylvain'><img src='https://github.com/legalsylvain.png' width='32' height='32' style='border-radius:50%;' alt='legalsylvain'/></a> | Add 'Net Weight' on product models

[//]: # (end addons)

Expand Down
118 changes: 118 additions & 0 deletions product_net_weight/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

=====================
Products - Net Weight
=====================

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

.. |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%2Fproduct--attribute-lightgray.png?logo=github
:target: https://github.com/OCA/product-attribute/tree/19.0/product_net_weight
: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_net_weight
: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 module extends the functionality of stock module to support net
weight. (container excluded)

**Table of contents**

.. contents::
:local:

Usage
=====

- Go to 'Inventory > Master Data > Product' and edit items.
- Go to 'Inventory' tab, and fill the "Net Weight" value.

|image1|

**Note**: The original weight field is renamed to "Gross Weight", to be
more explicit.

.. |image1| image:: https://raw.githubusercontent.com/OCA/product-attribute/19.0/product_net_weight/static/description/product_form.png

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

In futur version (> 12.0), allow to compute Weight Price (Net weight /
Price). For that purpose, refactor with ``product_logistics_uom``.

Ref :
https://github.com/OCA/product-attribute/pull/894#issuecomment-895930887

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

* GRAP

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

- Sylvain LE GAL (https://www.twitter.com/legalsylvain)
- `Greenice <https://www.greenice.com>`__:

- Fernando La Chica <fernandolachica@gmail.com>

- `Tecnativa <https://www.tecnativa.com>`__:

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

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

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

|maintainer-legalsylvain|

This module is part of the `OCA/product-attribute <https://github.com/OCA/product-attribute/tree/19.0/product_net_weight>`_ 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_net_weight/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
25 changes: 25 additions & 0 deletions product_net_weight/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Copyright (C) 2021 - Today: GRAP (http://www.grap.coop)
# @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Products - Net Weight",
"summary": "Add 'Net Weight' on product models",
"version": "19.0.1.0.0",
"category": "Product",
"author": "GRAP,Odoo Community Association (OCA)",
"maintainers": ["legalsylvain"],
"website": "https://github.com/OCA/product-attribute",
"license": "AGPL-3",
"depends": ["stock"],
"data": [
"views/view_product_product.xml",
"views/view_product_template.xml",
],
"demo": [
"demo/product_product.xml",
],
"images": [
"static/description/product_product_form.png",
],
"installable": True,
}
17 changes: 17 additions & 0 deletions product_net_weight/demo/product_product.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Copyright (C) 2021 - Today: GRAP (http://www.grap.coop)
@author: Sylvain LE GAL (https://twitter.com/legalsylvain)
deLicense AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
-->
<odoo>
<record id="product_strawberry_jam" model="product.product">
<field name="name">Strawberry Jam (Jar of 250 grams)</field>
<field name="uom_id" ref="uom.product_uom_unit" />
<field name="uom_po_id" ref="uom.product_uom_unit" />
<field name="net_weight">0.250</field>
<field name="weight">0.410</field>
<field name="standard_price">1.97</field>
<field name="list_price">2.70</field>
</record>
</odoo>
58 changes: 58 additions & 0 deletions product_net_weight/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:
# * product_net_weight
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-03-02 08:36+0000\n"
"PO-Revision-Date: 2023-08-29 08:30+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: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.17\n"

#. module: product_net_weight
#: model:ir.model.fields,field_description:product_net_weight.field_product_product__weight
#: model:ir.model.fields,field_description:product_net_weight.field_product_template__weight
msgid "Gross Weight"
msgstr "Peso bruto"

#. module: product_net_weight
#: model:ir.model.fields,field_description:product_net_weight.field_product_product__net_weight
#: model:ir.model.fields,field_description:product_net_weight.field_product_template__net_weight
msgid "Net Weight"
msgstr "Peso neto"

#. module: product_net_weight
#: model:ir.model.fields,help:product_net_weight.field_product_product__net_weight
#: model:ir.model.fields,help:product_net_weight.field_product_template__net_weight
msgid "Net Weight of the product, container excluded."
msgstr "Peso neto del producto, contenedor excluido."

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

#. module: product_net_weight
#: model:ir.model,name:product_net_weight.model_product_product
msgid "Product Variant"
msgstr "Variantes de producto"

#. module: product_net_weight
#: model:product.template,name:product_net_weight.product_strawberry_jam_product_template
msgid "Strawberry Jam (Jar of 250 grams)"
msgstr "Mermelada de fresa (tarro de 250 gramos)"

#. module: product_net_weight
#. odoo-python
#: code:addons/product_net_weight/models/product_product.py:0
#, python-format
msgid "The net weight of product must be lower than gross weight."
msgstr "El peso neto tiene que ser menor que el peso bruto."
75 changes: 75 additions & 0 deletions product_net_weight/i18n/fr.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * product_net_weight
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-08-13 18:38+0000\n"
"PO-Revision-Date: 2021-08-13 18:38+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: product_net_weight
#: model:ir.model.fields,field_description:product_net_weight.field_product_product__weight
#: model:ir.model.fields,field_description:product_net_weight.field_product_template__weight
msgid "Gross Weight"
msgstr "Poids brut"

#. module: product_net_weight
#: model:ir.model.fields,field_description:product_net_weight.field_product_product__net_weight
#: model:ir.model.fields,field_description:product_net_weight.field_product_template__net_weight
msgid "Net Weight"
msgstr "Poids net"

#. module: product_net_weight
#: model:ir.model.fields,help:product_net_weight.field_product_product__net_weight
#: model:ir.model.fields,help:product_net_weight.field_product_template__net_weight
msgid "Net Weight of the product, container excluded."
msgstr "Poids net du produit, contenant exclus."

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

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

#. module: product_net_weight
#: model:product.template,name:product_net_weight.product_strawberry_jam_product_template
msgid "Strawberry Jam (Jar of 250 grams)"
msgstr "Confiture de fraise (Pot de 250 grammes)"

#. module: product_net_weight
#. odoo-python
#: code:addons/product_net_weight/models/product_product.py:0
#, python-format
msgid "The net weight of product must be lower than gross weight."
msgstr ""

#~ msgid "Product Template"
#~ msgstr "Modèle d'article"

#, fuzzy
#~ msgid "The weight of the contents, not including any packaging, etc."
#~ msgstr ""
#~ "Le poids du contenu en kilogrammes, sans compter tout emballage, etc."

#~ msgid "Unit(s)"
#~ msgstr "Unité(s)"

#~ msgid ""
#~ "Weight of the product, packaging not included. The unit of measure can be "
#~ "changed in the general settings"
#~ msgstr ""
#~ "Poids du produit, sans le conditionnement. L'unité de mesure peut être "
#~ "changée dans les paramètres généraux."
57 changes: 57 additions & 0 deletions product_net_weight/i18n/it.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:
# * product_net_weight
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-10-29 15:40+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 4.17\n"

#. module: product_net_weight
#: model:ir.model.fields,field_description:product_net_weight.field_product_product__weight
#: model:ir.model.fields,field_description:product_net_weight.field_product_template__weight
msgid "Gross Weight"
msgstr "Peso lordo"

#. module: product_net_weight
#: model:ir.model.fields,field_description:product_net_weight.field_product_product__net_weight
#: model:ir.model.fields,field_description:product_net_weight.field_product_template__net_weight
msgid "Net Weight"
msgstr "Peso netto"

#. module: product_net_weight
#: model:ir.model.fields,help:product_net_weight.field_product_product__net_weight
#: model:ir.model.fields,help:product_net_weight.field_product_template__net_weight
msgid "Net Weight of the product, container excluded."
msgstr "Peso netto del prodotto, escluso contenitore."

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

#. module: product_net_weight
#: model:ir.model,name:product_net_weight.model_product_product
msgid "Product Variant"
msgstr "Variante prodotto"

#. module: product_net_weight
#: model:product.template,name:product_net_weight.product_strawberry_jam_product_template
msgid "Strawberry Jam (Jar of 250 grams)"
msgstr "Marmellata di fragole (vasetto da 250 grammi)"

#. module: product_net_weight
#. odoo-python
#: code:addons/product_net_weight/models/product_product.py:0
#, python-format
msgid "The net weight of product must be lower than gross weight."
msgstr "Il peso netto del prodotto deve essere inferiore al peso lordo."
Loading