Mayur Maheshwari(OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-opw-572802-port-mma into
lp:openobject-addons.
Requested reviews:
OpenERP Core Team (openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-opw-572802-port-mma/+merge/132657
Hello,
[Fix]: On the stock move filter "Product" when you search the product the limit
into the name_search() goes "None".
Current Result : No move for the search product
Expected Result: Should show all move for the Product
Code is forward port from 6.1
Thanks
Mayur
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-opw-572802-port-mma/+merge/132657
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-opw-572802-port-mma.
=== modified file 'product/product.py'
--- product/product.py 2012-10-13 10:09:05 +0000
+++ product/product.py 2012-11-02 08:43:20 +0000
@@ -657,9 +657,9 @@
# Performing a quick memory merge of ids in Python will give much better performance
ids = set()
ids.update(self.search(cr, user, args + [('default_code',operator,name)], limit=limit, context=context))
- if len(ids) < limit:
+ if not limit or len(ids) < limit:
# we may underrun the limit because of dupes in the results, that's fine
- ids.update(self.search(cr, user, args + [('name',operator,name)], limit=(limit-len(ids)), context=context))
+ ids.update(self.search(cr, user, args + [('name',operator,name)], limit=(limit-len(ids) if limit else limit) , context=context))
ids = list(ids)
if not ids:
ptrn = re.compile('(\[(.*?)\])')
_______________________________________________
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