Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
2 Antwoorden
5344 Weergaven

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?

Avatar
Annuleer
Auteur

is this a bug?

Auteur

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

Auteur

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

Auteur

...

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

Auteur

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:

Auteur

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

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

Beste antwoord

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.

Avatar
Annuleer
Auteur

the following link solves the bug:

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

Auteur Beste antwoord

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!

Avatar
Annuleer
Auteur

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.

Gerelateerde posts Antwoorden Weergaven Activiteit
1
dec. 22
6326
16
sep. 24
77968
3
okt. 22
10560
1
dec. 21
10639
11
jan. 24
36147