avanzosc team mailing list archive
-
avanzosc team
-
Mailing list archive
-
Message #00229
[Bug 894039] Re: mrp_master_extension: list index out of range
The code that makes the error on line 118 below:
----- CUT -----
if 'name' in context.keys():
production_id = self.pool.get('mrp.production').search(cr, uid, [('name', '=', context['name'])])[0]
res.update({'production_id': production_id})
return res
----- CUT -----
Should look like this:
----- CUT -----
if 'name' in context.keys():
production_id = self.pool.get('mrp.production').search(cr, uid, [('name', '=', context['name'])])
res.update({'production_id': production_id})
return res
----- CUT -----
--
You received this bug notification because you are a member of Avanzosc
Developers, which is subscribed to Avanzosc developments.
https://bugs.launchpad.net/bugs/894039
Title:
mrp_master_extension: list index out of range
Status in Avanzosc OpenERP modules:
New
Bug description:
When add Schedule Operations button is pushed and no other field has
been filled the following error will pop up:
Environment Information :
System : Windows-Vista-6.1.7601-SP1
OS Name : nt
Operating System Release : Vista
Operating System Version : 6.1.7601
Operating System Architecture : 32bit
Operating System Locale : sv_SE.cp1252
Python Version : 2.5.2
OpenERP-Client Version : 6.0.2
Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):
File "/opt/openerp/server/bin/netsvc.py", line 489, in dispatch
result = ExportService.getService(service_name).dispatch(method, auth, params)
File "/opt/openerp/server/bin/service/web_services.py", line 599, in dispatch
res = fn(db, uid, *params)
File "/opt/openerp/server/bin/osv/osv.py", line 122, in wrapper
return f(self, dbname, *args, **kwargs)
File "/opt/openerp/server/bin/osv/osv.py", line 176, in execute
res = self.execute_cr(cr, uid, obj, method, *args, **kw)
File "/opt/openerp/server/bin/osv/osv.py", line 167, in execute_cr
return getattr(object, method)(cr, uid, *args, **kw)
File "/opt/openerp/server/bin/addons/mrp_master_extension/mrp_production.py", line 118, in default_get
production_id = self.pool.get('mrp.production').search(cr, uid, [('name', '=', context['name'])])[0]
IndexError: list index out of range
To manage notifications about this bug go to:
https://bugs.launchpad.net/avanzosc/+bug/894039/+subscriptions
References