~unifield-team/unifield-web/web-uf-1718

« back to all changes in this revision

Viewing changes to addons/openerp/widgets/_interface.py

  • Committer: jf
  • Date: 2013-09-05 12:39:46 UTC
  • mfrom: (4713.1.4 unifield-web)
  • Revision ID: jfb@tempo-consulting.fr-20130905123946-23wd1oz5cks0zsjc
OEB-181 [FIX] 'default_focus' attribute doesn't work
lp:~unifield-team/unifield-web/oeb-181

Show diffs side-by-side

added added

removed removed

Lines of Context:
167
167
        self.callback = attrs.get('on_change', None)
168
168
        self.kind = attrs.get('type', None)
169
169
 
 
170
        self.default_focus = attrs.get('default_focus', False)
170
171
        self.label = self.label_type(self.name, self.string, self.help)
171
172
        self.filters = []
172
173
 
220
221
                'onchange': self.onchange
221
222
            })
222
223
 
 
224
        if self.default_focus:
 
225
            params['attrs']['autofocus'] = 'autofocus'
223
226
        if self.readonly:
224
227
            params['attrs']['disabled'] = 'disabled'
225
228
        #if self.states: