• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python keybindings.get_accels函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中stoqlib.gui.utils.keybindings.get_accels函数的典型用法代码示例。如果您正苦于以下问题:Python get_accels函数的具体用法?Python get_accels怎么用?Python get_accels使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了get_accels函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: create_actions

    def create_actions(self):
        group = get_accels('app.financial')
        actions = [
            ('Import', Gtk.STOCK_ADD, _('Import...'),
             group.get('import'), _('Import a GnuCash or OFX file')),
            ('ConfigurePaymentMethods', None,
             _('Payment methods'),
             group.get('configure_payment_methods'),
             _('Select accounts for the payment methods on the system')),
            ('Delete', None, _('Delete...')),
            ("NewAccount", Gtk.STOCK_NEW, _("Account..."),
             group.get('new_account'),
             _("Add a new account")),
            ("NewTransaction", Gtk.STOCK_NEW, _("Transaction..."),
             group.get('new_store'),
             _("Add a new transaction")),
            ("Edit", Gtk.STOCK_EDIT, _("Edit..."),
             group.get('edit')),
        ]
        self.financial_ui = self.add_ui_actions(actions)
        self.set_help_section(_("Financial help"), 'app-financial')

        user = api.get_current_user(self.store)
        if not user.profile.check_app_permission(u'admin'):
            self.set_sensitive([self.ConfigurePaymentMethods], False)
开发者ID:hackedbellini,项目名称:stoq,代码行数:25,代码来源:financial.py


示例2: _add_sale_menus

    def _add_sale_menus(self, sale_app):
        uimanager = sale_app.uimanager
        menu_items_str = '''<menuitem action="OpticalPreSale"/>
                            <menuitem action="OpticalMedicSearch"/>'''
        ui_string = self._get_menu_ui_string() % menu_items_str

        group = get_accels('plugin.optical')
        ag = gtk.ActionGroup('OpticalMenuActions')
        ag.add_actions([
            ('OpticalMenu', None, _(u'Optical')),
            ('OpticalPreSale', None, _(u'Sale with work order...'),
             group.get('pre_sale'), None,
             self._on_OpticalPreSale__activate),
            ('OpticalMedicSearch', None, _(u'Medics...'),
             group.get('search_medics'), None,
             self._on_MedicsSearch__activate),
        ])

        pre_sale = ag.get_action('OpticalPreSale')
        pre_sale.set_sensitive(not sale_app.has_open_inventory())

        sale_app.window.tool_items.extend(
            sale_app.window.NewToolItem.add_actions(uimanager, [pre_sale],
                                                    add_separator=False,
                                                    position=1))

        uimanager.insert_action_group(ag, 0)
        self._ui = uimanager.add_ui_from_string(ui_string)
开发者ID:reashninja,项目名称:stoq,代码行数:28,代码来源:opticalui.py


示例3: create_actions

    def create_actions(self):
        group = get_accels('app.inventory')
        actions = [
            # File
            ('NewInventory', None, _('Inventory...'),
             group.get('new_inventory'),
             _('Create a new inventory for product counting')),

            # Inventory
            ('Details', Gtk.STOCK_INFO, _('Details...'),
             group.get('inventory_details'),
             _('See details about this inventory')),
            ('CountingAction', Gtk.STOCK_INDEX, _('_Count...'),
             group.get('inventory_count'),
             _('Register the actual stock of products in the selected '
               'inventory')),
            ('AdjustAction', Gtk.STOCK_CONVERT, _('_Adjust...'),
             group.get('inventory_adjust'),
             _('Adjust the stock accordingly to the counting in the selected '
               'inventory')),
            ('Cancel', Gtk.STOCK_CANCEL, _('Cancel...'),
             group.get('inventory_cancel'),
             _('Cancel the selected inventory')),
            ('Export', Gtk.STOCK_SAVE, _('Export for external counting...'),
             None,
             _('Export the list of products for external counting')),
            ('PrintProductListing', Gtk.STOCK_PRINT,
             _('Print product listing...'),
             group.get('inventory_print'),
             _('Print the product listing for this inventory'))
        ]
        self.inventory_ui = self.add_ui_actions(actions)
        self.set_help_section(_("Inventory help"), 'app-inventory')
开发者ID:hackedbellini,项目名称:stoq,代码行数:33,代码来源:inventory.py


示例4: _add_sale_menus

    def _add_sale_menus(self, sale_app):
        uimanager = sale_app.uimanager
        ui_string = """
        <ui>
            <menubar name="menubar">
                <placeholder name="ExtraMenubarPH">
                    <menu action="OpticalMenu">
                    <menuitem action="OpticalPreSale"/>
                    <menuitem action="OpticalMedicSaleItems"/>
                    <menuitem action="OpticalMedicSearch"/>
                    </menu>
                </placeholder>
            </menubar>
        </ui>
        """

        group = get_accels('plugin.optical')
        ag = gtk.ActionGroup('OpticalSalesActions')
        ag.add_actions([
            ('OpticalMenu', None, _(u'Optical')),
            ('OpticalPreSale', None, _(u'Sale with work order...'),
             group.get('pre_sale'), None,
             self._on_OpticalPreSale__activate),
            ('OpticalMedicSearch', None, _(u'Medics...'),
             group.get('search_medics'), None,
             self._on_MedicsSearch__activate),
            ('OpticalMedicSaleItems', None, _(u'Medics sold items...'),
             None, None,
             self._on_MedicSaleItems__activate),
        ])

        uimanager.insert_action_group(ag, 0)
        self._app_ui[('sales', uimanager)] = uimanager.add_ui_from_string(ui_string)
开发者ID:Guillon88,项目名称:stoq,代码行数:33,代码来源:opticalui.py


示例5: _add_till_menus

    def _add_till_menus(self, uimanager):
        ui_string = """<ui>
          <menubar name="menubar">
            <placeholder name="ExtraMenubarPH">
              <menu action="ECFMenu">
                <menuitem action="CancelLastDocument"/>
                <menuitem action="Summary"/>
                <menuitem action="ReadMemory"/>
              </menu>
            </placeholder>
          </menubar>
        </ui>"""

        group = get_accels('plugin.ecf')
        ag = gtk.ActionGroup('ECFMenuActions')
        ag.add_actions([
            ('ECFMenu', None, _('ECF')),
            ('ReadMemory', None, _('Read Memory'),
             group.get('read_memory'), None, self._on_ReadMemory__activate),
            ('CancelLastDocument', None, _('Cancel Last Document'),
             None, None, self._on_CancelLastDocument__activate),
        ])
        ag.add_action_with_accel(self._till_summarize_action,
                                 group.get('summarize'))
        uimanager.insert_action_group(ag, 0)
        self._ui = uimanager.add_ui_from_string(ui_string)
开发者ID:LeonamSilva,项目名称:stoq,代码行数:26,代码来源:ecfui.py


示例6: create_actions

 def create_actions(self):
     group = get_accels("app.admin")
     actions = [
         ("SearchRole", None, _("Roles..."), group.get("search_roles")),
         ("SearchEmployee", None, _("Employees..."), group.get("search_employees")),
         ("SearchEvents", None, _("Events..."), group.get("search_events")),
         ("SearchCostCenters", None, _("Cost Centers..."), group.get("search_cost_centers")),
         ("SearchCfop", None, _("C.F.O.P..."), group.get("search_cfop")),
         ("SearchFiscalBook", None, _("Fiscal books..."), group.get("search_fiscalbook")),
         ("SearchUserProfile", None, _("Profiles..."), group.get("search_profile")),
         ("SearchUser", None, _("Users..."), group.get("search_users")),
         ("SearchBranch", None, _("Branches..."), group.get("search_branches")),
         ("SearchComputer", None, _("Computers..."), group.get("search_computers")),
         ("SearchTaxTemplate", None, _("Tax Classes...")),
         ("ConfigureMenu", None, _("_Configure")),
         ("ConfigureDevices", None, _("Devices..."), group.get("config_devices")),
         ("ConfigurePaymentMethods", None, _("Payment methods..."), group.get("config_payment_methods")),
         ("ConfigurePaymentCategories", None, _("Payment categories..."), group.get("config_payment_categories")),
         ("ConfigureClientCategories", None, _("Client categories..."), group.get("config_client_categories")),
         ("ConfigureInvoices", None, _("Invoices..."), group.get("config_invoices")),
         ("ConfigureInvoicePrinters", None, _("Invoice printers..."), group.get("config_invoice_printers")),
         ("ConfigureSintegra", None, _("Sintegra..."), group.get("config_sintegra")),
         ("ConfigurePlugins", None, _("Plugins...")),
         ("ConfigureTaxes", None, _("Taxes..."), group.get("config_taxes")),
         ("ConfigureParameters", None, _("Parameters..."), group.get("config_parameters")),
         ("NewUser", None, _("User..."), "", _("Create a new user")),
     ]
     self.admin_ui = self.add_ui_actions("", actions, filename="admin.xml")
     self.set_help_section(_("Admin help"), "app-admin")
开发者ID:relsi,项目名称:stoq,代码行数:29,代码来源:admin.py


示例7: create_actions

    def create_actions(self):
        group = get_accels('app.payable')

        actions = [
            # File
            ('AddPayment', gtk.STOCK_ADD, _('Account payable...'),
             group.get('add_payable'), _('Create a new account payable')),
            ('PaymentFlowHistory', None, _('Payment _flow history...'),
             group.get('payment_flow_history'),
             _('Show a report of payment expected to receive grouped by day')),

            # Payment
            ('PaymentMenu', None, _('Payment')),
            ('Details', gtk.STOCK_INFO, _('Details...'),
             group.get('payment_details'),
             _('Show details for the selected payment')),
            ('Pay', gtk.STOCK_APPLY, _('Pay...'), group.get('payment_pay'),
             _('Pay the order associated with the selected payment')),
            ('Edit', gtk.STOCK_EDIT, _('Edit installments...'),
             group.get('payment_edit'),
             _('Edit the selected payment installments')),
            ('CancelPayment', gtk.STOCK_REMOVE, _('Cancel...'),
             group.get('payment_cancel'), _('Cancel the selected payment')),
            ('SetNotPaid', gtk.STOCK_UNDO, _('Set as not paid...'),
             group.get('payment_set_not_paid'),
             _('Mark the selected payment as not paid')),
            ('ChangeDueDate', gtk.STOCK_REFRESH, _('Change due date...'),
             group.get('payment_change_due_date'),
             _('Change the due date of the selected payment')),
            ('Comments', None, _('Comments...'), group.get('payment_comments'),
             _('Add comments to the selected payment')),
            ('PrintReceipt', None, _('Print _receipt...'),
             group.get('payment_print_receipt'),
             _('Print a receipt for the selected payment')),

            # Search
            ('PaymentCategories', None, _("Payment categories..."),
             group.get('search_payment_categories'),
             _('Search for payment categories')),
            ('BillCheckSearch', None, _('Bills and checks...'),
             group.get('search_bills'), _('Search for bills and checks')),
        ]

        self.payable_ui = self.add_ui_actions(
            None, actions, filename='payable.xml')
        self.set_help_section(_("Accounts payable help"), 'app-payable')
        self.Pay.set_short_label(_('Pay'))
        self.Edit.set_short_label(_('Edit'))
        self.Details.set_short_label(_('Details'))
        self.Pay.props.is_important = True
        self.Pay.set_sensitive(False)
        self.PrintReceipt.set_sensitive(False)
        self.popup = self.uimanager.get_widget('/PayableSelection')
        self.window.add_new_items([self.AddPayment])
        self.window.NewToolItem.set_tooltip(self.AddPayment.get_tooltip())
        self.window.add_search_items([self.BillCheckSearch])
        self.window.SearchToolItem.set_tooltip(
            self.BillCheckSearch.get_tooltip())
        self.window.Print.set_tooltip(_("Print a report of these payments"))
开发者ID:reashninja,项目名称:stoq,代码行数:59,代码来源:payable.py


示例8: create_actions

 def create_actions(self):
     group = get_accels('app.admin')
     actions = [
         ("SearchRole", None, _("Roles..."),
          group.get('search_roles')),
         ("SearchEmployee", None, _("Employees..."),
          group.get('search_employees')),
         ("SearchEvents", None, _("Events..."),
          group.get('search_events')),
         ("SearchCostCenters", None, _("Cost Centers..."),
          group.get('search_cost_centers')),
         ("SearchDuplicatedPersons", None, _("Duplicated Persons..."),
          None),
         ("SearchCfop", None, _("C.F.O.P..."),
          group.get('search_cfop')),
         ("SearchFiscalBook", None, _("Fiscal books..."),
          group.get('search_fiscalbook')),
         ("SearchUserProfile", None, _("Profiles..."),
          group.get('search_profile')),
         ("SearchUser", None, _("Users..."),
          group.get('search_users')),
         ("SearchBranch", None, _("Branches..."),
          group.get('search_branches')),
         ("SearchComputer", None, _('Computers...'),
          group.get('search_computers')),
         ("SearchTaxTemplate", None, _('Tax Classes...')),
         ("ConfigureMenu", None, _("_Configure")),
         ("ConfigureDevices", None, _("Devices..."),
          group.get('config_devices')),
         ("ConfigureGridGroup", None, _("Attribute Group...")),
         ("ConfigureGridAttribute", None, _("Grid Attribute...")),
         ("ConfigurePaymentMethods", None, _("Payment methods..."),
          group.get('config_payment_methods')),
         ("ConfigurePaymentCategories", None, _("Payment categories..."),
          group.get('config_payment_categories')),
         ("ConfigureClientCategories", None, _("Client categories..."),
          group.get('config_client_categories')),
         ("ConfigureInvoices", None, _("Invoices..."),
          group.get('config_invoices')),
         ("ConfigureInvoicePrinters", None, _("Invoice printers..."),
          group.get('config_invoice_printers')),
         ("ConfigureSintegra", None, _("Sintegra..."),
          group.get('config_sintegra')),
         ("ConfigurePlugins", None, _("Plugins...")),
         ("ConfigureUIForm", None, _("Forms...")),
         ("ConfigureTaxes", None, _("Taxes..."),
          group.get('config_taxes')),
         ("ConfigureSaleToken", None, _("Sale tokens...")),
         ("ConfigureParameters", None, _("Parameters..."),
          group.get('config_parameters')),
         ("NewUser", None, _("User..."), '',
          _("Create a new user")),
         ("StoqLinkConnect", None, _("Connect to Stoq.Link..."), '',
          _("Connect this Stoq installation to Stoq.Link")),
     ]
     self.admin_ui = self.add_ui_actions('', actions,
                                         filename='admin.xml')
     self.set_help_section(_("Admin help"), 'app-admin')
开发者ID:adrianoaguiar,项目名称:stoq,代码行数:58,代码来源:admin.py


示例9: create_actions

    def create_actions(self):
        group = get_accels('app.payable')

        actions = [
            # File
            ('AddPayment', Gtk.STOCK_ADD, _('Account payable...'),
             group.get('add_payable'),
             _('Create a new account payable')),
            ('PaymentFlowHistory', None, _('Payment _flow history...'),
             group.get('payment_flow_history'),
             _('Show a report of payment expected to receive grouped by day')),

            # Payment
            ('PaymentMenu', None, _('Payment')),
            ('Details', Gtk.STOCK_INFO, _('Details...'),
             group.get('payment_details'),
             _('Show details for the selected payment')),
            ('Pay', Gtk.STOCK_APPLY, _('Pay...'),
             group.get('payment_pay'),
             _('Pay the order associated with the selected payment')),
            ('Edit', Gtk.STOCK_EDIT, _('Edit installments...'),
             group.get('payment_edit'),
             _('Edit the selected payment installments')),
            ('CancelPayment', Gtk.STOCK_REMOVE, _('Cancel...'),
             group.get('payment_cancel'),
             _('Cancel the selected payment')),
            ('SetNotPaid', Gtk.STOCK_UNDO, _('Set as not paid...'),
             group.get('payment_set_not_paid'),
             _('Mark the selected payment as not paid')),
            ('ChangeDueDate', Gtk.STOCK_REFRESH, _('Change due date...'),
             group.get('payment_change_due_date'),
             _('Change the due date of the selected payment')),
            ('Comments', None, _('Comments...'),
             group.get('payment_comments'),
             _('Add comments to the selected payment')),
            ('PrintReceipt', None, _('Print _receipt...'),
             group.get('payment_print_receipt'),
             _('Print a receipt for the selected payment')),

            # Search
            ('PaymentCategories', None, _("Payment categories..."),
             group.get('search_payment_categories'),
             _('Search for payment categories')),
            ('BillCheckSearch', None, _('Bills and checks...'),
             group.get('search_bills'),
             _('Search for bills and checks')),
        ]

        self.payable_ui = self.add_ui_actions(actions)
        self.set_help_section(_("Accounts payable help"), 'app-payable')
        self.set_sensitive([self.Pay], False)
        self.set_sensitive([self.PrintReceipt], False)

        self.window.add_print_items()
        self.window.add_new_items([self.AddPayment])
        self.window.add_search_items([self.BillCheckSearch,
                                      self.PaymentCategories,
                                      self.PaymentFlowHistory])
开发者ID:hackedbellini,项目名称:stoq,代码行数:58,代码来源:payable.py


示例10: _add_pos_menus

 def _add_pos_menus(self, app):
     group = get_accels('plugin.books')
     actions = [
         ('BookSearch', None, _(u'Book Search'),
          group.get('search_books'), None,
          self._on_BookSearchView__activate),
     ]
     app.add_ui_actions(actions)
     app.window.add_search_items([app.BookSearch], _('Books'))
开发者ID:hackedbellini,项目名称:stoq,代码行数:9,代码来源:booksui.py


示例11: create_actions

    def create_actions(self):
        group = get_accels('app.till')
        actions = [
            ('SaleMenu', None, _('Sale')),
            ('TillOpen', None, _('Open till...'),
             group.get('open_till')),
            ('TillClose', None, _('Close till...'),
             group.get('close_till')),
            ('TillVerify', None, _('Verify till...'),
             group.get('verify_till')),
            ("TillDailyMovement", None, _("Till daily movement..."),
             group.get('daily_movement')),
            ('TillAddCash', None, _('Cash addition...'), ''),
            ('TillRemoveCash', None, _('Cash removal...'), ''),
            ("PaymentReceive", None, _("Payment receival..."),
             group.get('payment_receive'),
             _("Receive payments")),
            ("SearchClient", None, _("Clients..."),
             group.get('search_clients'),
             _("Search for clients")),
            ("SearchSale", None, _("Sales..."),
             group.get('search_sale'),
             _("Search for sales")),
            ("SearchCardPayment", None, _("Card payments..."),
             None, _("Search for card payments")),
            ("SearchSoldItemsByBranch", None, _("Sold items by branch..."),
             group.get('search_sold_items_by_branch'),
             _("Search for items sold by branch")),
            ("SearchTillHistory", None, _("Till history..."),
             group.get('search_till_history'),
             _("Search for till history")),
            ("SearchFiscalTillOperations", None, _("Fiscal till operations..."),
             group.get('search_fiscal_till_operations'),
             _("Search for fiscal till operations")),
            ("Confirm", gtk.STOCK_APPLY, _("Confirm..."),
             group.get('confirm_sale'),
             _("Confirm the selected sale, decreasing stock and making it "
               "possible to receive it's payments")),
            ("Return", gtk.STOCK_CANCEL, _("Return..."),
             group.get('return_sale'),
             _("Return the selected sale, returning stock and the client's "
               "payments")),
            ("Details", gtk.STOCK_INFO, _("Details..."),
             group.get('sale_details'),
             _("Show details of the selected sale")),
        ]

        self.till_ui = self.add_ui_actions('', actions,
                                           filename="till.xml")
        self.set_help_section(_("Till help"), 'app-till')

        self.Confirm.set_short_label(_('Confirm'))
        self.Return.set_short_label(_('Return'))
        self.Details.set_short_label(_('Details'))
        self.Confirm.props.is_important = True
        self.Return.props.is_important = True
        self.Details.props.is_important = True
开发者ID:pkaislan,项目名称:stoq,代码行数:57,代码来源:till.py


示例12: _add_purchase_menus

 def _add_purchase_menus(self, app):
     group = get_accels('plugin.books')
     actions = [
         ('BookSearch', None, _(u'Book Search'),
          group.get('search_books'), None,
          self._on_BookSearch__activate),
         ('Publishers', None, _(u'Publishers ...'),
          group.get('search_publishers'), None,
          self._on_Publishers__activate),
     ]
     app.add_ui_actions(actions)
     app.window.add_search_items([app.BookSearch, app.Publishers], _('Books'))
开发者ID:hackedbellini,项目名称:stoq,代码行数:12,代码来源:booksui.py


示例13: create_actions

    def create_actions(self):
        group = get_accels('app.production')
        actions = [
            ('menubar', None, ''),

            # File
            ('NewProduction', gtk.STOCK_NEW,
             _('Production order...'),
             group.get('new_production_order'),
             _('Create a new production')),
            ('ProductionPurchaseQuote', STOQ_PRODUCTION_APP,
             _('Purchase quote...'),
             group.get('new_production_quote')),

            # Production
            ('ProductionMenu', None, _('Production')),
            ('StartProduction', gtk.STOCK_CONVERT, _('Start production...'),
             group.get('production_start'),
             _('Start the selected production')),
            ('EditProduction', gtk.STOCK_EDIT, _('Edit production...'),
             group.get('production_edit'),
             _('Edit the selected production')),
            ('ProductionDetails', gtk.STOCK_INFO, _('Production details...'),
             group.get('production_details'),
             _('Show production details and register produced items')),

            # Search
            ("SearchProduct", None, _("Production products..."),
             group.get('search_production_products'),
             _("Search for production products")),
            ("SearchService", None, _("Services..."),
             group.get('search_services'),
             _("Search for services")),
            ("SearchProductionItem", STOQ_PRODUCTION_APP,
             _("Production items..."),
             group.get('search_production_items'),
             _("Search for production items")),
            ("SearchProductionHistory", None, _("Production history..."),
             group.get('search_production_history'),
             _("Search for production history")),
        ]
        self.production_ui = self.add_ui_actions("", actions,
                                                 filename="production.xml")
        self.set_help_section(_("Production help"), 'app-production')

        self.NewProduction.set_short_label(_("New Production"))
        self.ProductionPurchaseQuote.set_short_label(_("Purchase"))
        self.SearchProductionItem.set_short_label(_("Search items"))
        self.StartProduction.set_short_label(_('Start'))
        self.EditProduction.set_short_label(_('Edit'))
        self.ProductionDetails.set_short_label(_('Details'))
        self.StartProduction.props.is_important = True
开发者ID:LeonamSilva,项目名称:stoq,代码行数:52,代码来源:production.py


示例14: create_actions

    def create_actions(self):
        group = get_accels('app.production')
        actions = [
            ('menubar', None, ''),

            # File
            ('NewProduction', Gtk.STOCK_NEW,
             _('Production order...'),
             group.get('new_production_order'),
             _('Create a new production')),
            ('ProductionPurchaseQuote', None,
             _('Purchase quote...'),
             group.get('new_production_quote')),

            # Production
            ('ProductionMenu', None, _('Production')),
            ('StartProduction', Gtk.STOCK_CONVERT, _('Start production...'),
             group.get('production_start'),
             _('Start the selected production')),
            ('EditProduction', Gtk.STOCK_EDIT, _('Edit production...'),
             group.get('production_edit'),
             _('Edit the selected production')),
            ('FinalizeProduction', Gtk.STOCK_APPLY, _('Finalize production...'),
             None,
             _('Finalize the selected production')),
            ('CancelProduction', Gtk.STOCK_CANCEL, _('Cancel production...'),
             None,
             _('Cancel the selected production')),
            ('ProductionDetails', Gtk.STOCK_INFO, _('Production details...'),
             group.get('production_details'),
             _('Show production details and register produced items')),

            # Search
            ("SearchProduct", None, _("Production products..."),
             group.get('search_production_products'),
             _("Search for production products")),
            ("SearchService", None, _("Services..."),
             group.get('search_services'),
             _("Search for services")),
            ("SearchProductionItem", None,
             _("Production items..."),
             group.get('search_production_items'),
             _("Search for production items")),
            ("SearchProductionHistory", None, _("Production history..."),
             group.get('search_production_history'),
             _("Search for production history")),
        ]
        self.production_ui = self.add_ui_actions(actions)
        self.set_help_section(_("Production help"), 'app-production')
开发者ID:hackedbellini,项目名称:stoq,代码行数:49,代码来源:production.py


示例15: _add_sale_menus

    def _add_sale_menus(self, uimanager):
        menu_items_str = '<menuitem action="BookSearch"/>'
        ui_string = self._get_menu_ui_string() % menu_items_str

        group = get_accels('plugin.books')
        ag = gtk.ActionGroup('BooksMenuActions')
        ag.add_actions([
            ('BooksMenu', None, _(u'Books')),
            ('BookSearch', None, _(u'Book Search'),
             group.get('search_books'), None,
             self._on_BookSearchView__activate),
        ])

        uimanager.insert_action_group(ag, 0)
        self._ui = uimanager.add_ui_from_string(ui_string)
开发者ID:EasyDevSolutions,项目名称:stoq,代码行数:15,代码来源:booksui.py


示例16: _add_ecf_menu

 def _add_ecf_menu(self, app):
     group = get_accels('plugin.ecf')
     actions = [
         ('ReadMemory', None, _('Read Memory'),
          group.get('read_memory'), None, self._on_ReadMemory__activate),
         ('CancelLastDocument', None, _('Cancel Last Document'),
          None, None, self._on_CancelLastDocument__activate),
         ('Summary', None, _('Summary'),
          group.get('read_memory'), None, self._on_TillSummary__activate),
     ]
     app.add_ui_actions(actions)
     items = [
         app.Summary,
         app.ReadMemory,
     ]
     if sysparam.get_bool('ALLOW_CANCEL_LAST_COUPON'):
         items.insert(0, app.CancelLastDocument)
     app.window.add_extra_items(items, _('ECF'))
开发者ID:hackedbellini,项目名称:stoq,代码行数:18,代码来源:ecfui.py


示例17: create_actions

    def create_actions(self):
        group = get_accels('app.pos')
        actions = [
            # File
            ('NewTrade', None, _('Trade...'),
             group.get('new_trade')),
            ('PaymentReceive', None, _('Payment Receival...'),
             group.get('payment_receive')),
            ("TillOpen", None, _("Open Till..."),
             group.get('till_open')),
            ("TillClose", None, _("Close Till..."),
             group.get('till_close')),
            ("TillVerify", None, _("Verify Till..."),
             group.get('till_verify')),
            ("LoanClose", None, _("Close loan...")),
            ("WorkOrderClose", None, _("Close work order...")),

            # Order
            ("OrderMenu", None, _("Order")),
            ('ConfirmOrder', None, _('Confirm...'),
             group.get('order_confirm')),
            ('CancelOrder', None, _('Cancel...'),
             group.get('order_cancel')),
            ('NewDelivery', None, _('Create delivery...'),
             group.get('order_create_delivery')),

            # Search
            ("Sales", None, _("Sales..."),
             group.get('search_sales')),
            ("SoldItemsByBranchSearch", None, _("Sold Items by Branch..."),
             group.get('search_sold_items')),
            ("Clients", None, _("Clients..."),
             group.get('search_clients')),
            ("ProductSearch", None, _("Products..."),
             group.get('search_products')),
            ("ServiceSearch", None, _("Services..."),
             group.get('search_services')),
            ("DeliverySearch", None, _("Deliveries..."),
             group.get('search_deliveries')),
        ]
        self.pos_ui = self.add_ui_actions('', actions,
                                          filename='pos.xml')
        self.set_help_section(_("POS help"), 'app-pos')
开发者ID:LeonamSilva,项目名称:stoq,代码行数:43,代码来源:pos.py


示例18: _add_sale_menus

    def _add_sale_menus(self, uimanager):
        menu_items_str = '''<menuitem action="OpticalPreSale"/>
                            <menuitem action="OpticalMedicSearch"/>'''
        ui_string = self._get_menu_ui_string() % menu_items_str

        group = get_accels('plugin.optical')
        ag = gtk.ActionGroup('OpticalMenuActions')
        ag.add_actions([
            ('OpticalMenu', None, _(u'Optical')),
            ('OpticalPreSale', None, _(u'Optical pre sale...'),
             group.get('pre_sale'), None,
             self._on_OpticalPreSale__activate),
            ('OpticalMedicSearch', None, _(u'Medics...'),
             group.get('search_medics'), None,
             self._on_MedicsSearch__activate),
        ])

        uimanager.insert_action_group(ag, 0)
        self._ui = uimanager.add_ui_from_string(ui_string)
开发者ID:LeonamSilva,项目名称:stoq,代码行数:19,代码来源:opticalui.py


示例19: create_actions

    def create_actions(self):
        group = get_accels('app.inventory')
        actions = [
            # File
            ('NewInventory', None, _('Inventory...'),
             group.get('new_inventory'),
             _('Create a new inventory for product counting')),

            # Inventory
            ('InventoryMenu', None, _('Inventory')),
            ('Details', gtk.STOCK_INFO, _('Details...'),
             group.get('inventory_details'),
             _('See details about this inventory')),
            ('CountingAction', gtk.STOCK_INDEX, _('_Count...'),
             group.get('inventory_count'),
             _('Register the actual stock of products in the selected '
               'inventory')),
            ('AdjustAction', gtk.STOCK_CONVERT, _('_Adjust...'),
             group.get('inventory_adjust'),
             _('Adjust the stock accordingly to the counting in the selected '
               'inventory')),
            ('Cancel', gtk.STOCK_CANCEL, _('Cancel...'),
             group.get('inventory_cancel'),
             _('Cancel the selected inventory')),
            ('PrintProductListing', gtk.STOCK_PRINT,
             _('Print product listing...'),
             group.get('inventory_print'),
             _('Print the product listing for this inventory'))
        ]
        self.inventory_ui = self.add_ui_actions('', actions,
                                                filename='inventory.xml')
        self.set_help_section(_("Inventory help"), 'app-inventory')

        self.AdjustAction.set_short_label(_("Adjust"))
        self.CountingAction.set_short_label(_("Count"))
        self.Details.set_short_label(_("Details"))
        self.Cancel.set_short_label(_("Cancel"))
        self.AdjustAction.props.is_important = True
        self.CountingAction.props.is_important = True
        self.Details.props.is_important = True
        self.Cancel.props.is_important = True
开发者ID:rosalin,项目名称:stoq,代码行数:41,代码来源:inventory.py


示例20: create_actions

 def create_actions(self):
     group = get_accels('app.services')
     actions = [
         # Search
         ("Products", None, _(u"Products..."),
          group.get("search_products")),
         ("Services", None, _(u"Services..."),
          group.get("search_services")),
         ("Categories", None, _(u"Categories..."),
          group.get("search_categories")),
         ("Clients", None, _(u"Clients..."),
          group.get("search_clients")),
     ]
     self.services_ui = self.add_ui_actions(actions)
     radio_actions = [
         ('ViewKanban', '', _("View as Kanban"),
          '', _("Show in Kanban mode")),
         ('ViewList', '', _("View as List"),
          '', _("Show in list mode")),
     ]
     self.add_ui_actions(radio_actions, 'RadioActions')
     self.set_help_section(_(u"Services help"), 'app-services')
开发者ID:hackedbellini,项目名称:stoq,代码行数:22,代码来源:services.py



注:本文中的stoqlib.gui.utils.keybindings.get_accels函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python printing.print_report函数代码示例发布时间:2022-05-27
下一篇:
Python persontemplate.BasePersonRoleEditor类代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap