Commit bb48e202 authored by Jérome Perrin's avatar Jérome Perrin

accounting: fix Node_getAccountingTransactionList compatibility

fixup f4639fde . params['section_uid'] can be a integer
parent c9589047
...@@ -170,11 +170,14 @@ if from_date or is_pl_account:\n ...@@ -170,11 +170,14 @@ if from_date or is_pl_account:\n
# I don\'t think this should happen\n # I don\'t think this should happen\n
log(\'from_date not passed, defaulting to period_start_date\')\n log(\'from_date not passed, defaulting to period_start_date\')\n
initial_balance_from_date = period_start_date\n initial_balance_from_date = period_start_date\n
\n \n
# Get previous debit and credit\n # Get previous debit and credit\n
if not (initial_balance_from_date == period_start_date and is_pl_account):\n if not (initial_balance_from_date == period_start_date and is_pl_account):\n
getInventoryAssetPrice = portal.portal_simulation.getInventoryAssetPrice\n getInventoryAssetPrice = portal.portal_simulation.getInventoryAssetPrice\n
for section_uid in list(params.get(\'section_uid\', [])):\n section_uid_list = params.get(\'section_uid\', [])\n
if not same_type(section_uid_list, []):\n
section_uid_list = [section_uid_list]\n
for section_uid in section_uid_list:\n
# We add one initial balance line per section. The main reason is to be able\n # We add one initial balance line per section. The main reason is to be able\n
# to know the section_title for the GL export.\n # to know the section_title for the GL export.\n
# XXX we may also want detail by resource or analytic columns sometimes.\n # XXX we may also want detail by resource or analytic columns sometimes.\n
...@@ -188,7 +191,7 @@ if from_date or is_pl_account:\n ...@@ -188,7 +191,7 @@ if from_date or is_pl_account:\n
to_date=min(period_start_date,\n to_date=min(period_start_date,\n
initial_balance_from_date),\n initial_balance_from_date),\n
**get_inventory_kw)\n **get_inventory_kw)\n
\n \n
# then all movements between period_start_date and from_date\n # then all movements between period_start_date and from_date\n
previous_total_debit = getInventoryAssetPrice(omit_asset_decrease=True,\n previous_total_debit = getInventoryAssetPrice(omit_asset_decrease=True,\n
from_date=period_start_date,\n from_date=period_start_date,\n
......
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