← Back to team overview

c2c-oerpscenario team mailing list archive

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

 

On Sunday 05 December 2010, you wrote:
> Public bug reported:
> 
> 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... 
> 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 constraint in v6, (sql one) is: UNIQUE(name, module) . It is /not/ the 
model.
Which should really cover the case mentioned.

Now, I see that the line is the same for v5.0, latest code.. How did your 
issue really happen?

One cause could be that the constraint never managed to be established in the 
first place, because of previous data or something. 
Can you please re-check the database (perhaps "\d ir_model_data") and verify 
that all the sql constraints are there?

-- 
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 OpenObject Server:
  Triaged

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.





References