**Impacted versions:**
11.0 
**Steps to reproduce:**
  - Create payslip
  - Add a contract with any structure
  - Add a structure in payslip, different from the one defined in step 2
  - Confirm or compute sheet

**Current behavior:**
Payslip is computed using the contract structure

**Expected behavior:**
Payslip should be computed using the payslip structure

**FYI:**  This is an issue because, sometimes, it's necessary to pay the employee using a structure different from their contract, e.g. in case of Christmas bonuses

**Video/Screenshot link (optional):**
[Video](https://www.youtube.com/watch?v=32H01n503uU&feature=youtu.be)


contracts = self.env['hr.contract'].browse(contract_ids)
        structure_ids = contracts.get_all_structures()
        
        rule_ids = self.env['hr.payroll.structure'].browse(structure_ids).get_all_rules()
        
        sorted_rule_ids = [id for id, sequence in sorted(rule_ids, key=lambda x:x[1])]
        sorted_rules = self.env['hr.salary.rule'].browse(sorted_rule_ids)
        for contract in contracts:
            employee = contract.employee_id
            localdict = dict(baselocaldict, employee=employee, contract=contract)
            for rule in sorted_rules:
                key = rule.code + '-' + str(contract.id)
                localdict['result'] = None
                localdict['result_qty'] = 1.0
                localdict['result_rate'] = 100
                
                if rule._satisfy_condition(localdict) and rule.id not in blacklist:
                    
                    amount, qty, rate = rule._compute_rule(localdict)
                    
                    previous_amount = rule.code in localdict and localdict[rule.code] or 0.0
                    
                    tot_rule = amount * qty * rate / 100.0
                    localdict[rule.code] = tot_rule
                    rules_dict[rule.code] = rule
                    
                    localdict = _sum_salary_rule_category(localdict, rule.category_id, tot_rule - previous_amount)
                    
                    result_dict[key] = {
                        'salary_rule_id': rule.id,