本文整理匯總了Python中stoqlib.gui.slaves.saleslave.SaleListToolbar.edit方法的典型用法代碼示例。如果您正苦於以下問題:Python SaleListToolbar.edit方法的具體用法?Python SaleListToolbar.edit怎麽用?Python SaleListToolbar.edit使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類stoqlib.gui.slaves.saleslave.SaleListToolbar
的用法示例。
在下文中一共展示了SaleListToolbar.edit方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: SalesApp
# 需要導入模塊: from stoqlib.gui.slaves.saleslave import SaleListToolbar [as 別名]
# 或者: from stoqlib.gui.slaves.saleslave.SaleListToolbar import edit [as 別名]
class SalesApp(ShellApp):
app_title = _('Sales')
gladefile = 'sales_app'
search_spec = SaleView
search_label = _('matching:')
report_table = SalesReport
cols_info = {Sale.STATUS_INITIAL: 'open_date',
Sale.STATUS_CONFIRMED: 'confirm_date',
Sale.STATUS_PAID: 'close_date',
Sale.STATUS_ORDERED: 'open_date',
Sale.STATUS_CANCELLED: 'cancel_date',
Sale.STATUS_QUOTE: 'open_date',
Sale.STATUS_RETURNED: 'return_date',
Sale.STATUS_RENEGOTIATED: 'close_date'}
action_permissions = {
"SalesPrintInvoice": ('app.sales.print_invoice', PermissionManager.PERM_SEARCH),
}
def __init__(self, window, store=None):
self.summary_label = None
self._visible_date_col = None
ShellApp.__init__(self, window, store=store)
#
# Application
#
def create_actions(self):
group = get_accels('app.sales')
actions = [
# File
("SaleQuote", None, _("Sale quote..."), '',
_('Create a new quote for a sale')),
("WorkOrderQuote", None, _("Sale with work order..."), '',
_('Create a new quote for a sale with work orders')),
("LoanNew", None, _("Loan...")),
("LoanClose", None, _("Close loan...")),
# Search
("SearchSoldItemsByBranch", None, _("Sold items by branch..."),
group.get("search_sold_items_by_branch"),
_("Search for sold items by branch")),
("SearchSalesByPaymentMethod", None,
_("Sales by payment method..."),
group.get("search_sales_by_payment")),
("SearchSalesPersonSales", None,
_("Total sales made by salesperson..."),
group.get("search_salesperson_sales"),
_("Search for sales by payment method")),
("SearchProduct", STOQ_PRODUCTS, _("Products..."),
group.get("search_products"),
_("Search for products")),
("SearchService", STOQ_SERVICES, _("Services..."),
group.get("search_services"),
_("Search for services")),
("SearchDelivery", STOQ_DELIVERY, _("Deliveries..."),
group.get("search_deliveries"),
_("Search for deliveries")),
("SearchClient", STOQ_CLIENTS, _("Clients..."),
group.get("search_clients"),
_("Search for clients")),
("SearchClientCalls", None, _("Client Calls..."),
group.get("search_client_calls"),
_("Search for client calls")),
("SearchCreditCheckHistory", None,
_("Client credit check history..."),
group.get("search_credit_check_history"),
_("Search for client check history")),
("SearchCommission", None, _("Commissions..."),
group.get("search_commissions"),
_("Search for salespersons commissions")),
("LoanSearch", None, _("Loans..."),
group.get("search_loans")),
("LoanSearchItems", None, _("Loan items..."),
group.get("search_loan_items")),
("ReturnedSaleSearch", None, _("Returned sales..."),
group.get("returned_sales")),
("SearchUnconfirmedSaleItems", None, _("Unconfirmed sale items..."),
group.get("search_reserved_product"),
_("Search for unconfirmed sale items")),
("SearchClientsWithSale", None, _("Clients with sales..."),
None,
_("Search for regular clients")),
("SearchClientsWithCredit", None, _("Clients with credit..."),
None,
_("Search for clients that have credit")),
("SearchSoldItemsByClient", None, _("Sold items by client..."),
None,
_("Search for products sold by client")),
# Sale
("SaleMenu", None, _("Sale")),
("SalesCancel", None, _("Cancel...")),
("ChangeClient", gtk.STOCK_EDIT, _("Change client...")),
("SalesPrintInvoice", gtk.STOCK_PRINT, _("_Print invoice...")),
#.........這裏部分代碼省略.........