hey! i've following line of code which is fetching value of prod_min_qty from stock.warehouse.orderpoint to product.template but it is giving me this singleton error. Can you suggest what should i use with it like @api.one,@api.multi,@api.depends and why? i'll be very thankful.
def _get_min_qty(self):
for prod_tml in self:
product = self.env['product.product'].search([('product_tmpl_id', '=', prod_tml.id)])
product_reorder = self.env['stock.warehouse.orderpoint'].search([('product_id', '=', product.id)], limit=1)
if product_reorder:
prod_tml.min_qty = product_reorder.product_min_qty