Code review comment for lp:~openerp-dev/openobject-server/6.0-opw-50841-nep

Revision history for this message
Olivier Laurent (Open ERP) (olt) wrote :

The current constraint 'ir_model_data_module_name_uniq' on ir_model_data table is already preventing from inserting 2 records with the same name and module, so you cannot insert a record with the same xml_id ('name' field) within the same module.

Example:

if you already have a record: name: 'next_id_2', module: 'base', model: 'ir.ui.menu'

you will not be able to insert this record: 'next_id_2', module: 'base', model: 'sale.order'

because the name and module are the same as another record.

Your constraint on (name, model, module) is less restrictive than before. So if we change the current constraint (name, module) to the new one (name, model, module), we will be able to insert records having the same xml_id for the same module which will raise the problems defined in the issue.

review: Disapprove

« Back to merge proposal