We see this bug as being invalid. If you really want to precisely link
to some category, you can be more specific by using its external id
(formerly known as XML id).

The domain associated to a field is actually more about the view than
about the data model. Normally it should be specified on a view, but can
be specified on the model when it is easier to do so (for instance as a
mean to factorize code).

import_data is a low level way to import data in OpenERP and must not be
too constrained by higher (more functional/business) level concerns.

** Changed in: openobject-server
       Status: New => Invalid

-- 
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:
  Invalid

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

_______________________________________________
Mailing list: https://launchpad.net/~c2c-oerpscenario
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~c2c-oerpscenario
More help   : https://help.launchpad.net/ListHelp

Reply via email to