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
Labels
Merge Requests
140
Merge Requests
140
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
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
af9bb9eb
Commit
af9bb9eb
authored
Oct 16, 2022
by
Kazuhiko Shiozaki
Committed by
Jérome Perrin
Dec 27, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
py2/py3: async is a reserved word in Python 3.7 or later.
parent
6d1e588d
Changes
4
Hide 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 @
af9bb9eb
"""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 @
af9bb9eb
...
@@ -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 @
af9bb9eb
...
@@ -121,7 +121,7 @@ else:
...
@@ -121,7 +121,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
))
portal_status_message
=
Base_translateString
(
'${ungrouped_line_count} lines ungrouped.'
,
portal_status_message
=
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 @
af9bb9eb
...
@@ -3907,7 +3907,7 @@ class TestTransactions(AccountingTestCase):
...
@@ -3907,7 +3907,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