summaryrefslogtreecommitdiff
path: root/addons/account/views
diff options
context:
space:
mode:
authorSwapnesh Shah <swapneshshah111@gmail.com>2020-10-18 11:57:01 +0000
committerGitHub <noreply@github.com>2020-10-18 11:57:01 +0000
commit366bf51bb07aac6edca668635f49316b21bbb7be (patch)
tree35c6ebf3c6e623425bf17eeef71a70c139687751 /addons/account/views
parenta48ba4672e90a7e9f3143de5ede0099a8e28d4cd (diff)
[FIX] account: readonly bank on posted payment
Field `partner_bank_id` should be readonly like other fields when Payment is not in `Draft` state. closes odoo/odoo#60218 Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Diffstat (limited to 'addons/account/views')
-rw-r--r--addons/account/views/account_payment_view.xml2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/account/views/account_payment_view.xml b/addons/account/views/account_payment_view.xml
index 78251dc1d08..6545db3b7af 100644
--- a/addons/account/views/account_payment_view.xml
+++ b/addons/account/views/account_payment_view.xml
@@ -224,7 +224,7 @@
required="1"
attrs="{'readonly': [('state', '!=', 'draft')], 'invisible': [('hide_payment_method', '=', True)]}"/>
<field name="partner_bank_id" context="{'default_partner_id': partner_id}"
- attrs="{'invisible': [('show_partner_bank_account', '=', False)], 'required': [('require_partner_bank_account', '=', True)]}"/>
+ attrs="{'invisible': [('show_partner_bank_account', '=', False)], 'required': [('require_partner_bank_account', '=', True)], 'readonly': [('state', '!=', 'draft')]}"/>
<!-- /!\ Required due to the _inherits but must not be required when saving a new
record. Using 'required': [('id', '!=', False)] is not working due to the groups set on