Skip to content

Commit

Permalink
Merge 52450c8 into c8d5c19
Browse files Browse the repository at this point in the history
  • Loading branch information
nicomacr committed Jun 1, 2018
2 parents c8d5c19 + 52450c8 commit bf9edc3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions stock_ean128/models/stock.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,11 @@ def action_compute(self):
@api.model
def name_search(
self, name, args=None, operator='ilike', limit=100):
ids = []
args = args or []
if name:
recs = self.search(
args + [('ean_128', operator, name)], limit=limit)
if ids:
if recs:
return recs.name_get()
return super(StockProductionLot, self).name_search(
name=name, args=args, operator=operator, limit=limit)

0 comments on commit bf9edc3

Please sign in to comment.