Skip to content
Snippets Groups Projects
Commit de6fa618 authored by Jason Van Malder's avatar Jason Van Malder
Browse files

[FIX] sale_management: fix quotation template orderline price


Reproduce the issue

    - Install Sale
    - Create a quotation template with a product price that is different
      than the price on the product form.
    - Create a quotation
    - Select a customer then the quotation template

    The product price is not the price mentionned in the quotation
    template

Cause

    In the method `onchange_sale_order_template_id`, if we have
    a pricelist set and the discount policy "with discount" we
    use the price of the pricelist instead of the price of the
    template line.

This commit use the template line's price if the discount policy
is not 'without' discount and if there is a template line's price

OPW-2146210

closes odoo/odoo#41139

X-original-commit: 1ed2c4dc
Signed-off-by: default avatarVictor Feyens (vfe) <vfe@odoo.com>
parent 58b79072
No related branches found
No related tags found
No related merge requests found
......@@ -84,6 +84,8 @@ class SaleOrder(models.Model):
discount = 0
else:
price = line.price_unit
elif line.price_unit:
price = line.price_unit
else:
price = line.price_unit
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment