Q:

how to get date difference in openerp?

I want to get the number of days between two dates. How can I achieve this in openerp? I need to comapare the current date with a past date and get the number of days in between.

A:

Here See Simple Example.
See below code.
from datetime import date

d0 = date(2013, 1, 1)
d1 = date(2013, 1, 30)
delta = d0 - d1
print delta.days

OpenERP follow python codes

