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

Python baseeditor.BaseEditorSlave类代码示例

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

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



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

示例1: __init__

 def __init__(self, store, employee, edit_mode, visual_mode=False):
     self.employee = employee
     self.person = employee.person
     self.salesperson = self.person.salesperson
     self.is_edit_mode = edit_mode
     self.current_role_history = self._get_active_role_history()
     BaseEditorSlave.__init__(self, store, visual_mode=visual_mode)
开发者ID:romaia,项目名称:stoq,代码行数:7,代码来源:employeeslave.py


示例2: __init__

    def __init__(self, wizard, parent, store, order_obj, payment_method,
                 outstanding_value=currency(0), first_duedate=None,
                 installments_number=None):
        self.wizard = wizard
        self.parent = parent
        # Note that 'order' may be a Sale or a PurchaseOrder object
        self.order = order_obj
        self.method = payment_method
        self.payment_type = self._get_payment_type()
        self.total_value = outstanding_value or self._get_total_amount()
        self.payment_group = self.order.group
        self.payment_list = None
        # This is very useful when calculating the total amount outstanding
        # or overpaid of the payments
        self.interest_total = currency(0)

        self._first_duedate = first_duedate
        self._installments_number = installments_number

        BaseEditorSlave.__init__(self, store)
        self.register_validate_function(self._refresh_next)

        # Most of slaves don't have bank information
        self.bank_combo.hide()
        self.bank_label.hide()
开发者ID:romaia,项目名称:stoq,代码行数:25,代码来源:paymentslave.py


示例3: __init__

 def __init__(self, store, model, model_type, visual_mode=False):
     self._proxy = None
     self.model = model
     self.model_type = model_type
     self.default_max_discount = sysparam(store).MAX_SALE_DISCOUNT
     self.max_discount = self.default_max_discount
     BaseEditorSlave.__init__(self, store, model, visual_mode=visual_mode)
开发者ID:leandrorchaves,项目名称:stoq,代码行数:7,代码来源:saleslave.py


示例4: __init__

 def __init__(self, store, model, parent):
     self.model = model
     self.icms_slave = parent.icms_slave
     self.ipi_slave = parent.ipi_slave
     self.pis_slave = parent.pis_slave
     self.cofins_slave = parent.cofins_slave
     self.quantity_model = Settable(quantity=model.quantity)
     BaseEditorSlave.__init__(self, store, self.model)
开发者ID:Guillon88,项目名称:stoq,代码行数:8,代码来源:stockdecreaseeditor.py


示例5: __init__

    def __init__(self, store, model, visual_mode=False):
        self.purchases = list(model.get_purchase_orders())

        # Save the receiving order if there is only one for this receiving invoice
        try:
            self._receiving_order = model.receiving_orders.one()
        except NotOneError:
            self._receiving_order = None
        BaseEditorSlave.__init__(self, store, model, visual_mode)
开发者ID:hackedbellini,项目名称:stoq,代码行数:9,代码来源:receivingslave.py


示例6: __init__

 def __init__(self, store, person, model=None, is_main_address=True,
              visual_mode=False, db_form=None):
     self.person = person
     self.is_main_address = (model and model.is_main_address
                             or is_main_address)
     self.db_form = db_form
     if model is not None:
         model = store.fetch(model)
         model = _AddressModel(model, store)
     BaseEditorSlave.__init__(self, store, model, visual_mode=visual_mode)
开发者ID:LeonamSilva,项目名称:stoq,代码行数:10,代码来源:addressslave.py


示例7: __init__

    def __init__(self, store, model=None, person_slave=None,
                 visual_mode=False):
        """ Creates a new IndividualEditorTemplate object

        :param store: a store
        :param model: model
        :param person_slave: the person slave
        :param visual_model:
        """
        self._person_slave = person_slave
        BaseEditorSlave.__init__(self, store, model, visual_mode=visual_mode)
开发者ID:romaia,项目名称:stoq,代码行数:11,代码来源:individualtemplate.py


示例8: __init__

 def __init__(self, store, workorder, show_finish_date=False):
     """
     :param workorder: The |workorder| this slave is editing. We will
       actually edit another object, but the |workorder| will be used to
       fetch or create it.
     :param show_finish_date: If the estimated finish date property of the
       work order should be editable in this slave.
     """
     self._show_finish_date = show_finish_date
     self._workorder = workorder
     model = self._create_model(store)
     BaseEditorSlave.__init__(self, store, model)
开发者ID:marianaanselmo,项目名称:stoq,代码行数:12,代码来源:opticalslave.py


示例9: __init__

 def __init__(self, store, model, model_type, visual_mode=False):
     self._proxy = None
     self.model = model
     self.model_type = model_type
     self.default_max_discount = sysparam.get_decimal('MAX_SALE_DISCOUNT')
     self.max_discount = self.default_max_discount
     # If there is an original discount, this means the sale was from a trade,
     # and the parameter USE_TRADE_AS_DISCOUNT must be set.
     self.original_discount = self.model.discount_value * 100 / self.model.get_sale_subtotal()
     if self.original_discount:
         assert sysparam.get_bool('USE_TRADE_AS_DISCOUNT')
     self.original_sale_amount = self.model.get_total_sale_amount()
     BaseEditorSlave.__init__(self, store, model, visual_mode=visual_mode)
开发者ID:Joaldino,项目名称:stoq,代码行数:13,代码来源:saleslave.py


示例10: __init__

    def __init__(self, store, model, sellable=None, visual_mode=False):
        self.image_model = model
        self._updating_widgets = False
        self._sellable = sellable

        BaseEditorSlave.__init__(self, store, model, visual_mode)
        self._setup_thumbnail()
        self._setup_widgets()

        self._app_info = Gio.app_info_get_default_for_type('image/png', False)
        if not self._app_info:
            # Hide view item if we don't have any app to visualize it.
            self.view_item.hide()
开发者ID:hackedbellini,项目名称:stoq,代码行数:13,代码来源:imageslave.py


示例11: __init__

    def __init__(self, store, person, model=None, is_main_address=True,
                 visual_mode=False, db_form=None):
        self.person = person
        self.is_main_address = (model and model.is_main_address
                                or is_main_address)
        self.db_form = db_form
        if model is not None:
            model = store.fetch(model)
            model = _AddressModel(model, store)

        plugin = get_plugin_manager()
        self._nfe_active = plugin.is_any_active(['nfe', 'nfce'])

        BaseEditorSlave.__init__(self, store, model, visual_mode=visual_mode)
开发者ID:hackedbellini,项目名称:stoq,代码行数:14,代码来源:addressslave.py


示例12: __init__

    def __init__(self, store, model, parent):
        self.model = model
        self.icms_slave = parent.icms_slave
        self.ipi_slave = parent.ipi_slave
        # Use a temporary object to edit the quantities, so we can delay the
        # database constraint checks
        self.quantity_model = Settable(quantity=model.quantity,
                                       reserved=model.quantity_decreased)

        self.proxy = None
        BaseEditorSlave.__init__(self, store, self.model)

        sale = self.model.sale
        if sale.status == Sale.STATUS_CONFIRMED:
            self._set_not_editable()
开发者ID:coletivoEITA,项目名称:stoq,代码行数:15,代码来源:saleeditor.py


示例13: __init__

    def __init__(self, store, workorder, show_finish_date=False, visual_mode=False):
        """
        :param workorder: The |workorder| this slave is editing. We will
          actually edit another object, but the |workorder| will be used to
          fetch or create it.
        :param show_finish_date: If the estimated finish date property of the
          work order should be editable in this slave.
        """
        self._show_finish_date = show_finish_date
        self._workorder = workorder
        model = self._create_model(store)

        # This is used to correctly triangulate the values of the spherical
        # widgets
        self._update_order = {"re": [], "le": []}
        BaseEditorSlave.__init__(self, store, model, visual_mode=visual_mode)
开发者ID:rosalin,项目名称:stoq,代码行数:16,代码来源:opticalslave.py


示例14: __init__

    def __init__(self, store, model, can_change=True, can_erase=True,
                 visual_mode=False):
        self._image_model = model
        model = _DummyImageModel()

        BaseEditorSlave.__init__(self, store, model, visual_mode)
        self._setup_image_model()
        self._setup_widgets()

        if not can_change:
            self.edit_item.hide()
        if not can_erase:
            self.erase_item.hide()
        self._app_info = gio.app_info_get_default_for_type('image/png', False)
        if not self._app_info:
            # Hide view item if we don't have any app to visualize it.
            self.view_item.hide()
开发者ID:LeonamSilva,项目名称:stoq,代码行数:17,代码来源:imageslaveslave.py


示例15: __init__

    def __init__(self, store, workorder, show_finish_date=False,
                 visual_mode=False, description=u"", parent=None):
        """
        :param workorder: The |workorder| this slave is editing. We will
          actually edit another object, but the |workorder| will be used to
          fetch or create it.
        :param show_finish_date: If the estimated finish date property of the
          work order should be editable in this slave.
        """
        self._update_level = 0
        self.parent = parent
        self._focus_change = False
        self._show_finish_date = show_finish_date
        self._workorder = workorder
        self._description = description
        model = self._create_model(store)

        # This is used to correctly triangulate the values of the spherical
        # widgets
        self._update_order = {'re': [], 'le': []}
        BaseEditorSlave.__init__(self, store, model, visual_mode=visual_mode)
开发者ID:hackedbellini,项目名称:stoq,代码行数:21,代码来源:opticalslave.py


示例16: __init__

    def __init__(self, store, model, parent):
        self.model = model
        self.icms_slave = parent.icms_slave
        self.ipi_slave = parent.ipi_slave
        # Use a temporary object to edit the quantities, so we can delay the
        # database constraint checks
        self.quantity_model = Settable(quantity=model.quantity,
                                       reserved=model.quantity_decreased)

        self.proxy = None
        BaseEditorSlave.__init__(self, store, self.model)

        sale = self.model.sale
        if sale.status == Sale.STATUS_CONFIRMED:
            self._set_not_editable()
        if model.parent_item:
            # We should not allow the user to edit the children
            self._set_not_editable()
            self.reserved.set_sensitive(False)

        sellable = model.sellable
        if sellable.product and sellable.product.is_package:
            # Do not allow the user to edit the price of the package
            self.price.set_sensitive(False)
开发者ID:adrianoaguiar,项目名称:stoq,代码行数:24,代码来源:saleeditor.py


示例17: __init__

 def __init__(self, store, product=None, visual_mode=False):
     self._product = product
     self._remove_component_list = []
     BaseEditorSlave.__init__(self, store, model=None, visual_mode=visual_mode)
     self._setup_widgets()
开发者ID:amaurihamasu,项目名称:stoq,代码行数:5,代码来源:productslave.py


示例18: __init__

 def __init__(self, store, model=None, visual_mode=False,
              confirm_password=True):
     BaseEditorSlave.__init__(self, store, model, visual_mode=visual_mode)
     self._confirm_password = confirm_password
     self._setup_widgets()
开发者ID:Guillon88,项目名称:stoq,代码行数:5,代码来源:userslave.py


示例19: __init__

 def __init__(self, store, parent):
     self._parent = parent
     self._product = self._parent.model.product
     BaseEditorSlave.__init__(self, store)
开发者ID:marianaanselmo,项目名称:stoq,代码行数:4,代码来源:productionslave.py


示例20: __init__

 def __init__(self, store, model, visual_mode=False, ui_form_name=None):
     self.model = model
     self.model_type = self.model_type or type(model)
     BaseEditorSlave.__init__(self, store, self.model,
                              visual_mode=visual_mode)
     self.notes.set_accepts_tab(False)
开发者ID:hackedbellini,项目名称:stoq,代码行数:6,代码来源:slaves.py



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Python printing.print_report函数代码示例发布时间:2022-05-27
下一篇:
Python baseeditor.BaseEditor类代码示例发布时间: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