Community mailing list archives

community@mail.odoo.com

Re: What was the logic behind the pricelist price percentage rule change from odoo 8 to 9?

by
Elico Corporation, Eric Caudal
- 06/08/2016 21:46:25
@Luis,
There is no such big change in the formula as you claim. There are very similar as far as I can see: p - p * d/100 = p * (1 - d/100) ~ p * (1+d). Discount handling is slightly different (positive/negative and perc/float) but usage should be the same.
Actually the calculation way has not fundamentally changed for sales price list in v9. Only purchase price lists do not have any more this calculation formula capability (which is really annoying in some cases).
--
Eric Caudal [Founder and CEO]
Skype: elico.corp. Phone: + 86 186 2136 1670 (Cell), + 86 21 6211 8017/27/37 (Office)
Elico Shanghai (Hong Kong/Shenzhen/Singapore) Odoo Gold Partner, best Odoo Partner 2014 for APAC
On 06/09/2016 08:26 AM, Luis Alfredo da Silva wrote:
I did this question in the Odoo forum but I think for discussion it's better the mail list, and because I saw more activity of people more involved in the development and use of the framework.

This is the link to the forum question but I'm going to paste here again for quick reading.

https://www.odoo.com/es_ES/forum/ayuda-1/question/what-was-the-logic-behind-the-pricelist-price-percentage-rule-change-from-odoo-8-to-9-103026

I want to add a profit percentage in odoo 9 with a pricelist rule formula, and searching in web I only find the option to do it but with the odoo version 8, because the formula in code changed to odoo 9.

Here is the code line in odoo 8 for that rule:

https://github.com/odoo/odoo/blob/8.0/addons/product/pricelist.py#L342


and here is the current code line in odoo 9: 

https://github.com/odoo/odoo/blob/9.0/addons/product/pricelist.py#L235


Because that change I have no option to add to the price a percentage to set a margin profit in a pricelist rule, maybe in odoo 9 there is another way to accomplish what I want or not. Some of yours can give me a great answer to this.

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe