← Back to team overview

c2c-oerpscenario team mailing list archive

Re: [Bug 685318] Re: Import: incoherence due to duplicate id in ir.model.data

 

"to be unique per *module*, not per module + model"

Guys, we had that kind of issue with the base_external_referentials module.
The way we fixed it is that we force the "XML id" to be actually the
concatenation of he model name and the id, like "product_product/42" then
you will have unique XML ids by module again. If that helps...

On Mon, Jun 6, 2011 at 11:52 AM, Olivier Dony (OpenERP) <
685318@xxxxxxxxxxxxxxxxxx> wrote:

> Cleanup: I'm closing this bug as invalid, because the OpenERP API
> explicitly requires XML IDs (the keys in ir.model.data) to be unique per
> *module*, not per module + model. This is an important property, because
> we need to be able to refer uniquely to any record using the "module.id"
> notation. It would break a lot of OpenERP internals if this did not
> correspond to a unique record.
>
> PS: the corresponding OPW case was closed a while ago too.
>
> ** Changed in: openobject-server
>       Status: Triaged => Invalid
>
> --
> You received this bug notification because you are a member of OpenERP
> Drivers, which is subscribed to OpenERP Server.
> https://bugs.launchpad.net/bugs/685318
>
> Title:
>  Import: incoherence due to duplicate id in ir.model.data
>
> Status in OpenERP Server:
>  Invalid
>
> Bug description:
>  Note this bug has been discovered at openERP premises (with Naajla and
>  Jacques-Etienne) during a support service but they asked me to post in
>  Launchpad to be sure it will be followed and resolved.
>
>  Potentially this issue remains also on the V6 and should be checked in
>  this environment also...
>
>
>  I have built a import module using CSV files but after the module
> installation I had inconsistencies in the uploaded data (ie wrong users
> assigned to project or tasks).
>
>  The reason of that was the fact that I was using same id for user and
> employee (ie user with ID 'CB' and employee with an ID also named 'CB'); the
> impact was:
>  - the system deleted some entries in ir.model.data related to users
>  - the user assignment in table loaded was incorrect in the objects (other
> users were assigned in analytic accounts/projects/task than the ones
> mentioned in the csv files
>
>  So, the issue seems to be that the import functions don't support same
>  ids (field "Name" in ir.model.data) used for different objects (field
>  "model" in ir.model.data)
>
>  This should be solved if the table keys used for reading ir.model.data
>  include fields "Name", "Module" but also the "Model" field that is not
>  included in the read key.
>

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

Title:
  Import: incoherence due to duplicate id in ir.model.data

Status in OpenERP Server:
  Invalid

Bug description:
  Note this bug has been discovered at openERP premises (with Naajla and
  Jacques-Etienne) during a support service but they asked me to post in
  Launchpad to be sure it will be followed and resolved.

  Potentially this issue remains also on the V6 and should be checked in
  this environment also...

  
  I have built a import module using CSV files but after the module installation I had inconsistencies in the uploaded data (ie wrong users assigned to project or tasks).

  The reason of that was the fact that I was using same id for user and employee (ie user with ID 'CB' and employee with an ID also named 'CB'); the impact was:
  - the system deleted some entries in ir.model.data related to users
  - the user assignment in table loaded was incorrect in the objects (other users were assigned in analytic accounts/projects/task than the ones mentioned in the csv files

  So, the issue seems to be that the import functions don't support same
  ids (field "Name" in ir.model.data) used for different objects (field
  "model" in ir.model.data)

  This should be solved if the table keys used for reading ir.model.data
  include fields "Name", "Module" but also the "Model" field that is not
  included in the read key.


Follow ups

References