Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FW][IMP] account_payment_group: Botón 'Registrar Pago' funcione como la acción de servidor #330

Open
wants to merge 1 commit into
base: 16.0
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -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