Skip to content

Commit

Permalink
[Karthi] | BAH-3598 | Refactor. Markup cost price logic has been modi…
Browse files Browse the repository at this point in the history
…fy (#81)
  • Loading branch information
karthikeyansp91 authored Mar 7, 2024
1 parent cc42f16 commit 8f5b6cc
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions bahmni_sale/models/sale_order_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,8 @@ def onchange_product_uom_qty(self):
@api.onchange('lot_id')
def onchange_lot_id(self):
if self.lot_id:
self.expiry_date = self.lot_id.expiration_date
res_config = self.env['res.config.settings'].search([],order='id desc',limit=1)

print("res_config",res_config.id)
print("res_config",res_config.sale_price_markup)


if res_config.sale_price_markup == True:
self.expiry_date = self.lot_id.expiration_date
if 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
Expand Down

0 comments on commit 8f5b6cc

Please sign in to comment.