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

hello

i want to search sales order records by customer's phone number & emial id

how can i achieve this??

skype id

shashank_leosys

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

There is no field of Customer Phone in Sale Order. So you cannot search for that.

You can create related field of Customer Phone.

'customer_phone': fields.related('partner_id', 'phone', type='char'),

Now add this field in search view of Sale Order.

Ảnh đại diện
Huỷ bỏ
Tác giả

thanks sudhir

bythe way i tried an alternate way to achieve this

i put this code in serach view

<field name="name" string="phone number" filter_domain="[('partner_order_id.phone','ilike',self)]"/>

<field name="name" string="email" filter_domain="[('partner_order_id.email','ilike',self)]"/>

its working f9

but your solution much easier and compact once again thanks

are you on skype?? can i have ur skype id?

Sorry I don't have account of skkype. You can contact me on linkedin.

Câu trả lời hay nhất

Insert this line in sale order search:

<field name="name" string="email" filter_domain="['|', ('partner_order_id.email','ilike',self), ('partner_order_id.phone','ilike',self)]"/>
Ảnh đại diện
Huỷ bỏ
Tác giả

thanks for response but i have done the same thing ;-)

Then my answer is correct for you. I don't know what you do to the other side of the world! :D

Tác giả

lolzzzz ;-)

Bài viết liên quan Trả lời Lượt xem Hoạt động
12
thg 5 21
273389
1
thg 3 15
3628
3
thg 2 24
1249
0
thg 6 16
3315
2
thg 3 15
6117