Skip to content

Commit 18c02e4

Browse files
[IMP] product_total_weight_from_packaging: pre-commit auto fixes
1 parent 333f877 commit 18c02e4

File tree

9 files changed

+61
-55
lines changed

9 files changed

+61
-55
lines changed

product_total_weight_from_packaging/README.rst

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -17,31 +17,32 @@ Product Total Weight From Packaging
1717
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
1818
:alt: License: AGPL-3
1919
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fproduct--attribute-lightgray.png?logo=github
20-
:target: https://github.com/OCA/product-attribute/tree/16.0/product_total_weight_from_packaging
20+
:target: https://github.com/OCA/product-attribute/tree/17.0/product_total_weight_from_packaging
2121
:alt: OCA/product-attribute
2222
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23-
:target: https://translation.odoo-community.org/projects/product-attribute-16-0/product-attribute-16-0-product_total_weight_from_packaging
23+
:target: https://translation.odoo-community.org/projects/product-attribute-17-0/product-attribute-17-0-product_total_weight_from_packaging
2424
:alt: Translate me on Weblate
2525
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
26-
:target: https://runboat.odoo-community.org/builds?repo=OCA/product-attribute&target_branch=16.0
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/product-attribute&target_branch=17.0
2727
:alt: Try me on Runboat
2828

2929
|badge1| |badge2| |badge3| |badge4| |badge5|
3030

31-
This module provides a function to estimate the weight of a given quantity of a product,
32-
taking into account the product packaging's weights and return the weight in the product uom.
31+
This module provides a function to estimate the weight of a given
32+
quantity of a product, taking into account the product packaging's
33+
weights and return the weight in the product uom.
3334

34-
It uses the module `stock_packaging_calculator` to get weight from product packagings
35-
having a weight defined first and fallback on product weight field
36-
if no weight is defined on any of the packaging.
35+
It uses the module stock_packaging_calculator to get weight from product
36+
packagings having a weight defined first and fallback on product weight
37+
field if no weight is defined on any of the packaging.
3738

38-
.. warning::
39+
Warning
3940

40-
This module is lacking the weight uom conversions as it depends on
41-
*product_packaging_dimension* that depends on *product_logistics_uom*
42-
that allows to set a uom on the weight.
41+
This module is lacking the weight uom conversions as it depends on
42+
*product_packaging_dimension* that depends on *product_logistics_uom*
43+
that allows to set a uom on the weight.
4344

44-
**The sum in this module is assuming all weights are in kg**.
45+
**The sum in this module is assuming all weights are in kg**.
4546

4647
**Table of contents**
4748

@@ -54,32 +55,33 @@ Bug Tracker
5455
Bugs are tracked on `GitHub Issues <https://github.com/OCA/product-attribute/issues>`_.
5556
In case of trouble, please check there if your issue has already been reported.
5657
If you spotted it first, help us to smash it by providing a detailed and welcomed
57-
`feedback <https://github.com/OCA/product-attribute/issues/new?body=module:%20product_total_weight_from_packaging%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
58+
`feedback <https://github.com/OCA/product-attribute/issues/new?body=module:%20product_total_weight_from_packaging%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
5859

5960
Do not contact contributors directly about support or help with technical issues.
6061

6162
Credits
6263
=======
6364

6465
Authors
65-
~~~~~~~
66+
-------
6667

6768
* Camptocamp
6869

6970
Contributors
70-
~~~~~~~~~~~~
71+
------------
7172

72-
* Akim Juillerat <akim.juillerat@camptocamp.com>
73-
* Hughes Damry <hughes.damry@acsone.eu>
74-
* Duong (Tran Quoc) <duongtq@trobz.com>
73+
- Akim Juillerat <akim.juillerat@camptocamp.com>
74+
- Hughes Damry <hughes.damry@acsone.eu>
75+
- Duong (Tran Quoc) <duongtq@trobz.com>
7576

7677
Other credits
77-
~~~~~~~~~~~~~
78+
-------------
7879

79-
The migration of this module from 14.0 to 16.0 was financially supported by Camptocamp
80+
The migration of this module from 14.0 to 16.0 was financially supported
81+
by Camptocamp
8082

8183
Maintainers
82-
~~~~~~~~~~~
84+
-----------
8385

8486
This module is maintained by the OCA.
8587

@@ -91,6 +93,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
9193
mission is to support the collaborative development of Odoo features and
9294
promote its widespread use.
9395

94-
This module is part of the `OCA/product-attribute <https://github.com/OCA/product-attribute/tree/16.0/product_total_weight_from_packaging>`_ project on GitHub.
96+
This module is part of the `OCA/product-attribute <https://github.com/OCA/product-attribute/tree/17.0/product_total_weight_from_packaging>`_ project on GitHub.
9597

9698
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

product_total_weight_from_packaging/models/product.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55

66
class ProductProduct(models.Model):
7-
87
_inherit = "product.product"
98

109
def get_total_weight_from_packaging(self, qty):
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build-system]
2+
requires = ["whool"]
3+
build-backend = "whool.buildapi"
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
- Akim Juillerat \<<akim.juillerat@camptocamp.com>\>
2+
- Hughes Damry \<<hughes.damry@acsone.eu>\>
3+
- Duong (Tran Quoc) \<<duongtq@trobz.com>\>

product_total_weight_from_packaging/readme/CONTRIBUTORS.rst

Lines changed: 0 additions & 3 deletions
This file was deleted.

product_total_weight_from_packaging/readme/CREDITS.rst renamed to product_total_weight_from_packaging/readme/CREDITS.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
The migration of this module from 14.0 to 16.0 was financially supported by Camptocamp
1+
The migration of this module from 14.0 to 16.0 was financially supported
2+
by Camptocamp
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
This module provides a function to estimate the weight of a given
2+
quantity of a product, taking into account the product packaging's
3+
weights and return the weight in the product uom.
4+
5+
It uses the module stock_packaging_calculator to get weight from product
6+
packagings having a weight defined first and fallback on product weight
7+
field if no weight is defined on any of the packaging.
8+
9+
Warning
10+
11+
This module is lacking the weight uom conversions as it depends on
12+
*product_packaging_dimension* that depends on *product_logistics_uom*
13+
that allows to set a uom on the weight.
14+
15+
**The sum in this module is assuming all weights are in kg**.

product_total_weight_from_packaging/readme/DESCRIPTION.rst

Lines changed: 0 additions & 14 deletions
This file was deleted.

product_total_weight_from_packaging/static/description/index.html

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -368,19 +368,18 @@ <h1 class="title">Product Total Weight From Packaging</h1>
368368
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
369369
!! source digest: sha256:29313755b0e2b616deb440b26d6197e8dc54f95855a7295865e6fdbb89482314
370370
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
371-
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/product-attribute/tree/16.0/product_total_weight_from_packaging"><img alt="OCA/product-attribute" src="https://img.shields.io/badge/github-OCA%2Fproduct--attribute-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/product-attribute-16-0/product-attribute-16-0-product_total_weight_from_packaging"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/product-attribute&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
372-
<p>This module provides a function to estimate the weight of a given quantity of a product,
373-
taking into account the product packaging’s weights and return the weight in the product uom.</p>
374-
<p>It uses the module <cite>stock_packaging_calculator</cite> to get weight from product packagings
375-
having a weight defined first and fallback on product weight field
376-
if no weight is defined on any of the packaging.</p>
377-
<div class="admonition warning">
378-
<p class="first admonition-title">Warning</p>
371+
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/product-attribute/tree/17.0/product_total_weight_from_packaging"><img alt="OCA/product-attribute" src="https://img.shields.io/badge/github-OCA%2Fproduct--attribute-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/product-attribute-17-0/product-attribute-17-0-product_total_weight_from_packaging"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/product-attribute&amp;target_branch=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
372+
<p>This module provides a function to estimate the weight of a given
373+
quantity of a product, taking into account the product packaging’s
374+
weights and return the weight in the product uom.</p>
375+
<p>It uses the module stock_packaging_calculator to get weight from product
376+
packagings having a weight defined first and fallback on product weight
377+
field if no weight is defined on any of the packaging.</p>
378+
<p>Warning</p>
379379
<p>This module is lacking the weight uom conversions as it depends on
380380
<em>product_packaging_dimension</em> that depends on <em>product_logistics_uom</em>
381381
that allows to set a uom on the weight.</p>
382-
<p class="last"><strong>The sum in this module is assuming all weights are in kg</strong>.</p>
383-
</div>
382+
<p><strong>The sum in this module is assuming all weights are in kg</strong>.</p>
384383
<p><strong>Table of contents</strong></p>
385384
<div class="contents local topic" id="contents">
386385
<ul class="simple">
@@ -399,7 +398,7 @@ <h1><a class="toc-backref" href="#toc-entry-1">Bug Tracker</a></h1>
399398
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/product-attribute/issues">GitHub Issues</a>.
400399
In case of trouble, please check there if your issue has already been reported.
401400
If you spotted it first, help us to smash it by providing a detailed and welcomed
402-
<a class="reference external" href="https://github.com/OCA/product-attribute/issues/new?body=module:%20product_total_weight_from_packaging%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
401+
<a class="reference external" href="https://github.com/OCA/product-attribute/issues/new?body=module:%20product_total_weight_from_packaging%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
403402
<p>Do not contact contributors directly about support or help with technical issues.</p>
404403
</div>
405404
<div class="section" id="credits">
@@ -420,7 +419,8 @@ <h2><a class="toc-backref" href="#toc-entry-4">Contributors</a></h2>
420419
</div>
421420
<div class="section" id="other-credits">
422421
<h2><a class="toc-backref" href="#toc-entry-5">Other credits</a></h2>
423-
<p>The migration of this module from 14.0 to 16.0 was financially supported by Camptocamp</p>
422+
<p>The migration of this module from 14.0 to 16.0 was financially supported
423+
by Camptocamp</p>
424424
</div>
425425
<div class="section" id="maintainers">
426426
<h2><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h2>
@@ -429,7 +429,7 @@ <h2><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h2>
429429
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
430430
mission is to support the collaborative development of Odoo features and
431431
promote its widespread use.</p>
432-
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/product-attribute/tree/16.0/product_total_weight_from_packaging">OCA/product-attribute</a> project on GitHub.</p>
432+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/product-attribute/tree/17.0/product_total_weight_from_packaging">OCA/product-attribute</a> project on GitHub.</p>
433433
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
434434
</div>
435435
</div>

0 commit comments

Comments
 (0)