From e147aac74aa4527d4dfa5fa3411ed7168aff55d0 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Tue, 6 Sep 2016 11:13:54 +0200 Subject: [PATCH] [FIX] warning: fix override of product_id_change Without the @api.multi property, the method is considered as taking only one parameter (self?), while it takes multiple parameters. This prevented to change the quote template on a sale order, if the quote template had some order lines, due to the below error `TypeError: product_id_change() takes exactly 1 argument (19 given)` opw-687797 --- addons/warning/warning.py | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/warning/warning.py b/addons/warning/warning.py index bead8a1b3a0..d7689d82bc6 100644 --- a/addons/warning/warning.py +++ b/addons/warning/warning.py @@ -232,6 +232,7 @@ class sale_order_line(osv.osv): result['warning'] = warning return result + @api.multi @api.onchange('product_id') def product_id_change(self): warning = self.onchange_product_id_warning()