Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
3678 Lượt xem

So I was thinking about creating a custom search like shown below under the search Customer searchbox.



There are default searches as shown below added via XML in POS app :

Search name for:
Search tag for:
Search Salesperson for:
Search Related Company for:

I want to add Search Customer ID for:


Any assistance will be highly appreciated.


Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

I had a similar requirement where I wanted search by data stored in ref field and was not available in POS Customer search  However I could achieve by modifying the code as below.

In addons/point_of_sale/static/src/js/models.js

i. Search for res.partner (around line 362)

ii. In the fields add ‘ref’ field too.


In addons/point_of_sale/static/src/js/db.js

i. Search for _partner_search_string: function(partner) ( around line 228)

ii. Add if(partner.ref){ str += '|' + partner.ref; } below one of the if condition

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

how can i do that in product list please ? i want to search for a product with my custom field. odoo16


Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 11 23
2315
0
thg 8 23
194
1
thg 2 22
2987
0
thg 8 18
5932
0
thg 2 18
6630