Skip to content

Commit aa93955

Browse files
committed
[MIG] migration stock_picking_batch_extended from 15.0 to 16.0
1 parent dca1c25 commit aa93955

38 files changed

+2824
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,5 @@ docs/_build/
7272

7373
# OCA rules
7474
!static/lib/
75+
76+
setup/stock_picking_batch_extended/
Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
1+
============================
2+
Stock batch picking extended
3+
============================
4+
5+
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
6+
!! This file is generated by oca-gen-addon-readme !!
7+
!! changes will be overwritten. !!
8+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
9+
10+
.. |badge1| image:: https://img.shields.io/badge/maturity-Mature-brightgreen.png
11+
:target: https://odoo-community.org/page/development-status
12+
:alt: Mature
13+
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
14+
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
15+
:alt: License: AGPL-3
16+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fstock--logistics--workflow-lightgray.png?logo=github
17+
:target: https://github.com/OCA/stock-logistics-workflow/tree/15.0/stock_picking_batch_extended
18+
:alt: OCA/stock-logistics-workflow
19+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
20+
:target: https://translation.odoo-community.org/projects/stock-logistics-workflow-15-0/stock-logistics-workflow-15-0-stock_picking_batch_extended
21+
:alt: Translate me on Weblate
22+
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
23+
:target: https://runbot.odoo-community.org/runbot/154/15.0
24+
:alt: Try me on Runbot
25+
26+
|badge1| |badge2| |badge3| |badge4| |badge5|
27+
28+
This module is based on `picking_dispatch <https://github.com/OCA/stock-logistics-workflow/tree/8.0/picking_dispatch>`_
29+
but reworked for matching Odoo new picking system (with pack operations).
30+
31+
Since v12 it is compatible with odoo addon https://github.com/odoo/odoo/blob/12.0/addons/stock_picking_batch/models/stock_picking_batch.py
32+
It allows to define which approach for batch handling will be used per company.
33+
By default after installation this option will be activated for all companies, you can disable
34+
it in settings.
35+
36+
Batch picking allows you to manage several pickings at the same time.
37+
You can create a batch with all pickings selected or multiple batch depends on
38+
a group field selected in wizard.
39+
40+
After having created a batch with a list of stock picking, you can:
41+
42+
* Check availability and reserve quants for all pickings
43+
* Mark all pickings as done when delivery is done.
44+
* Make partial delivery by filling done quantities in pack operations tab.
45+
* Print a report to pick the proper goods at once
46+
47+
.. figure:: https://raw.githubusercontent.com/OCA/stock-logistics-workflow/11.0/stock_batch_picking/static/stock_picking_list.png
48+
:alt: Sample report template
49+
:width: 80 %
50+
:align: center
51+
52+
.. figure:: https://raw.githubusercontent.com/OCA/stock-logistics-workflow/11.0/stock_batch_picking/static/batch_wizard.png
53+
:alt: Sample report template
54+
:width: 80 %
55+
:align: center
56+
57+
.. figure:: https://raw.githubusercontent.com/OCA/stock-logistics-workflow/11.0/stock_batch_picking/static/batch_form.png
58+
:alt: Sample report template
59+
:width: 80 %
60+
:align: center
61+
62+
.. figure:: https://raw.githubusercontent.com/OCA/stock-logistics-workflow/11.0/stock_batch_picking/static/batch_form_operation.png
63+
:alt: Sample report template
64+
:width: 80 %
65+
:align: center
66+
67+
**Table of contents**
68+
69+
.. contents::
70+
:local:
71+
72+
Bug Tracker
73+
===========
74+
75+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/stock-logistics-workflow/issues>`_.
76+
In case of trouble, please check there if your issue has already been reported.
77+
If you spotted it first, help us smashing it by providing a detailed and welcomed
78+
`feedback <https://github.com/OCA/stock-logistics-workflow/issues/new?body=module:%20stock_picking_batch_extended%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
79+
80+
Do not contact contributors directly about support or help with technical issues.
81+
82+
Credits
83+
=======
84+
85+
Authors
86+
~~~~~~~
87+
88+
* Camptocamp
89+
* Tecnativa
90+
91+
Contributors
92+
~~~~~~~~~~~~
93+
94+
**picking_dispatch**
95+
96+
* Peter Langenberg <[email protected]>
97+
* Rudolf Schnapka <[email protected]>
98+
* Matthieu Dietrich <[email protected]>
99+
* Romain Deheele <[email protected]>
100+
* Leonardo Pistone <[email protected]>
101+
* Guewen Baconnier <[email protected]>
102+
* Yannick Vaucher <[email protected]>
103+
* Alexandre Fayolle <[email protected]>
104+
* Joël Grand-Guillaume <[email protected]>
105+
* Cyril Gaudin <[email protected]>
106+
* Iryna Vyshnevska <[email protected]>
107+
108+
**stock_batch_picking**
109+
110+
* `Camptocamp <https://www.camptocamp.com>`_:
111+
112+
* Cyril Gaudin
113+
114+
* `Tecnativa <https://www.tecnativa.com>`_:
115+
116+
* Carlos Dauden
117+
* Sergio Teruel
118+
* César A. Sánchez
119+
120+
* `Trobz <https://trobz.com>`_:
121+
122+
* Son Ho <[email protected]>
123+
124+
Other credits
125+
~~~~~~~~~~~~~
126+
127+
The migration of this module from 13.0 to 14.0 was financially supported by Camptocamp
128+
129+
Maintainers
130+
~~~~~~~~~~~
131+
132+
This module is maintained by the OCA.
133+
134+
.. image:: https://odoo-community.org/logo.png
135+
:alt: Odoo Community Association
136+
:target: https://odoo-community.org
137+
138+
OCA, or the Odoo Community Association, is a nonprofit organization whose
139+
mission is to support the collaborative development of Odoo features and
140+
promote its widespread use.
141+
142+
.. |maintainer-gurneyalex| image:: https://github.com/gurneyalex.png?size=40px
143+
:target: https://github.com/gurneyalex
144+
:alt: gurneyalex
145+
.. |maintainer-carlosdauden| image:: https://github.com/carlosdauden.png?size=40px
146+
:target: https://github.com/carlosdauden
147+
:alt: carlosdauden
148+
.. |maintainer-i-vyshnevska| image:: https://github.com/i-vyshnevska.png?size=40px
149+
:target: https://github.com/i-vyshnevska
150+
:alt: i-vyshnevska
151+
152+
Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:
153+
154+
|maintainer-gurneyalex| |maintainer-carlosdauden| |maintainer-i-vyshnevska|
155+
156+
This module is part of the `OCA/stock-logistics-workflow <https://github.com/OCA/stock-logistics-workflow/tree/15.0/stock_picking_batch_extended>`_ project on GitHub.
157+
158+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
2+
3+
from . import models
4+
from . import report
5+
from . import wizard
6+
from .hooks import post_init_hook
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Copyright 2017 FactorLibre - Boris Alias
2+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
3+
4+
{
5+
"name": "Stock batch picking extended",
6+
"summary": "Allows manage a lot of pickings in batch",
7+
"version": "16.0.1.0.0",
8+
"author": "FactorLibre, " "Odoo Community Association (OCA)",
9+
"maintainers": ["boris"],
10+
"category": "Warehouse Management",
11+
"depends": ["stock_picking_batch", "delivery"],
12+
"website": "https://github.com/OCA/stock-logistics-workflow",
13+
"data": [
14+
"security/ir.model.access.csv",
15+
"data/batch_picking_actions_server.xml",
16+
"views/stock_batch_picking.xml",
17+
"views/product_product.xml",
18+
"views/report_batch_picking.xml",
19+
"views/stock_warehouse.xml",
20+
"views/stock_picking.xml",
21+
"views/res_config_settings_views.xml",
22+
"wizard/stock_picking_to_batch_views.xml",
23+
],
24+
"application": False,
25+
"auto_install": False,
26+
"license": "AGPL-3",
27+
"post_init_hook": "post_init_hook",
28+
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<odoo>
3+
<!-- Stock Batch Picking - Print Picking Operations -->
4+
<record id="action_print_batch_picking_operations" model="ir.actions.server">
5+
<field name="name">Print Picking Operations</field>
6+
<field name="model_id" ref="stock_picking_batch.model_stock_picking_batch" />
7+
<field
8+
name="binding_model_id"
9+
ref="stock_picking_batch.model_stock_picking_batch"
10+
/>
11+
<field name="type">ir.actions.server</field>
12+
<field name="state">code</field>
13+
<field name="code">
14+
pickings = records.mapped('picking_ids').filtered(lambda p: p.state != 'cancel')
15+
action = env['ir.actions.report'].sudo()._get_report_from_name('stock.report_picking').report_action(pickings)
16+
</field>
17+
</record>
18+
<!-- Stock Batch Picking - Print Delivery Slip -->
19+
<record id="action_print_batch_delivery_slip" model="ir.actions.server">
20+
<field name="name">Print Delivery Slip</field>
21+
<field name="model_id" ref="stock_picking_batch.model_stock_picking_batch" />
22+
<field
23+
name="binding_model_id"
24+
ref="stock_picking_batch.model_stock_picking_batch"
25+
/>
26+
<field name="state">code</field>
27+
<field name="code">
28+
pickings = records.mapped('picking_ids').filtered(lambda p: p.state != 'cancel')
29+
action = env['ir.actions.report'].sudo()._get_report_from_name('stock.report_delivery').report_action(pickings)
30+
</field>
31+
</record>
32+
<record model="ir.actions.server" id="action_stock_batch_picking_assign_all">
33+
<field name="name">Reserve All</field>
34+
<field name="model_id" ref="stock_picking_batch.model_stock_picking_batch" />
35+
<field
36+
name="binding_model_id"
37+
ref="stock_picking_batch.model_stock_picking_batch"
38+
/>
39+
<field name="state">code</field>
40+
<field name="code">
41+
for record in records:
42+
record.action_assign()
43+
</field>
44+
</record>
45+
</odoo>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
2+
3+
from odoo import SUPERUSER_ID, api
4+
5+
6+
def post_init_hook(cr, registry):
7+
env = api.Environment(cr, SUPERUSER_ID, {})
8+
company = env["res.company"].search([])
9+
company.write({"use_oca_batch_validation": True})

0 commit comments

Comments
 (0)