~openerp/openobject-client/6.0

« back to all changes in this revision

Viewing changes to bin/widget/view/calendar_gtk/parser.py

  • Committer: Jean-Christophe VASSORT
  • Date: 2012-03-07 13:38:18 UTC
  • mfrom: (1927.3.1 6.0-opw-54653-nch)
  • Revision ID: jcv@openerp.com-20120307133818-ce1jp82e2ucbvyjx
[MERGE] OPW 54653 color problem in calendar view

The treeview on the left in calendar view was displaying duplicate color for the newly added entry.

for eg:
Whenever we create any new calender leave, then newly created side pan does differ in color with the leave.

Show diffs side-by-side

added added

removed removed

Lines of Context:
220
220
        value = str(value)
221
221
        model = self._calendar_treeview.get_model()
222
222
        for row in model:
223
 
            if row[self.TV_COL_ID] == value:
224
 
                return  # id already in the treeview
 
223
            if row[self.TV_COL_ID] == value :# id already in the treeview
 
224
                if row[self.TV_COL_COLOR] != color: # the color assigned is the old one 
 
225
                    row[self.TV_COL_COLOR] = color  #replace it with new one.
 
226
                return  
225
227
        iter = model.append()
226
228
        model.set(iter, self.TV_COL_ID, value,
227
229
                        self.TV_COL_COLOR, color,