Ejemplo n.º 1
0
    def __init__(self):
        self._setup_params()
        self.default_store = get_default_store()
        StartApplicationEvent.connect(self._on_StartApplicationEvent)
        EditorCreateEvent.connect(self._on_EditorCreateEvent)
        RunDialogEvent.connect(self._on_RunDialogEvent)
        PrintReportEvent.connect(self._on_PrintReportEvent)
        SearchDialogSetupSearchEvent.connect(
            self._on_SearchDialogSetupSearchEvent)
        WorkOrderStatusChangedEvent.connect(
            self._on_WorkOrderStatusChangedEvent)
        ApplicationSetupSearchEvent.connect(
            self._on_ApplicationSetupSearchEvent)

        add_bindings([
            ('plugin.optical.pre_sale', ''),
            ('plugin.optical.search_medics', ''),
        ])

        # Whenever the model of WorkOrderActions change, we should also change ours
        actions = WorkOrderActions.get_instance()
        actions.connect('model-set', self._on_work_order_actions__model_set)

        # Add a new option to the WorkOrderRow options menu
        WorkOrderRow.options.append((_('Create new purchase...'),
                                     'optical_work_order.OpticalNewPurchase'))
Ejemplo n.º 2
0
 def _create_search(self):
     if self.search_spec is None:
         return
     self.columns = self.get_columns()
     ApplicationSetupSearchEvent.emit(self)
     self.search = SearchSlave(
         self.columns, store=self.store, restore_name=self.__class__.__name__, search_spec=self.search_spec
     )
Ejemplo n.º 3
0
 def _create_search(self):
     if self.search_spec is None:
         return
     self.columns = self.get_columns()
     ApplicationSetupSearchEvent.emit(self)
     self.search = SearchSlave(self.columns,
                               store=self.store,
                               restore_name=self.__class__.__name__,
                               search_spec=self.search_spec)
Ejemplo n.º 4
0
    def __init__(self):
        self._ui = None
        self.default_store = get_default_store()
        StartApplicationEvent.connect(self._on_StartApplicationEvent)
        StopApplicationEvent.connect(self._on_StopApplicationEvent)
        EditorCreateEvent.connect(self._on_EditorCreateEvent)
        RunDialogEvent.connect(self._on_RunDialogEvent)
        PrintReportEvent.connect(self._on_PrintReportEvent)
        SearchDialogSetupSearchEvent.connect(self._on_SearchDialogSetupSearchEvent)
        ApplicationSetupSearchEvent.connect(self._on_ApplicationSetupSearchEvent)

        add_bindings([
            ('plugin.optical.pre_sale', ''),
            ('plugin.optical.search_medics', ''),
        ])
Ejemplo n.º 5
0
    def __init__(self):
        # This will contain a mapping of (appname, uimanager) -> extra_ui
        # We need to store that like this because each windows has it's unique
        # uimanager, and we have an extra_ui for different apps
        self._app_ui = dict()

        self.default_store = get_default_store()
        StartApplicationEvent.connect(self._on_StartApplicationEvent)
        StopApplicationEvent.connect(self._on_StopApplicationEvent)
        EditorCreateEvent.connect(self._on_EditorCreateEvent)
        RunDialogEvent.connect(self._on_RunDialogEvent)
        PrintReportEvent.connect(self._on_PrintReportEvent)
        SearchDialogSetupSearchEvent.connect(self._on_SearchDialogSetupSearchEvent)
        ApplicationSetupSearchEvent.connect(self._on_ApplicationSetupSearchEvent)

        add_bindings([
            ('plugin.optical.pre_sale', ''),
            ('plugin.optical.search_medics', ''),
        ])
Ejemplo n.º 6
0
    def __init__(self):
        # This will contain a mapping of (appname, uimanager) -> extra_ui
        # We need to store that like this because each windows has it's unique
        # uimanager, and we have an extra_ui for different apps
        self._app_ui = dict()

        self.default_store = get_default_store()
        StartApplicationEvent.connect(self._on_StartApplicationEvent)
        StopApplicationEvent.connect(self._on_StopApplicationEvent)
        EditorCreateEvent.connect(self._on_EditorCreateEvent)
        RunDialogEvent.connect(self._on_RunDialogEvent)
        PrintReportEvent.connect(self._on_PrintReportEvent)
        SearchDialogSetupSearchEvent.connect(
            self._on_SearchDialogSetupSearchEvent)
        ApplicationSetupSearchEvent.connect(
            self._on_ApplicationSetupSearchEvent)

        add_bindings([
            ('plugin.optical.pre_sale', ''),
            ('plugin.optical.search_medics', ''),
        ])
Ejemplo n.º 7
0
    def __init__(self):
        self._setup_params()
        self.default_store = get_default_store()
        StartApplicationEvent.connect(self._on_StartApplicationEvent)
        EditorCreateEvent.connect(self._on_EditorCreateEvent)
        RunDialogEvent.connect(self._on_RunDialogEvent)
        PrintReportEvent.connect(self._on_PrintReportEvent)
        SearchDialogSetupSearchEvent.connect(self._on_SearchDialogSetupSearchEvent)
        WorkOrderStatusChangedEvent.connect(self._on_WorkOrderStatusChangedEvent)
        ApplicationSetupSearchEvent.connect(self._on_ApplicationSetupSearchEvent)

        add_bindings([
            ('plugin.optical.pre_sale', ''),
            ('plugin.optical.search_medics', ''),
        ])

        # Whenever the model of WorkOrderActions change, we should also change ours
        actions = WorkOrderActions.get_instance()
        actions.connect('model-set', self._on_work_order_actions__model_set)

        # Add a new option to the WorkOrderRow options menu
        WorkOrderRow.options.append((_('Create new purchase...'),
                                     'optical_work_order.OpticalNewPurchase'))