Blueprint pour une amélioration des règles de promotion dans OpenERP

Sharoon Thomas, qui a fait les excellent modules poweremail et magentoerpconnect, semble être intéressé pour améliorer les outils de règles de promotion dans OpenERP.

Pour lui donner un coup de main, j’ai fait une rapide analyse pour lui, en particulier une comparaison avec le moteur de promotion très puissant de Magento. Finalement on dirait que les conlusions étaient faciles à trouver, OpenERP a un moteur pour les règles qui sont basé sur les informations produits, mais en revanche totalement inexistant pour des règles basées sur le contenu d’une commande . Je supose qu’une implémentation dans ce domaine pourrait être une importante amélioration.

Voici mon analyse (en anglais, désolé la flemme de traduire tout le document) :

Improvement of the promotion rule in OpenERP

Introduction

The goal is to improve the promotion rule tool in OpenERP. Magento has a great system for this purpose, so we’ll make a comparison with it.

Modules that already exist

A quick search in the module list show the module that might be useful :

1)discount_campaign

The goal of this module is to manage a refund system. It might be useful if for example we want to give a 5% discount if a customer buy more than 50 product A in 2009.

At least, this is my comprehension, as there is no real description. The idea is good, but I think the module should still be improved.

2)product_pricelist_discount_and_tax

This module improve management of tax at pricelist and do some control. According to me, it’s certainly a module that should be merge with the core module product, but it don’t implement a very new functionality, except management of visible discount and the possibility to specify if tax included or not.

3)sale_target_discount

This module improve the usability of the sales management by allowing to specify directly the price with the discount.

Comparison with Magento

Catalog Price Rule

The Catalog Price Rule at Magento manage the rule which are product-based. Each rule can be apply on each customer group.

At OpenERP, each Partner can have several Partner, so the way to implement the promotion are different. A meta-rule call listprice is define and possess several rule in it, we can also define an availability period. Next, we define what listprice apply to a Partner.

About the Conditions, on Magento, each field (attribute) of the product can be used as a base for a rule, so that we can use name, category but also price, tax etc… This base is next compare (equal, greater, lesser etc…) to a value or a list defined.

On OpenERP, we are limited to only a product or a category of product.

About the Action, Magento can only apply a fix or percentage amount of discount on the price.

OpenERP can apply a fix or percentage amount but also with rounding method and verification of the margin, on the sell price but also the buy price or even another list price.

Conclusion :

At the catalog price rule, Magento and OpenERP are equivalent even if Magento can base the conditions on all field of the product.

So this is the only improvement I suggest, to base condition on all field of product.product and product.template but I think the needing is limited.

Shopping Cart Price Rule

As the Catalog Price Rule, Shoping Cart Price Rule can be applied to customer group, so if an improvement will be done here, I suggest to do it in the listprice of OpenERP.

Magento has also here management of coupon. It’s perhaps the voucher in OpenERP, I don’t know.

We can define the total number of use or the per customer use of a coupon. It’s an interesting function, but I suggest to create a separated module for it, if it’s not already exist.

About Conditions, Magento can do a lot of things :

Attribute combination : It is a condition that will control each field of each product on the cart. For example, if no product contain a price greater than 100€, so the condition is true. Really interesting and no equivalent in OpenERP.

Product subselection : The condition will see if the total amount or quantity of only product that match some subconditions are equial/greater/lesser than a certain number. For example, if between the products that are bought, there are for more than 100€ of product that are considered out-dated (not ever produced), so the condition is true. Really interesting and no equivalent in OpenERP.

If any of the subtotal, quantity total, weight, payment method etc… Equal to a certain value, then condition are true. Basic, but it is still a leak in OpenERP.

About action :

We can apply a fixed or percentage amount of discount per product, or for the whole cart. We can also apply a “Buy Y have X free” rule or free shipping. All of this apply on each product or product that are determined by conditions bases on their field.

Conclusion : None of all of these exist in OpenERP, there is no Shopping Cart Price Rule functionality. At the contrary, the Magento one was just really powerful, just perfect.

I really suggest to implement a module that will implement it the same way as Magento, even by copying the way it is implemented.

Conclusion

It seams that finally conclusion was easy to find, Magento show us the way of the functionality, we should just implement as in Magento.

For the moment I don’t push far further the analysis, feel free to contact me if you need more help.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>