[FIX] warning: domain was lost in onchange result

Closes #3127
This commit is contained in:
Wolfgang Taferner 2014-10-16 15:12:52 +02:00 committed by Olivier Dony
parent e6df0a21e9
commit 1e5c68f7a6
1 changed files with 24 additions and 8 deletions

View File

@ -78,7 +78,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
sale_order()
@ -107,7 +109,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
purchase_order()
@ -145,7 +149,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
account_invoice()
@ -174,7 +180,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
stock_picking()
@ -205,7 +213,9 @@ class stock_picking_in(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_out(osv.osv):
_inherit = 'stock.picking.out'
@ -232,7 +242,9 @@ class stock_picking_out(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.product'
@ -282,7 +294,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
sale_order_line()
@ -314,7 +328,9 @@ 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
purchase_order_line()