def _setup_widgets(self): self.sales_list.set_columns(self._get_sale_columns()) self.product_list.set_columns(self._get_product_columns()) self.services_list.set_columns(self._get_services_columns()) self.payments_list.set_columns(self._get_payments_columns()) self.calls_list.set_columns(self._get_calls_columns()) self.account_list.set_columns(self._get_account_columns()) self.sales_list.add_list(self.model.get_client_sales()) self.product_list.add_list(self.model.get_client_products()) self.services_list.add_list(self.model.get_client_services()) self.payments_list.add_list(self.model.get_client_payments()) self.calls_list.add_list(self.model.person.calls) self.account_list.add_list(self.model.get_credit_transactions()) value_format = '<b>%s</b>' total_label = "<b>%s</b>" % api.escape(_("Total:")) saldo_label = "<b>%s</b>" % api.escape(_("Saldo:")) sales_summary_label = SummaryLabel(klist=self.sales_list, column='total', label=total_label, value_format=value_format) account_summary_label = SummaryLabel(klist=self.account_list, column='value', label=saldo_label, value_format=value_format) sales_summary_label.show() account_summary_label.show() self.sales_vbox.pack_start(sales_summary_label, False) self.account_vbox.pack_start(account_summary_label, False)
def _setup_summary_labels(self): value_format = "<b>%s</b>" total_label = "<b>%s</b>" % api.escape(_("Total:")) total_summary_label = SummaryLabel(klist=self.payments_list, column='value', label=total_label, value_format=value_format) total_summary_label.show() self.payments_vbox.pack_start(total_summary_label, False) total_label = "<b>%s</b>" % api.escape(_("Total paid:")) total_paid_summary_label = SummaryLabel(klist=self.payments_list, column='paid_value', label=total_label, value_format=value_format) total_paid_summary_label.show() self.payments_vbox.pack_start(total_paid_summary_label, False) total_label = "<b>%s</b>" % api.escape(_("Total:")) transaction_summary_label = SummaryLabel( klist=self.stock_transactions_list, column='total', label=total_label, value_format=value_format) transaction_summary_label.show() self.stock_transactions_vbox.pack_start(transaction_summary_label, False) total_label = "<b>%s</b>" % api.escape(_("Total:")) sale_summary_label = SummaryLabel(klist=self.sales_list, column='total', label=total_label, value_format=value_format) sale_summary_label.show() self.sales_vbox.pack_start(sale_summary_label, False)
def _setup_widgets(self): self.receiving_list.set_columns(self._get_receiving_columns()) self.sales_list.set_columns(self._get_sale_columns()) self.transfer_list.set_columns(self._get_transfer_columns()) self.loan_list.set_columns(self._get_loan_columns()) self.decrease_list.set_columns(self._get_decrease_columns()) items = self.store.find(ReceivingItemView, sellable_id=self.model.id) self.receiving_list.add_list(list(items)) items = self.store.find(SaleItemsView, sellable_id=self.model.id) self.sales_list.add_list(list(items)) items = self.store.find(TransferOrderItem, sellable_id=self.model.id) self.transfer_list.add_list(list(items)) items = self.store.find(LoanItemView, sellable_id=self.model.id) self.loan_list.add_list(list(items)) items = self.store.find(StockDecreaseItemsView, sellable=self.model.id) self.decrease_list.add_list(list(items)) value_format = '<b>%s</b>' total_label = "<b>%s</b>" % api.escape(_("Total:")) receiving_summary_label = SummaryLabel(klist=self.receiving_list, column='quantity', label=total_label, value_format=value_format) receiving_summary_label.show() self.receiving_vbox.pack_start(receiving_summary_label, False) sales_summary_label = SummaryLabel(klist=self.sales_list, column='quantity', label=total_label, value_format=value_format) sales_summary_label.show() self.sales_vbox.pack_start(sales_summary_label, False) transfer_summary_label = SummaryLabel(klist=self.transfer_list, column='quantity', label=total_label, value_format=value_format) transfer_summary_label.show() self.transfer_vbox.pack_start(transfer_summary_label, False) loan_summary_label = SummaryLabel(klist=self.loan_list, column='quantity', label=total_label, value_format=value_format) self.loan_vbox.pack_start(loan_summary_label, False) decrease_summary_label = SummaryLabel(klist=self.decrease_list, column='quantity', label=total_label, value_format=value_format) decrease_summary_label.show() self.decrease_vbox.pack_start(decrease_summary_label, False)
def _setup_summary_labels(self): order_summary_label = SummaryLabel(klist=self.ordered_items, column='total', label='<b>%s</b>' % api.escape(_(u"Total")), value_format='<b>%s</b>') order_summary_label.show() self.ordered_vbox.pack_start(order_summary_label, False)
def _setup_summary_labels(self): summary_label = SummaryLabel(klist=self.payments_list, column='paid_value', label='<b>%s</b>' % api.escape(_(u"Total:")), value_format='<b>%s</b>') summary_label.show() self.payments_vbox.pack_start(summary_label, False)
def _setup_summary(self): # FIXME: Move this into AdditionListSlave if not self.summary_label_column: self.summary = None return self.summary = SummaryLabel(klist=self.slave.klist, column=self.summary_label_column, label=self.summary_label_text, value_format='<b>%s</b>') self.summary.show() self.slave.list_vbox.pack_start(self.summary, expand=False)
def _setup_widgets(self): self.product_list.set_columns(self._get_product_columns()) products = self.store.find(TransferOrderItem, transfer_order=self.model) self.product_list.add_list(list(products)) value_format = '<b>%s</b>' total_label = value_format % api.escape(_("Total:")) products_summary_label = SummaryLabel(klist=self.product_list, column='total', label=total_label, value_format=value_format) products_summary_label.show() self.products_vbox.pack_start(products_summary_label, False)
def _setup_widgets(self): self.product_list.set_columns(self._get_product_columns()) products = self.store.find(ReceivingOrderItem, receiving_order_id=self.model.id) self.product_list.add_list(list(products)) value_format = '<b>%s</b>' total_label = value_format % api.escape(_("Total:")) products_summary_label = SummaryLabel(klist=self.product_list, column='total', label=total_label, value_format=value_format) products_summary_label.show() self.products_vbox.pack_start(products_summary_label, False) label = self.print_labels.get_children()[0] label = label.get_children()[0].get_children()[1] label.set_label(_(u'Print labels'))
def _setup_widgets(self): self.purchases_list.set_columns(self._get_purchase_columns()) self.product_list.set_columns(self._get_product_columns()) self.payments_list.set_columns(self._get_payments_columns()) purchases = self.model.get_supplier_purchases() self.purchases_list.add_list(purchases) self._build_data(purchases) self.product_list.add_list(self.products) self.payments_list.add_list(self.payments) value_format = '<b>%s</b>' total_label = "<b>%s</b>" % api.escape(_("Total:")) purchases_summary_label = SummaryLabel(klist=self.purchases_list, column='total', label=total_label, value_format=value_format) purchases_summary_label.show() self.purchases_vbox.pack_start(purchases_summary_label, False)
def _setup_widgets(self): component_list = list(self._get_products()) if component_list: self.component_combo.prefill(component_list) else: self.sort_components_check.set_sensitive(False) self.component_tree.set_columns(self._get_columns()) self._populate_component_tree() self.component_label = SummaryLabel( klist=self.component_tree, column='total_production_cost', label='<b>%s</b>' % api.escape(_(u'Total:')), value_format='<b>%s</b>') self.component_label.show() self.component_tree_vbox.pack_start(self.component_label, False) self.info_label.set_bold(True) self._update_widgets() if self.visual_mode: self.component_combo.set_sensitive(False) self.add_button.set_sensitive(False) self.sort_components_check.set_sensitive(False)
def _setup_summary(self): self.summary = SummaryLabel(klist=self.product_list, column='total_received', value_format='<b>%s</b>') self.summary.show() self.vbox1.pack_start(self.summary, expand=False)