Commit d41ebd9c authored by Jérome Perrin's avatar Jérome Perrin Committed by Aurel

payment_mean: rename "mode" argument for erp5_hal_json compatibility

For same reasons as f692aa61 ([erp5_bank_reconciliation] Rename
your_mode field, to prevent naming conflict in hal, 2019-10-23)
parent 6164e39d
portal = context.getPortalObject()
if mode is None:
if select_mode is None:
# To show an empty listbox the first time the dialog is open
container.REQUEST.set('PaymentTransactionGroup_statGroupablePaymentTransactionLineList.total_quantity', None)
return []
elif mode == 'stopped_or_delivered':
elif select_mode == 'stopped_or_delivered':
simulation_state = ('delivered', 'stopped')
else:
assert mode == 'planned_or_confirmed', "Unknown mode, %r" % mode
assert select_mode == 'planned_or_confirmed', "Unknown select_mode, %r" % select_mode
simulation_state = ('planned', 'confirmed')
search_kw = dict(
......
......@@ -50,7 +50,7 @@
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>select_limit=None, start_date_range_min=None, start_date_range_max=None, sign=None, mode=None, Movement_getMirrorSectionTitle=None, **kw</string> </value>
<value> <string>select_limit=None, start_date_range_min=None, start_date_range_max=None, sign=None, select_mode=None, Movement_getMirrorSectionTitle=None, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
......
......@@ -13,7 +13,7 @@ context.activate(tag=tag).PaymentTransactionGroup_selectPaymentTransactionLineLi
start_date_range_min=start_date_range_min,
start_date_range_max=start_date_range_max,
sign=sign,
mode=mode,
select_mode=select_mode,
Movement_getMirrorSectionTitle=listbox_Movement_getMirrorSectionTitle,
tag=tag)
......
......@@ -50,7 +50,7 @@
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>uids=(), form_id=\'view\', select_limit=None, start_date_range_min=None, start_date_range_max=None, sign=None, mode=None, listbox_Movement_getMirrorSectionTitle=None, **kw</string> </value>
<value> <string>uids=(), form_id=\'view\', select_limit=None, start_date_range_min=None, start_date_range_max=None, sign=None, select_mode=None, listbox_Movement_getMirrorSectionTitle=None, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
......
......@@ -16,13 +16,13 @@ else:
start_date_range_min=start_date_range_min,
start_date_range_max=start_date_range_max,
sign=sign,
mode=mode,
select_mode=select_mode,
Movement_getMirrorSectionTitle=Movement_getMirrorSectionTitle,)]
if mode == 'stopped_or_delivered':
if select_mode == 'stopped_or_delivered':
method_id = 'AccountingTransactionLine_addPaymentTransactionGroup'
else:
assert mode == 'planned_or_confirmed', "Unknown mode, %r" % mode
assert select_mode == 'planned_or_confirmed', "Unknown select_mode, %r" % select_mode
method_id = 'AccountingTransactionLine_stopAndAddPaymentTransactionGroup'
......
......@@ -50,7 +50,7 @@
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>uids=(), select_limit=None, start_date_range_min=None, start_date_range_max=None, sign=None, mode=None, Movement_getMirrorSectionTitle=None, tag=\'\'</string> </value>
<value> <string>uids=(), select_limit=None, start_date_range_min=None, start_date_range_max=None, sign=None, select_mode=None, Movement_getMirrorSectionTitle=None, tag=\'\'</string> </value>
</item>
<item>
<key> <string>_proxy_roles</string> </key>
......
......@@ -102,7 +102,7 @@
<string>your_start_date_range_min</string>
<string>your_start_date_range_max</string>
<string>your_sign</string>
<string>your_mode</string>
<string>your_select_mode</string>
</list>
</value>
</item>
......
......@@ -8,7 +8,7 @@
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>your_mode</string> </value>
<value> <string>your_select_mode</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......
......@@ -250,7 +250,7 @@ class TestPaymentTransactionGroupPaymentSelection(AccountingTestCase):
start_date_range_min=None,
start_date_range_max=None,
sign='incoming',
mode='stopped_or_delivered',
select_mode='stopped_or_delivered',
)
self.assertEqual(
sorted([line.getObject().getRelativeUrl() for line in line_list]),
......@@ -265,7 +265,7 @@ class TestPaymentTransactionGroupPaymentSelection(AccountingTestCase):
start_date_range_min=None,
start_date_range_max=None,
sign='incoming',
mode='stopped_or_delivered',
select_mode='stopped_or_delivered',
)
self.assertEqual(
sorted([line.getObject().getRelativeUrl() for line in line_list]),
......@@ -314,7 +314,7 @@ class TestPaymentTransactionGroupPaymentSelection(AccountingTestCase):
price_currency_value=self.portal.currency_module.euro,
stop_date=DateTime(2014, 1, 31),)
self.tic()
ptg.PaymentTransactionGroup_selectPaymentTransactionLineList(mode='stopped_or_delivered')
ptg.PaymentTransactionGroup_selectPaymentTransactionLineList(select_mode='stopped_or_delivered')
self.tic()
self.assertEqual(
payment.bank.getAggregateValueList(),
......
......@@ -19,6 +19,10 @@
<td>field_your_sign</td>
<td>Outgoing</td>
</tr>
<!-- there's an empty listbox by default (and not a "Invalid Search Criteria-Reset" error) -->
<tal:block tal:define="pagination_configuration python: {'header': '(0)', 'footer': 'No records'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text" />
</tal:block>
<!-- update dialog -->
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/update_dialog" />
......
......@@ -17,14 +17,14 @@
<tr>
<td>assertSelected</td>
<td>field_your_mode</td>
<td>field_your_select_mode</td>
<td>Select already Posted to General Ledger or Closed Payments</td>
</tr>
<!-- update dialog -->
<tr>
<td>select</td>
<td>field_your_mode</td>
<td>field_your_select_mode</td>
<td>Select Planned or Confirmed Payments and Post them to General Ledger</td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/update_dialog" />
......
......@@ -16,14 +16,14 @@
<tr>
<td>assertSelected</td>
<td>field_your_mode</td>
<td>field_your_select_mode</td>
<td>Select already Posted to General Ledger or Closed Payments</td>
</tr>
<!-- update dialog -->
<tr>
<td>select</td>
<td>field_your_mode</td>
<td>field_your_select_mode</td>
<td>Select Planned or Confirmed Payments and Post them to General Ledger</td>
</tr>
......
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