Hello Everyone,
I have to try to add month into today date .
my code below :
from odoo.tools import float_is_zero, float_compare, DEFAULT_SERVER_DATETIME_FORMAT
from datetime import datetime, date, timedelta
import datetime
start_month = fields.Date("start")
end_month =fields.Date("end", compute='_calculate_month')
@api.depends('start_month')
@api.multi
def _calculate_month(self):
if self.start_month:
Date = datetime.datetime.now()
EndDate = Date + datetime.timedelta(months=6)
end_month = EndDate
print "CD:", Date, end_month
Thank you in Advanced