Cannot override landed cost distribution in landed cost line
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Camptocamp R&D Addons |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Environment:
python 2.7 + openerp 7.0 + latest c2c-rd-addons from branch 7.0
1. Create a request for quotation
2. Add a purchase order line for any product with quantity: 5
3. Add a purchase order line for any product with quantity: 10
4. Create a landed cost line with the "Quantity" distribution type and amount = 1000
5. Update the totals and assess that the « Landed Costs from Order » field is calculated correctly:
Expected and actual results:
Line 1: 333$
Line 2: 666$
6. Edit the request for quotation and set the « Amount type » field of the landed cost line to « Absolute Value »
7. Update the totals and assess that the « Landed Costs from Order» field is not calculated correctly for both lines:
Expected:
Line 1: 1000 * line1.subtotal / (line1.subtotal + line2.subtotal)
Line 2: 1000 * line2.subtotal / (line1.subtotal + line2.subtotal)
Result:
Line 1: 1000 * line1.product_qty / (line1.product_qty + line2.product_qty)
Line 2: 1000 * line2.product_qty / (line1.product_qty + line2.product_qty)
Related branches
- Ferdinand: Approve
-
Diff: 107 lines (+32/-7)3 files modifiedpurchase_landed_costs/product.py (+7/-0)
purchase_landed_costs/purchase.py (+24/-6)
purchase_landed_costs/purchase_view.xml (+1/-1)
Changed in c2c-rd-addons: | |
status: | New → Fix Committed |
Changed in c2c-rd-addons: | |
status: | Fix Committed → Fix Released |