~openerp-dev/openobject-server/saas-3-bug_1291322-ptr

« back to all changes in this revision

Viewing changes to openerp/tools/convert.py

  • Committer: Denis Ledoux
  • Date: 2014-05-06 12:16:27 UTC
  • mfrom: (4743.1.551 7.0)
  • Revision ID: dle@openerp.com-20140506121627-4oyw4zl4o6azy73w
[MERGE] Forward-port of latest 7.0 bugfixes, up to rev. 5294 revid:odo@openerp.com-20140505074636-bl2y5pst4pfmpz3u

Show diffs side-by-side

added added

removed removed

Lines of Context:
305
305
 
306
306
        if d_search:
307
307
            idref = _get_idref(self, cr, self.uid, d_model, context={}, idref={})
308
 
            ids = self.pool[d_model].search(cr, self.uid, unsafe_eval(d_search, idref))
 
308
            try:
 
309
                ids = self.pool[d_model].search(cr, self.uid, unsafe_eval(d_search, idref))
 
310
            except ValueError:
 
311
                _logger.warning('Skipping deletion for failed search `%r`', d_search, exc_info=True)
 
312
                pass
309
313
        if d_id:
310
314
            try:
311
315
                ids.append(self.id_get(cr, d_id))
312
 
            except:
 
316
            except ValueError:
313
317
                # d_id cannot be found. doesn't matter in this case
 
318
                _logger.warning('Skipping deletion for missing XML ID `%r`', d_id, exc_info=True)
314
319
                pass
315
320
        if ids:
316
321
            self.pool[d_model].unlink(cr, self.uid, ids)