mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
Initial commit of stock_picklist for 11.0
This commit is contained in:
13
stock_picklist/models/stock_picking_batch.py
Normal file
13
stock_picklist/models/stock_picking_batch.py
Normal file
@@ -0,0 +1,13 @@
|
||||
from odoo import api, fields, models, _
|
||||
from odoo.exceptions import UserError
|
||||
|
||||
|
||||
class StockPickingBatch(models.Model):
|
||||
_inherit = 'stock.picking.batch'
|
||||
|
||||
@api.multi
|
||||
def print_pick_list(self):
|
||||
pickings = self.mapped('picking_ids')
|
||||
if not pickings:
|
||||
raise UserError(_('Nothing to print.'))
|
||||
return self.env.ref('stock_picklist.picklist').report_action(pickings, data=None, config=False)
|
||||
Reference in New Issue
Block a user