A couple of questions

3 messages Options
Embed this post
Permalink
erikcederstrand

A couple of questions

Reply Threaded More More options
Print post
Permalink
Well, I got a couple of encouragements on my previous mai, so here goes. If you feel the need to tell me to RTFM, a relevant link would be nice :-)

Overview:
-------------
I want to migrate http://vandreklub.dk to Plone. It's a community site with about 250 users. I'd like to build on Plone 3.0, since it's out soon anyway, and (among other things) the Content Rule feature answers some of my problems with 2.5. To begin with, I have 2 use cases I'd like some suggestions to:



1. Membership fees
--------------------------
Members of the club pay a yearly fee to the club. The cashier must regularly search for members that have not paid the fee this year, and send email reminders to those who have not yet paid. Also, members need an overview of the fees they have paid until now. The actual money is handled by netbanking, but I'd like to track payments on the website.

The way it's solved in the old website is for the cashier to manually add payments to a list of payments related to the member. An SQL is run to identify non-paying members who have not already recieved a reminder, update the list with a reminder object and send an email to the member.

I've used ArgoUML /ArchGenXML to create two custom content types: "payment" and "reminder" to be placed in membership folders. This would allow memers to see their payments, and it would link a payment to a member. The idea was to have the cashier add a payment object to the member's folder when a payment is recieved in the bank (this solution would be ok). But reminders need to be handled more automatically, since sometimes 100 reminders must be created when a payment deadline expires. So, how do I e.g. search for membership folders not containing a payment marked "2007", automatically add a reminder object to the folder and send an email to the offending member?

I have also looked at the commerce products to try to exploit the customer/invoice analogy of this use case. However, I didn't find anything which seemed to do what I want.



2. Letters
-------------
When new members arrive, we send a letter by snail mail with various information. A frontpage should be generated, ready for printing, with the address of the member, a predetermined text and the name and contact info of the person in charge of members.

The old homepage generates an RTF file with a layout so the address fits with those envelopes with a window. If multiple letters need to be sent, the pages are concatenated so there is only one file to print.

Is it possible to generate an RTF or PDF file using Plone?


That's all for now,
Erik
Malthe Borch-2

Re: A couple of questions

Reply Threaded More More options
Print post
Permalink
> I've used ArgoUML /ArchGenXML to create two custom content types: "payment"
> and "reminder" to be placed in membership folders. This would allow memers
> to see their payments, and it would link a payment to a member.

You might want to consider if having paid is "content" or if it's
actually metadata. That said, the remember-product
(http://plone.org/products/remember) lets you annotate various
information onto a member.

> (...) But reminders
> need to be handled more automatically, since sometimes 100 reminders must be
> created when a payment deadline expires. So, how do I e.g. search for
> membership folders not containing a payment marked "2007", automatically add
> a reminder object to the folder and send an email to the offending member?

The membrane-tool (which remember builds on) has a catalog built-in I
think, which you could query using a boolean expression. Something
like this (untested obviously):

some_membrane_catalog({'query': received_payment, 'operator': 'not'})

This assumes received_payment is a KeywordIndex that you've somehow
added and that it connects to some annotated field that you set up
using remember.

Note that you probably don't want to create a reminder-object. Why
would you? You can send out a reminder without creating an object and
you don't have to remember that you did since the rule is that you
always send out reminders (you state it should be automatic).

> Is it possible to generate an RTF or PDF file using Plone?

If you're on linux then there should be plenty of tools that can
convert HTML-documents into PDF. That's probably the easiest. You
could create a Zope 3 view, connect it to a template and in the
__call__-method, put something like:

def __call__(self):
  mime_type = 'application/pdf'
  my_template_result = self.index()
  pdf_data = my_html2pdf_function(my_template)
  return pdf_data

or you could skip some steps and just attach the generated pdf to the
e-mail using some Python-library.

\malthe

_______________________________________________
Plone-Scandinavia mailing list
[hidden email]
http://lists.plone.org/mailman/listinfo/plone-scandinavia
erikcederstrand

Re: A couple of questions

Reply Threaded More More options
Print post
Permalink
Malthe Borch wrote:
>> I've used ArgoUML /ArchGenXML to create two custom content types:
>> "payment" and "reminder" to be placed in membership folders. This
>> would allow memers to see their payments, and it would link a
>> payment to a member.
>
> You might want to consider if having paid is "content" or if it's
> actually metadata. That said, the remember-product [...]

I need to store multiple paments for one member, and each payment has
some metadata attached - netbank id, registration date, amount paid etc.
It's more than just a has_payed boolean, so I think a payment should be
an object in itself.

> Note that you probably don't want to create a reminder-object. Why
> would you? You can send out a reminder without creating an object and
>  you don't have to remember that you did since the rule is that you
> always send out reminders (you state it should be automatic).

I want to store the fact that a reminder has been sent, so the member
desn't get multiple reminders, and so members with unanswered reminders
can be deleted at some point. I'd like the payment system to be somewhat
independent on the member objects, so it can more easily be changed.

>> Is it possible to generate an RTF or PDF file using Plone?
>
> If you're on linux then there should be plenty of tools that can
> convert HTML-documents into PDF. That's probably the easiest. You
> could create a Zope 3 view, connect it to a template and in the
> __call__-method, put something like:
>
> def __call__(self): mime_type = 'application/pdf' my_template_result
>  = self.index() pdf_data = my_html2pdf_function(my_template) return
> pdf_data
>
> or you could skip some steps and just attach the generated pdf to the
>  e-mail using some Python-library.

Thanks for the ideas. Googling around I found CMFReportTool and the
ReportLab PDF library which look promising.

Erik

_______________________________________________
Plone-Scandinavia mailing list
[hidden email]
http://lists.plone.org/mailman/listinfo/plone-scandinavia