Esempio n. 1
0
    def __init__(self):
        self._ui = None
        self.default_store = get_default_store()
        self._printer_verified = False
        # Delay printer creation until we are accessing pos or till app. Other
        # applications should still be accessible without a printer
        self._printer = None

        SaleStatusChangedEvent.connect(self._on_SaleStatusChanged)
        ECFIsLastSaleEvent.connect(self._on_ECFIsLastSale)
        TillOpenEvent.connect(self._on_TillOpen)
        TillCloseEvent.connect(self._on_TillClose)
        TillAddCashEvent.connect(self._on_TillAddCash)
        TillAddTillEntryEvent.connect(self._on_AddTillEntry)
        TillRemoveCashEvent.connect(self._on_TillRemoveCash)
        StartApplicationEvent.connect(self._on_StartApplicationEvent)
        StopApplicationEvent.connect(self._on_StopApplicationEvent)
        CouponCreatedEvent.connect(self._on_CouponCreatedEvent)
        GerencialReportPrintEvent.connect(self._on_GerencialReportPrintEvent)
        GerencialReportCancelEvent.connect(self._on_GerencialReportCancelEvent)
        CheckECFStateEvent.connect(self._on_CheckECFStateEvent)
        HasPendingReduceZ.connect(self._on_HasPendingReduceZ)
        HasOpenCouponEvent.connect(self._on_HasOpenCouponEvent)

        self._till_summarize_action = gtk.Action(
            'Summary', _('Summary'), None, None)
        self._till_summarize_action.connect(
            'activate', self._on_TillSummary__activate)

        add_bindings([
            ('plugin.ecf.read_memory', '<Primary>F9'),
            ('plugin.ecf.summarize', '<Primary>F11'),
        ])
Esempio n. 2
0
    def __init__(self):
        self._ui = None
        self.default_store = get_default_store()
        self._printer_verified = False
        # Delay printer creation until we are accessing pos or till app. Other
        # applications should still be accessible without a printer
        self._printer = None

        SaleStatusChangedEvent.connect(self._on_SaleStatusChanged)
        ECFIsLastSaleEvent.connect(self._on_ECFIsLastSale)
        TillOpenEvent.connect(self._on_TillOpen)
        TillCloseEvent.connect(self._on_TillClose)
        TillAddCashEvent.connect(self._on_TillAddCash)
        TillAddTillEntryEvent.connect(self._on_AddTillEntry)
        TillRemoveCashEvent.connect(self._on_TillRemoveCash)
        StartApplicationEvent.connect(self._on_StartApplicationEvent)
        StopApplicationEvent.connect(self._on_StopApplicationEvent)
        CouponCreatedEvent.connect(self._on_CouponCreatedEvent)
        GerencialReportPrintEvent.connect(self._on_GerencialReportPrintEvent)
        GerencialReportCancelEvent.connect(self._on_GerencialReportCancelEvent)
        CheckECFStateEvent.connect(self._on_CheckECFStateEvent)
        HasPendingReduceZ.connect(self._on_HasPendingReduceZ)
        HasOpenCouponEvent.connect(self._on_HasOpenCouponEvent)

        self._till_summarize_action = gtk.Action('Summary', _('Summary'), None,
                                                 None)
        self._till_summarize_action.connect('activate',
                                            self._on_TillSummary__activate)

        add_bindings([
            ('plugin.ecf.read_memory', '<Primary>F9'),
            ('plugin.ecf.summarize', '<Primary>F11'),
        ])
Esempio n. 3
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'))
Esempio n. 4
0
 def __init__(self):
     self._ui = None
     self.default_store = get_default_store()
     StartApplicationEvent.connect(self._on_StartApplicationEvent)
     EditorSlaveCreateEvent.connect(self._on_EditorSlaveCreateEvent)
     add_bindings([
         ('plugin.books.search_books', '<Primary><Alt>B'),
         ('plugin.books.search_publishers', '<Primary><Alt>P'),
     ])
Esempio n. 5
0
 def __init__(self):
     self._ui = None
     self.default_store = get_default_store()
     StartApplicationEvent.connect(self._on_StartApplicationEvent)
     EditorSlaveCreateEvent.connect(self._on_EditorSlaveCreateEvent)
     add_bindings([
         ('plugin.books.search_books', '<Primary><Alt>B'),
         ('plugin.books.search_publishers', '<Primary><Alt>P'),
     ])
Esempio n. 6
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)
     add_bindings([
         ('plugin.optical.pre_sale', ''),
         ('plugin.optical.search_medics', ''),
     ])
Esempio n. 7
0
 def __init__(self):
     self._ui = None
     self.default_store = get_default_store()
     StartApplicationEvent.connect(self._on_StartApplicationEvent)
     StopApplicationEvent.connect(self._on_StopApplicationEvent)
     EditorSlaveCreateEvent.connect(self._on_EditorSlaveCreateEvent)
     RunDialogEvent.connect(self._on_RunDialogEvent)
     add_bindings([
         ('plugin.optical.pre_sale', ''),
         ('plugin.optical.search_medics', ''),
     ])
Esempio n. 8
0
    def __init__(self):
        self._ui = None
        self.default_store = get_default_store()
        self._printer_verified = False
        # Delay printer creation until we are accessing pos or till app. Other
        # applications should still be accessible without a printer
        self._printer = None

        self._setup_params()
        self._setup_events()

        add_bindings([
            ('plugin.ecf.read_memory', '<Primary>F9'),
            ('plugin.ecf.summarize', '<Primary>F11'),
        ])
Esempio n. 9
0
    def __init__(self):
        self._ui = None
        self.default_store = get_default_store()
        self._printer_verified = False
        # Delay printer creation until we are accessing pos or till app. Other
        # applications should still be accessible without a printer
        self._printer = None

        self._setup_params()
        self._setup_events()

        add_bindings([
            ('plugin.ecf.read_memory', '<Primary>F9'),
            ('plugin.ecf.summarize', '<Primary>F11'),
        ])
Esempio n. 10
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', ''),
        ])
Esempio n. 11
0
    def __init__(self):
        self._ui = None
        self.default_store = get_default_store()
        self._printer_verified = False
        # Delay printer creation until we are accessing pos or till app. Other
        # applications should still be accessible without a printer
        self._printer = None

        self._setup_params()
        self._setup_events()

        self._till_summarize_action = Gtk.Action(
            'Summary', _('Summary'), None, None)
        self._till_summarize_action.connect(
            'activate', self._on_TillSummary__activate)

        add_bindings([
            ('plugin.ecf.read_memory', '<Primary>F9'),
            ('plugin.ecf.summarize', '<Primary>F11'),
        ])
Esempio n. 12
0
    def __init__(self):
        self._ui = None
        self.default_store = get_default_store()
        self._printer_verified = False
        # Delay printer creation until we are accessing pos or till app. Other
        # applications should still be accessible without a printer
        self._printer = None

        self._setup_params()
        self._setup_events()

        self._till_summarize_action = gtk.Action(
            'Summary', _('Summary'), None, None)
        self._till_summarize_action.connect(
            'activate', self._on_TillSummary__activate)

        add_bindings([
            ('plugin.ecf.read_memory', '<Primary>F9'),
            ('plugin.ecf.summarize', '<Primary>F11'),
        ])
Esempio n. 13
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', ''),
        ])
Esempio n. 14
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'))