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

import time
from datetime import datetime, timedelta
from dateutil import relativedelta
from odoo import api, fields, models, tools, _
from odoo.exceptions import UserError, ValidationError
from odoo.tools.safe_eval import safe_eval
from odoo.addons import decimal_precision as dp
class HrPayrollStructure(models.Model):
    """
    Salary structure used to defined
    - Basic
    - Allowances
    - Deductions
    """
    _name = 'hr.payroll.structure'
    _description = 'Salary Structure'
    @api.model
    def _get_parent(self):
        return self.env.ref('hr_payroll.structure_base', False)
    name = fields.Char(required=True)
    code = fields.Char(string='Reference', required=True)
    company_id = fields.Many2one('res.company', string='Company', required=True,
        copy=False, default=lambda self: self.env['res.company']._company_default_get())
    note = fields.Text(string='Description')
    parent_id = fields.Many2one('hr.payroll.structure', string='Parent', default=_get_parent)
    children_ids = fields.One2many('hr.payroll.structure', 'parent_id', string='Children', copy=True)
    rule_ids = fields.Many2many('hr.salary.rule', 'hr_structure_salary_rule_rel', 'struct_id', 'rule_id', string='Salary Rules')
    @api.constrains('parent_id')
    def _check_parent_id(self):