[FIX] sale: Wrong email state for order confirmation
[FIX] sale: Wrong email state for order confirmation

The email sent after an electronic payment is sent using the
quotation template instead of the order template.

This PR changes the way payment are done in the backend so
the order has the correct state before sending the email.

opw-1894258

closes odoo/odoo#27847
ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo