invoice from packing wrong price/unit if product has uos

Bug #668378 reported by Piotr Buszka
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Medium
OpenERP R&D Addons Team 2

Bug Description

If :
 - a product has both UOM and UOS fixed by a coefficient in the product
 - invoice is generated packing based on quantities delivered
 - 1 UOM = 5 UOS

Sales order uses UOM and corresponding quantity to calculate line subtotal = uom_qty * unit price. It means that price in sales order reflects price per UOM not per UOS

Packing uses UOM

When Invoice is generated from packing the unit used on invoice is UOS and quantity is uos_qty.
But the price is taken from sales order which is price per UOM resulting in 5 times higher subtotal for the invoice line in this case.

To reproduce :
1. define a product with both UOM and UOS
2. create a sales order with the product with mode invoice from picking
3. confirm picking for sales order
4. create invoice from picking

amounts on sales order and invoice are different

Proposed solution :
of of the three but I am not sure which is most consistent with the rest of the system
1. use UOM and uom_qty on invoice
2. adjust price_unit on invoice to reflect price per UOS
3. use UOS and price per UOS in sales order but probably it will screw up everything else later in the chain

Related branches

Revision history for this message
Piotr Buszka (piotr-buszka) wrote :

Forgot to put system info:

openerp-server 5.0.14
Ubuntu 10.04 64bit
GTK and web client

Changed in openobject-addons:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → OpenERP R&D Addons Team 2 (openerp-dev-addons2)
Changed in openobject-addons:
status: Confirmed → In Progress
Revision history for this message
Atik Agewan(OpenERP) (aag-openerp) wrote :

Hello Piotr Buszka

Thanks for reporting,
It has been fixed in lp:~openerp-commiter/openobject-addons/trunk-addons-aag
Revision ID: <email address hidden>
Revision num: 5015 .
It will be available in trunk soon,

Changed in openobject-addons:
status: In Progress → Fix Released
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.