**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
for payslip in self:
            number = payslip.number or self.env['ir.sequence'].next_by_code('salary.slip')
            
            payslip.line_ids.unlink()
            
            
            contract_ids = payslip.contract_id.ids or \
                self.get_contract(payslip.employee_id, payslip.date_from, payslip.date_to)
            lines = [(0, 0, line) for line in self._get_payslip_lines(contract_ids, payslip.id)]
            payslip.write({'line_ids': lines, 'number': number})
        return True
    @api.model
    def get_worked_day_lines(self, contracts, date_from, date_to):
        """
        @param contract: Browse record of contracts
        @return: returns a list of dict containing the input that should be applied for the given contract between date_from and date_to
        """
        res = []
        
        for contract in contracts.filtered(lambda contract: contract.resource_calendar_id):
            day_from = datetime.combine(fields.Date.from_string(date_from), datetime_time.min)
            day_to = datetime.combine(fields.Date.from_string(date_to), datetime_time.max)
            
            leaves = {}