summaryrefslogtreecommitdiff
path: root/addons/warning
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2015-01-19 17:15:56 +0100
committerChristophe Simonis <chs@odoo.com>2015-01-19 17:15:56 +0100
commit18e22be138f4d273ce8f63c0ff2c8a437cf6ce5d (patch)
tree63bd658de7b6fa0e91d521ca19322dd68bdc1492 /addons/warning
parentf6e5bf847b1a7107c09b009a757823b0f9514fa4 (diff)
parent0aab81cd3ac6881b2b64ccedb901b55badd421d4 (diff)
[MERGE] forward port of branch 8.0 up to 0aab81c
Diffstat (limited to 'addons/warning')
-rw-r--r--addons/warning/__openerp__.py1
-rw-r--r--addons/warning/warning.py25
2 files changed, 18 insertions, 8 deletions
diff --git a/addons/warning/__openerp__.py b/addons/warning/__openerp__.py
index a991f42fce0..e7e72738819 100644
--- a/addons/warning/__openerp__.py
+++ b/addons/warning/__openerp__.py
@@ -37,5 +37,4 @@ picking and invoice. The message is triggered by the form's onchange event.
'demo': [],
'installable': True,
'auto_install': False,
- 'images': ['images/customers_warnings.jpeg','images/sale_order_warning.jpeg'],
}
diff --git a/addons/warning/warning.py b/addons/warning/warning.py
index 81bac3cdff5..954b0e96e95 100644
--- a/addons/warning/warning.py
+++ b/addons/warning/warning.py
@@ -76,7 +76,9 @@ 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.get('value',{}), 'warning':warning}
+ if warning:
+ result['warning'] = warning
+ return result
class purchase_order(osv.osv):
@@ -104,7 +106,9 @@ 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.get('value',{}), 'warning':warning}
+ if warning:
+ result['warning'] = warning
+ return result
@@ -143,7 +147,9 @@ 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.get('value',{}), 'warning':warning}
+ if warning:
+ result['warning'] = warning
+ return result
class stock_picking(osv.osv):
@@ -171,8 +177,9 @@ 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.get('value',{}), 'warning':warning}
-
+ if warning:
+ result['warning'] = warning
+ return result
class product_product(osv.osv):
_inherit = 'product.template'
@@ -221,7 +228,9 @@ 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.get('value',{}), 'warning':warning}
+ if warning:
+ result['warning'] = warning
+ return result
class purchase_order_line(osv.osv):
@@ -252,4 +261,6 @@ 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.get('value',{}), 'warning':warning}
+ if warning:
+ result['warning'] = warning
+ return result