Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
2 Vastaukset
5374 Näkymät

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
Hylkää
Tekijä

is this a bug?

Tekijä

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

Tekijä

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

Tekijä

...

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

Tekijä

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:

Tekijä

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

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

Paras vastaus

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
Hylkää
Tekijä

the following link solves the bug:

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

Tekijä Paras vastaus

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
Hylkää
Tekijä

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.

Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
1
jouluk. 22
6375
16
syysk. 24
78036
3
lokak. 22
10608
1
jouluk. 21
10681
11
tammik. 24
36223