当前位置: 首页>>代码示例>>Python>>正文


Python BaseEditorSlave.__init__方法代码示例

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


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

示例1: __init__

# 需要导入模块: from stoqlib.gui.editors.baseeditor import BaseEditorSlave [as 别名]
# 或者: from stoqlib.gui.editors.baseeditor.BaseEditorSlave import __init__ [as 别名]
 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,代码行数:9,代码来源:employeeslave.py

示例2: __init__

# 需要导入模块: from stoqlib.gui.editors.baseeditor import BaseEditorSlave [as 别名]
# 或者: from stoqlib.gui.editors.baseeditor.BaseEditorSlave import __init__ [as 别名]
    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,代码行数:27,代码来源:paymentslave.py

示例3: __init__

# 需要导入模块: from stoqlib.gui.editors.baseeditor import BaseEditorSlave [as 别名]
# 或者: from stoqlib.gui.editors.baseeditor.BaseEditorSlave import __init__ [as 别名]
 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,代码行数:9,代码来源:saleslave.py

示例4: __init__

# 需要导入模块: from stoqlib.gui.editors.baseeditor import BaseEditorSlave [as 别名]
# 或者: from stoqlib.gui.editors.baseeditor.BaseEditorSlave import __init__ [as 别名]
 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,代码行数:10,代码来源:stockdecreaseeditor.py

示例5: __init__

# 需要导入模块: from stoqlib.gui.editors.baseeditor import BaseEditorSlave [as 别名]
# 或者: from stoqlib.gui.editors.baseeditor.BaseEditorSlave import __init__ [as 别名]
    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,代码行数:11,代码来源:receivingslave.py

示例6: __init__

# 需要导入模块: from stoqlib.gui.editors.baseeditor import BaseEditorSlave [as 别名]
# 或者: from stoqlib.gui.editors.baseeditor.BaseEditorSlave import __init__ [as 别名]
 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,代码行数:12,代码来源:addressslave.py

示例7: __init__

# 需要导入模块: from stoqlib.gui.editors.baseeditor import BaseEditorSlave [as 别名]
# 或者: from stoqlib.gui.editors.baseeditor.BaseEditorSlave import __init__ [as 别名]
    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,代码行数:13,代码来源:individualtemplate.py

示例8: __init__

# 需要导入模块: from stoqlib.gui.editors.baseeditor import BaseEditorSlave [as 别名]
# 或者: from stoqlib.gui.editors.baseeditor.BaseEditorSlave import __init__ [as 别名]
 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,代码行数:14,代码来源:opticalslave.py

示例9: __init__

# 需要导入模块: from stoqlib.gui.editors.baseeditor import BaseEditorSlave [as 别名]
# 或者: from stoqlib.gui.editors.baseeditor.BaseEditorSlave import __init__ [as 别名]
 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,代码行数:15,代码来源:saleslave.py

示例10: __init__

# 需要导入模块: from stoqlib.gui.editors.baseeditor import BaseEditorSlave [as 别名]
# 或者: from stoqlib.gui.editors.baseeditor.BaseEditorSlave import __init__ [as 别名]
    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,代码行数:15,代码来源:imageslave.py

示例11: __init__

# 需要导入模块: from stoqlib.gui.editors.baseeditor import BaseEditorSlave [as 别名]
# 或者: from stoqlib.gui.editors.baseeditor.BaseEditorSlave import __init__ [as 别名]
    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,代码行数:16,代码来源:addressslave.py

示例12: __init__

# 需要导入模块: from stoqlib.gui.editors.baseeditor import BaseEditorSlave [as 别名]
# 或者: from stoqlib.gui.editors.baseeditor.BaseEditorSlave import __init__ [as 别名]
    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,代码行数:17,代码来源:saleeditor.py

示例13: __init__

# 需要导入模块: from stoqlib.gui.editors.baseeditor import BaseEditorSlave [as 别名]
# 或者: from stoqlib.gui.editors.baseeditor.BaseEditorSlave import __init__ [as 别名]
    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,代码行数:18,代码来源:opticalslave.py

示例14: __init__

# 需要导入模块: from stoqlib.gui.editors.baseeditor import BaseEditorSlave [as 别名]
# 或者: from stoqlib.gui.editors.baseeditor.BaseEditorSlave import __init__ [as 别名]
    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,代码行数:19,代码来源:imageslaveslave.py

示例15: __init__

# 需要导入模块: from stoqlib.gui.editors.baseeditor import BaseEditorSlave [as 别名]
# 或者: from stoqlib.gui.editors.baseeditor.BaseEditorSlave import __init__ [as 别名]
    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,代码行数:23,代码来源:opticalslave.py


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