Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

1

search sales order by customer's phone number & email

By
shashank verma
on 6/14/13, 5:54 AM 2,085 views

hello

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

how can i achieve this??

skype id

shashank_leosys

3

Sudhir Arya (SA)

--Sudhir Arya (SA)--
10150
| 6 8 8
Ahmedabad, India
--Sudhir Arya (SA)--

Working as an OpenERP/Odoo developer and a Team Leader 

Top 5 Odoo contributor On Stackoverflow

LinkedIn

Blog

Stackoverflow

Sudhir Arya (SA)
On 6/14/13, 6:14 AM

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?

shashank verma
on 6/14/13, 7:20 AM

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

Sudhir Arya (SA)
on 6/14/13, 11:22 AM
1

Francesco OpenCode

--Francesco OpenCode--
3608
| 5 7 9
Grottaglie, Italy
--Francesco OpenCode--

Italian Odoo (OpenERP) Modules Developer LINKEDIN: http://www.linkedin.com/in/francescoapruzzese

Francesco OpenCode
On 6/14/13, 8:53 AM

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 ;-)

shashank verma
on 6/14/13, 10:01 AM

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

Francesco OpenCode
on 6/14/13, 11:16 AM

lolzzzz ;-)

shashank verma
on 6/15/13, 6:17 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 6/14/13, 5:54 AM
Seen: 2085 times
Last updated: 3/16/15, 8:10 AM