~vauxoo/addons-vauxoo/6.0-trunk

« back to all changes in this revision

Viewing changes to import_data_with_ids/orm_patch.patch

  • Committer: Gabriela (Vauxoo)
  • Date: 2012-01-03 00:42:58 UTC
  • Revision ID: gabrielaquilarque97@gmail.com-20120103004258-w881e8vj51secs2q

[IMP] Changed name of modules.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
=== modified file 'openerp/osv/orm.py'
2
 
--- openerp/osv/orm.py  2012-02-23 17:58:51 +0000
3
 
+++ openerp/osv/orm.py  2012-07-12 22:42:36 +0000
4
 
@@ -1251,7 +1251,7 @@
5
 
             context = {}
6
 
         fields = map(fix_import_export_id_paths, fields)
7
 
         ir_model_data_obj = self.pool.get('ir.model.data')
8
 
-
9
 
+        ids_record=[]
10
 
         # mode: id (XML id) or .id (database id) or False for name_get
11
 
         def _get_id(model_name, id, current_module=False, mode='id'):
12
 
             if mode=='.id':
13
 
@@ -1415,9 +1415,10 @@
14
 
                 return -1, res, 'Line ' + str(position) +' : ' + '!\n'.join(warning), ''
15
 
 
16
 
             try:
17
 
-                ir_model_data_obj._update(cr, uid, self._name,
18
 
+                record_line_id=ir_model_data_obj._update(cr, uid, self._name,
19
 
                      current_module, res, mode=mode, xml_id=xml_id,
20
 
                      noupdate=noupdate, res_id=res_id, context=context)
21
 
+                ids_record.append(record_line_id)
22
 
             except Exception, e:
23
 
                 return -1, res, 'Line ' + str(position) + ' : ' + tools.ustr(e), ''
24
 
 
25
 
@@ -1433,7 +1434,7 @@
26
 
 
27
 
         if context.get('defer_parent_store_computation'):
28
 
             self._parent_store_compute(cr)
29
 
-        return position, 0, 0, 0
30
 
+        return position, 0, 0, 0, ids_record
31
 
 
32
 
     def get_invalid_fields(self, cr, uid):
33
 
         return list(self._invalids)
34