Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
10469 มุมมอง

hello

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

how can i achieve this??

skype id

shashank_leosys

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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.

อวตาร
ละทิ้ง
ผู้เขียน

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.

คำตอบที่ดีที่สุด

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)]"/>
อวตาร
ละทิ้ง
ผู้เขียน

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

ผู้เขียน

lolzzzz ;-)

Related Posts ตอบกลับ มุมมอง กิจกรรม
12
พ.ค. 21
273354
1
มี.ค. 15
3606
3
ก.พ. 24
1238
0
มิ.ย. 16
3300
2
มี.ค. 15
6100