@api.depends("product_tmpl_id")
def _computeBOMLine(self):
for record in self:
bom_lines = record.product_tmpl_id.bom_ids.mapped("bom_line_ids").filtered(lambda x: record.id in x.bom_product_template_attribute_value_ids.ids)
if any(bom_lines):
record.computed_bom_line_id = bom_lines[0].id
else:
record.computed_bom_line_id = False
computed_bom_line_id = fields.Many2one("mrp.bom.line",compute="_computeBOMLine", store=True)
Compute method is not getting called, unless I remove store attribute nothing happens.