Odoo Help


How to define a promotionnal code for a minimal order amount?

Pascal Tremblay
on 3/14/16, 3:24 PM 865 views

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!


Axel Mendoza

--Axel Mendoza--
| 7 8 8
Camaguey, Cuba
--Axel Mendoza--

DevOps - Full stack - Software Architect - Developer - Technology Integrator

I could help you to develop anything and solve complex problems based on technologies, integrations and tricky stuffs mostly in Python with OpenERP/Odoo, Zato, Django and many others frameworks programming languages and technologies.

I offers consulting services to anyone with an unanswered questions or needs for customizations. Think about it, maybe it's better to have an expert to solve your issues and projects than having a full-time employee trying to understand what to do and how

Reach me at aekroft@gmail.com

Axel Mendoza
On 3/15/16, 5:43 AM

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

thanks. I will see that.

Pascal Tremblay
on 3/15/16, 7:46 AM

Is it the same method product_id_change for the web shop?

Pascal Tremblay
on 3/15/16, 8:09 AM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 3/14/16, 3:24 PM
Seen: 865 times
Last updated: 3/15/16, 5:43 AM