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()