~unifield-team/unifield-web/uf-1309

« back to all changes in this revision

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

  • Committer: jf
  • Date: 2012-08-24 15:49:29 UTC
  • mfrom: (4660.2.4 unifield-web)
  • Revision ID: jf@tempo4-20120824154929-chzeeqc9ixloys2p
UF-1299 [IMP] Add a button to change the destination location of an INT confirmed/available/not available...
UF-1315 [IMP] Lines are editable while o2m is readonly - readonly policy conflict?
OEB-13 [FIX] fix popup create a new record instead of reloading content when clicking on a button
UF-1296 [IMP] Inconsistent warning message at the "scheduler run"
lp:~unifield-team/unifield-web/web_uf_1299
lp:~unifield-team/unifield-web/uf_1296_action_empty_ids

Show diffs side-by-side

added added

removed removed

Lines of Context:
125
125
        attrs = node_attributes(root)
126
126
        
127
127
        # Get the hide status of some buttons - by default buttons are shown
128
 
        self.hide_new_button = attrs.get('hide_new_button', False)
129
 
        self.hide_delete_button = attrs.get('hide_delete_button', False)
 
128
        self.hide_new_button = False
 
129
        self.hide_delete_button = False
 
130
        try:
 
131
            self.hide_new_button = expr_eval(attrs.get('hide_new_button', False), {'context': context})
 
132
            self.hide_delete_button = expr_eval(attrs.get('hide_delete_button', False), {'context': context})
 
133
        except:
 
134
            pass
130
135
        
131
136
        self.string = attrs.get('string','')
132
137
 
242
247
                    pass 
243
248
 
244
249
        # make editors
 
250
        if self.editable and attrs.get('noteditable'):
 
251
            for x in self.values:
 
252
                try:
 
253
                    if expr_eval(attrs.get('noteditable'), x):
 
254
                        self.noteditable.append(x['id'])
 
255
                except:
 
256
                    pass
 
257
 
245
258
        if self.editable and attrs.get('editable') in ('top', 'bottom'):
246
 
            if attrs.get('noteditable'):
247
 
                for x in self.values:
248
 
                    try:
249
 
                        if expr_eval(attrs.get('noteditable'), x):
250
 
                            self.noteditable.append(x['id'])
251
 
                    except:
252
 
                        pass 
253
 
 
254
259
            for f, fa in self.headers:
255
260
                if not isinstance(fa, int):
256
261
                    fa['prefix'] = '_terp_listfields' + ((self.name != '_terp_list' or '') and '/' + self.name)