Merge lp:~nch-openerp/openobject-addons/addons_5stable into lp:openobject-addons/5.0
- addons_5stable
- Merge into 5.0
Proposed by
Naresh(OpenERP)
Status: | Merged |
---|---|
Merged at revision: | not available |
Proposed branch: | lp:~nch-openerp/openobject-addons/addons_5stable |
Merge into: | lp:openobject-addons/5.0 |
Diff against target: | None lines |
To merge this branch: | bzr merge lp:~nch-openerp/openobject-addons/addons_5stable |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
OpenERP Core Team | Pending | ||
Review via email: mp+6465@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote : | # |
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'account/report/account_balance.rml' | |||
2 | --- account/report/account_balance.rml 2009-04-14 09:06:55 +0000 | |||
3 | +++ account/report/account_balance.rml 2009-05-12 12:04:06 +0000 | |||
4 | @@ -57,9 +57,12 @@ | |||
5 | 57 | <lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/> | 57 | <lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/> |
6 | 58 | </blockTableStyle> | 58 | </blockTableStyle> |
7 | 59 | <blockTableStyle id="Table2"> | 59 | <blockTableStyle id="Table2"> |
8 | 60 | <blockValign value="TOP"/> | ||
9 | 61 | <blockAlignment value="RIGHT"/> | ||
10 | 60 | <lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/> | 62 | <lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/> |
13 | 61 | <blockValign value="TOP"/> | 63 | <lineStyle kind="LINEBELOW" colorName="#000000" start="0,1" stop="-1,1"/> |
14 | 62 | <blockAlignment value="RIGHT" start="2,1" stop="-1,-1"/> | 64 | <lineStyle kind="LINEBELOW" colorName="#000000" start="0,2" stop="-1,-1"/> |
15 | 65 | |||
16 | 63 | </blockTableStyle> | 66 | </blockTableStyle> |
17 | 64 | <blockTableStyle id="Table3"> | 67 | <blockTableStyle id="Table3"> |
18 | 65 | <blockAlignment value="LEFT"/> | 68 | <blockAlignment value="LEFT"/> |
19 | @@ -85,17 +88,18 @@ | |||
20 | 85 | <initialize> | 88 | <initialize> |
21 | 86 | <paraStyle name="all" alignment="justify"/> | 89 | <paraStyle name="all" alignment="justify"/> |
22 | 87 | </initialize> | 90 | </initialize> |
26 | 88 | <paraStyle name="P1" fontName="Helvetica" fontSize="20.0" leading="25" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/> | 91 | <paraStyle name="P1" fontName="Helvetica-Bold" fontSize="20.0" leading="25" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/> |
27 | 89 | <paraStyle name="P2" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/> | 92 | <paraStyle name="P2" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/> |
28 | 90 | <paraStyle name="P3" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/> | 93 | <paraStyle name="P3" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/> |
29 | 91 | <paraStyle name="P10" fontName="Helvetica" fontSize="8.0" leading="14" spaceBefore="0.0" spaceAfter="6.0" alignment="RIGHT"/> | 94 | <paraStyle name="P10" fontName="Helvetica" fontSize="8.0" leading="14" spaceBefore="0.0" spaceAfter="6.0" alignment="RIGHT"/> |
30 | 92 | <paraStyle name="P9" fontName="Helvetica-Bold" alignment="CENTER" fontSize="14.5" leftIndent="-5.0"/> | 95 | <paraStyle name="P9" fontName="Helvetica-Bold" alignment="CENTER" fontSize="14.5" leftIndent="-5.0"/> |
31 | 93 | <paraStyle name="P9a" fontName="Helvetica-Bold" fontSize="9" leftIndent="0.0" alignment="LEFT"/> | 96 | <paraStyle name="P9a" fontName="Helvetica-Bold" fontSize="9" leftIndent="0.0" alignment="LEFT"/> |
32 | 94 | <paraStyle name="P9b" fontName="Helvetica" fontSize="9" leftIndent="0.0" alignment="LEFT"/> | 97 | <paraStyle name="P9b" fontName="Helvetica" fontSize="9" leftIndent="0.0" alignment="LEFT"/> |
33 | 95 | <paraStyle name="P9b" fontName="Helvetica" fontSize="8" leftIndent="-5.0" alignment="LEFT"/> | 98 | <paraStyle name="P9b" fontName="Helvetica" fontSize="8" leftIndent="-5.0" alignment="LEFT"/> |
35 | 96 | <paraStyle name="P12" fontName="Helvetica" fontSize="8.0" leading="14" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/> | 99 | <paraStyle name="P12" fontName="Helvetica-Bold" fontSize="8.0" leading="14" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/> |
36 | 97 | <paraStyle name="P12a" fontName="Helvetica" fontSize="8.0" leading="14" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/> | 100 | <paraStyle name="P12a" fontName="Helvetica" fontSize="8.0" leading="14" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/> |
38 | 98 | <paraStyle name="P14" rightIndent="17.0" leftIndent="-0.0" fontName="Helvetica" fontSize="8.0" leading="10" spaceBefore="0.0" spaceAfter="6.0"/> | 101 | <paraStyle name="P12b" fontName="Helvetica" fontSize="8.0" leading="14" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/> |
39 | 102 | <paraStyle name="P14" rightIndent="17.0" leftIndent="-0.0" fontName="Helvetica-Bold" fontSize="8.0" leading="10" spaceBefore="0.0" spaceAfter="6.0"/> | ||
40 | 99 | 103 | ||
41 | 100 | 104 | ||
42 | 101 | <blockTableStyle id="TrLevel"> | 105 | <blockTableStyle id="TrLevel"> |
43 | @@ -122,7 +126,6 @@ | |||
44 | 122 | fontSize="8.0" /> | 126 | fontSize="8.0" /> |
45 | 123 | <paraStyle | 127 | <paraStyle |
46 | 124 | name="Level2" | 128 | name="Level2" |
47 | 125 | |||
48 | 126 | fontName="Helvetica-Bold" | 129 | fontName="Helvetica-Bold" |
49 | 127 | fontSize="8.0" /> | 130 | fontSize="8.0" /> |
50 | 128 | <paraStyle name="Level1" | 131 | <paraStyle name="Level1" |
51 | @@ -158,7 +161,7 @@ | |||
52 | 158 | <para style="P12a">Code</para> | 161 | <para style="P12a">Code</para> |
53 | 159 | </td> | 162 | </td> |
54 | 160 | <td> | 163 | <td> |
56 | 161 | <para style="P12">Account</para> | 164 | <para style="P12b">Account</para> |
57 | 162 | </td> | 165 | </td> |
58 | 163 | <td> | 166 | <td> |
59 | 164 | <para style="P10">Debit</para> | 167 | <para style="P10">Debit</para> |
60 | @@ -173,11 +176,11 @@ | |||
61 | 173 | <tr> | 176 | <tr> |
62 | 174 | <td><para style="P14">[[ repeatIn(lines(data['form']), 'a') ]]<i>[[ a['code'] or removeParentNode('tr') ]]</i></para></td> | 177 | <td><para style="P14">[[ repeatIn(lines(data['form']), 'a') ]]<i>[[ a['code'] or removeParentNode('tr') ]]</i></para></td> |
63 | 175 | <td> | 178 | <td> |
64 | 176 | |||
65 | 177 | <para style="P14"> | 179 | <para style="P14"> |
66 | 180 | <font color="white">[[ ...*(a['level']) ]]</font> [[ a['name'] ]] | ||
67 | 178 | <font>[[ (a['level']<3 and setTag('tr','tr',{'style':'TrLevel'+str(a['level']), 'paraStyle':('Level'+str(a['level']))})) or removeParentNode('font') ]]</font> | 181 | <font>[[ (a['level']<3 and setTag('tr','tr',{'style':'TrLevel'+str(a['level']), 'paraStyle':('Level'+str(a['level']))})) or removeParentNode('font') ]]</font> |
68 | 179 | <font>[[ (a['level']>2 and setTag('tr','tr',{'style':'TrLevel', 'paraStyle':('Level')})) or removeParentNode('font') ]] </font> | 182 | <font>[[ (a['level']>2 and setTag('tr','tr',{'style':'TrLevel', 'paraStyle':('Level')})) or removeParentNode('font') ]] </font> |
70 | 180 | <font color="white">[[ '...'*(a['level']) ]]</font> [[ a['name'] ]]</para> | 183 | </para> |
71 | 181 | </td> | 184 | </td> |
72 | 182 | <td> | 185 | <td> |
73 | 183 | <para style="P3"><font>[[ a['type']=='view' and removeParentNode('font') ]][[ formatLang(a['debit']) ]]</font> | 186 | <para style="P3"><font>[[ a['type']=='view' and removeParentNode('font') ]][[ formatLang(a['debit']) ]]</font> |
74 | @@ -194,4 +197,4 @@ | |||
75 | 194 | </tr> | 197 | </tr> |
76 | 195 | </blockTable> | 198 | </blockTable> |
77 | 196 | </story> | 199 | </story> |
79 | 197 | </document> | 200 | </document> |
80 | 198 | \ No newline at end of file | 201 | \ No newline at end of file |
81 | 199 | 202 | ||
82 | === modified file 'account_invoice_layout/report/report_account_invoice_layout.py' | |||
83 | --- account_invoice_layout/report/report_account_invoice_layout.py 2009-04-06 14:35:41 +0000 | |||
84 | +++ account_invoice_layout/report/report_account_invoice_layout.py 2009-05-12 11:23:05 +0000 | |||
85 | @@ -1,7 +1,7 @@ | |||
86 | 1 | # -*- encoding: utf-8 -*- | 1 | # -*- encoding: utf-8 -*- |
87 | 2 | ############################################################################## | 2 | ############################################################################## |
88 | 3 | # | 3 | # |
90 | 4 | # OpenERP, Open Source Management Solution | 4 | # OpenERP, Open Source Management Solution |
91 | 5 | # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved | 5 | # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved |
92 | 6 | # $Id$ | 6 | # $Id$ |
93 | 7 | # | 7 | # |
94 | @@ -23,79 +23,17 @@ | |||
95 | 23 | import pooler | 23 | import pooler |
96 | 24 | from report import report_sxw | 24 | from report import report_sxw |
97 | 25 | 25 | ||
98 | 26 | parents = { | ||
99 | 27 | 'tr':1, | ||
100 | 28 | 'li':1, | ||
101 | 29 | 'story': 0, | ||
102 | 30 | 'section': 0 | ||
103 | 31 | } | ||
104 | 32 | |||
105 | 33 | class account_invoice_1(report_sxw.rml_parse): | 26 | class account_invoice_1(report_sxw.rml_parse): |
106 | 34 | def __init__(self, cr, uid, name, context): | 27 | def __init__(self, cr, uid, name, context): |
107 | 35 | super(account_invoice_1, self).__init__(cr, uid, name, context) | 28 | super(account_invoice_1, self).__init__(cr, uid, name, context) |
108 | 36 | self.localcontext.update({ | 29 | self.localcontext.update({ |
109 | 37 | 'time': time, | 30 | 'time': time, |
110 | 38 | 'invoice_lines': self.invoice_lines, | 31 | 'invoice_lines': self.invoice_lines, |
111 | 39 | 'repeat_In':self.repeat_In, | ||
112 | 40 | }) | 32 | }) |
113 | 41 | self.context = context | 33 | self.context = context |
168 | 42 | 34 | self._node = None | |
115 | 43 | def repeat_In(self, lst, name, nodes_parent=False,td=False,width=[],value=[],type=[]): | ||
116 | 44 | self._node.data = '' | ||
117 | 45 | node = self._find_parent(self._node, nodes_parent or parents) | ||
118 | 46 | ns = node.nextSibling | ||
119 | 47 | |||
120 | 48 | value=['tax_types','quantity','uos','price_unit','discount','price_subtotal','currency'] | ||
121 | 49 | type=['string','string','string','string','string','string','string'] | ||
122 | 50 | width=[62,38,29,67,53,53,27] | ||
123 | 51 | td=7 | ||
124 | 52 | |||
125 | 53 | tableFlag=0 | ||
126 | 54 | |||
127 | 55 | if not lst: | ||
128 | 56 | lst.append(1) | ||
129 | 57 | for ns in node.childNodes : | ||
130 | 58 | if tableFlag==1: | ||
131 | 59 | break | ||
132 | 60 | if ns and ns.nodeName!='#text' and ns.tagName=='blockTable' and td : | ||
133 | 61 | tableFlag=1 | ||
134 | 62 | |||
135 | 63 | width_str = ns._attrs['colWidths'].nodeValue | ||
136 | 64 | ns.removeAttribute('colWidths') | ||
137 | 65 | total_td = td * len(value) | ||
138 | 66 | |||
139 | 67 | if not width: | ||
140 | 68 | for v in value: | ||
141 | 69 | width.append(30) | ||
142 | 70 | for v in range(len(value)): | ||
143 | 71 | width_str +=',%d'%width[v] | ||
144 | 72 | |||
145 | 73 | ns.setAttribute('colWidths',width_str) | ||
146 | 74 | |||
147 | 75 | child_list = ns.childNodes | ||
148 | 76 | |||
149 | 77 | for child in child_list: | ||
150 | 78 | if child.nodeName=='tr': | ||
151 | 79 | lc = child.childNodes[1] | ||
152 | 80 | # for t in range(td): | ||
153 | 81 | i=0 | ||
154 | 82 | for v in value: | ||
155 | 83 | t2="[[%s['type']=='text' and removeParentNode('tr')]]"%(name) | ||
156 | 84 | t1= "[[ %s['%s'] ]]"%(name,v) | ||
157 | 85 | t3="[[ %s['type']=='subtotal' and ( setTag('para','para',{'fontName':'Times-bold'})) ]]"%name | ||
158 | 86 | newnode = lc.cloneNode(1) | ||
159 | 87 | |||
160 | 88 | newnode.childNodes[1].lastChild.data = t1 + t2 +t3 | ||
161 | 89 | # newnode.childNodes[1].lastChild.data=[[ a['status']==1 and ( setTag('para','para',{'fontName':'Times-bold'})) ]] | ||
162 | 90 | child.appendChild(newnode) | ||
163 | 91 | newnode=False | ||
164 | 92 | i+=1 | ||
165 | 93 | |||
166 | 94 | |||
167 | 95 | return super(account_invoice_1,self).repeatIn(lst, name, nodes_parent=False) | ||
169 | 96 | 35 | ||
170 | 97 | def invoice_lines(self,invoice): | 36 | def invoice_lines(self,invoice): |
171 | 98 | |||
172 | 99 | result =[] | 37 | result =[] |
173 | 100 | sub_total={} | 38 | sub_total={} |
174 | 101 | info=[] | 39 | info=[] |
175 | @@ -107,7 +45,6 @@ | |||
176 | 107 | for id in range(0,len(ids)): | 45 | for id in range(0,len(ids)): |
177 | 108 | info = self.pool.get('account.invoice.line').browse(self.cr, self.uid,ids[id], self.context.copy()) | 46 | info = self.pool.get('account.invoice.line').browse(self.cr, self.uid,ids[id], self.context.copy()) |
178 | 109 | list_in_seq[info]=info.sequence | 47 | list_in_seq[info]=info.sequence |
179 | 110 | # invoice_list +=[info] | ||
180 | 111 | i=1 | 48 | i=1 |
181 | 112 | j=0 | 49 | j=0 |
182 | 113 | final=sorted(list_in_seq.items(), lambda x, y: cmp(x[1], y[1])) | 50 | final=sorted(list_in_seq.items(), lambda x, y: cmp(x[1], y[1])) |
183 | @@ -116,11 +53,9 @@ | |||
184 | 116 | sum_flag[j]=-1 | 53 | sum_flag[j]=-1 |
185 | 117 | for entry in invoice_list: | 54 | for entry in invoice_list: |
186 | 118 | res={} | 55 | res={} |
187 | 119 | |||
188 | 120 | if entry.state=='article': | 56 | if entry.state=='article': |
189 | 121 | self.cr.execute('select tax_id from account_invoice_line_tax where invoice_line_id=%s', (entry.id,)) | 57 | self.cr.execute('select tax_id from account_invoice_line_tax where invoice_line_id=%s', (entry.id,)) |
190 | 122 | tax_ids=self.cr.fetchall() | 58 | tax_ids=self.cr.fetchall() |
191 | 123 | |||
192 | 124 | if tax_ids==[]: | 59 | if tax_ids==[]: |
193 | 125 | res['tax_types']='' | 60 | res['tax_types']='' |
194 | 126 | else: | 61 | else: |
195 | @@ -187,14 +122,14 @@ | |||
196 | 187 | res['price_subtotal']='' | 122 | res['price_subtotal']='' |
197 | 188 | res['currency']='' | 123 | res['currency']='' |
198 | 189 | elif entry.state=='line': | 124 | elif entry.state=='line': |
200 | 190 | res['quantity']='____________' | 125 | res['quantity']='_______________' |
201 | 191 | res['price_unit']='______________' | 126 | res['price_unit']='______________' |
202 | 192 | res['discount']='____________' | 127 | res['discount']='____________' |
204 | 193 | res['tax_types']='_________________' | 128 | res['tax_types']='____________________' |
205 | 194 | res['uos']='_____' | 129 | res['uos']='_____' |
209 | 195 | res['name']='________________________________________' | 130 | res['name']='_______________________________________________' |
210 | 196 | res['price_subtotal']='_______________________' | 131 | res['price_subtotal']='____________' |
211 | 197 | res['currency']='_______' | 132 | res['currency']='____' |
212 | 198 | elif entry.state=='break': | 133 | elif entry.state=='break': |
213 | 199 | res['type']=entry.state | 134 | res['type']=entry.state |
214 | 200 | res['name']=entry.name | 135 | res['name']=entry.name |
215 | 201 | 136 | ||
216 | === modified file 'account_invoice_layout/report/report_account_invoice_layout.rml' | |||
217 | --- account_invoice_layout/report/report_account_invoice_layout.rml 2009-04-06 14:35:41 +0000 | |||
218 | +++ account_invoice_layout/report/report_account_invoice_layout.rml 2009-05-12 12:04:06 +0000 | |||
219 | @@ -130,8 +130,7 @@ | |||
220 | 130 | <font color="white"> </font> | 130 | <font color="white"> </font> |
221 | 131 | </para> | 131 | </para> |
222 | 132 | <para style="P17"> | 132 | <para style="P17"> |
225 | 133 | <font face="Times-Roman">Document</font> | 133 | <font face="Times-Roman">Document:</font> |
224 | 134 | <font face="Times-Roman">:</font> | ||
226 | 135 | <font face="Times-Roman">[[o.name]]</font> | 134 | <font face="Times-Roman">[[o.name]]</font> |
227 | 136 | </para> | 135 | </para> |
228 | 137 | <para style="P17"> | 136 | <para style="P17"> |
229 | @@ -143,7 +142,7 @@ | |||
230 | 143 | <para style="Standard"> | 142 | <para style="Standard"> |
231 | 144 | <font color="white"> </font> | 143 | <font color="white"> </font> |
232 | 145 | </para> | 144 | </para> |
234 | 146 | <blockTable colWidths="198.0,62.0,67.0,67.0,53.0,80.0" style="Tableau6"> | 145 | <blockTable colWidths="216.0,62.0,62.0,62.0,51.0,74.0" style="Tableau6"> |
235 | 147 | <tr> | 146 | <tr> |
236 | 148 | <td> | 147 | <td> |
237 | 149 | <para style="P3">Description</para> | 148 | <para style="P3">Description</para> |
238 | @@ -166,64 +165,80 @@ | |||
239 | 166 | </tr> | 165 | </tr> |
240 | 167 | </blockTable> | 166 | </blockTable> |
241 | 168 | <section> | 167 | <section> |
296 | 169 | <para style="P20">[[ repeat_In(invoice_lines(o), 'a') ]]</para> | 168 | <para style="P20">[[ repeatIn(invoice_lines(o), 'a') ]]</para> |
297 | 170 | <blockTable colWidths="0.0,198.0" style="Tableau7"> | 169 | <blockTable colWidths="0.0,216.0,62,38,29,67,53,53" style="Tableau7"> |
298 | 171 | <tr> | 170 | <tr> |
299 | 172 | <td> | 171 | <td> |
300 | 173 | <para style="P8">[[ a['type']=='text' and removeParentNode('tr')]]</para> | 172 | <para style="P8">[[ a['type']=='text' and removeParentNode('blockTable')]]</para> |
301 | 174 | </td> | 173 | </td> |
302 | 175 | <td> | 174 | <td> |
303 | 176 | <para style="Table Contents"><font>[[ a['type']=='title' and ( setTag('font','font',{'size':'11.5'})) ]][[ (a['type']=='title' or a['type']=='subtotal') and ( setTag('font','font',{'name':'Times-bold'})) ]][[ a['type']=='text' and removeParentNode('font') or a['name'] ]]</font></para> | 175 | <para style="Table Contents">[[ (a['type']=='title' or a['type']=='subtotal') and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ a['name'] ]]</para> |
304 | 177 | </td> | 176 | </td> |
305 | 178 | </tr> | 177 | <td> |
306 | 179 | </blockTable> | 178 | <para style="Table Contents">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ a['tax_types'] ]]</para> |
307 | 180 | <blockTable colWidths="447.0,80.0" style="Tableau8"> | 179 | </td> |
308 | 181 | <tr> | 180 | <td> |
309 | 182 | <td> | 181 | <para style="Table Contents">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ a['quantity'] ]][[ a['uos'] ]]</para> |
310 | 183 | <para style="Table Contents">[[ a['type']=='text' and a['name'] or removeParentNode('table') ]]</para> | 182 | </td> |
311 | 184 | </td> | 183 | <td> |
312 | 185 | <td> | 184 | <para><font color="white"></font></para> |
313 | 186 | <para style="P8">[[ a['type']=='text' and '' or removeParentNode('table') ]]</para> | 185 | </td> |
314 | 187 | </td> | 186 | <td> |
315 | 188 | </tr> | 187 | <para style="Table Contents">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ a['price_unit'] ]]</para> |
316 | 189 | </blockTable> | 188 | </td> |
317 | 190 | <blockTable colWidths="28.0,499.0" style="Tableau8"> | 189 | <td> |
318 | 191 | <tr> | 190 | <para style="Table Contents">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ a['discount'] ]]</para> |
319 | 192 | <td> | 191 | </td> |
320 | 193 | <para style="P21">[[ a['note']=='' and removeParentNode('table') ]][[ repeatIn(( a['note'] and a['note'].splitlines()) or [], 'note') ]]</para> | 192 | <td> |
321 | 194 | </td> | 193 | <para style="Table Contents">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ a['price_subtotal'] ]][[ a['currency'] ]]</para> |
322 | 195 | <td> | 194 | </td> |
323 | 196 | <para style="P9">[[ note or removeParentNode('table') ]]</para> | 195 | </tr> |
324 | 197 | </td> | 196 | </blockTable> |
325 | 198 | </tr> | 197 | <blockTable colWidths="453.0,74.0" style="Tableau8"> |
326 | 199 | </blockTable> | 198 | <tr> |
327 | 200 | <pageBreak>[[ a['type']!='break' and removeParentNode('pageBreak')]]</pageBreak> | 199 | <td> |
328 | 201 | <blockTable colWidths="198.0,62.0,67.0,67.0,53.0,80.0" style="Tableau6"> | 200 | <para style="Table Contents">[[ a['type']=='text' and a['name'] or removeParentNode('blockTable') ]]</para> |
329 | 202 | <tr> | 201 | </td> |
330 | 203 | <td> | 202 | <td> |
331 | 204 | <para style="P3">Description [[ a['type']!='break' and removeParentNode('tr')]]</para> | 203 | <para style="P8">[[ a['type']=='text' and '' or removeParentNode('blockTable') ]]</para> |
332 | 205 | </td> | 204 | </td> |
333 | 206 | <td> | 205 | </tr> |
334 | 207 | <para style="P4">Taxes</para> | 206 | </blockTable> |
335 | 208 | </td> | 207 | <blockTable colWidths="28.0,499.0" style="Tableau8"> |
336 | 209 | <td> | 208 | <tr> |
337 | 210 | <para style="P4">Quantity</para> | 209 | <td> |
338 | 211 | </td> | 210 | <para style="P21"><font>[[ a['note']=='' and removeParentNode('blockTable') ]]</font><font>[[ repeatIn(( a['note'] and a['note'].splitlines()) or [], 'note') ]]</font></para> |
339 | 212 | <td> | 211 | </td> |
340 | 213 | <para style="P4">Unit Price</para> | 212 | <td> |
341 | 214 | </td> | 213 | <para style="P9">[[ note or removeParentNode('blockTable') ]]</para> |
342 | 215 | <td> | 214 | </td> |
343 | 216 | <para style="P4">Disc. (%)</para> | 215 | </tr> |
344 | 217 | </td> | 216 | </blockTable> |
345 | 218 | <td> | 217 | <pageBreak>[[ a['type']!='break' and removeParentNode('pageBreak')]]</pageBreak> |
346 | 219 | <para style="P4">Price</para> | 218 | <blockTable colWidths="216.0,62.0,62.0,62.0,51.0,74.0" style="Tableau6"> |
347 | 220 | </td> | 219 | <tr> |
348 | 221 | </tr> | 220 | <td> |
349 | 222 | </blockTable> | 221 | <para style="P3">Description [[ a['type']!='break' and removeParentNode('blockTable')]]</para> |
350 | 222 | </td> | ||
351 | 223 | <td> | ||
352 | 224 | <para style="P4">Taxes</para> | ||
353 | 225 | </td> | ||
354 | 226 | <td> | ||
355 | 227 | <para style="P4">Quantity</para> | ||
356 | 228 | </td> | ||
357 | 229 | <td> | ||
358 | 230 | <para style="P4">Unit Price</para> | ||
359 | 231 | </td> | ||
360 | 232 | <td> | ||
361 | 233 | <para style="P4">Disc. (%)</para> | ||
362 | 234 | </td> | ||
363 | 235 | <td> | ||
364 | 236 | <para style="P4">Price</para> | ||
365 | 237 | </td> | ||
366 | 238 | </tr> | ||
367 | 239 | </blockTable> | ||
368 | 223 | </section> | 240 | </section> |
372 | 224 | <para style="Standard"> | 241 | |
370 | 225 | <font color="white"> </font> | ||
371 | 226 | </para> | ||
373 | 227 | <blockTable colWidths="215.0,313.0" style="Tableau3"> | 242 | <blockTable colWidths="215.0,313.0" style="Tableau3"> |
374 | 228 | <tr> | 243 | <tr> |
375 | 229 | <td> | 244 | <td> |
376 | @@ -281,16 +296,11 @@ | |||
377 | 281 | </td> | 296 | </td> |
378 | 282 | </tr> | 297 | </tr> |
379 | 283 | </blockTable> | 298 | </blockTable> |
383 | 284 | <para style="Table Contents"> | 299 | |
381 | 285 | <font color="white"> </font> | ||
382 | 286 | </para> | ||
384 | 287 | </td> | 300 | </td> |
385 | 288 | </tr> | 301 | </tr> |
386 | 289 | </blockTable> | 302 | </blockTable> |
387 | 290 | <para style="P19">[[ format(o.comment) or '' ]]</para> | 303 | <para style="P19">[[ format(o.comment) or '' ]]</para> |
388 | 291 | <para style="P19"> | ||
389 | 292 | <font color="white"> </font> | ||
390 | 293 | </para> | ||
391 | 294 | <para style="P19">[[ format(o.payment_term and o.payment_term.note) or '' ]]</para> | 304 | <para style="P19">[[ format(o.payment_term and o.payment_term.note) or '' ]]</para> |
392 | 295 | </story> | 305 | </story> |
393 | 296 | </document> | 306 | </document> |
394 | 297 | 307 | ||
395 | === modified file 'account_invoice_layout/report/report_account_invoice_layout.sxw' | |||
396 | 298 | Binary files account_invoice_layout/report/report_account_invoice_layout.sxw 2009-01-08 12:35:15 +0000 and account_invoice_layout/report/report_account_invoice_layout.sxw 2009-05-12 11:23:05 +0000 differ | 308 | Binary files account_invoice_layout/report/report_account_invoice_layout.sxw 2009-01-08 12:35:15 +0000 and account_invoice_layout/report/report_account_invoice_layout.sxw 2009-05-12 11:23:05 +0000 differ |
397 | === modified file 'account_invoice_layout/report/special_message_invoice.py' | |||
398 | --- account_invoice_layout/report/special_message_invoice.py 2009-01-04 22:12:50 +0000 | |||
399 | +++ account_invoice_layout/report/special_message_invoice.py 2009-05-12 12:17:56 +0000 | |||
400 | @@ -1,7 +1,7 @@ | |||
401 | 1 | # -*- encoding: utf-8 -*- | 1 | # -*- encoding: utf-8 -*- |
402 | 2 | ############################################################################## | 2 | ############################################################################## |
403 | 3 | # | 3 | # |
405 | 4 | # OpenERP, Open Source Management Solution | 4 | # OpenERP, Open Source Management Solution |
406 | 5 | # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved | 5 | # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved |
407 | 6 | # $Id$ | 6 | # $Id$ |
408 | 7 | # | 7 | # |
409 | @@ -23,12 +23,6 @@ | |||
410 | 23 | import time | 23 | import time |
411 | 24 | from report import report_sxw | 24 | from report import report_sxw |
412 | 25 | import pooler | 25 | import pooler |
413 | 26 | parents = { | ||
414 | 27 | 'tr':1, | ||
415 | 28 | 'li':1, | ||
416 | 29 | 'story': 0, | ||
417 | 30 | 'section': 0 | ||
418 | 31 | } | ||
419 | 32 | 26 | ||
420 | 33 | class account_invoice_with_message(report_sxw.rml_parse): | 27 | class account_invoice_with_message(report_sxw.rml_parse): |
421 | 34 | def __init__(self, cr, uid, name, context): | 28 | def __init__(self, cr, uid, name, context): |
422 | @@ -37,67 +31,13 @@ | |||
423 | 37 | 'time': time, | 31 | 'time': time, |
424 | 38 | 'spcl_msg': self.spcl_msg, | 32 | 'spcl_msg': self.spcl_msg, |
425 | 39 | 'invoice_lines': self.invoice_lines, | 33 | 'invoice_lines': self.invoice_lines, |
426 | 40 | 'repeat_In':self.repeat_In, | ||
427 | 41 | 34 | ||
428 | 42 | }) | 35 | }) |
429 | 43 | self.context = context | 36 | self.context = context |
430 | 44 | 37 | ||
431 | 45 | def repeat_In(self, lst, name, nodes_parent=False,td=False,width=[],value=[],type=[]): | ||
432 | 46 | self._node.data = '' | ||
433 | 47 | node = self._find_parent(self._node, nodes_parent or parents) | ||
434 | 48 | ns = node.nextSibling | ||
435 | 49 | |||
436 | 50 | value=['tax_types','quantity','uos','price_unit','discount','price_subtotal','currency'] | ||
437 | 51 | type=['string','string','string','string','string','string','string'] | ||
438 | 52 | width=[62,42,20,62,51,50,24] | ||
439 | 53 | td=7 | ||
440 | 54 | |||
441 | 55 | tableFlag=0 | ||
442 | 56 | |||
443 | 57 | if not lst: | ||
444 | 58 | lst.append(1) | ||
445 | 59 | for ns in node.childNodes : | ||
446 | 60 | if tableFlag==1: | ||
447 | 61 | break | ||
448 | 62 | if ns and ns.nodeName!='#text' and ns.tagName=='blockTable' and td : | ||
449 | 63 | tableFlag=1 | ||
450 | 64 | |||
451 | 65 | width_str = ns._attrs['colWidths'].nodeValue | ||
452 | 66 | ns.removeAttribute('colWidths') | ||
453 | 67 | total_td = td * len(value) | ||
454 | 68 | |||
455 | 69 | if not width: | ||
456 | 70 | for v in value: | ||
457 | 71 | width.append(30) | ||
458 | 72 | for v in range(len(value)): | ||
459 | 73 | width_str +=',%d'%width[v] | ||
460 | 74 | |||
461 | 75 | ns.setAttribute('colWidths',width_str) | ||
462 | 76 | |||
463 | 77 | child_list = ns.childNodes | ||
464 | 78 | |||
465 | 79 | for child in child_list: | ||
466 | 80 | if child.nodeName=='tr': | ||
467 | 81 | lc = child.childNodes[1] | ||
468 | 82 | # for t in range(td): | ||
469 | 83 | i=0 | ||
470 | 84 | for v in value: | ||
471 | 85 | t2="[[%s['type']=='text' and removeParentNode('tr')]]"%(name) | ||
472 | 86 | t1= "[[ %s['%s'] ]]"%(name,v) | ||
473 | 87 | t3="[[ %s['type']=='subtotal' and ( setTag('para','para',{'fontName':'Times-bold'})) ]]"%name | ||
474 | 88 | newnode = lc.cloneNode(1) | ||
475 | 89 | |||
476 | 90 | newnode.childNodes[1].lastChild.data = t1 + t2 +t3 | ||
477 | 91 | # newnode.childNodes[1].lastChild.data=[[ a['status']==1 and ( setTag('para','para',{'fontName':'Times-bold'})) ]] | ||
478 | 92 | child.appendChild(newnode) | ||
479 | 93 | newnode=False | ||
480 | 94 | i+=1 | ||
481 | 95 | |||
482 | 96 | return super(account_invoice_with_message,self).repeatIn(lst, name, nodes_parent=False) | ||
483 | 97 | |||
484 | 98 | def spcl_msg(self, form): | 38 | def spcl_msg(self, form): |
485 | 99 | account_msg_data = pooler.get_pool(self.cr.dbname).get('notify.message').browse(self.cr, self.uid, form['message']) | 39 | account_msg_data = pooler.get_pool(self.cr.dbname).get('notify.message').browse(self.cr, self.uid, form['message']) |
487 | 100 | msg = account_msg_data.msg | 40 | msg = account_msg_data.msg |
488 | 101 | return msg | 41 | return msg |
489 | 102 | 42 | ||
490 | 103 | 43 | ||
491 | @@ -113,7 +53,6 @@ | |||
492 | 113 | for id in range(0,len(ids)): | 53 | for id in range(0,len(ids)): |
493 | 114 | info = self.pool.get('account.invoice.line').browse(self.cr, self.uid,ids[id], self.context.copy()) | 54 | info = self.pool.get('account.invoice.line').browse(self.cr, self.uid,ids[id], self.context.copy()) |
494 | 115 | list_in_seq[info]=info.sequence | 55 | list_in_seq[info]=info.sequence |
495 | 116 | # invoice_list +=[info] | ||
496 | 117 | i=1 | 56 | i=1 |
497 | 118 | j=0 | 57 | j=0 |
498 | 119 | final=sorted(list_in_seq.items(), lambda x, y: cmp(x[1], y[1])) | 58 | final=sorted(list_in_seq.items(), lambda x, y: cmp(x[1], y[1])) |
499 | @@ -198,9 +137,9 @@ | |||
500 | 198 | res['discount']='____________' | 137 | res['discount']='____________' |
501 | 199 | res['tax_types']='_________________' | 138 | res['tax_types']='_________________' |
502 | 200 | res['uos']='_____' | 139 | res['uos']='_____' |
506 | 201 | res['name']='________________________________________' | 140 | res['name']='_____________________________________________' |
507 | 202 | res['price_subtotal']='_______________________' | 141 | res['price_subtotal']='_____________________' |
508 | 203 | res['currency']='_______' | 142 | res['currency']='_' |
509 | 204 | elif entry.state=='break': | 143 | elif entry.state=='break': |
510 | 205 | res['type']=entry.state | 144 | res['type']=entry.state |
511 | 206 | res['name']=entry.name | 145 | res['name']=entry.name |
512 | 207 | 146 | ||
513 | === modified file 'account_invoice_layout/report/special_message_invoice.rml' | |||
514 | --- account_invoice_layout/report/special_message_invoice.rml 2009-01-08 12:35:15 +0000 | |||
515 | +++ account_invoice_layout/report/special_message_invoice.rml 2009-05-12 12:17:56 +0000 | |||
516 | @@ -130,8 +130,7 @@ | |||
517 | 130 | <font color="white"> </font> | 130 | <font color="white"> </font> |
518 | 131 | </para> | 131 | </para> |
519 | 132 | <para style="P17"> | 132 | <para style="P17"> |
522 | 133 | <font face="Times-Roman">Document</font> | 133 | <font face="Times-Roman">Document:</font> |
521 | 134 | <font face="Times-Roman">:</font> | ||
523 | 135 | <font face="Times-Roman">[[o.name]]</font> | 134 | <font face="Times-Roman">[[o.name]]</font> |
524 | 136 | </para> | 135 | </para> |
525 | 137 | <para style="P17"> | 136 | <para style="P17"> |
526 | @@ -166,64 +165,80 @@ | |||
527 | 166 | </tr> | 165 | </tr> |
528 | 167 | </blockTable> | 166 | </blockTable> |
529 | 168 | <section> | 167 | <section> |
584 | 169 | <para style="P20">[[ repeat_In(invoice_lines(o), 'a') ]]</para> | 168 | <para style="P20">[[ repeatIn(invoice_lines(o), 'a') ]]</para> |
585 | 170 | <blockTable colWidths="0.0,216.0" style="Tableau7"> | 169 | <blockTable colWidths="0.0,216.0,62,38,29,67,53,53" style="Tableau7"> |
586 | 171 | <tr> | 170 | <tr> |
587 | 172 | <td> | 171 | <td> |
588 | 173 | <para style="P8">[[ a['type']=='text' and removeParentNode('tr')]]</para> | 172 | <para style="P8">[[ a['type']=='text' and removeParentNode('blockTable')]]</para> |
589 | 174 | </td> | 173 | </td> |
590 | 175 | <td> | 174 | <td> |
591 | 176 | <para style="Table Contents"><font>[[ a['type']=='title' and ( setTag('font','font',{'size':'11.5'})) ]][[ (a['type']=='title' or a['type']=='subtotal') and ( setTag('font','font',{'name':'Times-bold'})) ]][[ a['type']=='text' and removeParentNode('font') or a['name'] ]]</font></para> | 175 | <para style="Table Contents">[[ (a['type']=='title' or a['type']=='subtotal') and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ a['name'] ]]</para> |
592 | 177 | </td> | 176 | </td> |
593 | 178 | </tr> | 177 | <td> |
594 | 179 | </blockTable> | 178 | <para style="Table Contents">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ a['tax_types'] ]]</para> |
595 | 180 | <blockTable colWidths="453.0,74.0" style="Tableau8"> | 179 | </td> |
596 | 181 | <tr> | 180 | <td> |
597 | 182 | <td> | 181 | <para style="Table Contents">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ a['quantity'] ]][[ a['uos'] ]]</para> |
598 | 183 | <para style="Table Contents">[[ a['type']=='text' and a['name'] or removeParentNode('table') ]]</para> | 182 | </td> |
599 | 184 | </td> | 183 | <td> |
600 | 185 | <td> | 184 | <para><font color="white"></font></para> |
601 | 186 | <para style="P8">[[ a['type']=='text' and '' or removeParentNode('table') ]]</para> | 185 | </td> |
602 | 187 | </td> | 186 | <td> |
603 | 188 | </tr> | 187 | <para style="Table Contents">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ a['price_unit'] ]]</para> |
604 | 189 | </blockTable> | 188 | </td> |
605 | 190 | <blockTable colWidths="28.0,499.0" style="Tableau8"> | 189 | <td> |
606 | 191 | <tr> | 190 | <para style="Table Contents">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ a['discount'] ]]</para> |
607 | 192 | <td> | 191 | </td> |
608 | 193 | <para style="P21">[[ a['note']=='' and removeParentNode('table') ]][[ repeatIn(( a['note'] and a['note'].splitlines()) or [], 'note') ]]</para> | 192 | <td> |
609 | 194 | </td> | 193 | <para style="Table Contents">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ a['price_subtotal'] ]][[ a['currency'] ]]</para> |
610 | 195 | <td> | 194 | </td> |
611 | 196 | <para style="P9">[[ note or removeParentNode('table') ]]</para> | 195 | </tr> |
612 | 197 | </td> | 196 | </blockTable> |
613 | 198 | </tr> | 197 | <blockTable colWidths="453.0,74.0" style="Tableau8"> |
614 | 199 | </blockTable> | 198 | <tr> |
615 | 200 | <pageBreak>[[ a['type']!='break' and removeParentNode('pageBreak')]]</pageBreak> | 199 | <td> |
616 | 201 | <blockTable colWidths="216.0,62.0,62.0,62.0,51.0,74.0" style="Tableau6"> | 200 | <para style="Table Contents">[[ a['type']=='text' and a['name'] or removeParentNode('blockTable') ]]</para> |
617 | 202 | <tr> | 201 | </td> |
618 | 203 | <td> | 202 | <td> |
619 | 204 | <para style="P3">Description [[ a['type']!='break' and removeParentNode('tr')]]</para> | 203 | <para style="P8">[[ a['type']=='text' and '' or removeParentNode('blockTable') ]]</para> |
620 | 205 | </td> | 204 | </td> |
621 | 206 | <td> | 205 | </tr> |
622 | 207 | <para style="P4">Taxes</para> | 206 | </blockTable> |
623 | 208 | </td> | 207 | <blockTable colWidths="28.0,499.0" style="Tableau8"> |
624 | 209 | <td> | 208 | <tr> |
625 | 210 | <para style="P4">Quantity</para> | 209 | <td> |
626 | 211 | </td> | 210 | <para style="P21"><font>[[ a['note']=='' and removeParentNode('blockTable') ]]</font><font>[[ repeatIn(( a['note'] and a['note'].splitlines()) or [], 'note') ]]</font></para> |
627 | 212 | <td> | 211 | </td> |
628 | 213 | <para style="P4">Unit Price</para> | 212 | <td> |
629 | 214 | </td> | 213 | <para style="P9">[[ note or removeParentNode('blockTable') ]]</para> |
630 | 215 | <td> | 214 | </td> |
631 | 216 | <para style="P4">Disc. (%)</para> | 215 | </tr> |
632 | 217 | </td> | 216 | </blockTable> |
633 | 218 | <td> | 217 | <pageBreak>[[ a['type']!='break' and removeParentNode('pageBreak')]]</pageBreak> |
634 | 219 | <para style="P4">Price</para> | 218 | <blockTable colWidths="216.0,62.0,62.0,62.0,51.0,74.0" style="Tableau6"> |
635 | 220 | </td> | 219 | <tr> |
636 | 221 | </tr> | 220 | <td> |
637 | 222 | </blockTable> | 221 | <para style="P3">Description [[ a['type']!='break' and removeParentNode('blockTable')]]</para> |
638 | 222 | </td> | ||
639 | 223 | <td> | ||
640 | 224 | <para style="P4">Taxes</para> | ||
641 | 225 | </td> | ||
642 | 226 | <td> | ||
643 | 227 | <para style="P4">Quantity</para> | ||
644 | 228 | </td> | ||
645 | 229 | <td> | ||
646 | 230 | <para style="P4">Unit Price</para> | ||
647 | 231 | </td> | ||
648 | 232 | <td> | ||
649 | 233 | <para style="P4">Disc. (%)</para> | ||
650 | 234 | </td> | ||
651 | 235 | <td> | ||
652 | 236 | <para style="P4">Price</para> | ||
653 | 237 | </td> | ||
654 | 238 | </tr> | ||
655 | 239 | </blockTable> | ||
656 | 223 | </section> | 240 | </section> |
660 | 224 | <para style="Standard"> | 241 | |
658 | 225 | <font color="white"> </font> | ||
659 | 226 | </para> | ||
661 | 227 | <blockTable colWidths="215.0,313.0" style="Tableau3"> | 242 | <blockTable colWidths="215.0,313.0" style="Tableau3"> |
662 | 228 | <tr> | 243 | <tr> |
663 | 229 | <td> | 244 | <td> |
664 | @@ -281,16 +296,11 @@ | |||
665 | 281 | </td> | 296 | </td> |
666 | 282 | </tr> | 297 | </tr> |
667 | 283 | </blockTable> | 298 | </blockTable> |
671 | 284 | <para style="Table Contents"> | 299 | |
669 | 285 | <font color="white"> </font> | ||
670 | 286 | </para> | ||
672 | 287 | </td> | 300 | </td> |
673 | 288 | </tr> | 301 | </tr> |
674 | 289 | </blockTable> | 302 | </blockTable> |
675 | 290 | <para style="P19">[[ format(o.comment) or '' ]]</para> | 303 | <para style="P19">[[ format(o.comment) or '' ]]</para> |
676 | 291 | <para style="P19"> | ||
677 | 292 | <font color="white"> </font> | ||
678 | 293 | </para> | ||
679 | 294 | <para style="P19">[[ format(o.payment_term and o.payment_term.note) or '' ]]</para> | 304 | <para style="P19">[[ format(o.payment_term and o.payment_term.note) or '' ]]</para> |
680 | 295 | <section> | 305 | <section> |
681 | 296 | <para style="P19">[[ repeatIn((spcl_msg(data['form']) and spcl_msg(data['form']).splitlines()) or [], 'note') ]]</para> | 306 | <para style="P19">[[ repeatIn((spcl_msg(data['form']) and spcl_msg(data['form']).splitlines()) or [], 'note') ]]</para> |
Bugfixes: Bugs related to reports on launchpad with new report engine