← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 845440] [NEW] Import facility does not handle many2many records correctly

 

Public bug reported:

The import from CSV facility is not handling many2many records
correctly. To test:

1. In install the accounts module.
2. Use the export CSV wizard to generate an export file, include the 'Entries/Account' field.
3. Try and use the exported CSV to import into the system.

Expected result: should import the records correctly.
Actual result: generates an error that indicates that it cannot find the account record.

Having traced what is happening, I tracked down the problem to the field
detection. When it comes to the account.move.line account field
(line_id/account_id) it searches the account.move.line model, looking at
the 'name' column. This is incorrect. It should be searching the
account.account record, looking at the 'name' field.

It has looked at the model of the 'line_id' part of the field
(account.move.line), but not recognised that 'account_id' is a many2one
field - thus it should look at the model of the 'account_id' field
(account.account) and search for that.

OpenERP version: 6.1 trunk

** 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/845440

Title:
  Import facility does not handle many2many records correctly

Status in OpenERP Server:
  New

Bug description:
  The import from CSV facility is not handling many2many records
  correctly. To test:

  1. In install the accounts module.
  2. Use the export CSV wizard to generate an export file, include the 'Entries/Account' field.
  3. Try and use the exported CSV to import into the system.

  Expected result: should import the records correctly.
  Actual result: generates an error that indicates that it cannot find the account record.

  Having traced what is happening, I tracked down the problem to the
  field detection. When it comes to the account.move.line account field
  (line_id/account_id) it searches the account.move.line model, looking
  at the 'name' column. This is incorrect. It should be searching the
  account.account record, looking at the 'name' field.

  It has looked at the model of the 'line_id' part of the field
  (account.move.line), but not recognised that 'account_id' is a
  many2one field - thus it should look at the model of the 'account_id'
  field (account.account) and search for that.

  OpenERP version: 6.1 trunk

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


Follow ups

References