Hi,
I have two date fields "from_date" and "to_date" and if the current date is between or equal to "from_date" or" to_date" I want to get all such records from the model.
How could I search these records??
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hi,
I have two date fields "from_date" and "to_date" and if the current date is between or equal to "from_date" or" to_date" I want to get all such records from the model.
How could I search these records??
Hello Sebin,
Try this :-
search_obj = self.env['model.name'].search([('from_date', '>=', fields.date.today()), ('to_date', '<=', fields.date.today())])
Hope it works for you.
Thanks,
hi Jignesh Meha,
offers = self.env['offer.sales'].search([('branch_id', 'in', line.branch_id.ids),('from_date', '>=', line.date_order),('to_date', '>=', line.date_order)]) not getting data from offer.sales models
Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!
DaftarPost Terkait | Replies | Tampilan | Aktivitas | |
---|---|---|---|---|
|
0
Okt 23
|
3103 | ||
|
1
Nov 22
|
3612 | ||
Preview pdf,docs or other attachment file
Diselesaikan
|
|
4
Des 21
|
33481 | |
|
0
Jun 21
|
6201 | ||
|
0
Mar 21
|
3001 |