← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 646350] Re: [trunk] sale analysis - wrong average price

 

What if we specified a special group_operator to compute the average
price column of this analysis view?

Imagine we use a column that gives the total price for the line (i.e. qt
* unit_price), and we specify a group_operator along these lines
(keeping in mind that OpenERP will add the braces after the operator):
group_operator="(1.0/sum(product_qty))*sum"

This way when the grouping is done it should execute this: 
    SELECT (1.0/sum(product_qty))*sum(total_price) FROM ...

Would it work?

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/646350

Title:
  [trunk] sale analysis - wrong average price

Status in OpenObject Addons Modules:
  Confirmed

Bug description:
  see png

precision/rounding error ?