Odoo Help

Welcome!

This community 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.

0

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

By
Pascal Tremblay
on 3/14/16, 3:24 PM 362 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!

0

Axel Mendoza

--Axel Mendoza--
10203
| 7 7 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 an 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"

---------------------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

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

Your Answer

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

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

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