Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
Hi, I have 2 dates (from date and to date) in hand. I would like to know if there's another record in the table that falls on the same range. I use openerp search function to do that
below is my code. Kindly see if my date search with operator <= is correct and is there anything that i wrongly understood.
exist_ids = self.search(cr, uid, [('partner_id','=',customer),('sys_conf_name','ilike',sys_conf_name.strip()),('contract_start_date','<=',cont_start_date),('contract_end_date','>=',cont_end_date)]) if exist_ids: raise osv.except_osv(_('Error!!'), "Already there exist a Contract for the same customer, same product and the same date range!!")
Thanks for your time.
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 9/26/13, 9:46 AM|
|Seen: 926 times|
|Last updated: 3/16/15, 8:10 AM|