Skip to content

Commit

Permalink
BAH-3751 | Fix. MRP on-change when product is changed
Browse files Browse the repository at this point in the history
  • Loading branch information
mohan-13 committed May 17, 2024
1 parent 24dd22d commit cb90f2f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bahmni_purchase/models/purchase_order_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@ def onchange_product_id(self):
self.prod_categ_id = self.product_id.categ_id.id
return result

@api.onchange('product_qty', 'product_uom')
@api.onchange('product_id', 'product_qty', 'product_uom')
def _onchange_quantity(self):
'''Method to get mrp for product from vendor configuration in product master'''
if not self.product_id or not self.product_uom:
self.mrp = 0
return

seller = self.product_id._select_seller(
Expand Down

0 comments on commit cb90f2f

Please sign in to comment.