Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
5397 Lượt xem

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?

Ảnh đại diện
Huỷ bỏ
Tác giả

is this a bug?

Tác giả

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

Tác giả

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

Tác giả

...

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

Tác giả

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:

Tác giả

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

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

Câu trả lời hay nhất

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.

Ảnh đại diện
Huỷ bỏ
Tác giả

the following link solves the bug:

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

Tác giả Câu trả lời hay nhất

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!

Ảnh đại diện
Huỷ bỏ
Tác giả

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.

Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 12 22
6470
16
thg 9 24
78106
3
thg 10 22
10673
1
thg 12 21
10735
11
thg 1 24
36335