Skip to Content
Menu
This question has been flagged
1 Reply
1686 Views

under tab Components  in Bills of Materials 


class StockMoveLine(models.Model):  

  _inherit = "stock.move.line"
    bom_line_id = fields.Many2one('mrp.bom.line', 'BoM Line')
    To Consume  = fields.Float(related='move_id.bom_line_id.product_qty', store=True)

 

the appear  Quantity fields not  Quantity under tab Components

Avatar
Discard
Best Answer

Hi,

Try this:class StockMoveLine(models.Model):

    _inherit = "stock.move.line"


    bom_line_id = fields.Many2one('mrp.bom.line', 'BoM Line')

    to_consume = fields.Float(related='bom_line_id.product_qty', string='To Consume')


Hope it helps

Avatar
Discard