Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
5196 Widoki

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?

Awatar
Odrzuć
Autor

is this a bug?

Autor

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

Autor

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

Autor

...

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

Autor

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:

Autor

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

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

Najlepsza odpowiedź

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.

Awatar
Odrzuć
Autor

the following link solves the bug:

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

Autor Najlepsza odpowiedź

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!

Awatar
Odrzuć
Autor

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.

Powiązane posty Odpowiedzi Widoki Czynność
1
gru 22
6135
16
wrz 24
77610
3
paź 22
10335
1
gru 21
10471
11
sty 24
35769