Merge lp:~hector-cantu/bias-trunk/bias_trunk_cheque_banorte into lp:~openbias/bias-trunk/bias_trunk_v61

Proposed by Hector Cantu
Status: Merged
Merged at revision: 387
Proposed branch: lp:~hector-cantu/bias-trunk/bias_trunk_cheque_banorte
Merge into: lp:~openbias/bias-trunk/bias_trunk_v61
Diff against target: 127 lines (+20/-21)
3 files modified
bias_customization_exim/payment/report/print_cheque_entry.py (+4/-5)
bias_customization_exim/payment/report/print_cheque_entry_lodi.rml (+5/-14)
bias_tools/text.py (+11/-2)
To merge this branch: bzr merge lp:~hector-cantu/bias-trunk/bias_trunk_cheque_banorte
Reviewer Review Type Date Requested Status
OpenBias Approve
Review via email: mp+124304@code.launchpad.net

Description of the change

Se agrego en el text.py de bias tools la funcion get_money_code, se corrigio el que aparezca el importe en letra en el cheque, en bias_customization_exim el print_cheque_lodi se modifico un poco el formato de cheque banorte en cuanto a alineacion.

To post a comment you must log in.
Revision history for this message
OpenBias (openbias) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bias_customization_exim/payment/report/print_cheque_entry.py'
2--- bias_customization_exim/payment/report/print_cheque_entry.py 2012-08-28 14:03:33 +0000
3+++ bias_customization_exim/payment/report/print_cheque_entry.py 2012-09-13 21:38:21 +0000
4@@ -32,7 +32,7 @@
5 super(print_cheque, self).__init__(cr, uid, name, context)
6 self.localcontext.update({
7 'time': time,
8- 'text': self._text,
9+ 'texto1': self._text1,
10 'date_sp': text.date_sp,
11 'moneyfmt': text.moneyfmt,
12 'total_debit': self._total_debit,
13@@ -42,15 +42,14 @@
14
15 })
16 #[[ texto(int(o.amount)) ]] [[ o.mode.journal.currency.name ]] [[ ('%.2f' % o.amount)[-2:] ]]/100 [[ o.mode.journal.currency.code ]]
17- def _text(self, obj):
18+ def _text1(self, obj):
19 #currency_name = {'MN':'PESOS','USD':'DOLLAR','EUR':'EUROS'}
20- print 'currency_name',currency_name
21 amount = text.text(int(obj.amount)) + ' '
22 currency_name = obj.mode.journal.currency.name
23 if not currency_name:
24 currency_name = obj.mode.journal.company_id.currency_id.name
25- amount = amount + currency_name + ' '
26- amount = amount + ('%.2f' % obj.amount)[-2:] +'/100 '+ text.get_money_code(currency_name)
27+ a = ('%.2f' % obj.amount)[-2:] +'/100 '
28+ amount = amount + currency_name + ' ' + str(a) + text.get_money_code(currency_name)
29 return amount
30
31 def _get_name(self, obj, line):
32
33=== modified file 'bias_customization_exim/payment/report/print_cheque_entry_lodi.rml'
34--- bias_customization_exim/payment/report/print_cheque_entry_lodi.rml 2012-08-28 14:03:33 +0000
35+++ bias_customization_exim/payment/report/print_cheque_entry_lodi.rml 2012-09-13 21:38:21 +0000
36@@ -2,7 +2,7 @@
37 <document filename="test.pdf">
38 <template pageSize="(612.0,792.0)" title="Test" author="Martin Simon" allowSplitting="20">
39 <pageTemplate id="first">
40- <frame id="first" x1="15.0" y1="4.0" width="578" height="765"/>
41+ <frame id="first" x1="15.0" y1="4.0" width="578" height="775"/>
42 </pageTemplate>
43 </template>
44 <stylesheet>
45@@ -87,7 +87,7 @@
46 <paraStyle name="P28" fontName="Times-Roman" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
47 <paraStyle name="P29" fontName="Times-Roman" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
48 <paraStyle name="P30" fontName="Times-Roman" fontSize="4.0" leading="5" spaceBefore="0.0" spaceAfter="0.0"/>
49- <paraStyle name="P301" fontName="Times-Roman" fontSize="3.0" leading="4" spaceBefore="0.0" spaceAfter="0.0"/>
50+ <paraStyle name="P301" fontName="Times-Roman" fontSize="4.0" leading="5" spaceBefore="0.0" spaceAfter="0.0"/>
51 <paraStyle name="P31" fontName="Times-Roman" fontSize="13.0" leading="16" spaceBefore="0.0" spaceAfter="0.0"/>
52 <paraStyle name="P311" fontName="Times-Roman" fontSize="14.0" leading="17" spaceBefore="0.0" spaceAfter="0.0"/>
53 <paraStyle name="P111" fontName="Times-Roman" fontSize="9.0" leading="11" spaceBefore="0.0" spaceAfter="0.0"/>
54@@ -110,15 +110,6 @@
55 <images/>
56 <story>
57 <para style="P35">[[ repeatIn(objects,'o') ]]</para>
58- <para style="P36">
59- <font color="white"> </font>
60- </para>
61- <para style="P36">
62- <font color="white"> </font>
63- </para>
64- <para style="P36">
65- <font color="white"> </font>
66- </para>
67 <blockTable colWidths="442.0,105.0,30.0" style="Tabla5">
68 <tr>
69 <td>
70@@ -127,7 +118,7 @@
71 </para>
72 </td>
73 <td>
74- <para style="P9">[[ time.strftime('%d-%b-%Y', time.strptime(o.date,'%Y-%m-%d'))]]</para>
75+ <para style="P9">[[ date_sp(o.date,3)]]</para>
76 </td>
77 <td>
78 <para style="P9">
79@@ -171,7 +162,7 @@
80 <blockTable colWidths="577.0" style="Tabla10">
81 <tr>
82 <td>
83- <para style="P7">[[ text(o) ]]</para>
84+ <para style="P7">[[ texto1(o) ]]</para>
85 </td>
86 </tr>
87 </blockTable>
88@@ -284,7 +275,7 @@
89 </td>
90 </tr>
91 </blockTable>
92- <blockTable colWidths="577.0" rowHeights="12.9cm" style="Tabla222">
93+ <blockTable colWidths="577.0" rowHeights="14.2cm" style="Tabla222">
94 <tr>
95 <td>
96 <blockTable colWidths="57.0,70.0,195.0,91.0,82.0,82.0" style="Tabla14">
97
98=== modified file 'bias_tools/text.py'
99--- bias_tools/text.py 2012-08-15 17:32:51 +0000
100+++ bias_tools/text.py 2012-09-13 21:38:21 +0000
101@@ -168,7 +168,7 @@
102 }
103
104 centaine = {
105- 0:'', 1: 'CIEN', 2:'DOCIENTOS', 3:'TRECIENTOS',4:'CUATROCIENTOS', 5:'QUINIENTOS', 6:'SEISCIENTOS', 7:'SETECIENTOS',
106+ 0:'', 1: 'CIEN', 2:'DOSCIENTOS', 3:'TRESCIENTOS',4:'CUATROCIENTOS', 5:'QUINIENTOS', 6:'SEISCIENTOS', 7:'SETECIENTOS',
107 8:'OCHOCIENTOS', 9:'NOVECIENTOS'
108 }
109
110@@ -233,7 +233,16 @@
111 return code
112 return my_name[code][fmt]
113
114-
115+def get_money_code(name):
116+ my_name = {'PESOS':'MN',
117+ 'Pesos':'MN',
118+ 'DOLARES AMERICANOS':'USD',
119+ 'Dolares Americanos':'USD',}
120+ if my_name.get(name, False):
121+ return my_name[name]
122+ else:
123+ return name
124+ return my_name[name]
125
126 def convert_value( value, context={}):
127 if not value:

Subscribers

People subscribed via source and target branches