If you own your own company and you are retiring to leave it for others to carry on, you can arrange for the company to pay you a reasonable retiring allowance which will be deductible to the company, and you may be able to transfer all or a portion of the allowance to your RRSP and claim the tax deduction.
"This article provides information of a general nature only. It is only current at the posting date. It is not updated and it may no longer be current. It does not provide legal advice nor can it or should it be relied upon. All tax situations are specific to their facts and will differ from the situations in the articles. If you have specific legal questions you should consult a lawyer."