[FIX] stock: remove action_traceability method on lot fixes #22299

This commit is contained in:
Josse Colpaert
2018-02-21 17:14:13 +01:00
parent cb53485d71
commit 6ec6d3e8a1
@@ -42,17 +42,3 @@ class ProductionLot(models.Model):
# We only care for the quants in internal or transit locations.
quants = self.quant_ids.filtered(lambda q: q.location_id.usage in ['internal', 'transit'])
self.product_qty = sum(quants.mapped('quantity'))
@api.multi
def action_traceability(self):
move_ids = self.mapped('quant_ids').mapped('history_ids').ids
if not move_ids:
return False
return {
'domain': [('id', 'in', move_ids)],
'name': _('Traceability'),
'view_mode': 'tree,form',
'view_type': 'form',
'context': {'tree_view_ref': 'stock.view_move_tree'},
'res_model': 'stock.move',
'type': 'ir.actions.act_window'}