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?
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!
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"
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
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
|Asked: 3/14/16, 3:24 PM|
|Seen: 362 times|
|Last updated: 3/15/16, 5:43 AM|