~savoirfairelinux-openerp/openobject-server/group_by_falsey_1299222

« back to all changes in this revision

Viewing changes to openerp/tests/addons/test_impex/tests/test_export.py

[MERGE] [FIX] orm: when generating xml ids for export, use the model of the exported field instead of the current model. Courtesy of Stefan Rijnhart (Therp).

Show diffs side-by-side

added added

removed removed

Lines of Context:
309
309
    def test_external_id(self):
310
310
        integer_id = self.registry('export.integer').create(
311
311
            self.cr, openerp.SUPERUSER_ID, {'value': 42})
312
 
        # __export__.$class.$id
313
 
        external_id = u'__export__.export_many2one_%d' % integer_id
 
312
        # Expecting the m2o target model name in the external id,
 
313
        # not this model's name
 
314
        external_id = u'__export__.export_integer_%d' % integer_id
314
315
        self.assertEqual(
315
316
            self.export(integer_id, fields=['value/id']),
316
317
            [[external_id]])