title: Adding a list to a one2many
body: <p>For my use case,I'm trying to add all the product category list to a contact at creation time.   </p>
  
  <pre><code>class product_category(models.Model):
              _inherit = "product.category" 
              is_checked = fields.Boolean('Don', help="Check this box if this contact make Donation.")
              resRelId = fields.Many2one('res.partner')
  
  class res_partner(models.Model):
          _inherit = "res.partner"
          categs = fields.One2many('product.category','resRelId',String='Halo')
          @api.model
      def create(self, values):
          categs = self.env['product.category'].search([])
          new_id = super(res_partner, self).create(values)
          for i in categs:
              _logger.error(i)
              new_id.write({'categs': i})
          _logger.error(new_id.categs)
          return new_id
  </code></pre>
  
  <p>My code compile with no errors but i always end up with an empty product list in the contact and I'm getting those warnings.</p>
  
  <pre><code>2016-07-04 17:54:46,777 17751 WARNING v8dev openerp.models: Comparing apples and oranges: product.category(1,) == 1 (/home/odoo/odoo-dev/odoo/openerp/osv/fields.py:800)
  2016-07-04 17:54:46,777 17751 WARNING v8dev openerp.models: Comparing apples and oranges: product.category(1,) == 2 (/home/odoo/odoo-dev/odoo/openerp/osv/fields.py:802)
  2016-07-04 17:54:46,777 17751 WARNING v8dev openerp.models: Comparing apples and oranges: product.category(1,) == 3 (/home/odoo/odoo-dev/odoo/openerp/osv/fields.py:804)
  2016-07-04 17:54:46,777 17751 WARNING v8dev openerp.models: Comparing apples and oranges: product.category(1,) == 4 (/home/odoo/odoo-dev/odoo/openerp/osv/fields.py:812)
  2016-07-04 17:54:46,777 17751 WARNING v8dev openerp.models: Comparing apples and oranges: product.category(1,) == 5 (/home/odoo/odoo-dev/odoo/openerp/osv/fields.py:818)
  2016-07-04 17:54:46,778 17751 WARNING v8dev openerp.models: Comparing apples and oranges: product.category(1,) == 6 (/home/odoo/odoo-dev/odoo/openerp/osv/fields.py:831)
  2016-07-04 17:54:46,778 17751 WARNING v8dev openerp.models: Comparing apples and oranges: product.category(3,) == 1 (/home/odoo/odoo-dev/odoo/openerp/osv/fields.py:800)
  2016-07-04 17:54:46,778 17751 WARNING v8dev openerp.models: Comparing apples and oranges: product.category(3,) == 2 (/home/odoo/odoo-dev/odoo/openerp/osv/fields.py:802)
  2016-07-04 17:54:46,778 17751 WARNING v8dev openerp.models: Comparing apples and oranges: product.category(3,) == 3 (/home/odoo/odoo-dev/odoo/openerp/osv/fields.py:804)
  2016-07-04 17:54:46,778 17751 WARNING v8dev openerp.models: Comparing apples and oranges: product.category(3,) == 4 (/home/odoo/odoo-dev/odoo/openerp/osv/fields.py:812)
  2016-07-04 17:54:46,778 17751 WARNING v8dev openerp.models: Comparing apples and oranges: product.category(3,) == 5 (/home/odoo/odoo-dev/odoo/openerp/osv/fields.py:818)
  2016-07-04 17:54:46,778 17751 WARNING v8dev openerp.models: Comparing apples and oranges: product.category(3,) == 6 (/home/odoo/odoo-
  </code></pre>