Commit a42b3f4b authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

py2/py3: async is a reserved word in Python 3.7 or later.

parent a2b70d0c
"""Resets grouping reference on this line and all related lines.
This runs by default asynchronously, but can be call with `async=False` to
run synchronously and returns the list of ungrouped lines. With `async=True`,
This runs by default asynchronoushronously, but can be call with `asynchronous=False` to
run synchronously and returns the list of ungrouped lines. With `asynchronous=True`,
the returned list is always empty.
"""
......@@ -13,7 +13,7 @@ if not context.getGroupingReference():
portal = context.getPortalObject()
resetGroupingReference = portal.ERP5Site_resetAccountingTransactionLineGroupingReference
if async:
if asynchronous:
resetGroupingReference = portal.portal_simulation.activate(
activity='SQLQueue',
after_tag='accounting_grouping_reference'
......
......@@ -50,7 +50,7 @@
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>async=True</string> </value>
<value> <string>asynchronous=True</string> </value>
</item>
<item>
<key> <string>id</string> </key>
......
......@@ -119,7 +119,7 @@ else:
if line.getGroupingReference():
# Call AccountingTransactionLine_resetGroupingReference synchronously
# to know the number of ungrouped lines.
ungrouped_line_list.extend(line.AccountingTransactionLine_resetGroupingReference(async=False))
ungrouped_line_list.extend(line.AccountingTransactionLine_resetGroupingReference(asynchronous=False))
psm = Base_translateString('${ungrouped_line_count} lines ungrouped.',
mapping=dict(ungrouped_line_count=len(ungrouped_line_list)))
......
......@@ -3907,7 +3907,7 @@ class TestTransactions(AccountingTestCase):
# reset from the payment line, the invoice line from the same group will be
# ungrouped
payment_line.AccountingTransactionLine_resetGroupingReference(async=False)
payment_line.AccountingTransactionLine_resetGroupingReference(asynchronous=False)
self.assertFalse(payment_line.getGroupingReference())
self.assertFalse(payment_line.getGroupingDate())
self.assertFalse(invoice_line.getGroupingReference())
......
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