product.pricelist price_get returns wrong item_id

Bug #1285195 reported by Thomas Rehn
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
New
Undecided
Unassigned

Bug Description

If a product has a price of zero by a certain pricelist, the function price_get of product.pricelist returns the wrong item_id.

This is because line 312 of product/pricelist.py "if price" should be "if price is not False" instead. Because of the wrong condition, the item_id gets not propagated correctly from price_get_multi

Revision history for this message
Antonio M. - Zeroincombenze (zeroincombenze) wrote :

This bug seems have side effect on multi-company enviroment. In my enviroment this correction seem solved error "Access denied by record rules for operation: read, uid: nn, model: product.pricelist".
I will do other tests in order to confirm this matter.

Antonio M. Vigliotti
http://www.zeroincombenze.it

Revision history for this message
Antonio M. - Zeroincombenze (zeroincombenze) wrote :

Hi,
I confirm side: side effect resolved.

Trouble: multi-company environment, with a master company (empty) e 2 or more child companies.
Companies do not have any to share.
Generated a pricelist for every company without item, with default price=0; generated a version of pricelist for every company.
After of this, you cannot see pricelist o you caanot write order or modify order, because "Access denied by record rules for operation: read, uid: nn, model: product.pricelist". Security rules are oK.

After modified line 312 of product/pricelist.py system works right. Test are executed on development machine, then on quality-test machine and at end on producion machine.

You can find more informations here http://www.zeroincombenze.org/wiki/OpenERP/dev#Modulo_product (italian language)

Thanks t Thomas Rehn.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.