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.
from datetime import datetime from dateutil.relativedelta import relativedelta def _add_month_date(self, date_octroi,nbr_echeance) : date_before_month = datetime.strptime(date_octroi, '%Y-%m-%d') date_after_month = date_before_month+ relativedelta(months=nbr_echeance) return date_after_month
This function takes as parameters your date and number of months and add return months to this date then return a new date.
Thank you so so much for your reply and sorry if I was'nt too clear.. But I want to say that I have already a "date_octroi" for which I need to increase the number of months with the value of the number of deadlines "nbr_echeance"... how can i do it !! please i need your help thanks a lot
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/15/13, 12:42 PM|
|Seen: 1356 times|
|Last updated: 3/16/15, 8:10 AM|