From 684483b634d5fd2e02ddcca43e89747f549d2ee0 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Mon, 8 Jan 2018 15:59:23 +0100 Subject: [PATCH] [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 --- addons/website_portal_sale/models/payment.py | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/website_portal_sale/models/payment.py b/addons/website_portal_sale/models/payment.py index fcc4aa09a40..adc8a66bdc5 100644 --- a/addons/website_portal_sale/models/payment.py +++ b/addons/website_portal_sale/models/payment.py @@ -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()