warning message not working

Bug #1189332 reported by Aneeshmohan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
New
Undecided
Unassigned

Bug Description

I want to show a warning message in user interface side in my module in a particular condition.For that I have write the code like this.

    raise osv.except_osv(('Warning!'), ("Entered Quantity is greater than quantity on source."))

But in that condition in user interface side it just showing the loading image.

At the console I got the error like this.

> 2013-06-10 09:45:53,612 364
> ←[1;31m←[1;49mERROR←[0m None
> openerp.netsvc: Warning! Entered
> Quantity is greater than quantity on
> source. Traceback (most recent call
> last): File
> "C:\OpenErp\openerp\openobject-server\openerp\netsvc.py",
> line 361, in dispatch_rpc
> result = ExportService.getService(service_name).dispatch(method,
> params) File
> "C:\OpenErp\openerp\openobject-server\openerp\service\web_services.py",
> line 585, in dispatch
> res = fn(db, uid, *params) File "C:\OpenErp\openerp\openobject-server\openerp\osv\osv.py",
> line 167, in execute_kw
> return self.execute(db, uid, obj, method, *args, **kw or {}) File
> "C:\OpenErp\openerp\openobject-server\openerp\osv\osv.py",
> line 121, in wrapper
> return f(self, dbname, *args, **kwargs) File "C:\OpenErp\openerp\openobject-server\openerp\osv\osv.py",
> line 176, in execute
> res = self.execute_cr(cr, uid, obj, method, *args, **kw) File
> "C:\OpenErp\openerp\openobject-server\openerp\osv\osv.py",
> line 164, in execute_cr
> return getattr(object, method)(cr, uid, *args, **kw) File
> "C:\OpenErp\openerp\openobject-addons\mat_mgmt\mat_mgmt.py",
> line 101, in button_confirm
> raise osv.except_osv(('Warning!'), ("Entered Quantity is greater than
> quantity on source.")) except_osv:
> ('Warning!', 'Entered Quantity is
> greater than quantity on source.')
> > c:\openerp\openerp\openobject-addons\mat_mgmt\mat_mgmt.py(101)button_confirm()
> -> raise osv.except_osv(('Warning!'), ("Entered Quantity is greater than
> quantity on source."))

I want to show the warning message on user interface side.

Amit Parik (amit-parik)
affects: openobject-addons → openobject-server
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.