[FIX] stock: remove action_traceability method on lot fixes #22299
This commit is contained in:
@@ -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'}
|
||||
|
||||
Reference in New Issue
Block a user