|
i'm dealing with the same problem here. this only happens the tree(search form)
i found out that deleting 'default' value from the module stops from stamping the time automatically and when i start the operation, it does write the time to workcenter line object.
The problem is when you try to finish the operation with 'done' code. 'calc_delay' function tries to take the values of mrp_operations.operation's date_start and date_finished and it returns error as below:
Traceback (most recent call last): File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/openerp-server/netsvc.py", line 489, in dispatch result = ExportService.getService(service_name).dispatch(method, auth, params) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/openerp-server/service/web_services.py", line 586, in dispatch res = fn(db, uid, *params) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/openerp-server/osv/osv.py", line 57, in wrapper return f(self, dbname, *args, **kwargs) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/openerp-server/osv/osv.py", line 140, in execute res = pool.execute_cr(cr, uid, obj, method, *args, **kw) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/openerp-server/osv/osv.py", line 130, in execute_cr return getattr(object, method)(cr, uid, *args, **kw) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/openerp-server/addons/mrp_operations/mrp_operations.py", line 533, in create delay=self.calc_delay(cr, uid, vals) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/openerp-server/addons/mrp_operations/mrp_operations.py", line 430, in calc_delay a = datetime.strptime(time_lst[i-1],'%Y-%m-%d %H:%M:%S') TypeError: strptime() argument 1 must be string, not bool
I'm trying to find the way so that the function takes the date_start time (it seems to be doing that already as found out from the traceback) and takes datetime.now() as the date_finished. This takes place both in 5.0 and 6.0.
i''d like to make a dedicated client which accepts input thru barcode only and taking correct time is rather crucial in this operation (I'm pretty sure i'm not alone in this). This needs to be addressed.
|