Mayur Maheshwari(OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-bug-904495-mma into 
lp:openobject-addons.

Requested reviews:
  Rucha (Open ERP) (rpa-openerp)
Related bugs:
  Bug #904495 in OpenERP Addons: "can not search prod_lot by name"
  https://bugs.launchpad.net/openobject-addons/+bug/904495

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-904495-mma/+merge/85861

Hello,
  

     stock :  I Have make a name_serch method on prfix for stock production lot

Thanks.
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-904495-mma/+merge/85861
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-bug-904495-mma.
=== modified file 'stock/stock.py'
--- stock/stock.py	2011-12-01 21:32:12 +0000
+++ stock/stock.py	2011-12-15 13:32:20 +0000
@@ -1360,6 +1360,11 @@
                 name = '%s [%s]' % (name, record['ref'])
             res.append((record['id'], name))
         return res
+    
+    def name_search(self, cr, user, name='', args=None, operator='ilike', context=None, limit=100):
+        ids = self.search(cr, user, [('prefix',operator,name)]+ args, limit=limit, context=context)
+        result = self.name_get(cr, user, ids, context=context)
+        return result
 
     _name = 'stock.production.lot'
     _description = 'Production lot'

_______________________________________________
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

Reply via email to