← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 700199] [NEW] [5.0/6.0] mrp_operations time stamp for barcode susceptible to mistakes

 

Public bug reported:

Quote from forum:
"I use the barcode reader to introduce ORDER, WORKCENTER, OPERATION. Once I have done this, automatically a new register appears, with the initial date set, so, when I want to update the register with a new operation, the date is already set some time ago. " -Sergio

i'm dealing with the same problem here. i've done some work to correct
this but it's beyond my ability.

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 correct time (datetime.now() ) 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 understand this is not 'bug' per se, as it does that it's supposed to do. However, i think this is bad design for what it's supposed to do. 
For my case, 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).

** Affects: openobject-addons
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/700199

Title:
  [5.0/6.0] mrp_operations time stamp for barcode susceptible to mistakes

Status in OpenObject Addons Modules:
  New

Bug description:
  Quote from forum:
"I use the barcode reader to introduce ORDER, WORKCENTER, OPERATION. Once I have done this, automatically a new register appears, with the initial date set, so, when I want to update the register with a new operation, the date is already set some time ago. " -Sergio

i'm dealing with the same problem here. i've done some work to correct this but it's beyond my ability. 

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 correct time (datetime.now() ) 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 understand this is not 'bug' per se, as it does that it's supposed to do. However, i think this is bad design for what it's supposed to do. 
For my case, 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).





Follow ups

References