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.
IS IT POSSIBLE TO TO SUBTRACT THE YEAR. IF SO WHAT CODE IM GOING TO USE. DO I NEED TO USE THE FIELDS.DATE OR FIELDS THAT INTEGER? TAKE NOTE I NEED ONLY TO SUBTRACT THE YEARNOW - YEAREFFECT. YEAR EFFECT IS FIELDS TO BE INPUT.
You can do that in many ways. I can give you a simple way. In this you have to choose your YEAREFFECT field as integer(in format "yyyy", ie '2015')
in code its like:-
'yeareffect' : fields.integer('Year Effect'),
Then at calculation part you can use like this:-
yearnow = int(time.strftime("%Y"))
then you have get the value in yeareffect field
diff = value_yeareffect - yearnow
For this you have to import time
This is a simple way, You can do it in many other ways, for that you have mention more details about your requirement, This is from what i understood form your brief description. please let me know if this solves the problem.
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: 1/25/15, 7:46 PM|
|Seen: 667 times|
|Last updated: 3/28/15, 3:13 AM|