~aw/openobject-client/5.0

« back to all changes in this revision

Viewing changes to bin/widget/model/group.py

  • Committer: Jay(Open ERP)
  • Date: 2010-06-25 11:35:06 UTC
  • Revision ID: jvo@tinyerp.com-20100625113506-7dvgmmaw9aeucg8d
[FIX] Field should be displayed with proper type and widget on specific view

Show diffs side-by-side

added added

removed removed

Lines of Context:
286
286
    def add_fields_custom(self, fields, models):
287
287
        to_add = []
288
288
        for f in fields.keys():
289
 
            if not f in models.fields:
 
289
            add_field = True
 
290
            if f in models.fields:
 
291
                if fields[f].get('widget','') == models.fields[f].get('widget',''):
 
292
                    models.fields[f].update(fields[f])
 
293
                    add_field = False
 
294
            if add_field:
290
295
                models.fields[f] = fields[f]
291
296
                models.fields[f]['name'] = f
292
297
                to_add.append(f)
293
 
            else:
294
 
                models.fields[f].update(fields[f])
295
298
        self.mfields_load(to_add, models)
296
299
        for fname in to_add:
297
300
            for m in models.models: