Skip to content

Commit

Permalink
[IMP] packaging_uom: pre-commit auto fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
gaelTorrecillas committed Jan 16, 2025
1 parent 010da80 commit 23d2b40
Show file tree
Hide file tree
Showing 16 changed files with 110 additions and 97 deletions.
58 changes: 32 additions & 26 deletions packaging_uom/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,20 @@ Packaging UOM
: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/14.0/packaging_uom
:target: https://github.com/OCA/product-attribute/tree/18.0/packaging_uom
: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-14-0/product-attribute-14-0-packaging_uom
:target: https://translation.odoo-community.org/projects/product-attribute-18-0/product-attribute-18-0-packaging_uom
: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=14.0
:target: https://runboat.odoo-community.org/builds?repo=OCA/product-attribute&target_branch=18.0
:alt: Try me on Runboat

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

This module was written to use unit of measure instead of quantity by package
in the definition of packaging.
The goal is to ease the use of packaging in sale and purchase.
This module was written to use unit of measure instead of quantity by
package in the definition of packaging. The goal is to ease the use of
packaging in sale and purchase.

**Table of contents**

Expand All @@ -42,64 +42,70 @@ Configuration

To configure this module, you need to:

* on product packaging define the unit of measure to use.
- on product packaging define the unit of measure to use.

Usage
=====



Changelog
=========

0.1 (2015-08-04)
~~~~~~~~~~~~~~~~
----------------

* rename packaging_extended to packaging_uom
- rename packaging_extended to packaging_uom

10.0.1.0.0 (2017-03-09)
~~~~~~~~~~~~~~~~~~~~~~~
-----------------------

* [MIG] packaging_uom, purchase_packaging, sale_packaging: Migrated to 10.0
- [MIG] packaging_uom, purchase_packaging, sale_packaging: Migrated to
10.0

11.0.1.0.0 (2018-08-28)
~~~~~~~~~~~~~~~~~~~~~~~
-----------------------

* [MIG] packaging_uom: Migration to 11.0
- [MIG] packaging_uom: Migration to 11.0

12.0.1.0.0 (2019-05-27)
~~~~~~~~~~~~~~~~~~~~~~~
-----------------------

* [MIG] packaging_uom: Migration to 12.0
- [MIG] packaging_uom: Migration to 12.0

13.0.1.0.0 (2020-02-13)
~~~~~~~~~~~~~~~~~~~~~~~
-----------------------

* [MIG] packaging_uom: Migration to 13.0
- [MIG] packaging_uom: Migration to 13.0

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:%20packaging_uom%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/product-attribute/issues/new?body=module:%20packaging_uom%0Aversion:%2018.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
~~~~~~~
-------

* ACSONE SA/NV

Contributors
~~~~~~~~~~~~
------------

* Laetitia Gangloff <[email protected]>
* Laurent Mignon <[email protected]>
* Juan Humanes <[email protected]>
* Denis Roussel <[email protected]>
- Laetitia Gangloff <[email protected]>
- Laurent Mignon <[email protected]>
- Juan Humanes <[email protected]>
- Denis Roussel <[email protected]>

Maintainers
~~~~~~~~~~~
-----------

This module is maintained by the OCA.

Expand All @@ -119,6 +125,6 @@ Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-rousseldenis|

This module is part of the `OCA/product-attribute <https://github.com/OCA/product-attribute/tree/14.0/packaging_uom>`_ project on GitHub.
This module is part of the `OCA/product-attribute <https://github.com/OCA/product-attribute/tree/18.0/packaging_uom>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 1 addition & 1 deletion packaging_uom/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Packaging UOM",
"version": "14.0.1.0.1",
"version": "18.0.1.0.0",
"author": "ACSONE SA/NV, Odoo Community Association (OCA)",
"category": "Warehouse",
"development_status": "Production/Stable",
Expand Down
2 changes: 1 addition & 1 deletion packaging_uom/models/product_packaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def _inverse_qty(self):
if not uom_id:
uom_id = packaging.uom_id.create(
{
"name": "{} {}".format(category_id.name, qty),
"name": f"{category_id.name} {qty}",
"category_id": category_id.id,
"rounding": packaging.product_id.uom_id.rounding,
"uom_type": "bigger",
Expand Down
3 changes: 3 additions & 0 deletions packaging_uom/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
3 changes: 3 additions & 0 deletions packaging_uom/readme/CONFIGURE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
To configure this module, you need to:

- on product packaging define the unit of measure to use.
3 changes: 0 additions & 3 deletions packaging_uom/readme/CONFIGURE.rst

This file was deleted.

4 changes: 4 additions & 0 deletions packaging_uom/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- Laetitia Gangloff \<[email protected]\>
- Laurent Mignon \<[email protected]\>
- Juan Humanes \<[email protected]\>
- Denis Roussel \<[email protected]\>
4 changes: 0 additions & 4 deletions packaging_uom/readme/CONTRIBUTORS.rst

This file was deleted.

3 changes: 3 additions & 0 deletions packaging_uom/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
This module was written to use unit of measure instead of quantity by
package in the definition of packaging. The goal is to ease the use of
packaging in sale and purchase.
3 changes: 0 additions & 3 deletions packaging_uom/readme/DESCRIPTION.rst

This file was deleted.

20 changes: 20 additions & 0 deletions packaging_uom/readme/HISTORY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
## 0.1 (2015-08-04)

- rename packaging_extended to packaging_uom

## 10.0.1.0.0 (2017-03-09)

- \[MIG\] packaging_uom, purchase_packaging, sale_packaging: Migrated to
10.0

## 11.0.1.0.0 (2018-08-28)

- \[MIG\] packaging_uom: Migration to 11.0

## 12.0.1.0.0 (2019-05-27)

- \[MIG\] packaging_uom: Migration to 12.0

## 13.0.1.0.0 (2020-02-13)

- \[MIG\] packaging_uom: Migration to 13.0
24 changes: 0 additions & 24 deletions packaging_uom/readme/HISTORY.rst

This file was deleted.

1 change: 1 addition & 0 deletions packaging_uom/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Empty file removed packaging_uom/readme/USAGE.rst
Empty file.
75 changes: 41 additions & 34 deletions packaging_uom/static/description/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
Expand All @@ -9,10 +8,11 @@

/*
:Author: David Goodger ([email protected])
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
:Copyright: This stylesheet has been placed in the public domain.
Default cascading style sheet for the HTML output of Docutils.
Despite the name, some widely supported CSS2 features are used.
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
customize this style sheet.
Expand Down Expand Up @@ -275,7 +275,7 @@
margin-left: 2em ;
margin-right: 2em }

pre.code .ln { color: grey; } /* line numbers */
pre.code .ln { color: gray; } /* line numbers */
pre.code, code { background-color: #eeeeee }
pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
Expand All @@ -301,7 +301,7 @@
span.pre {
white-space: pre }

span.problematic {
span.problematic, pre.problematic {
color: red }

span.section-subtitle {
Expand Down Expand Up @@ -369,27 +369,28 @@ <h1 class="title">Packaging UOM</h1>
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:dd4cf8419b78ecd63dafaab25a0dd69551d4b90fd82ed7c19dffd37d22cbb182
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Production/Stable" src="https://img.shields.io/badge/maturity-Production%2FStable-green.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/14.0/packaging_uom"><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-14-0/product-attribute-14-0-packaging_uom"><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=14.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module was written to use unit of measure instead of quantity by package
in the definition of packaging.
The goal is to ease the use of packaging in sale and purchase.</p>
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Production/Stable" src="https://img.shields.io/badge/maturity-Production%2FStable-green.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/18.0/packaging_uom"><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-18-0/product-attribute-18-0-packaging_uom"><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=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module was written to use unit of measure instead of quantity by
package in the definition of packaging. The goal is to ease the use of
packaging in sale and purchase.</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
<li><a class="reference internal" href="#configuration" id="toc-entry-1">Configuration</a></li>
<li><a class="reference internal" href="#changelog" id="toc-entry-2">Changelog</a><ul>
<li><a class="reference internal" href="#section-1" id="toc-entry-3">0.1 (2015-08-04)</a></li>
<li><a class="reference internal" href="#section-2" id="toc-entry-4">10.0.1.0.0 (2017-03-09)</a></li>
<li><a class="reference internal" href="#section-3" id="toc-entry-5">11.0.1.0.0 (2018-08-28)</a></li>
<li><a class="reference internal" href="#section-4" id="toc-entry-6">12.0.1.0.0 (2019-05-27)</a></li>
<li><a class="reference internal" href="#section-5" id="toc-entry-7">13.0.1.0.0 (2020-02-13)</a></li>
<li><a class="reference internal" href="#usage" id="toc-entry-2">Usage</a></li>
<li><a class="reference internal" href="#changelog" id="toc-entry-3">Changelog</a><ul>
<li><a class="reference internal" href="#section-1" id="toc-entry-4">0.1 (2015-08-04)</a></li>
<li><a class="reference internal" href="#section-2" id="toc-entry-5">10.0.1.0.0 (2017-03-09)</a></li>
<li><a class="reference internal" href="#section-3" id="toc-entry-6">11.0.1.0.0 (2018-08-28)</a></li>
<li><a class="reference internal" href="#section-4" id="toc-entry-7">12.0.1.0.0 (2019-05-27)</a></li>
<li><a class="reference internal" href="#section-5" id="toc-entry-8">13.0.1.0.0 (2020-02-13)</a></li>
</ul>
</li>
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-8">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="toc-entry-9">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="toc-entry-10">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="toc-entry-11">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="toc-entry-12">Maintainers</a></li>
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-9">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="toc-entry-10">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="toc-entry-11">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="toc-entry-12">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="toc-entry-13">Maintainers</a></li>
</ul>
</li>
</ul>
Expand All @@ -401,57 +402,61 @@ <h1><a class="toc-backref" href="#toc-entry-1">Configuration</a></h1>
<li>on product packaging define the unit of measure to use.</li>
</ul>
</div>
<div class="section" id="usage">
<h1><a class="toc-backref" href="#toc-entry-2">Usage</a></h1>
</div>
<div class="section" id="changelog">
<h1><a class="toc-backref" href="#toc-entry-2">Changelog</a></h1>
<h1><a class="toc-backref" href="#toc-entry-3">Changelog</a></h1>
<div class="section" id="section-1">
<h2><a class="toc-backref" href="#toc-entry-3">0.1 (2015-08-04)</a></h2>
<h2><a class="toc-backref" href="#toc-entry-4">0.1 (2015-08-04)</a></h2>
<ul class="simple">
<li>rename packaging_extended to packaging_uom</li>
</ul>
</div>
<div class="section" id="section-2">
<h2><a class="toc-backref" href="#toc-entry-4">10.0.1.0.0 (2017-03-09)</a></h2>
<h2><a class="toc-backref" href="#toc-entry-5">10.0.1.0.0 (2017-03-09)</a></h2>
<ul class="simple">
<li>[MIG] packaging_uom, purchase_packaging, sale_packaging: Migrated to 10.0</li>
<li>[MIG] packaging_uom, purchase_packaging, sale_packaging: Migrated to
10.0</li>
</ul>
</div>
<div class="section" id="section-3">
<h2><a class="toc-backref" href="#toc-entry-5">11.0.1.0.0 (2018-08-28)</a></h2>
<h2><a class="toc-backref" href="#toc-entry-6">11.0.1.0.0 (2018-08-28)</a></h2>
<ul class="simple">
<li>[MIG] packaging_uom: Migration to 11.0</li>
</ul>
</div>
<div class="section" id="section-4">
<h2><a class="toc-backref" href="#toc-entry-6">12.0.1.0.0 (2019-05-27)</a></h2>
<h2><a class="toc-backref" href="#toc-entry-7">12.0.1.0.0 (2019-05-27)</a></h2>
<ul class="simple">
<li>[MIG] packaging_uom: Migration to 12.0</li>
</ul>
</div>
<div class="section" id="section-5">
<h2><a class="toc-backref" href="#toc-entry-7">13.0.1.0.0 (2020-02-13)</a></h2>
<h2><a class="toc-backref" href="#toc-entry-8">13.0.1.0.0 (2020-02-13)</a></h2>
<ul class="simple">
<li>[MIG] packaging_uom: Migration to 13.0</li>
</ul>
</div>
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#toc-entry-8">Bug Tracker</a></h1>
<h1><a class="toc-backref" href="#toc-entry-9">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/product-attribute/issues">GitHub Issues</a>.
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
<a class="reference external" href="https://github.com/OCA/product-attribute/issues/new?body=module:%20packaging_uom%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<a class="reference external" href="https://github.com/OCA/product-attribute/issues/new?body=module:%20packaging_uom%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
<h1><a class="toc-backref" href="#toc-entry-9">Credits</a></h1>
<h1><a class="toc-backref" href="#toc-entry-10">Credits</a></h1>
<div class="section" id="authors">
<h2><a class="toc-backref" href="#toc-entry-10">Authors</a></h2>
<h2><a class="toc-backref" href="#toc-entry-11">Authors</a></h2>
<ul class="simple">
<li>ACSONE SA/NV</li>
</ul>
</div>
<div class="section" id="contributors">
<h2><a class="toc-backref" href="#toc-entry-11">Contributors</a></h2>
<h2><a class="toc-backref" href="#toc-entry-12">Contributors</a></h2>
<ul class="simple">
<li>Laetitia Gangloff &lt;<a class="reference external" href="mailto:laetitia.gangloff&#64;acsone.eu">laetitia.gangloff&#64;acsone.eu</a>&gt;</li>
<li>Laurent Mignon &lt;<a class="reference external" href="mailto:laurent.mignon&#64;acsone.eu">laurent.mignon&#64;acsone.eu</a>&gt;</li>
Expand All @@ -460,15 +465,17 @@ <h2><a class="toc-backref" href="#toc-entry-11">Contributors</a></h2>
</ul>
</div>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#toc-entry-12">Maintainers</a></h2>
<h2><a class="toc-backref" href="#toc-entry-13">Maintainers</a></h2>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
<a class="reference external image-reference" href="https://odoo-community.org">
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
</a>
<p>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.</p>
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
<p><a class="reference external image-reference" href="https://github.com/rousseldenis"><img alt="rousseldenis" src="https://github.com/rousseldenis.png?size=40px" /></a></p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/product-attribute/tree/14.0/packaging_uom">OCA/product-attribute</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/product-attribute/tree/18.0/packaging_uom">OCA/product-attribute</a> project on GitHub.</p>
<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>
</div>
</div>
Expand Down
Loading

0 comments on commit 23d2b40

Please sign in to comment.