[REF] mrp : remove stock.quant inherit.
The field created by this inherit are no more used
anymore. The logic of produced/consumed has been move
on stock_move_line by this commit 0469d2e712
This commit is contained in:
@@ -1,19 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class StockQuant(models.Model):
|
||||
_inherit = 'stock.quant'
|
||||
|
||||
consumed_quant_ids = fields.Many2many(
|
||||
'stock.quant', 'stock_quant_consume_rel', 'produce_quant_id', 'consume_quant_id')
|
||||
produced_quant_ids = fields.Many2many(
|
||||
'stock.quant', 'stock_quant_consume_rel', 'consume_quant_id', 'produce_quant_id')
|
||||
|
||||
def _prepare_history(self):
|
||||
vals = super(StockQuant, self)._prepare_history()
|
||||
vals['consumed_quant_ids'] = [(4, quant.id) for quant in self.consumed_quant_ids]
|
||||
vals['produced_quant_ids'] = [(4, quant.id) for quant in self.produced_quant_ids]
|
||||
return vals
|
||||
Reference in New Issue
Block a user