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
Nikola Balog
erp5
Commits
f692aa61
Commit
f692aa61
authored
Oct 23, 2019
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_bank_reconciliation] Rename your_mode field, to prevent naming conflict in hal
parent
33b8e920
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
26 additions
and
26 deletions
+26
-26
bt5/erp5_bank_reconciliation/SkinTemplateItem/portal_skins/erp5_bank_reconciliation/BankReconciliation_getAccountingTransactionLineList.py
...on/BankReconciliation_getAccountingTransactionLineList.py
+2
-2
bt5/erp5_bank_reconciliation/SkinTemplateItem/portal_skins/erp5_bank_reconciliation/BankReconciliation_getAccountingTransactionLineList.xml
...n/BankReconciliation_getAccountingTransactionLineList.xml
+1
-1
bt5/erp5_bank_reconciliation/SkinTemplateItem/portal_skins/erp5_bank_reconciliation/BankReconciliation_getBankReconciliationReportSectionList.py
...kReconciliation_getBankReconciliationReportSectionList.py
+2
-2
bt5/erp5_bank_reconciliation/SkinTemplateItem/portal_skins/erp5_bank_reconciliation/BankReconciliation_reconcileTransactionList.py
...nciliation/BankReconciliation_reconcileTransactionList.py
+8
-8
bt5/erp5_bank_reconciliation/SkinTemplateItem/portal_skins/erp5_bank_reconciliation/BankReconciliation_reconcileTransactionList.xml
...ciliation/BankReconciliation_reconcileTransactionList.xml
+1
-1
bt5/erp5_bank_reconciliation/SkinTemplateItem/portal_skins/erp5_bank_reconciliation/BankReconciliation_viewBankReconciliationFastInputDialog.xml
...kReconciliation_viewBankReconciliationFastInputDialog.xml
+1
-1
bt5/erp5_bank_reconciliation/SkinTemplateItem/portal_skins/erp5_bank_reconciliation/BankReconciliation_viewBankReconciliationFastInputDialog/your_reconciliation_mode.xml
...econciliationFastInputDialog/your_reconciliation_mode.xml
+1
-1
bt5/erp5_bank_reconciliation/SkinTemplateItem/portal_skins/erp5_bank_reconciliation/BankReconciliation_viewReconciledAccountingTransactionList/listbox.xml
...ation_viewReconciledAccountingTransactionList/listbox.xml
+1
-1
product/ERP5/tests/testBankReconciliation.py
product/ERP5/tests/testBankReconciliation.py
+9
-9
No files found.
bt5/erp5_bank_reconciliation/SkinTemplateItem/portal_skins/erp5_bank_reconciliation/BankReconciliation_getAccountingTransactionLineList.py
View file @
f692aa61
...
...
@@ -13,7 +13,7 @@ kw = {
}
if
mode
==
"reconcile"
:
if
reconciliation_
mode
==
"reconcile"
:
if
context
.
getStopDate
():
kw
[
'at_date'
]
=
context
.
getStopDate
().
latestTime
()
kw
.
update
({
...
...
@@ -22,7 +22,7 @@ if mode == "reconcile":
'left_join_list'
:
[
'aggregate_bank_reconciliation_date'
],
'implicit_join'
:
False
,
})
else
:
assert
mode
==
"unreconcile"
assert
reconciliation_
mode
==
"unreconcile"
kw
[
'aggregate_bank_reconciliation_uid'
]
=
context
.
getUid
()
# Handle search params
...
...
bt5/erp5_bank_reconciliation/SkinTemplateItem/portal_skins/erp5_bank_reconciliation/BankReconciliation_getAccountingTransactionLineList.xml
View file @
f692aa61
...
...
@@ -50,7 +50,7 @@
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
mode="reconcile", *args, **listbox_kw
</string>
</value>
<value>
<string>
reconciliation_
mode="reconcile", *args, **listbox_kw
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
...
...
bt5/erp5_bank_reconciliation/SkinTemplateItem/portal_skins/erp5_bank_reconciliation/BankReconciliation_getBankReconciliationReportSectionList.py
View file @
f692aa61
...
...
@@ -19,13 +19,13 @@ if request.get('show_reconcilied', True):
path
=
context
.
getPhysicalPath
(),
selection_name
=
"bank_reconciliation_report_selection"
,
selection_params
=
{
'title'
:
'Reconciled Transactions'
,
'mode'
:
'unreconcile'
}))
'
reconciliation_
mode'
:
'unreconcile'
}))
if
request
.
get
(
'show_non_reconcilied'
,
True
):
report_section_list
.
append
(
ReportSection
(
form_id
=
'BankReconciliation_viewBankReconciliationReportSection'
,
selection_name
=
"bank_reconciliation_report_selection"
,
path
=
context
.
getPhysicalPath
(),
selection_params
=
{
'title'
:
'Not Reconciled Transactions'
,
'mode'
:
'reconcile'
}))
'
reconciliation_
mode'
:
'reconcile'
}))
return
report_section_list
bt5/erp5_bank_reconciliation/SkinTemplateItem/portal_skins/erp5_bank_reconciliation/BankReconciliation_reconcileTransactionList.py
View file @
f692aa61
...
...
@@ -7,7 +7,7 @@ selection_uid_list = portal.portal_selections.getSelectionCheckedUidsFor(list_se
reconciled_bank_account
=
context
.
getSourcePayment
()
if
mode
==
'reconcile'
:
if
reconciliation_
mode
==
'reconcile'
:
for
line
in
portal
.
portal_catalog
(
uid
=
selection_uid_list
or
-
1
):
line
=
line
.
getObject
()
# Sanity check: line should not already be reconciled.
...
...
@@ -29,8 +29,8 @@ if mode == 'reconcile':
'portal_status_message'
:
translateString
(
"Line Already Reconciled"
),
'reset'
:
1
,
'cancel_url'
:
cancel_url
,
'
mode'
:
mode
,
'field_your_
mode'
:
mode
})
'
reconciliation_mode'
:
reconciliation_
mode
,
'field_your_
reconciliation_mode'
:
reconciliation_
mode
})
line
.
AccountingTransactionLine_addBankReconciliation
(
context
.
getRelativeUrl
(),
message
=
translateString
(
"Reconciling Bank Line"
))
...
...
@@ -38,11 +38,11 @@ if mode == 'reconcile':
'portal_status_message'
:
translateString
(
"Lines Reconciled"
),
'reset'
:
1
,
'cancel_url'
:
cancel_url
,
'field_your_
mode'
:
mode
,
'
mode'
:
mode
,
'field_your_
reconciliation_mode'
:
reconciliation_
mode
,
'
reconciliation_mode'
:
reconciliation_
mode
,
'reconciled_uid_list'
:
selection_uid_list
})
assert
mode
==
'unreconcile'
assert
reconciliation_
mode
==
'unreconcile'
for
line
in
portal
.
portal_catalog
(
uid
=
selection_uid_list
or
-
1
):
line
=
line
.
getObject
()
line
.
AccountingTransactionLine_removeBankReconciliation
(
...
...
@@ -53,6 +53,6 @@ return context.Base_redirect(dialog_id, keep_items={
'portal_status_message'
:
translateString
(
"Lines Unreconciled"
),
'reset'
:
1
,
'cancel_url'
:
cancel_url
,
'field_your_
mode'
:
mode
,
'
mode'
:
mode
,
'field_your_
reconciliation_mode'
:
reconciliation_
mode
,
'
reconciliation_mode'
:
reconciliation_
mode
,
'reconciled_uid_list'
:
selection_uid_list
})
bt5/erp5_bank_reconciliation/SkinTemplateItem/portal_skins/erp5_bank_reconciliation/BankReconciliation_reconcileTransactionList.xml
View file @
f692aa61
...
...
@@ -50,7 +50,7 @@
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
mode="reconcile", list_selection_name="", uids=(), listbox_uid=(), dialog_id=None, cancel_url=None, **kw
</string>
</value>
<value>
<string>
reconciliation_
mode="reconcile", list_selection_name="", uids=(), listbox_uid=(), dialog_id=None, cancel_url=None, **kw
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
...
...
bt5/erp5_bank_reconciliation/SkinTemplateItem/portal_skins/erp5_bank_reconciliation/BankReconciliation_viewBankReconciliationFastInputDialog.xml
View file @
f692aa61
...
...
@@ -100,7 +100,7 @@
<key>
<string>
left
</string>
</key>
<value>
<list>
<string>
your_mode
</string>
<string>
your_
reconciliation_
mode
</string>
<string>
my_stop_date
</string>
</list>
</value>
...
...
bt5/erp5_bank_reconciliation/SkinTemplateItem/portal_skins/erp5_bank_reconciliation/BankReconciliation_viewBankReconciliationFastInputDialog/your_mode.xml
→
bt5/erp5_bank_reconciliation/SkinTemplateItem/portal_skins/erp5_bank_reconciliation/BankReconciliation_viewBankReconciliationFastInputDialog/your_
reconciliation_
mode.xml
View file @
f692aa61
...
...
@@ -18,7 +18,7 @@
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
your_mode
</string>
</value>
<value>
<string>
your_
reconciliation_
mode
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
...
...
bt5/erp5_bank_reconciliation/SkinTemplateItem/portal_skins/erp5_bank_reconciliation/BankReconciliation_viewReconciledAccountingTransactionList/listbox.xml
View file @
f692aa61
...
...
@@ -180,7 +180,7 @@
<string>
View
</string>
</tuple>
<tuple>
<string>
mode
</string>
<string>
reconciliation_
mode
</string>
<string>
unreconcile
</string>
</tuple>
</list>
...
...
product/ERP5/tests/testBankReconciliation.py
View file @
f692aa61
...
...
@@ -136,7 +136,7 @@ class TestBankReconciliation(AccountingTestCase, ERP5ReportTestCase):
# This listbox can also be used to unreconcile some previously reconciled
# transactions.
line_list
=
bank_reconciliation
.
BankReconciliation_getAccountingTransactionLineList
(
mode
=
"unreconcile"
,
reconciliation_
mode
=
"unreconcile"
,
)
self
.
assertEqual
([
payment1
.
bank
,
],
[
line
.
getObject
()
for
line
in
line_list
])
...
...
@@ -258,7 +258,7 @@ class TestBankReconciliation(AccountingTestCase, ERP5ReportTestCase):
bank_reconciliation
.
BankReconciliation_reconcileTransactionList
(
list_selection_name
=
list_selection_name
,
uids
=
(
payment1
.
bank
.
getUid
(),),
mode
=
'reconcile'
)
reconciliation_
mode
=
'reconcile'
)
self
.
tic
()
self
.
assertEqual
(
bank_reconciliation
,
payment1
.
bank
.
getAggregateValue
())
...
...
@@ -274,7 +274,7 @@ class TestBankReconciliation(AccountingTestCase, ERP5ReportTestCase):
bank_reconciliation
.
BankReconciliation_reconcileTransactionList
(
list_selection_name
=
list_selection_name
,
uids
=
(
payment1
.
bank
.
getUid
(),),
mode
=
'unreconcile'
)
reconciliation_
mode
=
'unreconcile'
)
self
.
tic
()
self
.
assertEqual
(
None
,
payment1
.
bank
.
getAggregateValue
())
...
...
@@ -444,7 +444,7 @@ class TestBankReconciliation(AccountingTestCase, ERP5ReportTestCase):
self
.
assertEqual
(
'BankReconciliation_view'
,
report_section_list
[
0
].
form_id
)
# Then we have the reconciled lines
self
.
assertEqual
({
'mode'
:
'unreconcile'
,
self
.
assertEqual
({
'
reconciliation_
mode'
:
'unreconcile'
,
'title'
:
'Reconciled Transactions'
},
report_section_list
[
1
].
selection_params
)
line_list
=
self
.
getListBoxLineList
(
report_section_list
[
1
])
...
...
@@ -455,7 +455,7 @@ class TestBankReconciliation(AccountingTestCase, ERP5ReportTestCase):
# And finally the non reconciled lines
line_list
=
self
.
getListBoxLineList
(
report_section_list
[
2
])
self
.
assertEqual
({
'mode'
:
'reconcile'
,
self
.
assertEqual
({
'
reconciliation_
mode'
:
'reconcile'
,
'title'
:
'Not Reconciled Transactions'
},
report_section_list
[
2
].
selection_params
)
data_line_list
=
[
l
for
l
in
line_list
if
l
.
isDataLine
()]
...
...
@@ -552,7 +552,7 @@ class TestBankReconciliation(AccountingTestCase, ERP5ReportTestCase):
bank_reconciliation
.
BankReconciliation_reconcileTransactionList
(
list_selection_name
=
list_selection_name
,
uids
=
(
payment1
.
bank
.
getUid
(),
),
mode
=
'reconcile'
)
reconciliation_
mode
=
'reconcile'
)
self
.
tic
()
self
.
assertEqual
(
100
,
bank_reconciliation
.
BankReconciliation_getReconciledAccountBalance
())
...
...
@@ -631,7 +631,7 @@ class TestBankReconciliation(AccountingTestCase, ERP5ReportTestCase):
bank_reconciliation_for_section
.
BankReconciliation_reconcileTransactionList
(
list_selection_name
=
list_selection_name
,
uids
=
(
internal_transaction
.
bank
.
getUid
(),
),
mode
=
'reconcile'
)
reconciliation_
mode
=
'reconcile'
)
self
.
tic
()
# reconciled for `section`
self
.
assertEqual
(
100
,
bank_reconciliation_for_section
.
BankReconciliation_getReconciledAccountBalance
())
...
...
@@ -657,7 +657,7 @@ class TestBankReconciliation(AccountingTestCase, ERP5ReportTestCase):
bank_reconciliation_for_main_section
.
BankReconciliation_reconcileTransactionList
(
list_selection_name
=
list_selection_name
,
uids
=
(
internal_transaction
.
bank
.
getUid
(),
),
mode
=
'reconcile'
)
reconciliation_
mode
=
'reconcile'
)
self
.
tic
()
# Reconciled for `main_section`
self
.
assertEqual
(
-
100
,
bank_reconciliation_for_main_section
.
BankReconciliation_getReconciledAccountBalance
())
...
...
@@ -684,7 +684,7 @@ class TestBankReconciliation(AccountingTestCase, ERP5ReportTestCase):
bank_reconciliation_for_section
.
BankReconciliation_reconcileTransactionList
(
list_selection_name
=
list_selection_name
,
uids
=
(
internal_transaction
.
bank
.
getUid
(),
),
mode
=
'unreconcile'
)
reconciliation_
mode
=
'unreconcile'
)
self
.
tic
()
# no longer reconciled for `section`
self
.
assertEqual
(
0
,
bank_reconciliation_for_section
.
BankReconciliation_getReconciledAccountBalance
())
...
...
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