mirror of
https://github.com/brain-tec/account_ebics.git
synced 2024-11-23 12:42:04 +00:00
rename ui_designation to transaction_rights
This commit is contained in:
parent
08d572b9df
commit
1638aae5ca
@ -84,16 +84,17 @@ class EbicsUserID(models.Model):
|
|||||||
"This default can be overriden for specific "
|
"This default can be overriden for specific "
|
||||||
"EBICS transactions (cf. File Formats).",
|
"EBICS transactions (cf. File Formats).",
|
||||||
)
|
)
|
||||||
ui_designation = fields.Selection(
|
transaction_rights = fields.Selection(
|
||||||
[
|
selection=[
|
||||||
("both", "Download and Upload"),
|
("both", "Download and Upload"),
|
||||||
("down", "Download Only"),
|
("down", "Download Only"),
|
||||||
("up", "Upload Only"),
|
("up", "Upload Only"),
|
||||||
],
|
],
|
||||||
string="UI Designation",
|
string="Allowed Transactions",
|
||||||
default="both",
|
default="both",
|
||||||
required=True,
|
required=True,
|
||||||
help="Defines in what form this User will be available for selection.",
|
help="Use this parameter to limit the transactions for this User "
|
||||||
|
"to downloads or uploads.",
|
||||||
)
|
)
|
||||||
ebics_keys_fn = fields.Char(compute="_compute_ebics_keys_fn")
|
ebics_keys_fn = fields.Char(compute="_compute_ebics_keys_fn")
|
||||||
ebics_keys_found = fields.Boolean(compute="_compute_ebics_keys_found")
|
ebics_keys_found = fields.Boolean(compute="_compute_ebics_keys_found")
|
||||||
|
@ -94,8 +94,8 @@
|
|||||||
attrs="{'required': [('ebics_passphrase_store', '=', True)], 'invisible': [('state', '!=', 'draft')]}"
|
attrs="{'required': [('ebics_passphrase_store', '=', True)], 'invisible': [('state', '!=', 'draft')]}"
|
||||||
/>
|
/>
|
||||||
<field name="ebics_passphrase_store" />
|
<field name="ebics_passphrase_store" />
|
||||||
|
<field name="transaction_rights" />
|
||||||
<field name="active" />
|
<field name="active" />
|
||||||
<field name="ui_designation" />
|
|
||||||
</group>
|
</group>
|
||||||
<group name="main-right">
|
<group name="main-right">
|
||||||
<field name="signature_class" />
|
<field name="signature_class" />
|
||||||
|
@ -122,14 +122,14 @@ class EbicsXfer(models.TransientModel):
|
|||||||
lambda r: r.type == "down"
|
lambda r: r.type == "down"
|
||||||
)
|
)
|
||||||
avail_userids = avail_userids.filtered(
|
avail_userids = avail_userids.filtered(
|
||||||
lambda r: r.ui_designation in ["both", 'down']
|
lambda r: r.transaction_rights in ["both", "down"]
|
||||||
)
|
)
|
||||||
else: # Upload Form
|
else: # Upload Form
|
||||||
avail_formats = self.ebics_config_id.ebics_file_format_ids.filtered(
|
avail_formats = self.ebics_config_id.ebics_file_format_ids.filtered(
|
||||||
lambda r: r.type == "up"
|
lambda r: r.type == "up"
|
||||||
)
|
)
|
||||||
avail_userids = avail_userids.filtered(
|
avail_userids = avail_userids.filtered(
|
||||||
lambda r: r.ui_designation in ["both", "up"]
|
lambda r: r.transaction_rights in ["both", "up"]
|
||||||
)
|
)
|
||||||
|
|
||||||
if avail_formats and len(avail_formats) == 1:
|
if avail_formats and len(avail_formats) == 1:
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
/>
|
/>
|
||||||
<field
|
<field
|
||||||
name="ebics_userid_id"
|
name="ebics_userid_id"
|
||||||
domain="[('ebics_config_id', '=', ebics_config_id), ('user_ids.id', '=', uid), ('ui_designation', 'in', ['both', 'down'])]"
|
domain="[('ebics_config_id', '=', ebics_config_id), ('user_ids.id', '=', uid), ('transaction_rights', 'in', ['both', 'down'])]"
|
||||||
required="1"
|
required="1"
|
||||||
options="{'no_create': True, 'no_open': True}"
|
options="{'no_create': True, 'no_open': True}"
|
||||||
/>
|
/>
|
||||||
@ -69,7 +69,7 @@
|
|||||||
/>
|
/>
|
||||||
<field
|
<field
|
||||||
name="ebics_userid_id"
|
name="ebics_userid_id"
|
||||||
domain="[('ebics_config_id', '=', ebics_config_id), ('user_ids.id', '=', uid), ('ui_designation', 'in', ['both', 'up'])]"
|
domain="[('ebics_config_id', '=', ebics_config_id), ('user_ids.id', '=', uid), ('transaction_rights', 'in', ['both', 'up'])]"
|
||||||
required="1"
|
required="1"
|
||||||
options="{'no_create': True, 'no_open': True}"
|
options="{'no_create': True, 'no_open': True}"
|
||||||
/>
|
/>
|
||||||
|
Loading…
Reference in New Issue
Block a user