Skip to content
Snippets Groups Projects
Commit f22f98cf authored by Martin Trigaux's avatar Martin Trigaux
Browse files

[FIX] stock_account: accept negative quantities on standard price

The qty_available available of a product can be negative (e.g. using the force availibility button on delivery order) and the generated account.move.line should be adapted (otherwise getting negative values in debit/credit entries).
Fixes #2475
parent 93845d68
No related branches found
No related tags found
No related merge requests found
......@@ -124,7 +124,7 @@ class product_template(osv.osv):
}
move_id = move_obj.create(cr, uid, move_vals, context=context)
if diff > 0:
if diff*qty > 0:
amount_diff = qty * diff
debit_account_id = datas['stock_account_input']
credit_account_id = datas['property_stock_valuation_account_id']
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment