Skip to content

Commit

Permalink
[FIX] sale_three_discount: _compute_discount appears as method in the…
Browse files Browse the repository at this point in the history
… module sale
  • Loading branch information
matiasperalta1 committed Apr 27, 2023
1 parent 35f43dc commit 739012f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sale_three_discounts/models/sale_order_line.py
Expand Up @@ -26,7 +26,7 @@ class SaleOrderLine(models.Model):
# TODO do like in invoice line? Make normal field with constraint and
# oncahnge?
discount = fields.Float(
compute='_compute_discount',
compute='_compute_discounts',
store=True,
readonly=True,
# agregamos states vacio porque lo hereda de la definicion anterior
Expand Down Expand Up @@ -83,7 +83,7 @@ def inverse_vals(self, vals_list):
})

@api.depends('discount1', 'discount2', 'discount3')
def _compute_discount(self):
def _compute_discounts(self):
for rec in self:
discount_factor = 1.0
for discount in [rec.discount1, rec.discount2, rec.discount3]:
Expand Down

0 comments on commit 739012f

Please sign in to comment.