Skip to content

Commit ba0767a

Browse files
committed
[MIG] stock_picking_to_batch_group_fields: Migration to 18.0
MT-11850
1 parent 0372291 commit ba0767a

File tree

9 files changed

+59
-76
lines changed

9 files changed

+59
-76
lines changed

stock_picking_to_batch_group_fields/README.rst

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,31 +10,26 @@ Stock Picking To Batch Group Field
1010
!! source digest: sha256:958d5588f5eb42cdd38e4875cb99bfe19014da755878e820ce73a148fe2991ef
1111
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1212
13-
.. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png
13+
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
1414
:target: https://odoo-community.org/page/development-status
15-
:alt: Alpha
15+
:alt: Beta
1616
.. |badge2| image:: https://img.shields.io/badge/licence-LGPL--3-blue.png
1717
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
1818
:alt: License: LGPL-3
1919
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fstock--logistics--workflow-lightgray.png?logo=github
20-
:target: https://github.com/OCA/stock-logistics-workflow/tree/16.0/stock_picking_to_batch_group_fields
20+
:target: https://github.com/OCA/stock-logistics-workflow/tree/18.0/stock_picking_to_batch_group_fields
2121
:alt: OCA/stock-logistics-workflow
2222
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23-
:target: https://translation.odoo-community.org/projects/stock-logistics-workflow-16-0/stock-logistics-workflow-16-0-stock_picking_to_batch_group_fields
23+
:target: https://translation.odoo-community.org/projects/stock-logistics-workflow-18-0/stock-logistics-workflow-18-0-stock_picking_to_batch_group_fields
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/stock-logistics-workflow&target_branch=16.0
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/stock-logistics-workflow&target_branch=18.0
2727
:alt: Try me on Runboat
2828

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

31-
This module extends the functionality of the picking batchs and allows
32-
you to manually group picking by any field in the model.
33-
34-
.. IMPORTANT::
35-
This is an alpha version, the data model and design can change at any time without warning.
36-
Only for development or testing purpose, do not use in production.
37-
`More details on development status <https://odoo-community.org/page/development-status>`_
31+
This module extends the functionality of the picking batch and allows
32+
you to manually group pickings by any field in the model.
3833

3934
**Table of contents**
4035

@@ -47,19 +42,19 @@ Use Cases / Context
4742
Currently this module
4843
`stock_picking_batch_extended <https://github.com/OCA/stock-logistics-workflow/tree/16.0/stock_picking_batch_extended>`__
4944
includes this functionality but to make it work it is necessary to
50-
activate the OCA batches, which forces to use other behaviours than
45+
activate the OCA batches, which forces to use other behaviors than
5146
Odoo's for the picking batches.
5247

5348
It will be useful for you if you want to make the grouping of pickings
54-
manually using any field of the delivery note.
49+
manually using any field of the delivery order.
5550

5651
Configuration
5752
=============
5853

5954
To configure this module, you need to:
6055

6156
1. Go to Inventory > Configuration > Settings > Operations.
62-
2. Activate Batch Transfers
57+
2. Activate Batch, Wave & Cluster Transfers
6358

6459
Usage
6560
=====
@@ -75,15 +70,15 @@ To use this module, you need to:
7570
7. Click on **Confirm**.
7671
8. Multiple batches will be created by grouping the picking by the
7772
fields you selected.
78-
9. Fields you selected will be save for the next time.
73+
9. Fields you selected are saved and will be loaded for the next time.
7974

8075
Bug Tracker
8176
===========
8277

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

8883
Do not contact contributors directly about support or help with technical issues.
8984

@@ -98,8 +93,8 @@ Authors
9893
Contributors
9994
------------
10095

101-
- Emilio Pascual (`Moduon <https://www.moduon.team/>`__)
102-
- Rafael Blasco (`Moduon <https://www.moduon.team/>`__)
96+
- Emilio Pascual (`Moduon <https://www.moduon.team/>`__)
97+
- Rafael Blasco (`Moduon <https://www.moduon.team/>`__)
10398

10499
Maintainers
105100
-----------
@@ -122,6 +117,6 @@ Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
122117

123118
|maintainer-EmilioPascual|
124119

125-
This module is part of the `OCA/stock-logistics-workflow <https://github.com/OCA/stock-logistics-workflow/tree/16.0/stock_picking_to_batch_group_fields>`_ project on GitHub.
120+
This module is part of the `OCA/stock-logistics-workflow <https://github.com/OCA/stock-logistics-workflow/tree/18.0/stock_picking_to_batch_group_fields>`_ project on GitHub.
126121

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

stock_picking_to_batch_group_fields/__manifest__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
{
55
"name": "Stock Picking To Batch Group Field",
66
"summary": "Allows to create batches grouped by picking fields.",
7-
"version": "16.0.1.0.1",
8-
"development_status": "Alpha",
7+
"version": "18.0.1.0.1",
8+
"development_status": "Beta",
99
"category": "Inventory/Delivery",
1010
"website": "https://github.com/OCA/stock-logistics-workflow",
1111
"author": "Moduon, Odoo Community Association (OCA)",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
To configure this module, you need to:
22

33
1. Go to Inventory > Configuration > Settings > Operations.
4-
2. Activate Batch Transfers
4+
2. Activate Batch, Wave & Cluster Transfers
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
Currently this module [stock_picking_batch_extended](https://github.com/OCA/stock-logistics-workflow/tree/16.0/stock_picking_batch_extended) includes this functionality but to make it work it is necessary to activate the OCA batches, which forces to use other behaviours than Odoo's for the picking batches.
1+
Currently this module [stock_picking_batch_extended](https://github.com/OCA/stock-logistics-workflow/tree/16.0/stock_picking_batch_extended) includes this functionality but to make it work it is necessary to activate the OCA batches, which forces to use other behaviors than Odoo's for the picking batches.
22

3-
It will be useful for you if you want to make the grouping of pickings manually using any field of the delivery note.
3+
It will be useful for you if you want to make the grouping of pickings manually using any field of the delivery order.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
This module extends the functionality of the picking batchs and allows you to manually group picking by any field in the model.
1+
This module extends the functionality of the picking batch and allows you to manually group pickings by any field in the model.

stock_picking_to_batch_group_fields/readme/USAGE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ To use this module, you need to:
88
6. Select the fields you want to group by.
99
7. Click on **Confirm**.
1010
8. Multiple batches will be created by grouping the picking by the fields you selected.
11-
9. Fields you selected will be save for the next time.
11+
9. Fields you selected are saved and will be loaded for the next time.

stock_picking_to_batch_group_fields/static/description/index.html

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@
88

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

277-
pre.code .ln { color: grey; } /* line numbers */
278+
pre.code .ln { color: gray; } /* line numbers */
278279
pre.code, code { background-color: #eeeeee }
279280
pre.code .comment, code .comment { color: #5C6576 }
280281
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
@@ -300,7 +301,7 @@
300301
span.pre {
301302
white-space: pre }
302303

303-
span.problematic {
304+
span.problematic, pre.problematic {
304305
color: red }
305306

306307
span.section-subtitle {
@@ -368,15 +369,9 @@ <h1 class="title">Stock Picking To Batch Group Field</h1>
368369
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
369370
!! source digest: sha256:958d5588f5eb42cdd38e4875cb99bfe19014da755878e820ce73a148fe2991ef
370371
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
371-
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Alpha" src="https://img.shields.io/badge/maturity-Alpha-red.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/stock-logistics-workflow/tree/16.0/stock_picking_to_batch_group_fields"><img alt="OCA/stock-logistics-workflow" src="https://img.shields.io/badge/github-OCA%2Fstock--logistics--workflow-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/stock-logistics-workflow-16-0/stock-logistics-workflow-16-0-stock_picking_to_batch_group_fields"><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/stock-logistics-workflow&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 extends the functionality of the picking batchs and allows
373-
you to manually group picking by any field in the model.</p>
374-
<div class="admonition important">
375-
<p class="first admonition-title">Important</p>
376-
<p class="last">This is an alpha version, the data model and design can change at any time without warning.
377-
Only for development or testing purpose, do not use in production.
378-
<a class="reference external" href="https://odoo-community.org/page/development-status">More details on development status</a></p>
379-
</div>
372+
<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/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/stock-logistics-workflow/tree/18.0/stock_picking_to_batch_group_fields"><img alt="OCA/stock-logistics-workflow" src="https://img.shields.io/badge/github-OCA%2Fstock--logistics--workflow-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/stock-logistics-workflow-18-0/stock-logistics-workflow-18-0-stock_picking_to_batch_group_fields"><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/stock-logistics-workflow&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
373+
<p>This module extends the functionality of the picking batch and allows
374+
you to manually group pickings by any field in the model.</p>
380375
<p><strong>Table of contents</strong></p>
381376
<div class="contents local topic" id="contents">
382377
<ul class="simple">
@@ -397,17 +392,17 @@ <h1><a class="toc-backref" href="#toc-entry-1">Use Cases / Context</a></h1>
397392
<p>Currently this module
398393
<a class="reference external" href="https://github.com/OCA/stock-logistics-workflow/tree/16.0/stock_picking_batch_extended">stock_picking_batch_extended</a>
399394
includes this functionality but to make it work it is necessary to
400-
activate the OCA batches, which forces to use other behaviours than
395+
activate the OCA batches, which forces to use other behaviors than
401396
Odoo’s for the picking batches.</p>
402397
<p>It will be useful for you if you want to make the grouping of pickings
403-
manually using any field of the delivery note.</p>
398+
manually using any field of the delivery order.</p>
404399
</div>
405400
<div class="section" id="configuration">
406401
<h1><a class="toc-backref" href="#toc-entry-2">Configuration</a></h1>
407402
<p>To configure this module, you need to:</p>
408403
<ol class="arabic simple">
409404
<li>Go to Inventory &gt; Configuration &gt; Settings &gt; Operations.</li>
410-
<li>Activate Batch Transfers</li>
405+
<li>Activate Batch, Wave &amp; Cluster Transfers</li>
411406
</ol>
412407
</div>
413408
<div class="section" id="usage">
@@ -423,15 +418,15 @@ <h1><a class="toc-backref" href="#toc-entry-3">Usage</a></h1>
423418
<li>Click on <strong>Confirm</strong>.</li>
424419
<li>Multiple batches will be created by grouping the picking by the
425420
fields you selected.</li>
426-
<li>Fields you selected will be save for the next time.</li>
421+
<li>Fields you selected are saved and will be loaded for the next time.</li>
427422
</ol>
428423
</div>
429424
<div class="section" id="bug-tracker">
430425
<h1><a class="toc-backref" href="#toc-entry-4">Bug Tracker</a></h1>
431426
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/stock-logistics-workflow/issues">GitHub Issues</a>.
432427
In case of trouble, please check there if your issue has already been reported.
433428
If you spotted it first, help us to smash it by providing a detailed and welcomed
434-
<a class="reference external" href="https://github.com/OCA/stock-logistics-workflow/issues/new?body=module:%20stock_picking_to_batch_group_fields%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
429+
<a class="reference external" href="https://github.com/OCA/stock-logistics-workflow/issues/new?body=module:%20stock_picking_to_batch_group_fields%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
435430
<p>Do not contact contributors directly about support or help with technical issues.</p>
436431
</div>
437432
<div class="section" id="credits">
@@ -452,13 +447,15 @@ <h2><a class="toc-backref" href="#toc-entry-7">Contributors</a></h2>
452447
<div class="section" id="maintainers">
453448
<h2><a class="toc-backref" href="#toc-entry-8">Maintainers</a></h2>
454449
<p>This module is maintained by the OCA.</p>
455-
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
450+
<a class="reference external image-reference" href="https://odoo-community.org">
451+
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
452+
</a>
456453
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
457454
mission is to support the collaborative development of Odoo features and
458455
promote its widespread use.</p>
459456
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
460457
<p><a class="reference external image-reference" href="https://github.com/EmilioPascual"><img alt="EmilioPascual" src="https://github.com/EmilioPascual.png?size=40px" /></a></p>
461-
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/stock-logistics-workflow/tree/16.0/stock_picking_to_batch_group_fields">OCA/stock-logistics-workflow</a> project on GitHub.</p>
458+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/stock-logistics-workflow/tree/18.0/stock_picking_to_batch_group_fields">OCA/stock-logistics-workflow</a> project on GitHub.</p>
462459
<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>
463460
</div>
464461
</div>

stock_picking_to_batch_group_fields/tests/test_batch_group_field.py

Lines changed: 17 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,20 @@
33

44

55
from odoo.exceptions import UserError
6-
from odoo.tests.common import TransactionCase
76

7+
from odoo.addons.stock.tests.common import TestStockCommon
88

9-
class StockPickingToBatchGroupField(TransactionCase):
9+
10+
class StockPickingToBatchGroupField(TestStockCommon):
1011
@classmethod
1112
def setUpClass(cls):
1213
super().setUpClass()
13-
cls.Product = cls.env["product.product"]
14-
cls.picking_model = cls.env["stock.picking"]
15-
cls.batch_model = cls.env["stock.picking.batch"]
16-
cls.picking_type_out = cls.env.ref("stock.picking_type_out")
17-
cls.stock_loc = cls.env.ref("stock.stock_location_stock")
18-
cls.customer_loc = cls.env.ref("stock.stock_location_customers")
19-
cls.productA = cls.Product.create({"name": "Product A", "type": "consu"})
20-
cls.productB = cls.Product.create({"name": "Product A", "type": "product"})
21-
cls.pickingA = cls.picking_model.with_context(planned=True).create(
14+
cls.BatchObject = cls.env["stock.picking.batch"]
15+
cls.pickingA = cls.PickingObj.with_context(planned=True).create(
2216
{
23-
"picking_type_id": cls.picking_type_out.id,
24-
"location_id": cls.stock_loc.id,
25-
"location_dest_id": cls.customer_loc.id,
17+
"picking_type_id": cls.picking_type_out,
18+
"location_id": cls.stock_location,
19+
"location_dest_id": cls.customer_location,
2620
"origin": "A",
2721
"move_ids": [
2822
(
@@ -32,18 +26,18 @@ def setUpClass(cls):
3226
"name": "Test move",
3327
"product_id": cls.productA.id,
3428
"product_uom_qty": 1,
35-
"location_id": cls.stock_loc.id,
36-
"location_dest_id": cls.customer_loc.id,
29+
"location_id": cls.stock_location,
30+
"location_dest_id": cls.customer_location,
3731
},
3832
)
3933
],
4034
}
4135
)
42-
cls.pickingB = cls.picking_model.with_context(planned=True).create(
36+
cls.pickingB = cls.PickingObj.with_context(planned=True).create(
4337
{
44-
"picking_type_id": cls.picking_type_out.id,
45-
"location_id": cls.stock_loc.id,
46-
"location_dest_id": cls.customer_loc.id,
38+
"picking_type_id": cls.picking_type_out,
39+
"location_id": cls.stock_location,
40+
"location_dest_id": cls.customer_location,
4741
"origin": "B",
4842
"move_ids": [
4943
(
@@ -53,15 +47,15 @@ def setUpClass(cls):
5347
"name": "Test move",
5448
"product_id": cls.productB.id,
5549
"product_uom_qty": 1,
56-
"location_id": cls.stock_loc.id,
57-
"location_dest_id": cls.customer_loc.id,
50+
"location_id": cls.stock_location,
51+
"location_dest_id": cls.customer_location,
5852
},
5953
)
6054
],
6155
}
6256
)
6357
cls.pickings = cls.pickingA + cls.pickingB
64-
cls.batch = cls.batch_model.create({})
58+
cls.batch = cls.BatchObject.create({})
6559

6660
def test_sptb_existing_batch(self):
6761
"""Add pickings to existing batch"""

0 commit comments

Comments
 (0)