Impacted versions: 10.0

Steps to reproduce:
- define a rule with `Appears on Payslip` unticked and with account defined
- define a contract for an employee, and linked to a structure which has the modified rule

Current behavior: the rule is not computed and move is not written to journal.

Expected behavior: account move related to hidden rule should be present in salary journal

Video/Screenshot link (optional):

return True
    @api.multi
    def unlink(self):
        if any(self.filtered(lambda payslip: payslip.state not in ('draft', 'cancel'))):
            raise UserError(_('You cannot delete a payslip which is not draft or cancelled!'))
        return super(HrPayslip, self).unlink()
    
    @api.model
    def get_contract(self, employee, date_from, date_to):
        """
        @param employee: recordset of employee
        @param date_from: date field
        @param date_to: date field
        @return: returns the ids of all the contracts for the given employee that need to be considered for the given dates
        """
        
        clause_1 = ['&', ('date_end', '<=', date_to), ('date_end', '>=', date_from)]
        
        clause_2 = ['&', ('date_start', '<=', date_to), ('date_start', '>=', date_from)]
        
        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
        return self.env['hr.contract'].search(clause_final).ids
    @api.multi
    def compute_sheet(self):