Skip to content

Commit 630bb6f

Browse files
[MIG] stock_picking_mass_action: Continue migration to v16
1 parent 011ea5c commit 630bb6f

File tree

5 files changed

+16
-38
lines changed

5 files changed

+16
-38
lines changed

stock_picking_mass_action/README.rst

+7-6
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Stock Picking Mass Action
77
!! This file is generated by oca-gen-addon-readme !!
88
!! changes will be overwritten. !!
99
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10-
!! source digest: sha256:479c7779260791788dac894277567def0e1e3307d0939ae28f702079d62d0c27
10+
!! source digest: sha256:b57b3cafa5f50bc5967e3ef6148a19d0efd2c7dd1e89d2359df5db9953f04f41
1111
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1212
1313
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
@@ -22,10 +22,9 @@ Stock Picking Mass Action
2222
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
2323
:target: https://translation.odoo-community.org/projects/stock-logistics-workflow-16-0/stock-logistics-workflow-16-0-stock_picking_mass_action
2424
:alt: Translate me on Weblate
25-
26-
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
27-
:target: https://runbot.odoo-community.org/runbot/154/16.0
28-
:alt: Try me on Runbot
25+
.. |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
27+
:alt: Try me on Runboat
2928

3029
|badge1| |badge2| |badge3| |badge4| |badge5|
3130

@@ -66,7 +65,7 @@ Bug Tracker
6665
Bugs are tracked on `GitHub Issues <https://github.com/OCA/stock-logistics-workflow/issues>`_.
6766
In case of trouble, please check there if your issue has already been reported.
6867
If you spotted it first, help us to smash it by providing a detailed and welcomed
69-
`feedback <https://github.com/OCA/stock-logistics-workflow/issues/new?body=module:%20stock_picking_mass_action%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
68+
`feedback <https://github.com/OCA/stock-logistics-workflow/issues/new?body=module:%20stock_picking_mass_action%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
7069

7170
Do not contact contributors directly about support or help with technical issues.
7271

@@ -89,6 +88,8 @@ Contributors
8988
* Vicent Cubells
9089
* Carlos Dauden
9190
* Sergio Teruel
91+
* Carolina Fernandez
92+
* Pau Sanchez (pau.sanchez@qubiq.es)
9293

9394
Maintainers
9495
~~~~~~~~~~~

stock_picking_mass_action/readme/CONTRIBUTORS.rst

+1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@
44
* Vicent Cubells
55
* Carlos Dauden
66
* Sergio Teruel
7+
* Carolina Fernandez
78
* Pau Sanchez (pau.sanchez@qubiq.es)

stock_picking_mass_action/static/description/index.html

+7-5
Original file line numberDiff line numberDiff line change
@@ -367,9 +367,9 @@ <h1 class="title">Stock Picking Mass Action</h1>
367367
!! This file is generated by oca-gen-addon-readme !!
368368
!! changes will be overwritten. !!
369369
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
370-
!! source digest: sha256:479c7779260791788dac894277567def0e1e3307d0939ae28f702079d62d0c27
370+
!! source digest: sha256:b57b3cafa5f50bc5967e3ef6148a19d0efd2c7dd1e89d2359df5db9953f04f41
371371
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
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/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/stock-logistics-workflow/tree/15.0/stock_picking_mass_action"><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-15-0/stock-logistics-workflow-15-0-stock_picking_mass_action"><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=15.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
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/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/stock-logistics-workflow/tree/16.0/stock_picking_mass_action"><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_mass_action"><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>
373373
<p>Facilities to check the availability of stock picking list:</p>
374374
<ul>
375375
<li><p class="first">A wizard which allows on multiple stock pickings at a time to:</p>
@@ -413,7 +413,7 @@ <h1><a class="toc-backref" href="#toc-entry-2">Bug Tracker</a></h1>
413413
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/stock-logistics-workflow/issues">GitHub Issues</a>.
414414
In case of trouble, please check there if your issue has already been reported.
415415
If you spotted it first, help us to smash it by providing a detailed and welcomed
416-
<a class="reference external" href="https://github.com/OCA/stock-logistics-workflow/issues/new?body=module:%20stock_picking_mass_action%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
416+
<a class="reference external" href="https://github.com/OCA/stock-logistics-workflow/issues/new?body=module:%20stock_picking_mass_action%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
417417
<p>Do not contact contributors directly about support or help with technical issues.</p>
418418
</div>
419419
<div class="section" id="credits">
@@ -434,7 +434,9 @@ <h2><a class="toc-backref" href="#toc-entry-5">Contributors</a></h2>
434434
<li><a class="reference external" href="https://www.tecnativa.com">Tecnativa</a>:
435435
* Vicent Cubells
436436
* Carlos Dauden
437-
* Sergio Teruel</li>
437+
* Sergio Teruel
438+
* Carolina Fernandez</li>
439+
<li>Pau Sanchez (<a class="reference external" href="mailto:pau.sanchez&#64;qubiq.es">pau.sanchez&#64;qubiq.es</a>)</li>
438440
</ul>
439441
</div>
440442
<div class="section" id="maintainers">
@@ -444,7 +446,7 @@ <h2><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h2>
444446
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
445447
mission is to support the collaborative development of Odoo features and
446448
promote its widespread use.</p>
447-
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/stock-logistics-workflow/tree/15.0/stock_picking_mass_action">OCA/stock-logistics-workflow</a> project on GitHub.</p>
449+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/stock-logistics-workflow/tree/16.0/stock_picking_mass_action">OCA/stock-logistics-workflow</a> project on GitHub.</p>
448450
<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>
449451
</div>
450452
</div>

stock_picking_mass_action/wizard/mass_action.py

-16
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ class StockPickingMassAction(TransientModel):
1111
_name = "stock.picking.mass.action"
1212
_description = "Stock Picking Mass Action"
1313

14-
@api.model
15-
def _default_check_availability(self):
16-
return self.env.context.get("check_availability", False)
17-
1814
@api.model
1915
def _default_transfer(self):
2016
return self.env.context.get("transfer", False)
@@ -27,11 +23,6 @@ def _default_picking_ids(self):
2723
default=True,
2824
help="check this box if you want to mark as Todo the" " selected Pickings.",
2925
)
30-
check_availability = fields.Boolean(
31-
default=lambda self: self._default_check_availability(),
32-
help="check this box if you want to check the availability of"
33-
" the selected Pickings.",
34-
)
3526
transfer = fields.Boolean(
3627
default=lambda self: self._default_transfer(),
3728
help="check this box if you want to transfer all the selected"
@@ -56,13 +47,6 @@ def mass_action(self):
5647
).sorted(key=lambda r: r.scheduled_date)
5748
draft_picking_lst.action_confirm()
5849

59-
# check availability if asked
60-
if self.check_availability:
61-
pickings_to_check = self.picking_ids.filtered(
62-
lambda x: x.state not in ["draft", "cancel", "done"]
63-
).sorted(key=lambda r: r.scheduled_date)
64-
pickings_to_check.action_assign()
65-
6650
# Get all pickings ready to transfer and transfer them if asked
6751
if self.transfer:
6852
assigned_picking_lst = self.picking_ids.filtered(

stock_picking_mass_action/wizard/mass_action_view.xml

+1-11
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
<form string="Mass Action for the selected stock picking">
77
<group>
88
<field name="confirm" />
9-
<field name="check_availability" />
109
<field name="transfer" />
1110
</group>
1211
<footer>
@@ -30,22 +29,13 @@
3029
<field name="target">new</field>
3130
<field name="binding_model_id" ref="stock.model_stock_picking" />
3231
</record>
33-
<!-- Check Availability Action -->
34-
<record id="action_check_availability" model="ir.actions.act_window">
35-
<field name="name">Check Availability</field>
36-
<field name="res_model">stock.picking.mass.action</field>
37-
<field name="view_mode">form</field>
38-
<field name="target">new</field>
39-
<field name="context">{'check_availability': 1}</field>
40-
<field name="binding_model_id" ref="stock.model_stock_picking" />
41-
</record>
4232
<!-- Transfer Action -->
4333
<record id="action_transfer" model="ir.actions.act_window">
4434
<field name="name">Transfer</field>
4535
<field name="res_model">stock.picking.mass.action</field>
4636
<field name="view_mode">form</field>
4737
<field name="target">new</field>
48-
<field name="context">{'check_availability': 1, 'transfer': 1,}</field>
38+
<field name="context">{'transfer': 1}</field>
4939
<field name="binding_model_id" ref="stock.model_stock_picking" />
5040
</record>
5141
</odoo>

0 commit comments

Comments
 (0)