hunk.code_window:                         % for attendee in object.event_id.attendee_ids:
                               <li>
                                   <div style="display:inline-block; border-radius: 50%; width:10px; height:10px;background:${colors[attendee.state] or 'white'};"></div>
                                   % if attendee.cn != object.cn:
                                   <span style="margin-left:5px">${attendee.cn}</span>
                                   % else:
                                   <span style="margin-left:5px">You</span>
                                   % endif
                               </li>
                           % endfor
  
hunk.labels: keep keep keep replace replace keep keep keep keep keep
hunk.after_edit:                                 % if attendee.common_name != object.common_name:
                                   <span style="margin-left:5px">${attendee.common_name}</span>
  
hunk.file_path: addons/calendar/data/calendar_data.xml
hunk.type: replace
file: # -*- coding: utf-8 -*-
  import time
  
  import openerp
  
  class m(openerp.osv.osv.Model):
      """ This model exposes a few methods that will consume between 'almost no
          resource' and 'a lot of resource'.
      """
      _name = 'test.limits.model'
  
      def consume_nothing(self, cr, uid, context=None):
          return True
  
      def consume_memory(self, cr, uid, size, context=None):
          l = [0] * size
          return True
  
      def leak_memory(self, cr, uid, size, context=None):
          if not hasattr(self, 'l'):
              self.l = []
          self.l.append([0] * size)
          return True
  
      def consume_time(self, cr, uid, seconds, context=None):
          time.sleep(seconds)
          return True
  
      def consume_cpu_time(self, cr, uid, seconds, context=None):
          t0 = time.clock()
          t1 = time.clock()
          while t1 - t0 < seconds:
              for i in xrange(10000000):
                  x = i * i
              t1 = time.clock()
          return True
  