(self)
If the checkbox for syncing consumption fixtures is
        checked, then we build the restore config with appropriate
        special properties, otherwise just clear the object.

        If there becomes a way to tweak these on the UI, this should
        be done differently.
If the checkbox for syncing consumption fixtures is
        checked, then we build the restore config with appropriate
        special properties, otherwise just clear the object.
If the checkbox for syncing consumption fixtures is checked then we build the restore config with appropriate special properties otherwise just clear the object .
def set_ota_restore_config(self):
        """
        If the checkbox for syncing consumption fixtures is
        checked, then we build the restore config with appropriate
        special properties, otherwise just clear the object.

        If there becomes a way to tweak these on the UI, this should
        be done differently.
        """

        if self.commtrack_settings.sync_consumption_fixtures:
            self.domain_object.commtrack_settings.stockrestoreconfig = StockRestoreConfig(
                section_to_consumption_types={
                    'stock': 'consumption'
                },
                force_consumption_case_types=[
                    SUPPLY_POINT_CASE_TYPE
                ],
                use_dynamic_product_list=True,
            )
        else:
            self.domain_object.commtrack_settings.stockrestoreconfig = StockRestoreConfig()
def set_ota_restore_config ( self ) : if self . commtrack_settings . sync_consumption_fixtures : self . domain_object . commtrack_settings . stockrestoreconfig = StockRestoreConfig ( section_to_consumption_types = { 'stock' : 'consumption' } , force_consumption_case_types = [ SUPPLY_POINT_CASE_TYPE ] , use_dynamic_product_list = True , ) else : self . domain_object . commtrack_settings . stockrestoreconfig = StockRestoreConfig ( )