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

[FIX] payment_mercadopago: prevent re-send of mail when pending for payment #67

Open
wants to merge 1 commit into
base: 13.0
Choose a base branch
from

Conversation

ALopez-Adhoc
Copy link
Contributor

No description provided.

@roboadhoc
Copy link

@ALopez-Adhoc ALopez-Adhoc force-pushed the 13.0-t-32989-loa branch 2 times, most recently from 363d495 to 473947c Compare August 10, 2023 14:40
@maq-adhoc
Copy link
Contributor

podemos agregar esto para evitar el primer envio de el emal

`

class PaymentTransaction(models.Model):
_inherit = 'payment.transaction'

def _set_transaction_pending(self):
    tx_mercadopago = self.filtered(lambda t: t.aquirer_id.provider == 'mercadopago')
    if tx_mercadopago:         
        super(PaymentTransaction, tx_mercadopago.with_context(ingnore_confirmation_mail=True))._set_transaction_pending()

    super(PaymentTransaction, (self - tx_mercadopago))._set_transaction_pending()

class SaleOrder(models.Model):
_name = "sale.order"

def _send_order_confirmation_mail(self):
    if not self._context.get('ingnore_confirmation_mail'):
        super()._send_order_confirmation_mail()

`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants