Community mailing list archives

community@mail.odoo.com

[v8] Sale order margin is wrong is you use Unit of Sale

by
Manuel López
- 12/13/2015 13:52:06
I posted this on Github (https://github.com/odoo/odoo/issues/9756 href="https://github.com/odoo/odoo/issues/9756">https://github.com/odoo/odoo/issues/9756), but it seems nobody is paying much attention to v8 issues there, so I repost it here. Screen captures can be seen in the Github link above.
 
Impacted versions:
  • 8.0

Steps to reproduce:

1) Activate "Allow using different units of measure " in Settings -> Configuration -> Sales
2) Activate "Manage Secondary Unit of Measure " in user settings
3) Create a product "PRODUCT TEST" with following data:
Unit of Measure (uom_id): Kg

Sale price (list_price): 5€/kg

Purchase Unit of Measure (uom_po_id): Kg

Cost Price (standar_price): 2€/kg

Unit of Sale (uos_id): Box

Unit of Measure -> UOS Coeff (uos_coeff) : 0,05 (each box weights 20 Kg, so coeff. 1/20=0,05)

4) Create a new sale order
5) Insert a line of PRODUCT TEST with quantity 1 Box (UoS)
6) Calculate (refresh) the sale order, so sale order margin can be computed.Current behavior:

  • Margin: 98€

Expected behavior:

  • Margin: ((20 x 5) - (20 x 2)) = 60€

It seems that it is mixing apples and oranges, because is calculating the margin as follows:

[1 uos x 100 € (uos unit price)] - [1 uos x 2€ (uom standard cost price)] = 98€

what is obviously wrong, if you use unit price of the uos you should use cost unit price of the uos, or it can be also used both uom for unit price and cost price.

Can anyone confirm me this is a bug, and if so, should it be expected to be corrected? Thank you



Avast logo

El software de antivirus Avast ha analizado este correo electrónico en busca de virus.
www.avast.com