← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 890217] [NEW] [trunk] import_data does not care about domain of the imported fields

 

Public bug reported:

Hello,

On the import_data method of the orm, when importing from a CSV :
 - on many2one / many2many fields, when we put in the CSV the name of the resource to link, the domain of the field is not applied on the on the name_search.

As instance :
I add a column on product.category :
  'special': fields.boolean('Special')
I add a column on product.product :
 'special_category_id': fields.many2one('product.category', 'Special Category', domain=[('special', '=', True)])

I add 2 categories : 
 1. A normal category named "My Category" with special=False
 2. A special category named "My Category" too with special=True

I import a CSV file of product.product with :
.id,special_category_id
10,"My Category"

The product 10 will be updated with the product category 1 with special=False (or maybe the other by chance, as the first will be taken).
The name_search must take in account the domain of the special_category_id field.

** Affects: openobject-server
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to OpenERP Project Group.
https://bugs.launchpad.net/bugs/890217

Title:
  [trunk] import_data does not care about domain of the imported fields

Status in OpenERP Server:
  New

Bug description:
  Hello,

  On the import_data method of the orm, when importing from a CSV :
   - on many2one / many2many fields, when we put in the CSV the name of the resource to link, the domain of the field is not applied on the on the name_search.

  As instance :
  I add a column on product.category :
    'special': fields.boolean('Special')
  I add a column on product.product :
   'special_category_id': fields.many2one('product.category', 'Special Category', domain=[('special', '=', True)])

  I add 2 categories : 
   1. A normal category named "My Category" with special=False
   2. A special category named "My Category" too with special=True

  I import a CSV file of product.product with :
  .id,special_category_id
  10,"My Category"

  The product 10 will be updated with the product category 1 with special=False (or maybe the other by chance, as the first will be taken).
  The name_search must take in account the domain of the special_category_id field.

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-server/+bug/890217/+subscriptions


Follow ups

References