hunk.code_window:             created_invoice.action_invoice_open()
               if tx.acquirer_id.journal_id:
                   created_invoice.pay_and_reconcile(tx.acquirer_id.journal_id, pay_amount=created_invoice.amount_total)
                   if created_invoice.payment_ids:
                       created_invoice.payment_ids[0].payment_transaction_id = tx
               else:
                   _logger.warning('<%s> transaction completed, could not auto-generate payment for %s (ID %s) (no journal set on acquirer)',
                                   acquirer_name, tx.sale_order_id.name, tx.sale_order_id.id)
  
hunk.labels: keep keep keep replace keep keep keep keep keep
hunk.after_edit:                 created_invoice.with_context(tx_currency_id=tx.currency_id.id).pay_and_reconcile(tx.acquirer_id.journal_id, pay_amount=created_invoice.amount_total)
  
hunk.file_path: addons/website_portal_sale/models/payment.py
hunk.type: replace
file: odoo.define('website_sale.validate', function(require) {
  "use strict";
  
  var ajax = require('web.ajax');
  
  $(document).ready(function () {
  
      var _poll_nbr = 0;
  
      function payment_transaction_poll_status() {
          var order_node = $('div.oe_website_sale_tx_status');
          if (! order_node || order_node.data('order-id') === undefined) {
              return;
          }
          var order_id = order_node.data('order-id');
          return ajax.jsonRpc('/shop/payment/get_status/' + order_id, 'call', {
          }).then(function (result) {
              _poll_nbr += 1;
              if(result.recall && _poll_nbr <= 5){
                  setTimeout(function () { payment_transaction_poll_status(); }, 1000);
              }
              $('div.oe_website_sale_tx_status').html(result.message);
          });
      }
  
      payment_transaction_poll_status();
  });
  
  });
  