Thanks a lot, @pokoli . Very good to know. Is there a database table that contains this “parties associated to sales” info, or is it just the “distinct/unique” customers from the sales table? I’m guessing the latter.
What I really want is a list of parties that are customers (as opposed to vendors). I’ve made myself a workaround by creating a customer “category” called “Customers”, and I go into each “customer” party and add them to that category. Then the following PostgreSQL query gets me the info I need:
select
pp.name as customer,
pc.name as category
from party_party as pp
inner join party_category_rel as pcr
on pp.id = pcr.party
inner join party_category as pc
on pc.id = pcr.category
You guessed right. There is no table for customers nor suppliers. All of them are stored as party
Yes, that’s a good way of categorizing your parties. If you go to the Party → Categories menú option you can get all the parties of a category by double clicking the category…
But this modules also add a domain on sale and invoice which does not allow you to select a party for sales and customer invoices if it does not have the customer set.
I prefer to allow to create a sale for any party as having a flag may cause to create duplicated parties: i.e: you search for a party which does not have the customer flag and you create it. Now you have to records which represent the same party.