Skip to content

Commit

Permalink
Merge pull request #3 from ingadhoc/17.0
Browse files Browse the repository at this point in the history
Fork Sync Branch 17.0
  • Loading branch information
btl-bot authored Jan 9, 2025
2 parents eef80cc + ba7f271 commit ab1b141
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions sale_three_discounts/models/sale_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,11 @@
# For copyright and license notices, see __manifest__.py file in module root
# directory
##############################################################################
from odoo import models, api
from odoo import models


class SaleOrder(models.Model):
_inherit = "sale.order"

def _recompute_prices(self):
super(SaleOrder, self.with_context(recompute_prices=True))._recompute_prices()

@api.onchange('pricelist_id')
def _onchange_pricelist(self):
self.order_line.write({
'discount1': 0,
'discount2': 0,
'discount3': 0
})
self._recompute_prices()

0 comments on commit ab1b141

Please sign in to comment.