This question has been flagged

Hello all,

It is easy to define a promotionnal code (in pricelist) for a product category, a product template or a variant. 

But is it possible to define a promotionnal code for a minimal order amount, no matter the products the customer buy?

Example :

We would want a coupon to give rebate of 10 % si the total amount of the order is more than 50 $.


Thanks for your comments!

Avatar
Discard
Best Answer

Hi Pascal. Interesting question. The answer is "no" while using Odoo out of the box. For that you need to change how the pricelist get applied to calculate the product unit_price in the sale order line, to remove the warning dialog that prevent for calculate anything in the onchange that use the pricelist. Review it at the method product_id_change of the sale.order.line model. The warning is at this line:

warning_msgs += _("No valid pricelist line found ! :") + warn_msg +"\n\n"

---------------------update-----------------------------------

That error is due to the method price_get_multi of the model product.pricelist is not able to calculate an unit price for the product because it's using it in an sql query. Changing that sql query you could be better on this

Avatar
Discard
Author

thanks. I will see that.

Author

Is it the same method product_id_change for the web shop?