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 zaoral committed Nov 29, 2022
1 parent a501543 commit bc07b1c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion account_payment_group/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,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 @@ -84,6 +84,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 bc07b1c

Please sign in to comment.