This hack is needed in 7.0 to avoid changes in the API.
Renaming the method is the proper solution for trunk (done revision 5018)
bzr revid: mat@openerp.com-
20140312140515-tisj9cye0mzfprsw
import psycopg2
from openerp.osv import orm, fields
import psycopg2
from openerp.osv import orm, fields
+from openerp.osv.orm import BaseModel
from openerp.tools.translate import _
FIELDS_RECURSION_LIMIT = 2
from openerp.tools.translate import _
FIELDS_RECURSION_LIMIT = 2
}]
_logger.info('importing %d rows...', len(data))
}]
_logger.info('importing %d rows...', len(data))
- import_result = self.pool[record.res_model].load(
- cr, uid, import_fields, data, context=context)
+ # DO NOT FORWARD PORT, already fixed in trunk
+ # hack to avoid to call the load method from ir_translation (name clash)
+ if record.res_model == 'ir.translation':
+ import_result = BaseModel.load(self.pool[record.res_model], cr, uid, import_fields, data, context=context)
+ else:
+ import_result = self.pool[record.res_model].load(cr, uid, import_fields, data, context=context)
_logger.info('done')
# If transaction aborted, RELEASE SAVEPOINT is going to raise
_logger.info('done')
# If transaction aborted, RELEASE SAVEPOINT is going to raise