Penal Code PC § 26615

(a)  Section 26500 does not apply to the sale, delivery, or transfer of a firearm by a law enforcement agency to a retiring peace officer who is authorized to carry a firearm pursuant to Chapter 5 (commencing with Section 26300 ) of Division 5.

(b) Within 10 days of the date that a handgun, and commencing January 1, 2014, any firearm, is sold, delivered, or transferred to that retiring peace officer, the name of the officer and the make, model, serial number, and other identifying characteristics of the firearm being sold, delivered, or transferred shall be entered into the Automated Firearms System (AFS) via the California Law Enforcement Telecommunications System (CLETS) by the law enforcement or state agency that sold, delivered, or transferred the firearm, provided, however, that if the firearm is not a handgun and does not have a serial number, identification number, or identification mark assigned to it, that fact shall be noted in AFS.  Any agency without access to AFS shall arrange with the sheriff of the county in which the agency is located to input this information via this system.