示例#1
0
    def show(self, xfer):
        xfer.params['supporting'] = self.item.id
        third = xfer.get_components('thirdtotal')
        xfer.tab = third.tab
        btn = XferCompButton('show_third')
        btn.set_location(third.col + third.colspan, third.row)
        act_btn = ActionsManage.get_action_url('accounting.Third', 'Show',
                                               xfer)
        if act_btn is not None:
            act_btn.caption = _('third')
        btn.set_action(xfer.request,
                       act_btn,
                       modal=FORMTYPE_MODAL,
                       close=CLOSE_NO,
                       params={'third': self.item.third.id})
        btn.rowspan = 2
        xfer.add_component(btn)

        lots = xfer.get_components('propertylot')
        lots.actions = []
        lots.delete_header('owner')

        if hasattr(xfer.item.third.contact.get_final_child(),
                   'structure_type'):
            contact = xfer.get_components('ownercontact')
            xfer.tab = contact.tab
            old_item = xfer.item
            xfer.item = old_item.third.contact.get_final_child()
            xfer.filltab_from_model(contact.col, contact.row + 1, True,
                                    ['responsability_set'])
            xfer.item = old_item

        self._show_entryline(xfer)
        self._show_current_class_loads(xfer)
        self._show_call_payoff(xfer)
示例#2
0
文件: editors.py 项目: htwalid/syndic
    def show(self, xfer):
        xfer.params['supporting'] = self.item.id
        third = xfer.get_components('thirdtotal')
        xfer.tab = third.tab
        btn = XferCompButton('show_third')
        btn.set_location(third.col + third.colspan, third.row)
        act_btn = ActionsManage.get_action_url('accounting.Third', 'Show',
                                               xfer)
        if act_btn is not None:
            act_btn.caption = _('third')
        btn.set_action(xfer.request,
                       act_btn,
                       modal=FORMTYPE_MODAL,
                       close=CLOSE_NO,
                       params={'third': self.item.third.id})
        btn.rowspan = 2
        xfer.add_component(btn)

        if hasattr(xfer.item.third.contact.get_final_child(),
                   'structure_type'):
            contact = xfer.get_components('ownercontact')
            xfer.tab = contact.tab
            old_item = xfer.item
            xfer.item = old_item.third.contact.get_final_child()
            xfer.filltab_from_model(contact.col, contact.row + 1, True,
                                    ['responsability_set'])
            xfer.item = old_item

        link_grid_lines = xfer.get_components('entryline')
        link_grid_lines.description = ''
        link_grid_lines.actions = []
        link_grid_lines.colspan = 2
        link_grid_lines.add_action(xfer.request,
                                   ActionsManage.get_action_url(
                                       'accounting.EntryAccount',
                                       'OpenFromLine', xfer),
                                   modal=FORMTYPE_MODAL,
                                   unique=SELECT_SINGLE,
                                   close=CLOSE_NO)
        link_grid_lines.add_action(xfer.request,
                                   ActionsManage.get_action_url(
                                       'accounting.EntryAccount', 'Close',
                                       xfer),
                                   modal=FORMTYPE_MODAL,
                                   unique=SELECT_MULTI,
                                   close=CLOSE_NO)
        link_grid_lines.add_action(xfer.request,
                                   ActionsManage.get_action_url(
                                       'accounting.EntryAccount', 'Link',
                                       xfer),
                                   modal=FORMTYPE_MODAL,
                                   unique=SELECT_MULTI,
                                   close=CLOSE_NO)

        partition = xfer.get_components('partition')
        partition.actions = []
        partition.description = _("current class loads")
        partition.delete_header('owner')
        lots = xfer.get_components('propertylot')
        lots.actions = []
        lots.delete_header('owner')
        xfer.get_components('payoff').colspan = 2
        callfunds = xfer.get_components('callfunds')
        callfunds.actions = []
        callfunds.colspan = 2
        callfunds.add_action(xfer.request,
                             ActionsManage.get_action_url(
                                 'condominium.CallFunds', 'Show', xfer),
                             close=CLOSE_NO,
                             unique=SELECT_SINGLE)

        xfer.tab = callfunds.tab
        row = xfer.get_max_row() + 1
        btn = XferCompButton('add_multipayoff')
        btn.set_location(callfunds.col, row)
        btn.set_action(xfer.request,
                       ActionsManage.get_action_url('condominium.Owner',
                                                    'MultiPay', xfer),
                       modal=FORMTYPE_MODAL,
                       close=CLOSE_NO)
        xfer.add_component(btn)
        btn = XferCompButton('add_ventilatePayoff')
        btn.set_location(callfunds.col + 1, row)
        btn.set_action(xfer.request,
                       ActionsManage.get_action_url('condominium.Owner',
                                                    'VentilatePay', xfer),
                       modal=FORMTYPE_MODAL,
                       close=CLOSE_NO)
        xfer.add_component(btn)