Skip to content
Snippets Groups Projects
Commit 919a1af9 authored by Jérome Maes's avatar Jérome Maes
Browse files

[FIX] purchase: correct product cost in reporting

product.product inheritS from product.template, and they both
define the 'standard_price' field, but implement it differently;
 - product: the field is a company dependent one (so non stored)
 - template: the field is a computed one based on tis variants

For the first case, since the field is not stored in database, when
doing SQL query, we have to get the value from the table ir_property.
That is what purchase report does, but instead of searching on resource
'product.product', it does it on 'product.template'. There are
obviously no entries in ir_property table for 'standard_price' field
on product template. As consequence, the "product value" (cost)
is always null in purchase reporting.
This commit fixes that by modifying SQL query to get the good
value from ir_property table.
parent 28179bc8
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment