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
Paul Graydon
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 = {
...
@@ -13,7 +13,7 @@ kw = {
}
}
if
mode
==
"reconcile"
:
if
reconciliation_
mode
==
"reconcile"
:
if
context
.
getStopDate
():
if
context
.
getStopDate
():
kw
[
'at_date'
]
=
context
.
getStopDate
().
latestTime
()
kw
[
'at_date'
]
=
context
.
getStopDate
().
latestTime
()
kw
.
update
({
kw
.
update
({
...
@@ -22,7 +22,7 @@ if mode == "reconcile":
...
@@ -22,7 +22,7 @@ if mode == "reconcile":
'left_join_list'
:
[
'aggregate_bank_reconciliation_date'
],
'left_join_list'
:
[
'aggregate_bank_reconciliation_date'
],
'implicit_join'
:
False
,
})
'implicit_join'
:
False
,
})
else
:
else
:
assert
mode
==
"unreconcile"
assert
reconciliation_
mode
==
"unreconcile"
kw
[
'aggregate_bank_reconciliation_uid'
]
=
context
.
getUid
()
kw
[
'aggregate_bank_reconciliation_uid'
]
=
context
.
getUid
()
# Handle search params
# Handle search params
...
...
bt5/erp5_bank_reconciliation/SkinTemplateItem/portal_skins/erp5_bank_reconciliation/BankReconciliation_getAccountingTransactionLineList.xml
View file @
f692aa61
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
_params
</string>
</key>
<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>
<item>
<item>
<key>
<string>
id
</string>
</key>
<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):
...
@@ -19,13 +19,13 @@ if request.get('show_reconcilied', True):
path
=
context
.
getPhysicalPath
(),
path
=
context
.
getPhysicalPath
(),
selection_name
=
"bank_reconciliation_report_selection"
,
selection_name
=
"bank_reconciliation_report_selection"
,
selection_params
=
{
'title'
:
'Reconciled Transactions'
,
selection_params
=
{
'title'
:
'Reconciled Transactions'
,
'mode'
:
'unreconcile'
}))
'
reconciliation_
mode'
:
'unreconcile'
}))
if
request
.
get
(
'show_non_reconcilied'
,
True
):
if
request
.
get
(
'show_non_reconcilied'
,
True
):
report_section_list
.
append
(
report_section_list
.
append
(
ReportSection
(
form_id
=
'BankReconciliation_viewBankReconciliationReportSection'
,
ReportSection
(
form_id
=
'BankReconciliation_viewBankReconciliationReportSection'
,
selection_name
=
"bank_reconciliation_report_selection"
,
selection_name
=
"bank_reconciliation_report_selection"
,
path
=
context
.
getPhysicalPath
(),
path
=
context
.
getPhysicalPath
(),
selection_params
=
{
'title'
:
'Not Reconciled Transactions'
,
selection_params
=
{
'title'
:
'Not Reconciled Transactions'
,
'mode'
:
'reconcile'
}))
'
reconciliation_
mode'
:
'reconcile'
}))
return
report_section_list
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
...
@@ -7,7 +7,7 @@ selection_uid_list = portal.portal_selections.getSelectionCheckedUidsFor(list_se
reconciled_bank_account
=
context
.
getSourcePayment
()
reconciled_bank_account
=
context
.
getSourcePayment
()
if
mode
==
'reconcile'
:
if
reconciliation_
mode
==
'reconcile'
:
for
line
in
portal
.
portal_catalog
(
uid
=
selection_uid_list
or
-
1
):
for
line
in
portal
.
portal_catalog
(
uid
=
selection_uid_list
or
-
1
):
line
=
line
.
getObject
()
line
=
line
.
getObject
()
# Sanity check: line should not already be reconciled.
# Sanity check: line should not already be reconciled.
...
@@ -29,8 +29,8 @@ if mode == 'reconcile':
...
@@ -29,8 +29,8 @@ if mode == 'reconcile':
'portal_status_message'
:
translateString
(
"Line Already Reconciled"
),
'portal_status_message'
:
translateString
(
"Line Already Reconciled"
),
'reset'
:
1
,
'reset'
:
1
,
'cancel_url'
:
cancel_url
,
'cancel_url'
:
cancel_url
,
'
mode'
:
mode
,
'
reconciliation_mode'
:
reconciliation_
mode
,
'field_your_
mode'
:
mode
})
'field_your_
reconciliation_mode'
:
reconciliation_
mode
})
line
.
AccountingTransactionLine_addBankReconciliation
(
line
.
AccountingTransactionLine_addBankReconciliation
(
context
.
getRelativeUrl
(),
context
.
getRelativeUrl
(),
message
=
translateString
(
"Reconciling Bank Line"
))
message
=
translateString
(
"Reconciling Bank Line"
))
...
@@ -38,11 +38,11 @@ if mode == 'reconcile':
...
@@ -38,11 +38,11 @@ if mode == 'reconcile':
'portal_status_message'
:
translateString
(
"Lines Reconciled"
),
'portal_status_message'
:
translateString
(
"Lines Reconciled"
),
'reset'
:
1
,
'reset'
:
1
,
'cancel_url'
:
cancel_url
,
'cancel_url'
:
cancel_url
,
'field_your_
mode'
:
mode
,
'field_your_
reconciliation_mode'
:
reconciliation_
mode
,
'
mode'
:
mode
,
'
reconciliation_mode'
:
reconciliation_
mode
,
'reconciled_uid_list'
:
selection_uid_list
})
'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
):
for
line
in
portal
.
portal_catalog
(
uid
=
selection_uid_list
or
-
1
):
line
=
line
.
getObject
()
line
=
line
.
getObject
()
line
.
AccountingTransactionLine_removeBankReconciliation
(
line
.
AccountingTransactionLine_removeBankReconciliation
(
...
@@ -53,6 +53,6 @@ return context.Base_redirect(dialog_id, keep_items={
...
@@ -53,6 +53,6 @@ return context.Base_redirect(dialog_id, keep_items={
'portal_status_message'
:
translateString
(
"Lines Unreconciled"
),
'portal_status_message'
:
translateString
(
"Lines Unreconciled"
),
'reset'
:
1
,
'reset'
:
1
,
'cancel_url'
:
cancel_url
,
'cancel_url'
:
cancel_url
,
'field_your_
mode'
:
mode
,
'field_your_
reconciliation_mode'
:
reconciliation_
mode
,
'
mode'
:
mode
,
'
reconciliation_mode'
:
reconciliation_
mode
,
'reconciled_uid_list'
:
selection_uid_list
})
'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 @@
...
@@ -50,7 +50,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
_params
</string>
</key>
<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>
<item>
<item>
<key>
<string>
id
</string>
</key>
<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 @@
...
@@ -100,7 +100,7 @@
<key>
<string>
left
</string>
</key>
<key>
<string>
left
</string>
</key>
<value>
<value>
<list>
<list>
<string>
your_mode
</string>
<string>
your_
reconciliation_
mode
</string>
<string>
my_stop_date
</string>
<string>
my_stop_date
</string>
</list>
</list>
</value>
</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 @@
...
@@ -18,7 +18,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
<value>
<string>
your_mode
</string>
</value>
<value>
<string>
your_
reconciliation_
mode
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
message_values
</string>
</key>
<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 @@
...
@@ -180,7 +180,7 @@
<string>
View
</string>
<string>
View
</string>
</tuple>
</tuple>
<tuple>
<tuple>
<string>
mode
</string>
<string>
reconciliation_
mode
</string>
<string>
unreconcile
</string>
<string>
unreconcile
</string>
</tuple>
</tuple>
</list>
</list>
...
...
product/ERP5/tests/testBankReconciliation.py
View file @
f692aa61
...
@@ -136,7 +136,7 @@ class TestBankReconciliation(AccountingTestCase, ERP5ReportTestCase):
...
@@ -136,7 +136,7 @@ class TestBankReconciliation(AccountingTestCase, ERP5ReportTestCase):
# This listbox can also be used to unreconcile some previously reconciled
# This listbox can also be used to unreconcile some previously reconciled
# transactions.
# transactions.
line_list
=
bank_reconciliation
.
BankReconciliation_getAccountingTransactionLineList
(
line_list
=
bank_reconciliation
.
BankReconciliation_getAccountingTransactionLineList
(
mode
=
"unreconcile"
,
reconciliation_
mode
=
"unreconcile"
,
)
)
self
.
assertEqual
([
payment1
.
bank
,
],
self
.
assertEqual
([
payment1
.
bank
,
],
[
line
.
getObject
()
for
line
in
line_list
])
[
line
.
getObject
()
for
line
in
line_list
])
...
@@ -258,7 +258,7 @@ class TestBankReconciliation(AccountingTestCase, ERP5ReportTestCase):
...
@@ -258,7 +258,7 @@ class TestBankReconciliation(AccountingTestCase, ERP5ReportTestCase):
bank_reconciliation
.
BankReconciliation_reconcileTransactionList
(
bank_reconciliation
.
BankReconciliation_reconcileTransactionList
(
list_selection_name
=
list_selection_name
,
list_selection_name
=
list_selection_name
,
uids
=
(
payment1
.
bank
.
getUid
(),),
uids
=
(
payment1
.
bank
.
getUid
(),),
mode
=
'reconcile'
)
reconciliation_
mode
=
'reconcile'
)
self
.
tic
()
self
.
tic
()
self
.
assertEqual
(
bank_reconciliation
,
payment1
.
bank
.
getAggregateValue
())
self
.
assertEqual
(
bank_reconciliation
,
payment1
.
bank
.
getAggregateValue
())
...
@@ -274,7 +274,7 @@ class TestBankReconciliation(AccountingTestCase, ERP5ReportTestCase):
...
@@ -274,7 +274,7 @@ class TestBankReconciliation(AccountingTestCase, ERP5ReportTestCase):
bank_reconciliation
.
BankReconciliation_reconcileTransactionList
(
bank_reconciliation
.
BankReconciliation_reconcileTransactionList
(
list_selection_name
=
list_selection_name
,
list_selection_name
=
list_selection_name
,
uids
=
(
payment1
.
bank
.
getUid
(),),
uids
=
(
payment1
.
bank
.
getUid
(),),
mode
=
'unreconcile'
)
reconciliation_
mode
=
'unreconcile'
)
self
.
tic
()
self
.
tic
()
self
.
assertEqual
(
None
,
payment1
.
bank
.
getAggregateValue
())
self
.
assertEqual
(
None
,
payment1
.
bank
.
getAggregateValue
())
...
@@ -444,7 +444,7 @@ class TestBankReconciliation(AccountingTestCase, ERP5ReportTestCase):
...
@@ -444,7 +444,7 @@ class TestBankReconciliation(AccountingTestCase, ERP5ReportTestCase):
self
.
assertEqual
(
'BankReconciliation_view'
,
report_section_list
[
0
].
form_id
)
self
.
assertEqual
(
'BankReconciliation_view'
,
report_section_list
[
0
].
form_id
)
# Then we have the reconciled lines
# Then we have the reconciled lines
self
.
assertEqual
({
'mode'
:
'unreconcile'
,
self
.
assertEqual
({
'
reconciliation_
mode'
:
'unreconcile'
,
'title'
:
'Reconciled Transactions'
},
'title'
:
'Reconciled Transactions'
},
report_section_list
[
1
].
selection_params
)
report_section_list
[
1
].
selection_params
)
line_list
=
self
.
getListBoxLineList
(
report_section_list
[
1
])
line_list
=
self
.
getListBoxLineList
(
report_section_list
[
1
])
...
@@ -455,7 +455,7 @@ class TestBankReconciliation(AccountingTestCase, ERP5ReportTestCase):
...
@@ -455,7 +455,7 @@ class TestBankReconciliation(AccountingTestCase, ERP5ReportTestCase):
# And finally the non reconciled lines
# And finally the non reconciled lines
line_list
=
self
.
getListBoxLineList
(
report_section_list
[
2
])
line_list
=
self
.
getListBoxLineList
(
report_section_list
[
2
])
self
.
assertEqual
({
'mode'
:
'reconcile'
,
self
.
assertEqual
({
'
reconciliation_
mode'
:
'reconcile'
,
'title'
:
'Not Reconciled Transactions'
},
'title'
:
'Not Reconciled Transactions'
},
report_section_list
[
2
].
selection_params
)
report_section_list
[
2
].
selection_params
)
data_line_list
=
[
l
for
l
in
line_list
if
l
.
isDataLine
()]
data_line_list
=
[
l
for
l
in
line_list
if
l
.
isDataLine
()]
...
@@ -552,7 +552,7 @@ class TestBankReconciliation(AccountingTestCase, ERP5ReportTestCase):
...
@@ -552,7 +552,7 @@ class TestBankReconciliation(AccountingTestCase, ERP5ReportTestCase):
bank_reconciliation
.
BankReconciliation_reconcileTransactionList
(
bank_reconciliation
.
BankReconciliation_reconcileTransactionList
(
list_selection_name
=
list_selection_name
,
list_selection_name
=
list_selection_name
,
uids
=
(
payment1
.
bank
.
getUid
(),
),
uids
=
(
payment1
.
bank
.
getUid
(),
),
mode
=
'reconcile'
)
reconciliation_
mode
=
'reconcile'
)
self
.
tic
()
self
.
tic
()
self
.
assertEqual
(
100
,
bank_reconciliation
.
BankReconciliation_getReconciledAccountBalance
())
self
.
assertEqual
(
100
,
bank_reconciliation
.
BankReconciliation_getReconciledAccountBalance
())
...
@@ -631,7 +631,7 @@ class TestBankReconciliation(AccountingTestCase, ERP5ReportTestCase):
...
@@ -631,7 +631,7 @@ class TestBankReconciliation(AccountingTestCase, ERP5ReportTestCase):
bank_reconciliation_for_section
.
BankReconciliation_reconcileTransactionList
(
bank_reconciliation_for_section
.
BankReconciliation_reconcileTransactionList
(
list_selection_name
=
list_selection_name
,
list_selection_name
=
list_selection_name
,
uids
=
(
internal_transaction
.
bank
.
getUid
(),
),
uids
=
(
internal_transaction
.
bank
.
getUid
(),
),
mode
=
'reconcile'
)
reconciliation_
mode
=
'reconcile'
)
self
.
tic
()
self
.
tic
()
# reconciled for `section`
# reconciled for `section`
self
.
assertEqual
(
100
,
bank_reconciliation_for_section
.
BankReconciliation_getReconciledAccountBalance
())
self
.
assertEqual
(
100
,
bank_reconciliation_for_section
.
BankReconciliation_getReconciledAccountBalance
())
...
@@ -657,7 +657,7 @@ class TestBankReconciliation(AccountingTestCase, ERP5ReportTestCase):
...
@@ -657,7 +657,7 @@ class TestBankReconciliation(AccountingTestCase, ERP5ReportTestCase):
bank_reconciliation_for_main_section
.
BankReconciliation_reconcileTransactionList
(
bank_reconciliation_for_main_section
.
BankReconciliation_reconcileTransactionList
(
list_selection_name
=
list_selection_name
,
list_selection_name
=
list_selection_name
,
uids
=
(
internal_transaction
.
bank
.
getUid
(),
),
uids
=
(
internal_transaction
.
bank
.
getUid
(),
),
mode
=
'reconcile'
)
reconciliation_
mode
=
'reconcile'
)
self
.
tic
()
self
.
tic
()
# Reconciled for `main_section`
# Reconciled for `main_section`
self
.
assertEqual
(
-
100
,
bank_reconciliation_for_main_section
.
BankReconciliation_getReconciledAccountBalance
())
self
.
assertEqual
(
-
100
,
bank_reconciliation_for_main_section
.
BankReconciliation_getReconciledAccountBalance
())
...
@@ -684,7 +684,7 @@ class TestBankReconciliation(AccountingTestCase, ERP5ReportTestCase):
...
@@ -684,7 +684,7 @@ class TestBankReconciliation(AccountingTestCase, ERP5ReportTestCase):
bank_reconciliation_for_section
.
BankReconciliation_reconcileTransactionList
(
bank_reconciliation_for_section
.
BankReconciliation_reconcileTransactionList
(
list_selection_name
=
list_selection_name
,
list_selection_name
=
list_selection_name
,
uids
=
(
internal_transaction
.
bank
.
getUid
(),
),
uids
=
(
internal_transaction
.
bank
.
getUid
(),
),
mode
=
'unreconcile'
)
reconciliation_
mode
=
'unreconcile'
)
self
.
tic
()
self
.
tic
()
# no longer reconciled for `section`
# no longer reconciled for `section`
self
.
assertEqual
(
0
,
bank_reconciliation_for_section
.
BankReconciliation_getReconciledAccountBalance
())
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