openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #15818
[Bug 1046298] Re: resource.calendar bug if no line defined in it when writing a mrp.production_workcenter_line
Hello,
It has been Fixed in https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-1046298-vba
Revision ID: vba@xxxxxxxxxxx-20120918112519-ntgedg5yw4o58q5z
Revision NO: 7483
Thanks,
vba
** Changed in: openobject-addons
Status: In Progress => Fix Committed
--
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/1046298
Title:
resource.calendar bug if no line defined in it when writing a
mrp.production_workcenter_line
Status in OpenERP Addons (modules):
Fix Committed
Bug description:
here's a really uncommon problem:
1. Create a db (with demo if you like or want to speed up the check), install mrp_operations
2. Go in the manufacturing
3. Create a working time but just give it a name and don't define any line in the m2o
4. Create a workcenter with the working time defined in pt. 3
5. Create a routing with the workcenter from pt.4 in it and some other workcenters before
6. associate the routing to a bom
7. Create a Manufacturing order with this bom and then start it
8. Try to read and write the work order, here's what you should get:
Server Traceback (most recent call last):
File "/home/antoine/source/web/6.1/addons/web/common/http.py", line 593, in send
return openerp.netsvc.dispatch_rpc(service_name, method, args)
File "/home/antoine/source/server/6.1/openerp/netsvc.py", line 360, in dispatch_rpc
result = ExportService.getService(service_name).dispatch(method, params)
File "/home/antoine/source/server/6.1/openerp/service/web_services.py", line 586, in dispatch
res = fn(db, uid, *params)
File "/home/antoine/source/server/6.1/openerp/osv/osv.py", line 167, in execute_kw
return self.execute(db, uid, obj, method, *args, **kw or {})
File "/home/antoine/source/server/6.1/openerp/osv/osv.py", line 121, in wrapper
return f(self, dbname, *args, **kwargs)
File "/home/antoine/source/server/6.1/openerp/osv/osv.py", line 176, in execute
res = self.execute_cr(cr, uid, obj, method, *args, **kw)
File "/home/antoine/source/server/6.1/openerp/osv/osv.py", line 164, in execute_cr
return getattr(object, method)(cr, uid, *args, **kw)
File "/home/antoine/source/server/6.1/openerp/osv/orm.py", line 3416, in read
result = self._read_flat(cr, user, select, fields, context, load)
File "/home/antoine/source/server/6.1/openerp/osv/orm.py", line 3539, in _read_flat
res2 = self._columns[f].get(cr, self, ids, f, user, context=context, values=res)
File "/home/antoine/source/server/6.1/openerp/osv/fields.py", line 1129, in get
result = self._fnct(obj, cr, uid, ids, name, self._arg, context)
File "/home/antoine/source/addons/6.1/mrp_operations/mrp_operations.py", line 72, in _get_date_end
intervals = self.pool.get('resource.calendar').interval_get_multi(cr, uid, date_and_hours_by_cal)
File "/home/antoine/source/addons/6.1/resource/resource.py", line 163, in interval_get_multi
for (hour_from,hour_to) in [(item['hour_from'], item['hour_to']) for item in hours_by_cal[id] if item['dayofweek'] == str(dt_from.weekday())]:
KeyError: 1
Note that it's also impossible then to duplicate a MO with the
workcenter concerned in it then.
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/1046298/+subscriptions
References