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


addons/hr_payroll/models/hr_payslip.py
def get_inputs(self, contracts, date_from, date_to):
        res = []
        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])]
        inputs = self.env['hr.salary.rule'].browse(sorted_rule_ids).mapped('input_ids')
        for contract in contracts:
            for input in inputs:
                input_data = {
                    'name': input.name,
                    'code': input.code,
                    'contract_id': contract.id,
                }
                res += [input_data]
        return res
    @api.model
    def _get_payslip_lines(self, contract_ids, payslip_id):
        def _sum_salary_rule_category(localdict, category, amount):
            if category.parent_id:
                localdict = _sum_salary_rule_category(localdict, category.parent_id, amount)
            localdict['categories'].dict[category.code] = category.code in localdict['categories'].dict and localdict['categories'].dict[category.code] + amount or amount
            return localdict
        class BrowsableObject(object):
            def __init__(self, employee_id, dict, env):
                self.employee_id = employee_id
                self.dict = dict
                self.env = env
            def __getattr__(self, attr):
                return attr in self.dict and self.dict.__getitem__(attr) or 0.0
        class InputLine(BrowsableObject):