Ignore:
Timestamp:
24 Nov 2014, 12:33:13 (10 years ago)
Author:
Henrik Bettermann
Message:

Render datatable on pdf slip.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.ikoba/trunk/src/waeup/ikoba/customers/browser.py

    r12051 r12052  
    950950            + ' %s' % self.context.display_fullname
    951951
     952    @property
     953    def tabletitle(self):
     954        portal_language = getUtility(IIkobaUtils).PORTAL_LANGUAGE
     955        tabletitle = []
     956        tabletitle.append(translate(_('Customer Documents'), 'waeup.ikoba',
     957            target_language=portal_language))
     958        return tabletitle
     959
    952960    def render(self):
     961        portal_language = getUtility(IIkobaUtils).PORTAL_LANGUAGE
     962        Id = translate(_('Document Id'), 'waeup.ikoba', target_language=portal_language)
     963        Title = translate(_('Title'), 'waeup.ikoba', target_language=portal_language)
     964        State = translate(_('State'), 'waeup.ikoba', target_language=portal_language)
     965        tabledata = []
     966        tableheader = []
     967        contenttitle = []
     968        for i in range(1,3):
     969            tabledata.append(sorted(
     970                [value for value in self.context['documents'].values()]))
     971            tableheader.append([(Id, 'document_id', 3),
     972                             (Title, 'title', 8),
     973                             (State, 'translated_state', 3),
     974                             ])
    953975        customerview = CustomerBasePDFFormPage(self.context,
    954976            self.request, self.omit_fields)
     
    957979            self, 'overview_slip.pdf',
    958980            self.context, customerview,
     981            tableheader=tableheader,
     982            tabledata=tabledata,
    959983            omit_fields=self.omit_fields)
Note: See TracChangeset for help on using the changeset viewer.