a very basic question, how i can get all customers and vendors in pgAdmin Query Tool writing a query, something like e.g. :
select * from res_partner where ???
regards
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
a very basic question, how i can get all customers and vendors in pgAdmin Query Tool writing a query, something like e.g. :
select * from res_partner where ???
regards
Hi
Try this Query
For customers
select * from res_partner where customer_rank > 0
For Vendors
select * from res_partner where supplier_rank > 0
Regards
yes, it works fine.
thank you for help.
@Cybrosys
as i can't post screenshot in Comment I have to use Answer option, please check it and advice.
in my Odoo 16, there is no 'customer' or 'supplier' field in res_partner as you have mentioned. i run query just copy paste yours'.
regards
Hi,
Here's an example query using the pgAdmin Query Tool to retrieve all customers and vendors:
SELECT id, name, email, phone, customer, supplier
FROM res_partner
WHERE customer = TRUE OR supplier = TRUE;
Explanation of the query:
This query selects the relevant fields from the res_partner table where either the customer or supplier field is set to TRUE, indicating that the partner is either a customer or a vendor.
Hope it helps.
this didn't worked for me, please check screenshot in my Answer ( which is not an Answer just use it to paste screenshot ).
regards
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
3
Nov 23
|
1993 | ||
|
2
Aug 25
|
2228 | ||
|
1
Jul 25
|
763 | ||
|
1
Aug 25
|
1150 | ||
|
0
May 25
|
1260 |