Merge lp:~openerp-dev/openobject-addons/6.0-opw-574759-ksa into lp:openobject-addons/6.0

Proposed by Kirti Savalia(OpenERP)
Status: Approved
Approved by: Naresh(OpenERP)
Approved revision: 5227
Proposed branch: lp:~openerp-dev/openobject-addons/6.0-opw-574759-ksa
Merge into: lp:openobject-addons/6.0
Diff against target: 23 lines (+13/-0)
1 file modified
product/product.py (+13/-0)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.0-opw-574759-ksa
Reviewer Review Type Date Requested Status
Naresh(OpenERP) (community) Approve
Review via email: mp+105633@code.launchpad.net

Description of the change

Hello,

Fixed the problem when import the data with product category in product form.

Thanks
KSA

To post a comment you must log in.
Revision history for this message
Naresh(OpenERP) (nch-openerp) :
review: Approve

Unmerged revisions

5227. By Kirti Savalia(OpenERP)

[FIX]: when import the data with product category you can not import the data

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'product/product.py'
--- product/product.py 2012-03-30 08:53:02 +0000
+++ product/product.py 2012-05-14 10:40:24 +0000
@@ -184,6 +184,19 @@
184# Categories184# Categories
185#----------------------------------------------------------185#----------------------------------------------------------
186class product_category(osv.osv):186class product_category(osv.osv):
187
188 def name_search(self, cr, uid, name, args=None, operator='ilike', context=None, limit=100):
189 if not args:
190 args=[]
191 if not context:
192 context={}
193 if name:
194 # Be sure name_search is symetric to name_get
195 name = name.split(' / ')[-1]
196 ids = self.search(cr, uid, [('name', operator, name)] + args, limit=limit, context=context)
197 else:
198 ids = self.search(cr, uid, args, limit=limit, context=context)
199 return self.name_get(cr, uid, ids, context)
187200
188 def name_get(self, cr, uid, ids, context=None):201 def name_get(self, cr, uid, ids, context=None):
189 if not len(ids):202 if not len(ids):