product_sale_price_from_pricelist: round up or down

This commit is contained in:
Luis 2025-07-22 13:39:47 +02:00
parent 7ca15f9aee
commit dafaaf9139

View file

@ -84,7 +84,7 @@ class ProductTemplate(models.Model):
) )
# Round to 0.05 # Round to 0.05
if round(price_with_taxes % 0.05, 2) != 0: if round(price_with_taxes % 0.05, 2) != 0:
price_with_taxes = math.ceil(price_with_taxes / 0.05) * 0.05 price_with_taxes = round(price_with_taxes * 20) / 20
template.write( template.write(
{ {