title: Odoo: cron method locks on writing attribute of an element with ir.cron reference
body: <p>I have a cron that call the method my_cron_method() so defined (simplified):</p>
  
  <pre><code>class MyModel(models.Model):
    model_cron_id = fields.Many2one('ir.cron', 'Cron Scheduled Action')
  
    def my_cron_method(self):
      object_list = self.env['my.model']
      for object in object_list:
        print('ck_1')
        object.att_a = 123
        self.update_obj(object)
        print('ck_4')
  
    def update_obj(self, object):
      print('ck_2')
      object.att_b='abc'
      print('ck_3')
      return
  </code></pre>
  
  <p>The result when executed by cron is:</p>
  
  <pre><code>ck_1
  ck_2
  </code></pre>
  
  <p>so the method "freezes" at object.att_b='abc' row.</p>
  
  <p>These happens only if model_cron_id is valorized; if object_list has two elements and the valorized is the second, the first is completely elaborated.</p>
  
  <p>I use PyCharm debug to follow step by step execution and when I confirm to execute the row it locks doing nothing else.</p>
  
  <p>I tried to pause the execution a step before and do on console 
  <code>object._write({'att_a' : 123})</code> and it locks too.
  The rest of Odoo seems going well, only object on write is locked.</p>
  
  <p>If I trigger the cron manually all goes well.</p>
  
  <p>Any idea?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I add the information on model_cron_id, because I discovered that it is the element that generates the problem.</p>