followp modifs

bzr revid: mra@tinyerp.com-20090128151019-cxkmi6765wi641by
This commit is contained in:
mra (Open ERP) 2009-01-28 20:40:19 +05:30
parent 645eb15ebf
commit da186d6387
3 changed files with 40 additions and 61 deletions

View File

@ -15,9 +15,13 @@
<field name="delay">15</field>
<field name="followup_id" ref="demo_followup1"/>
<field name="description">
Dear %(partner_name)s,
Exception made if there was a mistake of ours, it seems that the following amount staid unpaid. Please, take appropriate measures in order to carry out this payment in the next 8 days.
Would your payment have been carried out after this mail was sent, please consider the present one as void. Do not hesitate to contact our accounting department at (+32).10.68.94.39.
Best Regards,
</field>
</record>
@ -28,6 +32,8 @@ Would your payment have been carried out after this mail was sent, please consid
<field name="delay">30</field>
<field name="followup_id" ref="demo_followup1"/>
<field name="description">
Dear %(partner_name)s,
We are disappointed to see that despite sending a reminder, that your account is now seriously overdue.
It is essential that immediate payment is made, otherwise we will have to consider placing a stop on your account which means that we will no longer be able to supply your company with (goods/services).
@ -36,6 +42,8 @@ Please, take appropriate measures in order to carry out this payment in the next
If there is a problem with paying invoice that we are not aware of, do not hesitate to contact our accounting department at (+32).10.68.94.39. so that we can resolve the matter quickly.
Details of due payments is printed below.
Best Regards,
</field>
</record>
@ -46,6 +54,8 @@ Details of due payments is printed below.
<field name="delay">45</field>
<field name="followup_id" ref="demo_followup1"/>
<field name="description">
Dear %(partner_name)s,
Despite several reminders, your account is still not settled.
Unless full payment is made in next 8 days , then legal action for the recovery of the debt, will be taken without further notice.
@ -53,6 +63,8 @@ Unless full payment is made in next 8 days , then legal action for the recovery
I trust that this action will prove unnecessary and details of due payments is printed below.
In case of any queries concerning this matter, do not hesitate to contact our accounting department at (+32).10.68.94.39.
Best Regards,
</field>
</record>

View File

@ -14,10 +14,6 @@
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Table3">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Table1">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
@ -31,7 +27,6 @@
<blockBackground colorName="#e6e6e6" start="6,0" stop="6,0"/>
<blockBackground colorName="#e6e6e6" start="7,0" stop="7,0"/>
<blockBackground colorName="#e6e6e6" start="8,0" stop="8,0"/>
<blockBackground colorName="#e6e6e6" start="9,0" stop="9,0"/>
</blockTableStyle>
<blockTableStyle id="Table2">
<blockAlignment value="LEFT"/>
@ -44,7 +39,7 @@
<paraStyle name="P1" fontName="Times-Roman" fontSize="11.0" leading="14"/>
<paraStyle name="P2" fontName="Times-Roman" fontSize="11.0" leading="14"/>
<paraStyle name="P3" fontName="Times-Roman" fontSize="11.0" leading="14"/>
<paraStyle name="P4" fontName="Times-Roman" alignment="LEFT"/>
<paraStyle name="P4" fontName="Times-Roman" fontSize="11.0" leading="14" alignment="LEFT"/>
<paraStyle name="P5" fontName="Times-Roman" fontSize="14.0" leading="17" alignment="CENTER"/>
<paraStyle name="P6" fontName="Times-Roman" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P7" fontName="Times-Roman" fontSize="6.0" leading="8" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
@ -57,13 +52,13 @@
<paraStyle name="P14" fontName="Times-Roman" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P15" fontName="Times-Roman" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P16" fontName="Times-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P17" fontName="Times-Roman" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P18" fontName="Times-Roman" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P17" fontName="Times-Roman" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P18" fontName="Times-Roman" alignment="LEFT"/>
<paraStyle name="P19" fontName="Times-Roman" fontSize="11.0" leading="14"/>
<paraStyle name="P20" fontName="Times-Roman" fontSize="11.0" leading="14" alignment="LEFT"/>
<paraStyle name="P21" fontName="Times-Roman" fontSize="11.0" leading="14"/>
<paraStyle name="P20" fontName="Times-Roman" fontSize="11.0" leading="14"/>
<paraStyle name="P21" fontName="Times-Roman" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P22" fontName="Times-Roman" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P23" fontName="Times-Roman" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P23" fontName="Times-Roman" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P24" fontName="Times-Roman" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Standard" fontName="Times-Roman"/>
<paraStyle name="Text body" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
@ -106,33 +101,14 @@
<font face="Times-Roman">[[ time.strftime('%d/%m/%Y') ]]</font>
</para>
<para style="P3"><font face="Times-Roman">Customer Ref:</font> [[ o.id ]]</para>
<para style="P3">
<font color="white"> </font>
</para>
<para style="P3">Dear [[ a['name'] ]], </para>
<para style="P19">
<font color="white"> </font>
</para>
<blockTable colWidths="18.0,492.0" style="Table3">
<tr>
<td>
<para style="P17">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P20">[[ format(get_text(o)) ]]</para>
</td>
</tr>
</blockTable>
<para style="P20">
<font color="white"> </font>
</para>
<para style="P20">Best Regards,</para>
<para style="P4">
<para style="P4">[[ format(get_text(o)) ]]</para>
<para style="P18">
<font color="white"> </font>
</para>
<blockTable colWidths="55.0,81.0,63.0,73.0,42.0,31.0,54.0,19.0,46.0,45.0" style="Table1">
<blockTable colWidths="49.0,92.0,58.0,70.0,57.0,52.0,56.0,55.0,20.0" style="Table1">
<tr>
<td>
<para style="P8">Date</para>
@ -155,14 +131,11 @@
<td>
<para style="P9">Maturity</para>
</td>
<td>
<para style="P9">Li.</para>
</td>
<td>
<para style="P9">Amount</para>
</td>
<td>
<para style="P9">cur.</para>
<para style="P9">Li.</para>
</td>
</tr>
<tr>
@ -182,43 +155,40 @@
<para style="P12">[[ line['date_maturity'] ]]</para>
</td>
<td>
<para style="P15">[[ line['debit'] and '%.2f' % line['debit'] or '' ]]</para>
<para style="P15">[[ line['debit'] and '%.2f' % line['debit'] or '' ]] [[ company.currency_id.name]] </para>
</td>
<td>
<para style="P13">[[ line['credit'] and '%.2f' % line['credit'] or '' ]]</para>
<para style="P13">[[ line['credit'] and '%.2f' % line['credit'] or '0.00' ]] <font face="Times-Roman">[[ company.currency_id.name]] </font></para>
</td>
<td>
<para style="P13">[[ (line['date_maturity'] &lt; time.strftime('%Y-%m-%d')) and (line['debit'] - line['credit']) or '' ]]</para>
<para style="P13">[[ (line['date_maturity'] &lt; time.strftime('%Y-%m-%d')) and (line['debit'] - line['credit']) or '' ]] <font face="Times-Roman">[[ company.currency_id.name]] </font></para>
</td>
<td>
<para style="P13">[[ '%.2f' % line['amount_currency'] ]] [[ line['currency_id'] and line['currency_id'][1] or '' ]] </para>
</td>
<td>
<para style="P13">[[ line['blocked'] and 'X' or '' ]]</para>
</td>
<td>
<para style="P13">[[ line['amount_currency'] ]]</para>
</td>
<td>
<para style="P13">[[ line['currency_id'] and line['currency_id'][1] or '' ]] </para>
</td>
</tr>
</blockTable>
<blockTable colWidths="273.0,41.0,31.0,54.0,110.0" style="Table2">
<blockTable colWidths="270.0,57.0,52.0,56.0,76.0" style="Table2">
<tr>
<td>
<para style="P16">Sub-Total: </para>
</td>
<td>
<para style="P16">[[ '%.2f' % (reduce(lambda x,y: x+y['debit'], getLines(o), 0)) ]]</para>
<para style="P16">[[ '%.2f' % (reduce(lambda x,y: x+y['debit'], getLines(o), 0)) ]] [[ company.currency_id.name]] </para>
</td>
<td>
<para style="P13">
<font face="Times-Bold">[[ '%.2f' % (reduce(lambda x,y: x+y['credit'], getLines(o), 0)) ]]</font>
<para style="P24">
<font face="Times-Roman">[[ '%.2f' % (reduce(lambda x,y: x+y['credit'], getLines(o), 0)) ]] [[ company.currency_id.name]] </font>
</para>
</td>
<td>
<para style="P15">[[ reduce(lambda x,y: x+(y['debit'] - y['credit']), filter(lambda x: x['date_maturity'] &lt; time.strftime('%Y-%m-%d'), getLines(o)), 0) ]]</para>
<para style="P15">[[ reduce(lambda x,y: x+(y['debit'] - y['credit']), filter(lambda x: x['date_maturity'] &lt; time.strftime('%Y-%m-%d'), getLines(o)), 0) ]] [[ company.currency_id.name]] </para>
</td>
<td>
<para style="P18">
<para style="P17">
<font color="white"> </font>
</para>
</td>
@ -228,7 +198,7 @@
<para style="P16">Balance: </para>
</td>
<td>
<para style="P16">[[ '%.2f' % (reduce(lambda x,y: x+(y['debit'] - y['credit']), getLines(o), 0)) ]]</para>
<para style="P16">[[ '%.2f' % (reduce(lambda x,y: x+(y['debit'] - y['credit']), getLines(o), 0)) ]] <font face="Times-Roman">[[ company.currency_id.name]] </font></para>
</td>
<td>
<para style="P14">
@ -241,7 +211,7 @@
</para>
</td>
<td>
<para style="P18">
<para style="P17">
<font color="white"> </font>
</para>
</td>
@ -251,11 +221,7 @@
<font color="white"> </font>
</para>
<para style="P2">
<font face="Times-Roman">Total amount due: </font>
<font face="Times-Roman">[[ '%.2f' % (reduce(lambda x,y: x+(y['debit']-y['credit']), getLines(o), 0)) ]] [[ company.currency_id.name]].</font>
</para>
<para style="P2">
<font color="white"> </font>
<font face="Times-Roman"/>
</para>
</story>
</document>

View File

@ -61,10 +61,10 @@ class report_rappel(report_sxw.rml_parse):
movelines = moveline_obj.read(self.cr, self.uid, movelines)
return movelines
def _get_text(self, data):
def _get_text(self, partner):
text = ""
a = {}
partner_line = pooler.get_pool(self.cr.dbname).get('account.move.line').search(self.cr, self.uid, [('partner_id','=',data.id)])
partner_line = pooler.get_pool(self.cr.dbname).get('account.move.line').search(self.cr, self.uid, [('partner_id','=',partner.id)])
for i in pooler.get_pool(self.cr.dbname).get('account.move.line').browse(self.cr, self.uid, partner_line):
if i.followup_line_id and str(i.followup_line_id.delay)=='45':
text = i.followup_line_id.description
@ -76,6 +76,7 @@ class report_rappel(report_sxw.rml_parse):
text = i.followup_line_id.description
a['15'] = text
text = (a.has_key('45') and a['45']) or (a.has_key('30') and a['30']) or (a.has_key('15') and a['15'])
text = text % {'partner_name':partner.name}
return text