Hi,
I am trying to recover data from a broken odoo installation (uprade got screwed up).
I have exported all the tables to CSV using postgresql (psql). I would also be able to handle many2one and one2many relations.
For many2many relations, I need a way to programatically find out which database table contains the relation details (ids from both the models). I tried to get the data from the ORM "fields_get" function using xmlrpc. The field definition returns a dictionary which has a key named 'relation'. However this key contains just the name of the other table/ model involved in the relation. For many2many relations there is another 3rd table involved. I am unable to find where odoo stores the name of this table.
Regards,
Tanveer
You can get the name of the relation table by seeing the fields definition only. Or, odoo maintains a separate table called 'ir_model_relation' containing the module id(like, Project) and the object(model) id(like project_project ) with relation tables name for that object, you can use this table to get all the relation for that particular model(object) .