# -*- coding: utf-8 -*-
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import api, models


class ProductTemplate(models.Model):
    _inherit = "product.template"

    @api.multi
    def forward_bom_action(self):
        for obj in self:
            products = self.env['product.product'].search([
                ('product_tmpl_id', '=', obj.id)
            ])
            for product in products:
                return product.forward_bom_action()

    @api.multi
    def reverse_bom_action(self):
        for obj in self:
            products = self.env['product.product'].search([
                ('product_tmpl_id', '=', obj.id)
            ])
            for product in products:
                return product.reverse_bom_action()


class ProductProduct(models.Model):
    _inherit = "product.product"

    @api.multi
    def forward_bom_action(self):
        for obj in self:
            vals = {
                'product_id': obj.id
            }
            wizard = self.env['mrp.bom.component.find.wizard'].create(vals)
            return wizard.do_search_component()

    @api.multi
    def reverse_bom_action(self):
        for obj in self:
            vals = {
                'product_id': obj.id
            }
            wizard = self.env['mrp.bom.component.find.wizard'].create(vals)
            return wizard.do_search_component()

bade0ac3a05dcdd6a90975ee84c0d84828310d53
<mask token>


class ProductTemplate(models.Model):
    <mask token>
    <mask token>
    <mask token>


class ProductProduct(models.Model):
    _inherit = 'product.product'

    @api.multi
    def forward_bom_action(self):
        for obj in self:
            vals = {'product_id': obj.id}
            wizard = self.env['mrp.bom.component.find.wizard'].create(vals)
            return wizard.do_search_component()

    @api.multi
    def reverse_bom_action(self):
        for obj in self:
            vals = {'product_id': obj.id}
            wizard = self.env['mrp.bom.component.find.wizard'].create(vals)
            return wizard.do_search_component()

<mask token>


class ProductTemplate(models.Model):
    <mask token>

    @api.multi
    def forward_bom_action(self):
        for obj in self:
            products = self.env['product.product'].search([(
                'product_tmpl_id', '=', obj.id)])
            for product in products:
                return product.forward_bom_action()

    @api.multi
    def reverse_bom_action(self):
        for obj in self:
            products = self.env['product.product'].search([(
                'product_tmpl_id', '=', obj.id)])
            for product in products:
                return product.reverse_bom_action()


class ProductProduct(models.Model):
    _inherit = 'product.product'

    @api.multi
    def forward_bom_action(self):
        for obj in self:
            vals = {'product_id': obj.id}
            wizard = self.env['mrp.bom.component.find.wizard'].create(vals)
            return wizard.do_search_component()

    @api.multi
    def reverse_bom_action(self):
        for obj in self:
            vals = {'product_id': obj.id}
            wizard = self.env['mrp.bom.component.find.wizard'].create(vals)
            return wizard.do_search_component()

<mask token>


class ProductTemplate(models.Model):
    _inherit = 'product.template'

    @api.multi
    def forward_bom_action(self):
        for obj in self:
            products = self.env['product.product'].search([(
                'product_tmpl_id', '=', obj.id)])
            for product in products:
                return product.forward_bom_action()

    @api.multi
    def reverse_bom_action(self):
        for obj in self:
            products = self.env['product.product'].search([(
                'product_tmpl_id', '=', obj.id)])
            for product in products:
                return product.reverse_bom_action()


class ProductProduct(models.Model):
    _inherit = 'product.product'

    @api.multi
    def forward_bom_action(self):
        for obj in self:
            vals = {'product_id': obj.id}
            wizard = self.env['mrp.bom.component.find.wizard'].create(vals)
            return wizard.do_search_component()

    @api.multi
    def reverse_bom_action(self):
        for obj in self:
            vals = {'product_id': obj.id}
            wizard = self.env['mrp.bom.component.find.wizard'].create(vals)
            return wizard.do_search_component()

from odoo import api, models


class ProductTemplate(models.Model):
    _inherit = 'product.template'

    @api.multi
    def forward_bom_action(self):
        for obj in self:
            products = self.env['product.product'].search([(
                'product_tmpl_id', '=', obj.id)])
            for product in products:
                return product.forward_bom_action()

    @api.multi
    def reverse_bom_action(self):
        for obj in self:
            products = self.env['product.product'].search([(
                'product_tmpl_id', '=', obj.id)])
            for product in products:
                return product.reverse_bom_action()


class ProductProduct(models.Model):
    _inherit = 'product.product'

    @api.multi
    def forward_bom_action(self):
        for obj in self:
            vals = {'product_id': obj.id}
            wizard = self.env['mrp.bom.component.find.wizard'].create(vals)
            return wizard.do_search_component()

    @api.multi
    def reverse_bom_action(self):
        for obj in self:
            vals = {'product_id': obj.id}
            wizard = self.env['mrp.bom.component.find.wizard'].create(vals)
            return wizard.do_search_component()

# -*- coding: utf-8 -*-
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import api, models


class ProductTemplate(models.Model):
    _inherit = "product.template"

    @api.multi
    def forward_bom_action(self):
        for obj in self:
            products = self.env['product.product'].search([
                ('product_tmpl_id', '=', obj.id)
            ])
            for product in products:
                return product.forward_bom_action()

    @api.multi
    def reverse_bom_action(self):
        for obj in self:
            products = self.env['product.product'].search([
                ('product_tmpl_id', '=', obj.id)
            ])
            for product in products:
                return product.reverse_bom_action()


class ProductProduct(models.Model):
    _inherit = "product.product"

    @api.multi
    def forward_bom_action(self):
        for obj in self:
            vals = {
                'product_id': obj.id
            }
            wizard = self.env['mrp.bom.component.find.wizard'].create(vals)
            return wizard.do_search_component()

    @api.multi
    def reverse_bom_action(self):
        for obj in self:
            vals = {
                'product_id': obj.id
            }
            wizard = self.env['mrp.bom.component.find.wizard'].create(vals)
            return wizard.do_search_component()
