[IMP] name_get of product should not ask for seller_ids if not necessary

bzr revid: jco@openerp.com-20140227160808-m53f0kkgbqno1ea8
This commit is contained in:
Josse Colpaert 2014-02-27 17:08:08 +01:00
parent 0f52affe0b
commit bd0fcb70b7
2 changed files with 4 additions and 6 deletions

View File

@ -807,7 +807,10 @@ class product_product(osv.osv):
result = []
for product in self.browse(cr, SUPERUSER_ID, ids, context=context):
sellers = filter(lambda x: x.name.id == partner_id, product.seller_ids)
if partner_id:
sellers = filter(lambda x: x.name.id == partner_id, product.seller_ids)
else:
sellers = False
if sellers:
for s in sellers:
mydict = {

View File

@ -1,8 +1,3 @@
-
Do it with the rights of Mr. Demo
-
!context
uid: 'base.user_demo'
-
I first create a warehouse with pick-pack-ship and reception in 2 steps
-