diff --git a/addons/payment/models/payment_acquirer.py b/addons/payment/models/payment_acquirer.py index 14d4bc55f77..d8f86621dd8 100644 --- a/addons/payment/models/payment_acquirer.py +++ b/addons/payment/models/payment_acquirer.py @@ -722,7 +722,7 @@ class PaymentTransaction(models.Model): @api.multi def _set_transaction_done(self): '''Move the transaction's payment to the done state(e.g. Paypal).''' - if any(trans.state not in ('draft', 'authorized') for trans in self): + if any(trans.state not in ('draft', 'authorized', 'pending') for trans in self): raise ValidationError(_('Only draft/authorized transaction can be posted.')) self.write({'state': 'done', 'date': datetime.now().strftime(DEFAULT_SERVER_DATETIME_FORMAT)})