예제 #1
0
    if xfer.getparam('CRITERIA') is not None:
        for criteria_item in get_criteria_list(xfer.getparam('CRITERIA')):
            if (criteria_item[0] == 'status') and (criteria_item[2]
                                                   in ('1', '2', '1;2')):
                return True
        return False
    else:
        return xfer.getparam('status_filter', 0) in (1, 2)


@ActionsManage.affect_grid(_("Send"),
                           "lucterios.mailing/images/email.png",
                           close=CLOSE_NO,
                           unique=SELECT_MULTI,
                           condition=lambda xfer, gridname='': can_printing(
                               xfer) and can_send_email(xfer))
@ActionsManage.affect_show(_("Send"),
                           "lucterios.mailing/images/email.png",
                           close=CLOSE_NO,
                           condition=lambda xfer: xfer.item.status in
                           (1, 2) and can_send_email(xfer))
@MenuManage.describ('condominium.change_callfunds')
class CallFundsPayableEmail(XferContainerAcknowledge):
    caption = _("Send by email")
    icon = "callfunds.png"
    model = CallFunds
    field_id = 'callfunds'

    def fillresponse(self):
        self.redirect_action(ActionsManage.get_action_url(
            'payoff.Supporting', 'Email', self),
예제 #2
0
파일: views.py 프로젝트: julienM77/syndic

@ActionsManage.affect_show(_("Payment"), "diacamma.payoff/images/payments.png", close=CLOSE_NO, condition=lambda xfer: xfer.item.payoff_have_payment() and (len(PaymentMethod.objects.all()) > 0))
@MenuManage.describ('condominium.change_owner')
class OwnerPayableShow(XferContainerAcknowledge):
    caption = _("Payment")
    icon = "owner.png"
    model = Owner
    field_id = 'owner'

    def fillresponse(self):
        self.redirect_action(ActionsManage.get_action_url('payoff.Supporting', 'Show', self),
                             close=CLOSE_NO, params={'item_name': self.field_id})


@ActionsManage.affect_grid(_("Send"), "lucterios.mailing/images/email.png", close=CLOSE_NO, unique=SELECT_MULTI, condition=lambda xfer, gridname='': can_send_email(xfer))
@ActionsManage.affect_show(_("Send"), "lucterios.mailing/images/email.png", close=CLOSE_NO, condition=lambda xfer: can_send_email(xfer))
@MenuManage.describ('condominium.change_owner')
class OwnerPayableEmail(XferContainerAcknowledge):
    caption = _("Send by email")
    icon = "owner.png"
    model = Owner
    field_id = 'owner'

    def fillresponse(self):
        self.redirect_action(ActionsManage.get_action_url('payoff.Supporting', 'Email', self),
                             close=CLOSE_NO, params={'item_name': self.field_id})


@ActionsManage.affect_grid(TITLE_MODIFY, "images/edit.png", unique=SELECT_SINGLE)
@ActionsManage.affect_grid(TITLE_ADD, "images/add.png")
예제 #3
0
        XferShowEditor.fillresponse(self)
        self.add_action(ActionsManage.get_action_url('payoff.Supporting', 'Show', self),
                        close=CLOSE_NO, params={'item_name': 'callfundssupporting', 'callfundssupporting': self.item.supporting_id}, pos_act=0)


def can_printing(xfer, gridname=''):
    if xfer.getparam('CRITERIA') is not None:
        for criteria_item in get_criteria_list(xfer.getparam('CRITERIA')):
            if (criteria_item[0] == 'status') and (criteria_item[2] in ('1', '2', '1;2')):
                return True
        return False
    else:
        return xfer.getparam('status_filter', CallFunds.STATUS_BUILDING) in (CallFunds.STATUS_VALID, CallFunds.STATUS_ENDED)


@ActionsManage.affect_grid(_("Send"), "lucterios.mailing/images/email.png", close=CLOSE_NO, unique=SELECT_MULTI, condition=lambda xfer, gridname='': can_printing(xfer) and can_send_email(xfer))
@ActionsManage.affect_show(_("Send"), "lucterios.mailing/images/email.png", close=CLOSE_NO, condition=lambda xfer: xfer.item.status in (CallFunds.STATUS_VALID, CallFunds.STATUS_ENDED) and can_send_email(xfer))
@MenuManage.describ('condominium.add_callfunds')
class CallFundsPayableEmail(XferContainerAcknowledge):
    caption = _("Send by email")
    icon = "callfunds.png"
    model = CallFunds
    field_id = 'callfunds'

    def fillresponse(self):
        self.redirect_action(ActionsManage.get_action_url('payoff.Supporting', 'Email', self),
                             close=CLOSE_NO, params={'item_name': self.field_id, "modelname": self.model.get_long_name()})


@ActionsManage.affect_grid(TITLE_PRINT, "images/print.png", unique=SELECT_MULTI, condition=can_printing)
@ActionsManage.affect_show(TITLE_PRINT, "images/print.png", close=CLOSE_NO, condition=lambda xfer: xfer.item.status in (CallFunds.STATUS_VALID, CallFunds.STATUS_ENDED))
예제 #4
0
파일: views.py 프로젝트: loudubewe/syndic
    readonly = True
    methods_allowed = ('GET', )

    def fillresponse(self):
        self.redirect_action(ActionsManage.get_action_url(
            'payoff.Supporting', 'Show', self),
                             close=CLOSE_NO,
                             params={'item_name': self.field_id})


@ActionsManage.affect_grid(
    _("Send"),
    "lucterios.mailing/images/email.png",
    close=CLOSE_NO,
    unique=SELECT_MULTI,
    condition=lambda xfer, gridname='': can_send_email(xfer))
@ActionsManage.affect_show(_("Send"),
                           "lucterios.mailing/images/email.png",
                           close=CLOSE_NO,
                           condition=lambda xfer: can_send_email(xfer))
@MenuManage.describ('condominium.add_owner')
class OwnerPayableEmail(XferContainerAcknowledge):
    caption = _("Send by email")
    icon = "owner.png"
    model = Owner
    field_id = 'owner'

    def fillresponse(self):
        self.redirect_action(ActionsManage.get_action_url(
            'payoff.Supporting', 'Email', self),
                             close=CLOSE_NO,