diff --git a/account_banking_payment/model/payment_line.py b/account_banking_payment/model/payment_line.py
index 4edcd9199..3abae5ff0 100644
--- a/account_banking_payment/model/payment_line.py
+++ b/account_banking_payment/model/payment_line.py
@@ -66,18 +66,6 @@ class payment_line(orm.Model):
'msg': '',
}
- def fields_get(self, cr, uid, fields=None, context=None):
- res = super(payment_line, self).fields_get(cr, uid, fields, context)
- if 'communication' in res:
- res['communication'].setdefault('states', {})
- res['communication']['states']['structured'] = [('required', True)]
- if 'communication2' in res:
- res['communication2'].setdefault('states', {})
- res['communication2']['states']['structured'] = [('readonly', True)]
- res['communication2']['states']['normal'] = [('readonly', False)]
-
- return res
-
"""
Hooks for processing direct debit orders, such as implemented in
account_direct_debit module.
diff --git a/account_banking_payment/view/account_payment.xml b/account_banking_payment/view/account_payment.xml
index 1d6b3c1e9..4f7601332 100644
--- a/account_banking_payment/view/account_payment.xml
+++ b/account_banking_payment/view/account_payment.xml
@@ -21,6 +21,13 @@
position="attributes">
launch_wizard
+
+
+ {
+ 'readonly': [('state', '=', 'normal')]
+ }
+