Merge lp:~unifield-team/unifield-web/us-1438 into lp:unifield-web

Proposed by Quentin THEURET @Amaris
Status: Merged
Merged at revision: 4796
Proposed branch: lp:~unifield-team/unifield-web/us-1438
Merge into: lp:unifield-web
Diff against target: 21 lines (+9/-2)
1 file modified
addons/openerp/widgets/form/_form.py (+9/-2)
To merge this branch: bzr merge lp:~unifield-team/unifield-web/us-1438
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+299938@code.launchpad.net
To post a comment you must log in.
4796. By Quentin THEURET @Amaris

US-1438 [FIX] Check 'readonly' on 'attrs' keys of field attributes

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'addons/openerp/widgets/form/_form.py'
--- addons/openerp/widgets/form/_form.py 2016-05-30 07:17:39 +0000
+++ addons/openerp/widgets/form/_form.py 2016-07-19 15:22:24 +0000
@@ -952,8 +952,15 @@
952 continue952 continue
953 try:953 try:
954 fields[name]['link'] = attrs.get('link', '1')954 fields[name]['link'] = attrs.get('link', '1')
955 if fields[name].get('no_write_access') and 'attrs' in attrs:955 if fields[name].get('no_write_access') and 'attrs' in attrs and 'readonly' in attrs['attrs']:
956 del attrs['attrs']956 attrs_dict = eval(attrs['attrs'])
957 if 'readonly' in attrs_dict:
958 del attrs_dict['readonly']
959
960 if attrs_dict:
961 attrs['attrs'] = unicode(attrs_dict)
962 else:
963 del attrs['attrs']
957 fields[name].update(attrs)964 fields[name].update(attrs)
958 except:965 except:
959 print "-"*30,"\n malformed tag for:", attrs966 print "-"*30,"\n malformed tag for:", attrs

Subscribers

People subscribed via source and target branches

to all changes: