v7 pricelists on product search form displays 0.00 on 'price' column

Bug #1180487 reported by charlee.papah
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
New
Undecided
Unassigned

Bug Description

as the question says. when selecting a price list, the price column appears, yet the price shown is 0.00 for all products. this is tru for all pricelists, both for Sales and Purchases.

Revision history for this message
charlee.papah (n-hartmann) wrote :

some things i would like to add are:

- i have tried creating new pricelists, and the result is the same.
- the code for 6.0 and 7 differ slightly. check the def for _product_price. i will append following:
   ** notice: partner = context.get('partner', False). perhaps this line is causing the pricelis to search for partner context and obviously, since there is none it displays 0.00.

v6 -->

def _product_price(self, cr, uid, ids, name, arg, context=None):
        res = {}
        if context is None:
            context = {}
        quantity = context.get('quantity') or 1.0
        pricelist = context.get('pricelist', False)
        if pricelist:
            for id in ids:
                try:
                    price = self.pool.get('product.pricelist').price_get(cr,uid,[pricelist], id, quantity, context=context)[pricelist]
                except:
                    price = 0.0
                res[id] = price
        for id in ids:
            res.setdefault(id, 0.0)
        return res

v7 -->

def _product_price(self, cr, uid, ids, name, arg, context=None):
        res = {}
        if context is None:
            context = {}
        quantity = context.get('quantity') or 1.0
        pricelist = context.get('pricelist', False)
        partner = context.get('partner', False)
        if pricelist:
            for id in ids:
                try:
                    price = self.pool.get('product.pricelist').price_get(cr,uid,[pricelist], id, quantity, partner=partner, context=context)[pricelist]
                except:
                    price = 0.0
                res[id] = price
        for id in ids:
            res.setdefault(id, 0.0)
        return res

Revision history for this message
charlee.papah (n-hartmann) wrote :

i tried deleting the line i mentioned -- partner = context.get('partner', False) -- no errors on server start, the price column still shows 0.00 for all prices when selecting price list, however.

Revision history for this message
charlee.papah (n-hartmann) wrote :

i forgot to mention, the code bit come from product.py from the product module in the addons folder.

Revision history for this message
charlee.papah (n-hartmann) wrote :

any ideas on how to fix this?? help please.

Revision history for this message
charlee.papah (n-hartmann) wrote :

when debugging the server this message is displayed while running a pricelist search:

2013-05-28 14:33:13,940 8426 ERROR 2demo_7 openerp.osv.expression: The field 'Pricelist' (pricelist_id) can not be searched: non-stored function field without fnct_search

Comments please. How do we fix the pricelist issue???

Revision history for this message
charlee.papah (n-hartmann) wrote :

well, to add to the mystery, when using pricelists on the GTK Client, the price column shows the prices as it should. So, is this a problem with the web platform?

Revision history for this message
charlee.papah (n-hartmann) wrote :

could it be the new search bar that is not working properly the extended filters... on 6.0 and 6.1, pricelists work fine on the web platform.

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.