Skip to content

Commit

Permalink
[Karthi] | BAH-3692 | Refactor. Pricelist calculations does not apply…
Browse files Browse the repository at this point in the history
… on sale quotations issue has been fixed. (#96)
  • Loading branch information
karthikeyansp91 authored Mar 13, 2024
1 parent aa32d89 commit dabead7
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions bahmni_sale/models/sale_order_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ def onchange_product_uom_qty(self):
if self.product_uom_qty:
if bool(self.env['ir.config_parameter'].sudo().get_param('bahmni_sale.sale_price_markup')) == True:
self.price_unit = self.lot_id.sale_price if self.lot_id.sale_price > 0.0 else self.product_id.lst_price
else:
self.price_unit = self.product_id.lst_price



@api.onchange('lot_id')
Expand All @@ -41,13 +40,11 @@ def onchange_lot_id(self):
self.expiry_date = self.lot_id.expiration_date
if bool(self.env['ir.config_parameter'].sudo().get_param('bahmni_sale.sale_price_markup')) == True:
self.price_unit = self.lot_id.sale_price if self.lot_id.sale_price > 0.0 else self.product_id.lst_price
else:
self.price_unit = self.product_id.lst_price


@api.onchange('product_id')
def onchange_product_id_inherit(self):
if self.product_id:
self.price_unit = self.product_id.lst_price
if self.product_id:
self.lot_id = self.get_available_batch_details(self.product_id,self.order_id.id)


Expand Down

0 comments on commit dabead7

Please sign in to comment.