[FIX] Landed Cost: When Creating Negative costs with more than one picking line fixes #8714
check_sum fails as whole cost from cost_lines field are fully allocated to first item in picking.
This commit is contained in:
parent
34ce3e36e1
commit
432d6585c9
|
@ -286,7 +286,8 @@ class stock_landed_cost(osv.osv):
|
|||
|
||||
if digits:
|
||||
value = float_round(value, precision_digits=digits[1], rounding_method='UP')
|
||||
value = min(value, line.price_unit - value_split)
|
||||
fnc = min if line.price_unit > 0 else max
|
||||
value = fnc(value, line.price_unit - value_split)
|
||||
value_split += value
|
||||
|
||||
if valuation.id not in towrite_dict:
|
||||
|
|
Loading…
Reference in New Issue