Skip to content

Commit

Permalink
Merge PR #1641 into 15.0
Browse files Browse the repository at this point in the history
Signed-off-by AaronHForgeFlow
  • Loading branch information
OCA-git-bot committed Jan 10, 2024
2 parents b37b13a + 40a62ed commit 62cb8a4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions account_invoice_pricelist/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,8 @@ def _get_real_price_currency(self, product, rule_id, qty, uom, pricelist_id):
return product[field_name] * uom_factor * cur_factor, currency_id

def _calculate_discount(self, base_price, final_price):
if not base_price:
return 0.0
discount = (base_price - final_price) / base_price * 100
if (discount < 0 and base_price > 0) or (discount > 0 and base_price < 0):
discount = 0.0
Expand Down

0 comments on commit 62cb8a4

Please sign in to comment.