Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

1

v7: Pricelist on product tree shows 0.00 on 'price' column

By
Niklaus Hartmann
on 5/10/13, 6:43 PM 1,690 views

the problem i am facing is the following:

on v7, when selecting a pricelist on the product search form, the 'price' column appears. however, the prices on the 'price' column all show 0.00.

i have tried with different pricelists, new pricelists, etc. but it always shows 0.00.

anybody know how to fix this?

is this a bug?

Niklaus Hartmann
on 5/10/13, 6:44 PM

this character restriction is kind of annoying. and how do you post code bits?

Niklaus Hartmann
on 5/10/13, 7:34 PM

v7 product.py (def _product_price)

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

Niklaus Hartmann
on 5/10/13, 7:36 PM

...

res[id] = price for id in ids: res.setdefault(id, 0.0) return res

Niklaus Hartmann
on 5/10/13, 7:36 PM

v6 product.py (def _product_price)

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:

Niklaus Hartmann
on 5/10/13, 7:38 PM

i've reported a bug on launchpad, this is the link: (with no link, not enough karma!)

bugs.launchpad.net/openobject-addons/+bug/1178835

Niklaus Hartmann
on 5/10/13, 7:51 PM
1
Kenneth
On 8/16/13, 12:34 AM

This forum is mostly for questions and answers whereas bugs arae listed on Launchad. This bug has already been reported, and has not been resolved yet, so if you think it is important you should go to launchpad and click the link to state the bug affects you @ bugs.launchpad.net/openobject-addons/+bug/1178835 (Sorry that the system does not allow me to attach links but you can only do a copy and paste)

Not only will doing so help you to quickly get to know the bug has been resolved, but the bug will also become more visible when it is stated to affect more people. Also you can get additional hints and even submit potential patches/solutions.

the following link solves the bug:

http://bazaar.launchpad.net/~openerp/openobject-addons/7.0/revision/9418

Niklaus Hartmann
on 12/4/13, 4:55 PM
0
Niklaus Hartmann
On 5/28/13, 12:44 PM

this comes on server debug while searching pricelist:

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

correct me if i'm wrong, but the line says the fiel 'pricelist_id' cannot be searched... this is why 0.00 is displayed on 'Price' column.

how do i fix this... help please!

obviously, when i tried to modify this through the web portal i got the following error:

2013-05-28 15:45:28,635 9888 ERROR 2demo_7 openerp.netsvc: Error! Properties of base fields cannot be altered in this manner! Please modify them through Python code, preferably through a custom addon!

question is, where do i modify this and in which way must i modify this? thanks.

Niklaus Hartmann
on 5/28/13, 1:47 PM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 5/10/13, 6:43 PM
Seen: 1690 times
Last updated: 3/16/15, 8:10 AM