Commit 1eb44d88 authored by Jérome Perrin's avatar Jérome Perrin

accounting py3

parent 18750bf7
...@@ -35,7 +35,7 @@ search_params = dict( ...@@ -35,7 +35,7 @@ search_params = dict(
for brain in portal.portal_simulation.getInventoryList(**search_params): for brain in portal.portal_simulation.getInventoryList(**search_params):
if round(brain.total_price, precision) == 0: if round(brain.total_price, precision) == 0:
print '%s has a 0 balance but some not grouped transactions.' % brain.mirror_section_relative_url print('%s has a 0 balance but some not grouped transactions.' % brain.mirror_section_relative_url)
if fixit: if fixit:
tr = brain.getObject().getParentValue() tr = brain.getObject().getParentValue()
grouped_line_list = tr.AccountingTransaction_guessGroupedLines() grouped_line_list = tr.AccountingTransaction_guessGroupedLines()
...@@ -51,9 +51,9 @@ for brain in portal.portal_simulation.getInventoryList(**search_params): ...@@ -51,9 +51,9 @@ for brain in portal.portal_simulation.getInventoryList(**search_params):
portal_type=portal.getPortalAccountingMovementTypeList(), portal_type=portal.getPortalAccountingMovementTypeList(),
grouping_reference=None,) if not line.getObject().getGroupingReference()]) grouping_reference=None,) if not line.getObject().getGroupingReference()])
if grouped_line_list: if grouped_line_list:
print 'FIXED', grouped_line_list print('FIXED %s' % grouped_line_list)
else: else:
print 'NOT FIXED' print('NOT FIXED')
active_result = ActiveResult( active_result = ActiveResult(
summary=context.getTitle(), summary=context.getTitle(),
......
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