[FIX] hr_timesheet: missing '&' in domain clause

To search the contracts for payroll, the domain is constructed with three clauses. Each of these clauses needs to start with a '&' to make sure they are correctly combined with the OR clause'
This commit is contained in:
TheCloneMaster 2014-07-17 23:58:44 -06:00 committed by Martin Trigaux
parent 3dec09079e
commit ed58bcf26b
1 changed files with 1 additions and 1 deletions

View File

@ -386,7 +386,7 @@ class hr_payslip(osv.osv):
#OR if it starts between the given dates
clause_2 = ['&',('date_start', '<=', date_to),('date_start','>=', date_from)]
#OR if it starts before the date_from and finish after the date_end (or never finish)
clause_3 = [('date_start','<=', date_from),'|',('date_end', '=', False),('date_end','>=', date_to)]
clause_3 = ['&',('date_start','<=', date_from),'|',('date_end', '=', False),('date_end','>=', date_to)]
clause_final = [('employee_id', '=', employee.id),'|','|'] + clause_1 + clause_2 + clause_3
contract_ids = contract_obj.search(cr, uid, clause_final, context=context)
return contract_ids