Community: Framework mailing list archives

expert-framework@mail.odoo.com

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

by
Luis Alfredo da Silva
- 06/08/2016 22:51:37
Oh :/ I see.. Yes of course now I can see that from a user perspective it's more easy in this v9 way. For some reason when I changed this percentage in Odoo and not work the first thing I did was searching google and with the results I check the code from the two versions and noted the differences, but now I realize that the formula it's ok. I will check why was the reason to haven't working with Odoo v9. Thanks for you answer I appreciate the time you took

El mié., 8 de jun. de 2016 a la(s) 21:41, Graeme Gellatly <gdgellatly@gmail.com> escribió:
I don't think you have the correct lines as those 2 lines are roughly functionally equivalent.

For example in v8 to add 20% then percentage is 0.20 in v9 to add 20% then percentage is -20.0. Plug in any number for price and you will see.  Pick any discount, for v8 divide it by 100, for v9 multiply it by -1.

To my mind the v9 way is more correct from a user perspective.  A negative discount should increase the price.

On Thu, Jun 9, 2016 at 12:31 PM, Luis Alfredo da Silva <xyklex@gmail.com> wrote:
I did this question in the Odoo forum a few days ago, 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-framework-62
Post to: mailto:expert-framework@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe


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