[FIX] mrp, stock: adapt traceability for mrp unbuild
This commit is contained in:
@@ -10,4 +10,12 @@ class MrpStockReport(models.TransientModel):
|
||||
res_model = 'mrp.production'
|
||||
res_id = move_line.production_id.id
|
||||
ref = move_line.production_id.name
|
||||
if move_line.move_id.unbuild_id:
|
||||
res_model = 'mrp.unbuild'
|
||||
res_id = move_line.move_id.unbuild_id.id
|
||||
ref = move_line.move_id.unbuild_id.name
|
||||
if move_line.move_id.consume_unbuild_id:
|
||||
res_model = 'mrp.unbuild'
|
||||
res_id = move_line.move_id.consume_unbuild_id.id
|
||||
ref = move_line.move_id.consume_unbuild_id.name
|
||||
return res_model, res_id, ref
|
||||
|
||||
@@ -37,6 +37,11 @@
|
||||
<a t-att-data-active-id="l.res_id" t-att-data-res-model="l.res_model" class="o_stock_reports_web_action"><t t-raw="c" /></a>
|
||||
</span>
|
||||
</t>
|
||||
<t t-if="l.res_model == 'mrp.unbuild' and l.reference == c">
|
||||
<span t-if="c">
|
||||
<a t-att-data-active-id="l.res_id" t-att-data-res-model="l.res_model" class="o_stock_reports_web_action"><t t-raw="c" /></a>
|
||||
</span>
|
||||
</t>
|
||||
<t t-if="l.res_model == 'mrp.repair' and l.reference == c">
|
||||
<span t-if="c">
|
||||
<a t-att-data-active-id="l.res_id" t-att-data-res-model="l.res_model" class="o_stock_reports_web_action"><t t-raw="c" /></a>
|
||||
|
||||
Reference in New Issue
Block a user