Add stock_lot_improve_sync_invenory_to_ougoing patch
This commit is contained in:
parent
fe4848a93e
commit
1840073c85
1
series
1
series
|
@ -74,3 +74,4 @@ issue7961002_40001.diff
|
||||||
#chart_not_translatable.diff
|
#chart_not_translatable.diff
|
||||||
#024726_account_bank_remove_company.diff
|
#024726_account_bank_remove_company.diff
|
||||||
#024726_account_payment_type_remove_company.diff
|
#024726_account_payment_type_remove_company.diff
|
||||||
|
#stock_lot_improve_sync_inventory_to_outgoing.diff
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
diff -r 973556094501 stock.py
|
||||||
|
--- a/trytond/trytond/modules/stock_lot/stock.py Mon Oct 26 13:23:09 2015 +0100
|
||||||
|
+++ b/trytond/trytond/modules/stock_lot/stock.py Mon Oct 26 13:45:41 2015 +0100
|
||||||
|
@@ -133,19 +133,17 @@
|
||||||
|
out_quantity = Uom.compute_qty(out_move.uom,
|
||||||
|
out_move.quantity, out_move.product.default_uom,
|
||||||
|
round=False)
|
||||||
|
+ out_move_vals = {}
|
||||||
|
if quantity < out_quantity:
|
||||||
|
outgoing_moves.extend(Move.copy([out_move], default={
|
||||||
|
'quantity': Uom.round(
|
||||||
|
out_quantity - quantity,
|
||||||
|
out_move.uom.rounding),
|
||||||
|
}))
|
||||||
|
- Move.write([out_move], {
|
||||||
|
- 'quantity': Uom.round(
|
||||||
|
- quantity, out_move.uom.rounding),
|
||||||
|
- })
|
||||||
|
- Move.write([out_move], {
|
||||||
|
- 'lot': move.lot.id,
|
||||||
|
- })
|
||||||
|
+ out_move_vals['quantity'] = Uom.round(quantity,
|
||||||
|
+ out_move.uom.rounding)
|
||||||
|
+ out_move_vals['lot'] = move.lot.id
|
||||||
|
+ Move.write([out_move], out_move_vals)
|
||||||
|
quantity -= out_quantity
|
||||||
|
assert quantity <= move.product.default_uom.rounding
|
||||||
|
|
Loading…
Reference in New Issue