Product : wrong variable reference on pricelist.py

Bug #653127 reported by Julian Robbins
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Undecided
Ravindra Mekhiya(OpenERP)

Bug Description

Using Trunk Rev No. 4152

When using Pricelists based on other pricelists, I always get prices returned as a zero figure, instead of a figure based on the other pricelist.

To recreate:-

1. Create new pricelist, with different currency. say, EUR
2. Create a New Pricelist Version eg EUR marking it active
3. Create new 'Products, Listprice' items without any rules, etc
4. In the above, select in 'Based on' as 'Other Pricelist', other Pricelist is set to 'Public Pricelist (GBP)'
5. Do not change any other areas.
6. In Partner, select EUR in the Pricelist, and create a Sale Order, from an opportunity with that Partner
7. Create a new sale order line, do Product search, you can see that List price and Cost price are ok, but Pricelist is always 0.00

In gtk client i get an error like this :-

Environment Information :
System : Linux-2.6.35-22-generic-x86_64-with-Ubuntu-10.10-maverick
OS Name : posix
Distributor ID: Ubuntu
Description: Ubuntu maverick (development branch)
Release: 10.10
Codename: maverick
Operating System Release : 2.6.35-22-generic
Operating System Version : #33-Ubuntu SMP Sun Sep 19 20:32:27 UTC 2010
Operating System Architecture : 64bit
Operating System Locale : en_GB.UTF8
Python Version : 2.6.6
OpenERP-Client Version : 6.0dev
Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):
  File "/home/openerp/production/openerp-server/bin/netsvc.py", line 480, in dispatch
    result = ExportService.getService(service_name).dispatch(method, auth, params)
  File "/home/openerp/production/openerp-server/bin/service/web_services.py", line 586, in dispatch
    res = fn(db, uid, *params)
  File "/home/openerp/production/openerp-server/bin/osv/osv.py", line 57, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/home/openerp/production/openerp-server/bin/osv/osv.py", line 140, in execute
    res = pool.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/home/openerp/production/openerp-server/bin/osv/osv.py", line 130, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/home/openerp/production/openerp-server/bin/addons/sale/sale.py", line 1126, in product_id_change
    'date': date_order,
  File "/home/openerp/production/openerp-server/bin/addons/product/pricelist.py", line 452, in price_get
    res_multi = self.price_get_multi(cr, uid, pricelist_ids=ids, products_by_qty_by_partner=[(prod_id, qty, partner)], context=context)
  File "/home/openerp/production/openerp-server/bin/addons/product/pricelist.py", line 391, in price_get_multi
    [res['base_pricelist_id']], prod_id,
NameError: global name 'prod_id' is not defined

Tags: crm trunk

Related branches

Changed in openobject-addons:
assignee: nobody → RME(OpenERP) (rme-openerp)
Changed in openobject-addons:
status: New → Confirmed
Changed in openobject-addons:
milestone: none → 6.0
Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Fixed by revision 4182 <email address hidden>.
Thanks.

Changed in openobject-addons:
status: Confirmed → Fix Released
summary: - Pricelist based on other pricelist gives zero values
+ Product : wrong variable reference on pricelist.py
Revision history for this message
Julian Robbins (joolsr) wrote :

Thanks for fixing this

I found other bugs relating to Pricelists, but all are fairly difficult to actually describe. If I can reproduce them, I will try and post any I find

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.