'Get partner_id of slip line to use in account_move_line'

def _get_partner_id(self, credit_account):

    register_partner_id = self.salary_rule_id.register_id.partner_id
    partner_id = (register_partner_id.id or self.slip_id.employee_id.address_home_id.id)
    if credit_account:
        if (register_partner_id or (self.salary_rule_id.account_credit.internal_type in ('receivable', 'payable'))):
            return partner_id
    elif (register_partner_id or (self.salary_rule_id.account_debit.internal_type in ('receivable', 'payable'))):
        return partner_id
    return False
