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):

addons/hr_payroll/models/hr_payroll.py
if not self.contract_id:
            self.struct_id = False
        self.with_context(contract=True).onchange_employee()
        return
class HrPayslipWorkedDays(models.Model):
    _name = 'hr.payslip.worked_days'
    _description = 'Payslip Worked Days'
    _order = 'payslip_id, sequence'
    name = fields.Char(string='Description', required=True)
    payslip_id = fields.Many2one('hr.payslip', string='Pay Slip', required=True, ondelete='cascade', index=True)
    sequence = fields.Integer(required=True, index=True, default=10)
    code = fields.Char(required=True, help="The code that can be used in the salary rules")
    number_of_days = fields.Float(string='Number of Days')
    number_of_hours = fields.Float(string='Number of Hours')
    contract_id = fields.Many2one('hr.contract', string='Contract', required=True,
        help="The contract for which applied this input")
class HrPayslipInput(models.Model):
    _name = 'hr.payslip.input'
    _description = 'Payslip Input'
    _order = 'payslip_id, sequence'
    name = fields.Char(string='Description', required=True)
    payslip_id = fields.Many2one('hr.payslip', string='Pay Slip', required=True, ondelete='cascade', index=True)
    sequence = fields.Integer(required=True, index=True, default=10)
    code = fields.Char(required=True, help="The code that can be used in the salary rules")