From 436cfd6954d5ed8e538ae3c4c141e9cf56f75bae Mon Sep 17 00:00:00 2001 From: "Jay (Open ERP)" Date: Thu, 12 Nov 2009 11:12:24 +0530 Subject: [PATCH] [FIX] Warning : the super of onchange may return {},covered the same lp bug: https://launchpad.net/bugs/480856 fixed bzr revid: jvo@tinyerp.com-20091112054224-sb6q3k0p3g1yfs7v --- addons/warning/warning.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/addons/warning/warning.py b/addons/warning/warning.py index 16d29d91758..6dd8d78f5c7 100644 --- a/addons/warning/warning.py +++ b/addons/warning/warning.py @@ -79,7 +79,7 @@ class sale_order(osv.osv): warning['title'] = title and title +' & '+ result['warning']['title'] or result['warning']['title'] warning['message'] = message and message + ' ' + result['warning']['message'] or result['warning']['message'] - return {'value': result['value'], 'warning':warning} + return {'value': result.get('value',{}), 'warning':warning} sale_order() @@ -107,7 +107,7 @@ class purchase_order(osv.osv): warning['title'] = title and title +' & '+ result['warning']['title'] or result['warning']['title'] warning['message'] = message and message + ' ' + result['warning']['message'] or result['warning']['message'] - return {'value': result['value'], 'warning':warning} + return {'value': result.get('value',{}), 'warning':warning} purchase_order() @@ -146,7 +146,7 @@ class account_invoice(osv.osv): warning['title'] = title and title +' & '+ result['warning']['title'] or result['warning']['title'] warning['message'] = message and message + ' ' + result['warning']['message'] or result['warning']['message'] - return {'value': result['value'], 'warning':warning} + return {'value': result.get('value',{}), 'warning':warning} account_invoice() @@ -174,7 +174,7 @@ class stock_picking(osv.osv): warning['title'] = title and title +' & '+ result['warning']['title'] or result['warning']['title'] warning['message'] = message and message + ' ' + result['warning']['message'] or result['warning']['message'] - return {'value': result['value'], 'warning':warning} + return {'value': result.get('value',{}), 'warning':warning} stock_picking() @@ -229,7 +229,7 @@ class sale_order_line(osv.osv): warning['title'] = title and title +' & '+result['warning']['title'] or result['warning']['title'] warning['message'] = message and message +'\n\n'+result['warning']['message'] or result['warning']['message'] - return {'value': result['value'], 'warning':warning} + return {'value': result.get('value',{}), 'warning':warning} sale_order_line() @@ -260,7 +260,7 @@ class purchase_order_line(osv.osv): warning['title'] = title and title +' & '+result['warning']['title'] or result['warning']['title'] warning['message'] = message and message +'\n\n'+result['warning']['message'] or result['warning']['message'] - return {'value': result['value'], 'warning':warning} + return {'value': result.get('value',{}), 'warning':warning} purchase_order_line()