This question has been flagged
3 Replies
3582 Views

Hi, I have been having a difficulty with the error message, "You cannot validate a landed cost which has no valid valuation lines." in the Landed Costs module. This error message shows up after I click the "Validate" button.

This seems to occur only when there are four or more items in the list (under "Valuation Adjustments") AND the last digit (second decmial place) of the cost lines total is 1, 2, 3, 4, 6, 7, 8, or 9. The number 0 and 5 in the second place has no issue (no error message).

For example, xxx.x2, xxx.x8, xxx.x3, and so on produce the error but if any number ends in 0 or 5 (xxx.x0 or xxx.x5) it works fine. Very strange!

I am able to reproduce this issue in Odoo demo. You can check it out at https://demo.odoo.com. I really need to resolve this so I can continue with the rest of record. I don't want to add or substract a few cents to sum to a number ending in 0 or 5 in the second decimal place to avoid the error message and validating the record successfully. I want to have accurate numbers all the time.

Hope you are able to resolve this glitch as soon as possible. It applies to my Odoo 8 on Windows 8 and online demo as well. There are couple of users responsed this error in the forum as well. I don't know if it occurs on OpenERP 7 as I don't have it.

Thanks in advance for your help on this issue.

landed_cost_error_message

(Online Odoo 9 Alpha Demo)

Avatar
Discard

Hi Tim, if you're very sure this isn't the correct behaviour and that its a bug you should open up a report for it. You can make one at https://github.com/odoo/odoo/issues

Author

Hi Yenthe, yeah I already reported this at GitHub :)

Best Answer

The problem is coming from the fact that the split per lines total is not matching the total of the landed cost.


I found the best way to get around that is to export the draft lines with the total per line, do a quick sum on all the lines and it should match the cost that you are trying to adjust.

I usually export the following lines

valuation_adjustment_lines/additional_landed_cost
valuation_adjustment_lines/product_id/id
valuation_adjustment_lines/quantity

and in the excel exported file do a sum for the "valuation_adjustment_lines/additional_landed_cost"

Avatar
Discard