Commit bd311474 authored by Arnaud Fontaine's avatar Arnaud Fontaine

erp5_real_time_inventory_accounting: stock/preparation/sortie for SPL.

parent 8116ba60
......@@ -71,14 +71,13 @@ class InventoryAssetPriceAccountingRuleMovementGenerator(InvoiceTransactionRuleM
update_property_dict=update_property_dict):
# PATCH-BEGIN
update_dict = {}
if movement.getLedger() == 'stock/stock/entree':
if movement.getLedger() in ('stock/stock/entree',
'stock/transit/sortie'):
update_dict['start_date'] = update_dict['stop_date'] = input_movement.getStopDate()
elif movement.getLedger() == 'stock/stock/sortie':
elif movement.getLedger() in ('stock/stock/sortie',
'stock/preparation/sortie',
'stock/transit/entree'):
update_dict['start_date'] = update_dict['stop_date'] = input_movement.getStartDate()
elif movement.getLedger() == 'stock/transit/entree':
update_dict['start_date'] = update_dict['stop_date'] = input_movement.getStartDate()
elif movement.getLedger() == 'stock/transit/sortie':
update_dict['start_date'] = update_dict['stop_date'] = input_movement.getStopDate()
movement._edit(**update_dict)
input_movement.log("%r (input_movement=%r): ledger=%r, start_date=%r, stop_date=%r" %
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment