It is currently Tue May 22, 2012 9:37 pm

All times are UTC + 2 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: mrp_operations
PostPosted: Fri Sep 11, 2009 6:48 pm 
Offline

Joined: Wed Aug 26, 2009 1:22 pm
Posts: 14
Location: Durango (Vizcaya)
Hello,
I am evaluating the mrp_operations module, and I've find this:
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, de date is already set some time ago. The real time is not saved. How can I change this? must I change some python code?

thanks.
Sergio


Top
 Profile  
 
 Post subject: Re: mrp_operations
PostPosted: Sat Jan 08, 2011 4:56 am 
Offline

Joined: Mon Nov 15, 2010 9:39 am
Posts: 3
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.


Top
 Profile  
 
 Post subject: Re: mrp_operations
PostPosted: Sun Jan 09, 2011 3:36 am 
Offline

Joined: Mon Nov 15, 2010 9:39 am
Posts: 3
i found a workaround for this problem: don't use calc_delay function in mrp_operations_operation.

edit mrp_operations.py:

1. comment out lines that relate to 'delay' and 'calc_delay'

2. comment out '_default'

this way, only mrp.workcenter.line will do the calculation of date_start, date_finish, and delay which always gets current time and difference of the two for the delay.

hope this helps some people.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 2 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:

Protected by Anti-Spam ACP