How i can compare fields.Date with another?
Im pretty newbie on this but im trying to learn and expand my knowledge.
I have a hotel which has a booking system, this booking system takes from user 2 dates , booking start and booking end. I would like to check when a new user tries to make a new booking if his date inserted is not overlaping another booking, do you copy me?
I think is by using the constrains odoo gives but how i can compare dates? For example if user a introduces that he wants a booking from 02/09/2018 to 04/09/2018 and user b tries to make a book for 03/09/2018 it should tell him that it is not possible. But how? I thought on parsing the result to EPOCH/posix time but i also dont know how to do it, im also a newbie on python.
Someone can help me?