I made the partition from 1/8 MDF but you can use ply. Make it a good fit on the sides and base, notch the top for the panel power cable. Make the height of the partition the same as the top of the plywood box you installed over the circuit board.Put the battery in and the partition up tight against it so it can't move about and hot glue it in. Take out the battery out and run the glue gun inside to seal the battery housing.
You will have to put spade end connectors on the panel power lead as shown.
On a safety note please cover the battery/compartment with 1/8 ply (not shown) to avoid anything metal dropping on the terminals.
Go to Pic 6