Fix issue with sellable editor when code is disabled

The the paramter EDIT_CODE_PRODUCT is disabled, the code widget will not be
editable, but (probably due to a regression) the model will not be updated
when it is disabled.

This is changing the code to update the code before disabling, this way, the
model will have the correct value.

Change-Id: Ie52c9abc7b01678b4b21cadf7101719a8dff47e9
(cherry picked from commit 8ca699e4aa693baa6159a08dfc4176d51af2c82e)