2018-01-16 11:34:37 +01:00
|
|
|
from flectra import models, api
|
2018-01-16 06:58:15 +01:00
|
|
|
|
|
|
|
class MrpStockReport(models.TransientModel):
|
|
|
|
_inherit = 'stock.traceability.report'
|
|
|
|
|
|
|
|
@api.model
|
|
|
|
def get_links(self, move_line):
|
|
|
|
res_model, res_id, ref = super(MrpStockReport, self).get_links(move_line)
|
|
|
|
if move_line.move_id.repair_id:
|
|
|
|
res_model = 'mrp.repair'
|
|
|
|
res_id = move_line.move_id.repair_id.id
|
|
|
|
ref = move_line.move_id.repair_id.name
|
|
|
|
return res_model, res_id, ref
|