mirror of
https://github.com/bringout/oca-ocb-mrp.git
synced 2026-04-26 00:32:01 +02:00
19.0 vanilla
This commit is contained in:
parent
accf5918df
commit
6e65e8c877
688 changed files with 225434 additions and 199401 deletions
|
|
@ -1,16 +1,17 @@
|
|||
from odoo import models, api
|
||||
|
||||
class MrpStockReport(models.TransientModel):
|
||||
|
||||
class StockTraceabilityReport(models.TransientModel):
|
||||
_inherit = 'stock.traceability.report'
|
||||
|
||||
@api.model
|
||||
def _get_reference(self, move_line):
|
||||
res_model, res_id, ref = super(MrpStockReport, self)._get_reference(move_line)
|
||||
if move_line.move_id.production_id and not move_line.move_id.scrapped:
|
||||
res_model, res_id, ref = super()._get_reference(move_line)
|
||||
if move_line.move_id.production_id and move_line.move_id.location_dest_usage != 'inventory':
|
||||
res_model = 'mrp.production'
|
||||
res_id = move_line.move_id.production_id.id
|
||||
ref = move_line.move_id.production_id.name
|
||||
if move_line.move_id.raw_material_production_id and not move_line.move_id.scrapped:
|
||||
if move_line.move_id.raw_material_production_id and move_line.move_id.location_dest_usage != 'inventory':
|
||||
res_model = 'mrp.production'
|
||||
res_id = move_line.move_id.raw_material_production_id.id
|
||||
ref = move_line.move_id.raw_material_production_id.name
|
||||
|
|
@ -26,7 +27,7 @@ class MrpStockReport(models.TransientModel):
|
|||
|
||||
@api.model
|
||||
def _get_linked_move_lines(self, move_line):
|
||||
move_lines, is_used = super(MrpStockReport, self)._get_linked_move_lines(move_line)
|
||||
move_lines, is_used = super()._get_linked_move_lines(move_line)
|
||||
if not move_lines:
|
||||
move_lines = (move_line.move_id.consume_unbuild_id and move_line.produce_line_ids) or (move_line.move_id.production_id and move_line.consume_line_ids)
|
||||
if not is_used:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue