Skip to content

Commit

Permalink
[ADD] l10n_ar_edi_ux: mejora de rendimiento en actualizacion masiva d…
Browse files Browse the repository at this point in the history
…e partners

Task: 37730
  • Loading branch information
mem-adhoc committed Apr 23, 2024
1 parent f3f0f02 commit 30473c8
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions l10n_ar_edi_ux/wizards/res_partner_update_from_padron_wizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,13 @@ def _update(self):
def automatic_process_cb(self):
for partner in self.partner_ids:
self.partner_id = partner.id
self.change_partner()
self._update()
try:
self.change_partner()
self._update()
except:
_logger.error("Error al procesar el contacto %s: " % partner.name)
continue

self.write({'state': 'finished'})
return {
'type': 'ir.actions.act_window',
Expand Down Expand Up @@ -218,7 +223,10 @@ def _next_screen(self):
self.write(values)
# because field is not changed, view is distroyed and reopen, on change
# is not called an we call it manually
self.change_partner()
try:
self.change_partner()
except:
raise UserError('No se pudo actualizar el contacto: %s. Por favor quitelo de la lista e intente de nuevo' % self.partner_ids[0].name )
return {
'type': 'ir.actions.act_window',
'res_model': self._name,
Expand Down

0 comments on commit 30473c8

Please sign in to comment.