title: How to create a record in a model while creating a record in another model in odoo
body: <p>In my custom application i want to create automatically a record in my custom model while i create a sale order.</p>
  
  <pre><code>    class custom_sale_order(models.Model):
          _inherit='sale.order'
  
          time1 = fields.Date('TIme1')
          time2 = fields.Date('TIme2')
  
      class demo(models.Model):   
          name = 'demo'
  
          time3 = fields.Date('TIme1')
          time4 = fields.Date('TIme2')
  </code></pre>
  
  <p>while a sale order is creating i want to create a record in demo model and also should fetch the time field from sale.order and save in demo model. How can i do that?</p>