[IMP] account: improve msg formatting and revert the changes for due date calculation
bzr revid: psi@tinyerp.com-20120508084549-3wd5dcnla6lgvvsy
This commit is contained in:
parent
a250b25200
commit
67a37d807c
|
@ -469,16 +469,10 @@ class account_invoice(osv.osv):
|
|||
def onchange_payment_term_date_invoice(self, cr, uid, ids, payment_term_id, date_invoice):
|
||||
res = {}
|
||||
if not payment_term_id:
|
||||
if date_invoice:
|
||||
res = {'value':{'date_due': date_invoice}}
|
||||
else:
|
||||
res = {'value':{'date_due': time.strftime('%Y-%m-%d')}}
|
||||
return res
|
||||
if not date_invoice:
|
||||
date_invoice = time.strftime('%Y-%m-%d')
|
||||
|
||||
pterm_list = self.pool.get('account.payment.term').compute(cr, uid, payment_term_id, value=1, date_ref=date_invoice)
|
||||
|
||||
if pterm_list:
|
||||
pterm_list = [line[0] for line in pterm_list]
|
||||
pterm_list.sort()
|
||||
|
|
|
@ -39,11 +39,11 @@ class res_company(osv.osv):
|
|||
|
||||
_defaults = {
|
||||
'expects_chart_of_accounts': True,
|
||||
'overdue_msg': '''Our records indicate that the payments on your account are still due. Please find details below.
|
||||
If the amount has already been paid, please disregard this notice. Otherwise, please forward us
|
||||
the total amount stated below. If you have any queries regarding your account, Please contact us.
|
||||
\nThank you in advance for your cooperation.
|
||||
'''
|
||||
'overdue_msg': '''Our records indicate that the payments on your account are still due. Please find details below.\n
|
||||
\nIf the amount has already been paid, please disregard this notice.
|
||||
\nOtherwise, please forward us the total amount stated below.
|
||||
\nIf you have any queries regarding your account, Please contact us.
|
||||
\nThank you in advance for your cooperation.'''
|
||||
}
|
||||
|
||||
res_company()
|
||||
|
|
|
@ -83,6 +83,7 @@
|
|||
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_10" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="2.0"/>
|
||||
<paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
|
@ -157,7 +158,7 @@
|
|||
<para style="terp_default_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="terp_default_9">[[ not getLines(o) and removeParentNode('para') or message(o, company) ]]</para>
|
||||
<para style="terp_default_10">[[ not getLines(o) and removeParentNode('para') or message(o, company) ]]</para>
|
||||
<para style="terp_default_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
|
@ -165,7 +166,7 @@
|
|||
<para style="terp_default_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="terp_default_9">[[ not getLines(o) and removeParentNode('para') or 'Best regards.']]</para>
|
||||
<para style="terp_default_9">[[ not getLines(o) and removeParentNode('para') or 'Best regards,']]</para>
|
||||
<para style="terp_default_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
|
|
Loading…
Reference in New Issue