[FIX] website_portal_sale: SO state

Add the SO state on the payment transaction, in order to be able to spot
more easily unconfirmed SO due to incomplete payments.

opw-748467
This commit is contained in:
Nicolas Martinelli
2018-01-09 08:30:25 +01:00
committed by Nicolas Martinelli
parent e3080d8433
commit 684483b634
@@ -11,6 +11,7 @@ class PaymentTransaction(models.Model):
# link with the sale order
sale_order_id = fields.Many2one('sale.order', string='Sale Order')
so_state = fields.Selection('sale.order', string='Sale Order State', related='sale_order_id.state')
def _generate_and_pay_invoice(self, tx, acquirer_name):
tx.sale_order_id._force_lines_to_invoice_policy_order()