Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Levin Zimmermann
erp5
Commits
5bc463cb
Commit
5bc463cb
authored
Oct 16, 2022
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
py2/py3: async is a reserved word in Python 3.7 or later.
parent
2c80076a
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
6 deletions
+6
-6
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionLine_resetGroupingReference.py
...nting/AccountingTransactionLine_resetGroupingReference.py
+3
-3
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionLine_resetGroupingReference.xml
...ting/AccountingTransactionLine_resetGroupingReference.xml
+1
-1
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_setGroupingReference.py
...nting/AccountingTransactionModule_setGroupingReference.py
+1
-1
bt5/erp5_accounting/TestTemplateItem/portal_components/test.erp5.testAccounting.py
...emplateItem/portal_components/test.erp5.testAccounting.py
+1
-1
No files found.
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionLine_resetGroupingReference.py
View file @
5bc463cb
"""Resets grouping reference on this line and all related lines.
"""Resets grouping reference on this line and all related lines.
This runs by default asynchronous
ly, but can be call with `async
=False` to
This runs by default asynchronous
hronously, but can be call with `asynchronous
=False` to
run synchronously and returns the list of ungrouped lines. With `async=True`,
run synchronously and returns the list of ungrouped lines. With `async
hronous
=True`,
the returned list is always empty.
the returned list is always empty.
"""
"""
...
@@ -13,7 +13,7 @@ if not context.getGroupingReference():
...
@@ -13,7 +13,7 @@ if not context.getGroupingReference():
portal
=
context
.
getPortalObject
()
portal
=
context
.
getPortalObject
()
resetGroupingReference
=
portal
.
ERP5Site_resetAccountingTransactionLineGroupingReference
resetGroupingReference
=
portal
.
ERP5Site_resetAccountingTransactionLineGroupingReference
if
async
:
if
async
hronous
:
resetGroupingReference
=
portal
.
portal_simulation
.
activate
(
resetGroupingReference
=
portal
.
portal_simulation
.
activate
(
activity
=
'SQLQueue'
,
activity
=
'SQLQueue'
,
after_tag
=
'accounting_grouping_reference'
after_tag
=
'accounting_grouping_reference'
...
...
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionLine_resetGroupingReference.xml
View file @
5bc463cb
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
_params
</string>
</key>
<key>
<string>
_params
</string>
</key>
<value>
<string>
async=True
</string>
</value>
<value>
<string>
async
hronous
=True
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
...
...
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_setGroupingReference.py
View file @
5bc463cb
...
@@ -119,7 +119,7 @@ else:
...
@@ -119,7 +119,7 @@ else:
if
line
.
getGroupingReference
():
if
line
.
getGroupingReference
():
# Call AccountingTransactionLine_resetGroupingReference synchronously
# Call AccountingTransactionLine_resetGroupingReference synchronously
# to know the number of ungrouped lines.
# to know the number of ungrouped lines.
ungrouped_line_list
.
extend
(
line
.
AccountingTransactionLine_resetGroupingReference
(
async
=
False
))
ungrouped_line_list
.
extend
(
line
.
AccountingTransactionLine_resetGroupingReference
(
async
hronous
=
False
))
psm
=
Base_translateString
(
'${ungrouped_line_count} lines ungrouped.'
,
psm
=
Base_translateString
(
'${ungrouped_line_count} lines ungrouped.'
,
mapping
=
dict
(
ungrouped_line_count
=
len
(
ungrouped_line_list
)))
mapping
=
dict
(
ungrouped_line_count
=
len
(
ungrouped_line_list
)))
...
...
bt5/erp5_accounting/TestTemplateItem/portal_components/test.erp5.testAccounting.py
View file @
5bc463cb
...
@@ -3739,7 +3739,7 @@ class TestTransactions(AccountingTestCase):
...
@@ -3739,7 +3739,7 @@ class TestTransactions(AccountingTestCase):
# reset from the payment line, the invoice line from the same group will be
# reset from the payment line, the invoice line from the same group will be
# ungrouped
# ungrouped
payment_line
.
AccountingTransactionLine_resetGroupingReference
(
async
=
False
)
payment_line
.
AccountingTransactionLine_resetGroupingReference
(
async
hronous
=
False
)
self
.
assertFalse
(
payment_line
.
getGroupingReference
())
self
.
assertFalse
(
payment_line
.
getGroupingReference
())
self
.
assertFalse
(
payment_line
.
getGroupingDate
())
self
.
assertFalse
(
payment_line
.
getGroupingDate
())
self
.
assertFalse
(
invoice_line
.
getGroupingReference
())
self
.
assertFalse
(
invoice_line
.
getGroupingReference
())
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment