diff --git a/stock_usability/procurement.py b/stock_usability/procurement.py index 3e7fb33..f097437 100644 --- a/stock_usability/procurement.py +++ b/stock_usability/procurement.py @@ -51,8 +51,9 @@ class ProcurementGroup(models.Model): # If I don't do an explicit cr.commit(), it doesn't create # the procurement.scheduler.log... I don't know why self._cr.commit() - except: - logger.warning('Could not create procurement.scheduler.log') + except Exception as e: + logger.warning( + 'Could not create procurement.scheduler.log (error: %s)', e) return res diff --git a/stock_usability/stock.py b/stock_usability/stock.py index 9d87e61..333816a 100644 --- a/stock_usability/stock.py +++ b/stock_usability/stock.py @@ -78,7 +78,8 @@ class StockMove(models.Model): in it''' res = [] for line in self: - name = '%s > %s' % (line.location_id.name, line.location_dest_id.name) + name = '%s > %s' % ( + line.location_id.name, line.location_dest_id.name) if line.product_id.code: name = '%s: %s' % (line.product_id.code, name) if line.picking_id.origin: @@ -112,3 +113,13 @@ class ProcurementGroup(models.Model): picking_ids = fields.One2many( 'stock.picking', 'group_id', string='Pickings', readonly=True) + + +class StockQuant(models.Model): + _inherit = 'stock.quant' + + def action_stock_move_lines_reserved(self): + self.ensure_one() + action = self.action_view_stock_moves() + action['context'] = {'search_default_todo': True} + return action diff --git a/stock_usability/stock_view.xml b/stock_usability/stock_view.xml index 5a70fa2..707213c 100644 --- a/stock_usability/stock_view.xml +++ b/stock_usability/stock_view.xml @@ -235,6 +235,24 @@ + + stock_usability.stock.move.line.tree + stock.move.line + + + + + + + 1 + + + + + + {'search_default_done': 1} + + stock.usability.warehouse.form stock.warehouse @@ -266,6 +284,10 @@ + + @@ -333,6 +355,16 @@ should be able to access it. So I add a menu entry under Inventory Control. --> + + stock.usability.quant.form + stock.quant + + +
+
+
+
parent="stock.menu_stock_inventory_control" sequence="135"/> + + {} + + +