Skip to content

Commit

Permalink
搜索同时支持条码和内部编号
Browse files Browse the repository at this point in the history
  • Loading branch information
JoneXiong committed Apr 26, 2022
1 parent 00141bd commit 7257bfd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion controllers/product.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def get_goods_domain(self, category_id, nameLike, **kwargs):
domain.append(('wxpp_category_id', 'in', cate_ids))
if nameLike:
for srch in nameLike.split(" "):
domain += ['|', ('name', 'ilike', srch), ('barcode', '=', srch)]
domain += ['|', ('name', 'ilike', srch), '|', ('barcode', '=', srch), ('default_code', '=', srch)]

return domain

Expand Down

0 comments on commit 7257bfd

Please sign in to comment.