product_historical_margin calculates wrong value for customer refunds

Bug #1205348 reported by Christoph Uhl
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Camptocamp Addons
New
Undecided
Unassigned

Bug Description

Hi at all,

we are running openERP 6.1.1 and have installed the following addons made by camptopcamp:

- product_get_cost_field
- product_historical_margin
- product_historical_margin_report

I'm calculating our margin with this view: ACCOUNTING / Reporting / Statistic Reports / Invoices Analysis

The addon does calculate the margin correctly when I only sum up all invoices (by clicking on "INVOICE"). All values (turnover, total cost and margin) are correct.. If I only calculate the customer refunds or invoices and refunds together, the turnover, the cost and the margin is wrong. All values do not make any sense. Unfortunately I cannot reconstruct it.

Would be great if someone could help me with this problem!

Kind regards

Christoph Uhl

Revision history for this message
Christoph Uhl (christoph-uhl) wrote :

Hi,

I just had a look again at the module and now I can describe the bug better:

There is a problem with the plus/minus signs.

Current state:

situation: We've got a refund of Euro 1000 net. Cost price was Euro 800 net.

If I only calculate the refunds (without invoices), I'll get the following results

net amount: -1000
total cost: -800
real margin: +1800

How it should be:

net amount: -1000
total cost: +800
real margin: -200

Would be really great if someone could have a look at this. Unfortunately I cannot fix this on my own. Thank you!

Kind regards

Christoph Uhl

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.