Skip to content

Commit

Permalink
[IMP] account_payment_group: Botón 'Registrar Pago' funcione como la …
Browse files Browse the repository at this point in the history
…accion de servidor

Ticket: 57356
X-original-commit: 4bf6d4e
  • Loading branch information
Maximiliano Mezzavilla authored and mem-adhoc committed Apr 6, 2023
1 parent 4067a54 commit 78eba37
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion account_payment_group/models/account_move.py
Expand Up @@ -58,7 +58,7 @@ def action_register_payment_group(self):
raise UserError(_('Nothing to be paid on selected entries'))
to_pay_partners = self.mapped('commercial_partner_id')
if len(to_pay_partners) > 1:
raise UserError(_('Selected recrods must be of the same partner'))
raise UserError(_('Selected records must be of the same partner'))

return {
'name': _('Register Payment'),
Expand All @@ -77,6 +77,11 @@ def action_register_payment_group(self):
},
}

def action_register_payment(self):
''' This method is extended to work like action_register_payment_group() and not like the native odoo method,
the register payment button will act like the "Registrar Pago" server action '''
return self.action_register_payment_group()

def action_post(self):
res = super(AccountMove, self).action_post()
self.pay_now()
Expand Down

0 comments on commit 78eba37

Please sign in to comment.