Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
Hi All, Using V6.1 on windows I basically want to design a class or function in an existing module, probably the stock module, that would allow the system to create production lot number based on the current date and number of production lot that has been created on that day. I have written a code that I think would do the job but I do not know where exactly to put it. The python code is below which is quite simple. This is to make tracking of product even easier for the company and employees
if currentid==None or currentid=='':
idpart=currentid[0:-6]; datepart=currentid[1:]; #print (idpart) #print (datepart) idpartint=int(idpart) if time.strftime('%y%d%m')==datepart: currentid=str(idpartint+1)+datepart else: currentid='1'+time.strftime('%y%d%m')
prodt_lot = currentid
the series should look something like 1132205,2132205...x132205 for the 22May2013 then the next day should start from 1 again looking like this 1132305,2132305...x132305 etc as oppose to the current seven digit number e.g 0000007 generated by the system
Can anyone help please?
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 5/22/13, 2:34 PM|
|Seen: 1342 times|
|Last updated: 3/16/15, 8:10 AM|