Mayur Maheshwari(OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-bug-1017365-mma into
lp:openobject-addons.
Requested reviews:
Purnendu Singh (OpenERP) (psi-tinyerp)
Related bugs:
Bug #1017365 in OpenERP Addons: "can't open Sales Order Lines from product
form view "
https://bugs.launchpad.net/openobject-addons/+bug/1017365
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-1017365-mma/+merge/111807
Hello Sir ,
product:I have fix the issue to open Sales Order Lines from product
form view and pass appropriate ids in name_get
Thanks.
Mayur
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-1017365-mma/+merge/111807
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-bug-1017365-mma.
=== modified file 'product/product.py'
--- product/product.py 2012-08-14 14:10:40 +0000
+++ product/product.py 2012-08-21 11:04:20 +0000
@@ -195,8 +195,10 @@
class product_category(osv.osv):
def name_get(self, cr, uid, ids, context=None):
- if not len(ids):
+ if not ids:
return []
+ if isinstance(ids, int):
+ ids = [ids]
reads = self.read(cr, uid, ids, ['name','parent_id'], context=context)
res = []
for record in reads:
@@ -602,10 +604,11 @@
def name_get(self, cr, user, ids, context=None):
if context is None:
context = {}
- if isinstance(ids, (int, long)):
+ if not ids:
+ return []
+ if isinstance(ids, int):
ids = [ids]
- if not len(ids):
- return []
+
def _name_get(d):
name = d.get('name','')
code = d.get('default_code',False)
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp