Odoo-mobile / framework

Odoo Mobile Framework
https://play.google.com/store/apps/dev?id=8607973775002477408
Other
327 stars 374 forks source link

ODomain with dates #301

Open jzahid opened 7 years ago

jzahid commented 7 years ago

Hi all How to set a domain with date. Is there any functioning example ? For example, i want to fetch all records from server with value of date fields > the first day of current month. I tried using java.util.calendar , and joda time library . but none worked.

r-mckay commented 7 years ago

Hello, you could use ODateUtils to populate your Domain. For example: domain.add(your_date_field, ">", ODateUtils.getDateBefore(number_of_days)); Feel free to check what ODateUtils exposes to you, you might find interesting methods for you.