summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorSwapnesh Shah <swapneshshah111@gmail.com>2020-01-26 19:20:33 +0000
committerGitHub <noreply@github.com>2020-01-27 11:42:05 +0000
commit751831e5ffbf8d2afa274b32274a482d083640d4 (patch)
tree9a1d04cd6de54c7e4adc0992ac04e8d8d67faaf3 /addons
parentd1a0601660ca6424eefe028b790791b68257b55f (diff)
[FIX] sale_product_matrix: Apply discount on line
Before this commit, Discount on SO line was never applied as '_onchange_discount' was not called. In this commit, We call the method explicitly to set a discount on SO line. Fixes https://github.com/odoo/odoo/issues/43970 closes odoo/odoo#43994 X-original-commit: 10fa3940bc7b28d20e7aac04e154fbcdfda69e56 Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Diffstat (limited to 'addons')
-rw-r--r--addons/sale_product_matrix/models/sale_order.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/addons/sale_product_matrix/models/sale_order.py b/addons/sale_product_matrix/models/sale_order.py
index 783b31647c0..a7dfee8457c 100644
--- a/addons/sale_product_matrix/models/sale_order.py
+++ b/addons/sale_product_matrix/models/sale_order.py
@@ -106,6 +106,8 @@ class SaleOrder(models.Model):
self.update(dict(order_line=new_lines))
for line in self.order_line.filtered(lambda line: line.product_template_id == product_template):
line.product_id_change()
+ line._onchange_discount()
+
def _get_matrix(self, product_template):
"""Return the matrix of the given product, updated with current SOLines quantities.