mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
[FIX] Move attributes to from 'states' dictionary to view
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -21,6 +21,13 @@
|
||||
position="attributes">
|
||||
<attribute name="name">launch_wizard</attribute>
|
||||
</xpath>
|
||||
<!-- Communication only used for 'structured' communication -->
|
||||
<xpath expr="//field[@name='line_ids']/form//field[@name='communication']"
|
||||
position="attributes">
|
||||
<attribute name="attrs">{
|
||||
'readonly': [('state', '=', 'normal')]
|
||||
}</attribute>
|
||||
</xpath>
|
||||
</data>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
Reference in New Issue
Block a user