How to Get Odoo Product Cost Price from  SQL Query
by Joining product, template, and company property table

To find the product cost price from direct SQL query you need to join it from these tables:

  • product.template

  • product.product

  • ir.property


For example:


select temp.name, prop.value_float
 from product_template temp
 left join product_product pp on pp.product_tmpl_id = temp.id
 left join ir_property prop on prop.res_id = 'product.product,' || pp.id
where temp.name = 'Corner Desk'
and prop.company_id=1


Need more Odoo advanced techniques ?

Check my Udemy courses: http://udemy.com/user/akhmaddaniel

Or visit our website for courses and other interesting stuffs: http://vitraining.com

How to Get Odoo Product Cost Price from  SQL Query
vitraining, odoo indonesia
7 May, 2020
Share this post
Archive
Sign in to leave a comment
Setup Odoo IM Live Chat di Multi Processing
tanpa setting ini, IM livechat nggak jalan