Skip to content

Commit

Permalink
Revert "[REM] stock_voucher: web action multi usage"
Browse files Browse the repository at this point in the history
This reverts commit 354f2f6.
  • Loading branch information
nicomacr committed Dec 19, 2022
1 parent b400806 commit 5ba5f98
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 5 deletions.
2 changes: 1 addition & 1 deletion stock_voucher/__manifest__.py
Expand Up @@ -30,7 +30,7 @@
],
'depends': [
'sale_stock',
# 'web_ir_actions_act_multi',
'web_ir_actions_act_multi',
],
'data': [
'security/stock_voucher_security.xml',
Expand Down
16 changes: 14 additions & 2 deletions stock_voucher/wizards/stock_backorder_confirmation.py
Expand Up @@ -20,7 +20,13 @@ def process(self):
# TODO we should also fix odoo methods
self._context.get('picking_ids')).filtered('book_required')
if pickings:
return pickings.do_print_voucher()
return {
'actions': [
{'type': 'ir.actions.act_window_close'},
picking.do_print_voucher(),
],
'type': 'ir.actions.act_multi',
}

def process_cancel_backorder(self):
super().process_cancel_backorder()
Expand All @@ -31,4 +37,10 @@ def process_cancel_backorder(self):
# TODO we should also fix odoo methods
self._context.get('picking_ids')).filtered('book_required')
if pickings:
return pickings.do_print_voucher()
return {
'actions': [
{'type': 'ir.actions.act_window_close'},
picking.do_print_voucher(),
],
'type': 'ir.actions.act_multi',
}
8 changes: 7 additions & 1 deletion stock_voucher/wizards/stock_immediate_transfer.py
Expand Up @@ -20,6 +20,12 @@ def process(self):
# si hay backorder se termina imprimiendo desde el backorder
# confirmation
if pickings:
return pickings.do_print_voucher()
return {
'actions': [
res,
picking.do_print_voucher(),
],
'type': 'ir.actions.act_multi',
}
else:
return res
8 changes: 7 additions & 1 deletion stock_voucher/wizards/stock_print_stock_voucher.py
Expand Up @@ -87,7 +87,13 @@ def assign_numbers(self):

def do_print_and_assign(self):
self.assign_numbers()
return self.do_print_voucher()
return {
'actions': [
{'type': 'ir.actions.act_window_close'},
self.do_print_voucher(),
],
'type': 'ir.actions.act_multi',
}

def do_clean(self):
self.picking_id.clean_voucher_data()

0 comments on commit 5ba5f98

Please sign in to comment.