[IMP] avoid sending mail for validation transactions
Before this commit, validation transactions would send an email when the token is assigned to the order. closes odoo/odoo#155167 Taskid: 3675875 X-original-commit: f70967e240058d8a6b095fc58c591249e517bd31 Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
This commit is contained in:
@@ -53,6 +53,8 @@ class PaymentTransaction(models.Model):
|
||||
for so in tx.sale_order_ids:
|
||||
so.reference = tx._compute_sale_order_reference(so)
|
||||
|
||||
if tx.operation == 'validation':
|
||||
continue
|
||||
# Send the payment status email.
|
||||
# The transactions are manually cached while in a sudoed environment to prevent an
|
||||
# AccessError: In some circumstances, sending the mail would generate the report assets
|
||||
|
||||
Reference in New Issue
Block a user