Skip to content

Commit 6fe203d

Browse files
committed
[IMP] sell_only_by_packaging: pre-commit auto fixes
1 parent f1a9930 commit 6fe203d

13 files changed

Lines changed: 122 additions & 96 deletions

File tree

sell_only_by_packaging/README.rst

Lines changed: 42 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -17,28 +17,32 @@ Sell Only By 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%2Fsale--workflow-lightgray.png?logo=github
20-
:target: https://github.com/OCA/sale-workflow/tree/16.0/sell_only_by_packaging
20+
:target: https://github.com/OCA/sale-workflow/tree/18.0/sell_only_by_packaging
2121
:alt: OCA/sale-workflow
2222
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23-
:target: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sell_only_by_packaging
23+
:target: https://translation.odoo-community.org/projects/sale-workflow-18-0/sale-workflow-18-0-sell_only_by_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/sale-workflow&target_branch=16.0
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/sale-workflow&target_branch=18.0
2727
:alt: Try me on Runboat
2828

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

31-
This module provides different configuration option to manage packagings on
32-
sale orders.
31+
This module provides different configuration option to manage packagings
32+
on sale orders.
3333

34-
The creation/update of sale order line will be blocked (by constraints) if the data on the
35-
sale.order.line does not fit with the configuration of the product's packagings.
34+
The creation/update of sale order line will be blocked (by constraints)
35+
if the data on the sale.order.line does not fit with the configuration
36+
of the product's packagings.
3637

37-
It's also possible to force the quantity to sell during creation/modification of the sale order line
38-
if the "Force sale quantity" is ticked on the packaging and the "Sell only by packaging" is ticked on product.
38+
It's also possible to force the quantity to sell during
39+
creation/modification of the sale order line if the "Force sale
40+
quantity" is ticked on the packaging and the "Sell only by packaging" is
41+
ticked on product.
3942

40-
For example, if your packaging is set to sell by 5 units and the employee fill
41-
the quantity with 3, the quantity will be automatically replaced by 5 (it always rounds up).
43+
For example, if your packaging is set to sell by 5 units and the
44+
employee fill the quantity with 3, the quantity will be automatically
45+
replaced by 5 (it always rounds up).
4246

4347
.. IMPORTANT::
4448
This is an alpha version, the data model and design can change at any time without warning.
@@ -53,58 +57,61 @@ the quantity with 3, the quantity will be automatically replaced by 5 (it always
5357
Configuration
5458
=============
5559

56-
Following options are available to define which packaging level can be sold and
57-
which product can only be sold by packaging.
60+
Following options are available to define which packaging level can be
61+
sold and which product can only be sold by packaging.
5862

59-
* Sell only by packaging: On product template model, this checkbox restricts
60-
sales of these products if no packaging is selected on the sale order line.
61-
If no packaging is selected, it will either be auto-assigned if the quantity
62-
on the sale order line matches a packaging quantity or an error will be raised.
63-
64-
* Force sale quantity (on the packaging): force rounds up the quantity during
65-
creation/modification of the sale order line with the factor set on the packaging.
63+
- Sell only by packaging: On product template model, this checkbox
64+
restricts sales of these products if no packaging is selected on the
65+
sale order line. If no packaging is selected, it will either be
66+
auto-assigned if the quantity on the sale order line matches a
67+
packaging quantity or an error will be raised.
68+
- Force sale quantity (on the packaging): force rounds up the quantity
69+
during creation/modification of the sale order line with the factor
70+
set on the packaging.
6671

6772
Bug Tracker
6873
===========
6974

7075
Bugs are tracked on `GitHub Issues <https://github.com/OCA/sale-workflow/issues>`_.
7176
In case of trouble, please check there if your issue has already been reported.
7277
If you spotted it first, help us to smash it by providing a detailed and welcomed
73-
`feedback <https://github.com/OCA/sale-workflow/issues/new?body=module:%20sell_only_by_packaging%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
78+
`feedback <https://github.com/OCA/sale-workflow/issues/new?body=module:%20sell_only_by_packaging%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
7479

7580
Do not contact contributors directly about support or help with technical issues.
7681

7782
Credits
7883
=======
7984

8085
Authors
81-
~~~~~~~
86+
-------
8287

8388
* Camptocamp
8489
* BCIM
8590

8691
Contributors
87-
~~~~~~~~~~~~
92+
------------
8893

89-
* Akim Juillerat <akim.juillerat@camptocamp.com>
90-
* Jacques-Etienne Baudoux (BCIM) <je@bcim.be>
91-
* Thomas Nowicki <thomas.nowicki@camptocamp.com>
92-
* François Honoré <francois.honore@acsone.eu>
93-
* Hiep (Nguyen Hoang) <hiepnh@trobz.com>
94-
* Phuc (Tran Thanh) <phuc@trobz.com>
95-
* Duong (Tran Quoc) <duongtq@trobz.com>
94+
- Akim Juillerat <akim.juillerat@camptocamp.com>
95+
- Jacques-Etienne Baudoux (BCIM) <je@bcim.be>
96+
- Thomas Nowicki <thomas.nowicki@camptocamp.com>
97+
- François Honoré <francois.honore@acsone.eu>
98+
- Hiep (Nguyen Hoang) <hiepnh@trobz.com>
99+
- Phuc (Tran Thanh) <phuc@trobz.com>
100+
- Duong (Tran Quoc) <duongtq@trobz.com>
96101

97102
Other credits
98-
~~~~~~~~~~~~~
103+
-------------
99104

100105
The development of this module has been financially supported by:
101106

102-
* Camptocamp
107+
- Camptocamp
103108

104-
This module feature was extracted from the original `sale-workflow/sale_by_packaging <https://github.com/oca/sale-workflow/tree/14.0/sale_by_packaging>`_ module.
109+
This module feature was extracted from the original
110+
`sale-workflow/sale_by_packaging <https://github.com/oca/sale-workflow/tree/14.0/sale_by_packaging>`__
111+
module.
105112

106113
Maintainers
107-
~~~~~~~~~~~
114+
-----------
108115

109116
This module is maintained by the OCA.
110117

@@ -116,6 +123,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
116123
mission is to support the collaborative development of Odoo features and
117124
promote its widespread use.
118125

119-
This module is part of the `OCA/sale-workflow <https://github.com/OCA/sale-workflow/tree/16.0/sell_only_by_packaging>`_ project on GitHub.
126+
This module is part of the `OCA/sale-workflow <https://github.com/OCA/sale-workflow/tree/18.0/sell_only_by_packaging>`_ project on GitHub.
120127

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

sell_only_by_packaging/models/sale_order_line.py

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

88

99
class SaleOrderLine(models.Model):
10-
1110
_inherit = "sale.order.line"
1211

1312
@api.constrains(
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: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Following options are available to define which packaging level can be
2+
sold and which product can only be sold by packaging.
3+
4+
- Sell only by packaging: On product template model, this checkbox
5+
restricts sales of these products if no packaging is selected on the
6+
sale order line. If no packaging is selected, it will either be
7+
auto-assigned if the quantity on the sale order line matches a
8+
packaging quantity or an error will be raised.
9+
- Force sale quantity (on the packaging): force rounds up the quantity
10+
during creation/modification of the sale order line with the factor
11+
set on the packaging.

sell_only_by_packaging/readme/CONFIGURE.rst

Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
- Akim Juillerat \<<akim.juillerat@camptocamp.com>\>
2+
- Jacques-Etienne Baudoux (BCIM) \<<je@bcim.be>\>
3+
- Thomas Nowicki \<<thomas.nowicki@camptocamp.com>\>
4+
- François Honoré \<<francois.honore@acsone.eu>\>
5+
- Hiep (Nguyen Hoang) \<<hiepnh@trobz.com>\>
6+
- Phuc (Tran Thanh) \<<phuc@trobz.com>\>
7+
- Duong (Tran Quoc) \<<duongtq@trobz.com>\>

sell_only_by_packaging/readme/CONTRIBUTORS.rst

Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
The development of this module has been financially supported by:
2+
3+
- Camptocamp
4+
5+
This module feature was extracted from the original
6+
[sale-workflow/sale_by_packaging](https://github.com/oca/sale-workflow/tree/14.0/sale_by_packaging)
7+
module.

sell_only_by_packaging/readme/CREDITS.rst

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
This module provides different configuration option to manage packagings
2+
on sale orders.
3+
4+
The creation/update of sale order line will be blocked (by constraints)
5+
if the data on the sale.order.line does not fit with the configuration
6+
of the product's packagings.
7+
8+
It's also possible to force the quantity to sell during
9+
creation/modification of the sale order line if the "Force sale
10+
quantity" is ticked on the packaging and the "Sell only by packaging" is
11+
ticked on product.
12+
13+
For example, if your packaging is set to sell by 5 units and the
14+
employee fill the quantity with 3, the quantity will be automatically
15+
replaced by 5 (it always rounds up).

0 commit comments

Comments
 (0)