I'm trying to get a list of Customers and the price lists that they are linked to. The field reference is property_product_pricelist. I've tried the SQL below but without success. If anyone can help I'd be very grateful.
select res_partner.id, res_partner.name, product_pricelist.name from res_partner,ir_property,product_pricelist
res_partner.id = right(ir_property.res_id,length(res_id)-12)::integer
right(ir_property.value_reference,length(value_reference)-21)::integer = product_pricelist.id
left(ir_property.value_reference,20) = 'product_pricelist'
res_partner.is_company = TRUE
res_partner.customer = TRUE
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
|Asked: 6/8/16, 10:18 AM|
|Seen: 160 times|
|Last updated: 6/8/16, 10:25 AM|