diff --git a/openerp/addons/base/ir/ir.xml b/openerp/addons/base/ir/ir.xml index 011ad437cca..adbab648798 100644 --- a/openerp/addons/base/ir/ir.xml +++ b/openerp/addons/base/ir/ir.xml @@ -241,7 +241,7 @@ {'active_test': False} - + @@ -1221,7 +1221,7 @@ ir.model.data form -
+ @@ -1239,7 +1239,7 @@ ir.model.data tree - + @@ -1253,7 +1253,7 @@ ir.model.data search - + @@ -1293,7 +1293,7 @@ - Object Identifiers + External Identifiers ir.model.data form diff --git a/openerp/addons/base/ir/ir_model.py b/openerp/addons/base/ir/ir_model.py index a9d2a21b7a5..1ae54af0cb9 100644 --- a/openerp/addons/base/ir/ir_model.py +++ b/openerp/addons/base/ir/ir_model.py @@ -561,14 +561,27 @@ class ir_model_access(osv.osv): ir_model_access() class ir_model_data(osv.osv): + """Holds external identifier keys for records in the database. + This has two main uses: + + * allows easy data integration with third-party systems, + making import/export/sync of data possible, as records + can be uniquely identified across multiple systems + * allows tracking the origin of data installed by OpenERP + modules themselves, thus making it possible to later + update them seamlessly. + """ _name = 'ir.model.data' __logger = logging.getLogger('addons.base.'+_name) _order = 'module,model,name' _columns = { - 'name': fields.char('XML Identifier', required=True, size=128, select=1), - 'model': fields.char('Object', required=True, size=64, select=1), + 'name': fields.char('External Identifier', required=True, size=128, select=1, + help="External Key/Identifier that can be used for " + "data integration with third-party systems"), + 'model': fields.char('Model Name', required=True, size=64, select=1), 'module': fields.char('Module', required=True, size=64, select=1), - 'res_id': fields.integer('Resource ID', select=1), + 'res_id': fields.integer('Record ID', select=1, + help="ID of the target record in the database"), 'noupdate': fields.boolean('Non Updatable'), 'date_update': fields.datetime('Update Date'), 'date_init': fields.datetime('Init Date') @@ -580,7 +593,7 @@ class ir_model_data(osv.osv): 'module': '' } _sql_constraints = [ - ('module_name_uniq', 'unique(name, module)', 'You cannot have multiple records with the same id for the same module !'), + ('module_name_uniq', 'unique(name, module)', 'You cannot have multiple records with the same external ID in the same module!'), ] def __init__(self, pool, cr): diff --git a/openerp/addons/base/ir/ir_translation.py b/openerp/addons/base/ir/ir_translation.py index 940909b0d71..813ab514b0f 100644 --- a/openerp/addons/base/ir/ir_translation.py +++ b/openerp/addons/base/ir/ir_translation.py @@ -59,7 +59,7 @@ class ir_translation(osv.osv): # These two columns map to ir_model_data.module and ir_model_data.name. # They are used to resolve the res_id above after loading is done. 'module': fields.char('Module', size=64, help='Maps to the ir_model_data for which this translation is provided.'), - 'xml_id': fields.char('XML Id', size=128, help='Maps to the ir_model_data for which this translation is provided.'), + 'xml_id': fields.char('External ID', size=128, help='Maps to the ir_model_data for which this translation is provided.'), } def _auto_init(self, cr, context={}): diff --git a/openerp/addons/base/ir/ir_ui_view.py b/openerp/addons/base/ir/ir_ui_view.py index f875ddf0b7e..90990834c9b 100644 --- a/openerp/addons/base/ir/ir_ui_view.py +++ b/openerp/addons/base/ir/ir_ui_view.py @@ -78,7 +78,7 @@ class view(osv.osv): 'arch': fields.text('View Architecture', required=True), 'inherit_id': fields.many2one('ir.ui.view', 'Inherited View', ondelete='cascade', select=True), 'field_parent': fields.char('Child Field',size=64), - 'xml_id': fields.function(osv.osv.get_xml_id, type='char', size=128, string="XML ID", + 'xml_id': fields.function(osv.osv.get_xml_id, type='char', size=128, string="External ID", method=True, help="ID of the view defined in xml file"), } _defaults = {