Merge lp:~openerp-dev/openobject-addons/trunk-qwebreport-pos-sle into lp:openobject-addons
- trunk-qwebreport-pos-sle
- Merge into trunk
Proposed by
sle-openerp
Status: | Merged |
---|---|
Merged at revision: | 9395 |
Proposed branch: | lp:~openerp-dev/openobject-addons/trunk-qwebreport-pos-sle |
Merge into: | lp:openobject-addons |
Diff against target: |
6952 lines (+1128/-4974) 76 files modified
point_of_sale/__init__.py (+3/-5) point_of_sale/__openerp__.py (+13/-10) point_of_sale/account_statement_report.xml (+16/-55) point_of_sale/controllers/__init__.py (+0/-1) point_of_sale/data/report_paperformat.xml (+20/-0) point_of_sale/point_of_sale.py (+0/-5) point_of_sale/point_of_sale_data.xml (+1/-4) point_of_sale/point_of_sale_report.xml (+55/-70) point_of_sale/report/__init__.py (+0/-5) point_of_sale/report/account_statement.py (+8/-1) point_of_sale/report/account_statement.rml (+0/-285) point_of_sale/report/all_closed_cashbox_of_the_day.py (+0/-140) point_of_sale/report/all_closed_cashbox_of_the_day.rml (+0/-249) point_of_sale/report/pos_details.py (+9/-2) point_of_sale/report/pos_details.rml (+0/-400) point_of_sale/report/pos_details_summary.py (+0/-129) point_of_sale/report/pos_details_summary.rml (+0/-315) point_of_sale/report/pos_invoice.py (+28/-35) point_of_sale/report/pos_lines.py (+8/-1) point_of_sale/report/pos_lines.rml (+0/-239) point_of_sale/report/pos_payment_report.py (+9/-1) point_of_sale/report/pos_payment_report.rml (+0/-209) point_of_sale/report/pos_payment_report_user.py (+0/-64) point_of_sale/report/pos_payment_report_user.rml (+0/-205) point_of_sale/report/pos_receipt.py (+9/-1) point_of_sale/report/pos_receipt.rml (+0/-171) point_of_sale/report/pos_report.py (+0/-1) point_of_sale/report/pos_sales_user.py (+0/-50) point_of_sale/report/pos_sales_user.rml (+0/-175) point_of_sale/report/pos_sales_user_today.py (+0/-50) point_of_sale/report/pos_sales_user_today.rml (+0/-175) point_of_sale/report/pos_users_product.py (+15/-3) point_of_sale/report/pos_users_product.py.WORK (+0/-68) point_of_sale/report/pos_users_product.rml (+0/-219) point_of_sale/test/02_order_to_invoice.yml (+8/-3) point_of_sale/test/account_statement_reports.yml (+72/-0) point_of_sale/test/point_of_sale_report.yml (+9/-42) point_of_sale/views/report_detailsofsales.xml (+140/-0) point_of_sale/views/report_payment.xml (+91/-0) point_of_sale/views/report_receipt.xml (+92/-0) point_of_sale/views/report_saleslines.xml (+98/-0) point_of_sale/views/report_sessionsummary.xml (+127/-0) point_of_sale/views/report_statement.xml (+85/-0) point_of_sale/views/report_usersproduct.xml (+79/-0) point_of_sale/wizard/__init__.py (+2/-8) point_of_sale/wizard/pos_box.py (+1/-1) point_of_sale/wizard/pos_box_entries.py (+0/-146) point_of_sale/wizard/pos_box_entries.xml (+0/-50) point_of_sale/wizard/pos_box_out.py (+0/-105) point_of_sale/wizard/pos_box_out.xml (+0/-48) point_of_sale/wizard/pos_confirm.py (+0/-1) point_of_sale/wizard/pos_confirm.xml (+0/-11) point_of_sale/wizard/pos_details.py (+2/-8) point_of_sale/wizard/pos_discount.py (+1/-16) point_of_sale/wizard/pos_payment.py (+2/-5) point_of_sale/wizard/pos_payment_report.py (+0/-48) point_of_sale/wizard/pos_payment_report.xml (+0/-31) point_of_sale/wizard/pos_payment_report_user.py (+0/-54) point_of_sale/wizard/pos_payment_report_user.xml (+0/-31) point_of_sale/wizard/pos_payment_report_user_view.xml (+0/-29) point_of_sale/wizard/pos_receipt.py (+0/-59) point_of_sale/wizard/pos_receipt_view.xml (+0/-30) point_of_sale/wizard/pos_return.py (+0/-323) point_of_sale/wizard/pos_return_view.xml (+0/-53) point_of_sale/wizard/pos_sales_user.py (+0/-60) point_of_sale/wizard/pos_sales_user.xml (+0/-36) point_of_sale/wizard/pos_sales_user_current_user.py (+0/-58) point_of_sale/wizard/pos_sales_user_today.py (+0/-57) product/__openerp__.py (+3/-1) product/product_report.xml (+8/-8) product/report/product_pricelist.py (+8/-9) product/report/product_pricelist.rml (+0/-266) product/views/report_pricelist.xml (+68/-0) product/wizard/product_price.py (+2/-7) report/controllers/main.py (+35/-25) report/static/src/js/qwebactionmanager.js (+1/-2) |
To merge this branch: | bzr merge lp:~openerp-dev/openobject-addons/trunk-qwebreport-pos-sle |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
OpenERP Core Team | Pending | ||
Review via email: mp+215701@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'point_of_sale/__init__.py' |
2 | --- point_of_sale/__init__.py 2012-11-29 22:26:45 +0000 |
3 | +++ point_of_sale/__init__.py 2014-04-29 12:44:05 +0000 |
4 | @@ -19,14 +19,12 @@ |
5 | # |
6 | ############################################################################## |
7 | |
8 | +import account_bank_statement |
9 | +import controllers |
10 | import point_of_sale |
11 | -import account_bank_statement |
12 | +import report |
13 | import res_users |
14 | import res_partner |
15 | import wizard |
16 | -import report |
17 | - |
18 | -import controllers |
19 | |
20 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
21 | - |
22 | |
23 | === modified file 'point_of_sale/__openerp__.py' |
24 | --- point_of_sale/__openerp__.py 2014-01-17 07:00:28 +0000 |
25 | +++ point_of_sale/__openerp__.py 2014-04-29 12:44:05 +0000 |
26 | @@ -19,7 +19,6 @@ |
27 | # |
28 | ############################################################################## |
29 | |
30 | - |
31 | { |
32 | 'name': 'Point of Sale', |
33 | 'version': '1.0.1', |
34 | @@ -51,19 +50,15 @@ |
35 | 'images': ['images/pos_touch_screen.jpeg', 'images/pos_session.jpeg', 'images/pos_analysis.jpeg','images/sale_order_pos.jpeg','images/product_pos.jpeg'], |
36 | 'depends': ['sale_stock'], |
37 | 'data': [ |
38 | + 'data/report_paperformat.xml', |
39 | 'security/point_of_sale_security.xml', |
40 | 'security/ir.model.access.csv', |
41 | + 'wizard/pos_box.xml', |
42 | + 'wizard/pos_confirm.xml', |
43 | 'wizard/pos_details.xml', |
44 | - 'wizard/pos_confirm.xml', |
45 | 'wizard/pos_discount.xml', |
46 | 'wizard/pos_open_statement.xml', |
47 | - 'wizard/pos_payment_report_user_view.xml', |
48 | - 'wizard/pos_sales_user.xml', |
49 | - 'wizard/pos_receipt_view.xml', |
50 | - 'wizard/pos_payment_report_user.xml', |
51 | - 'wizard/pos_payment_report.xml', |
52 | 'wizard/pos_payment.xml', |
53 | - 'wizard/pos_box.xml', |
54 | 'wizard/pos_session_opening.xml', |
55 | 'point_of_sale_report.xml', |
56 | 'point_of_sale_view.xml', |
57 | @@ -75,16 +70,24 @@ |
58 | 'account_statement_report.xml', |
59 | 'res_users_view.xml', |
60 | 'res_partner_view.xml', |
61 | + 'views/report_statement.xml', |
62 | + 'views/report_usersproduct.xml', |
63 | + 'views/report_receipt.xml', |
64 | + 'views/report_saleslines.xml', |
65 | + 'views/report_detailsofsales.xml', |
66 | + 'views/report_payment.xml', |
67 | + 'views/report_sessionsummary.xml', |
68 | ], |
69 | 'demo': [ |
70 | 'point_of_sale_demo.xml', |
71 | 'account_statement_demo.xml', |
72 | - 'test/00_register_open.yml' |
73 | ], |
74 | 'test': [ |
75 | + 'test/00_register_open.yml', |
76 | 'test/01_order_to_payment.yml', |
77 | 'test/02_order_to_invoice.yml', |
78 | - 'test/point_of_sale_report.yml' |
79 | + 'test/point_of_sale_report.yml', |
80 | + 'test/account_statement_reports.yml', |
81 | ], |
82 | 'installable': True, |
83 | 'application': True, |
84 | |
85 | === modified file 'point_of_sale/account_statement_report.xml' |
86 | --- point_of_sale/account_statement_report.xml 2011-01-14 00:11:01 +0000 |
87 | +++ point_of_sale/account_statement_report.xml 2014-04-29 12:44:05 +0000 |
88 | @@ -1,60 +1,21 @@ |
89 | <?xml version="1.0" encoding="iso-8859-1"?> |
90 | <openerp> |
91 | <data> |
92 | - |
93 | - <report |
94 | - id="pos_users_product_re" |
95 | - string="User's Product" |
96 | - model="account.bank.statement" |
97 | - name="pos.user.product" |
98 | - auto="False" |
99 | - multi="True" |
100 | - rml="point_of_sale/report/pos_users_product.rml" |
101 | - /> |
102 | - |
103 | - <report |
104 | - id="account_statement" |
105 | - string="Statement" |
106 | - model="account.bank.statement" |
107 | - name="account.statement" |
108 | - auto="False" |
109 | - multi="True" |
110 | - rml="point_of_sale/report/account_statement.rml" |
111 | - /> |
112 | - |
113 | - |
114 | - <report |
115 | - id="all_closed_cashbox_of_the_day" |
116 | - string="All Closed CashBox" |
117 | - model="account.bank.statement" |
118 | - name="all.closed.cashbox.of.the.day" |
119 | - auto="False" |
120 | - multi="True" |
121 | - menu = 'False' |
122 | - rml="point_of_sale/report/all_closed_cashbox_of_the_day.rml" |
123 | - /> |
124 | - |
125 | - <report |
126 | - id="pos_users_product_re" |
127 | - string="User's Product" |
128 | - model="account.bank.statement" |
129 | - name="pos.user.product" |
130 | - auto="False" |
131 | - multi="True" |
132 | - rml="point_of_sale/report/pos_users_product.rml" |
133 | - /> |
134 | - |
135 | - <report |
136 | - id="account_statement" |
137 | - string="Statement" |
138 | - model="account.bank.statement" |
139 | - name="account.statement" |
140 | - auto="False" |
141 | - multi="True" |
142 | - rml="point_of_sale/report/account_statement.rml" |
143 | - /> |
144 | - |
145 | - |
146 | - |
147 | + <report |
148 | + id="action_report_account_statement" |
149 | + model="account.bank.statement" |
150 | + string="Statement" |
151 | + name="point_of_sale.report_statement" |
152 | + file="point_of_sale.report_statement" |
153 | + report_type="qweb-pdf" |
154 | + /> |
155 | + <report |
156 | + id="action_report_pos_users_product" |
157 | + string="User's Product" |
158 | + model="account.bank.statement" |
159 | + name="point_of_sale.report_usersproduct" |
160 | + file="point_of_sale.report_usersproduct" |
161 | + report_type="qweb-pdf" |
162 | + /> |
163 | </data> |
164 | </openerp> |
165 | |
166 | === modified file 'point_of_sale/controllers/__init__.py' |
167 | --- point_of_sale/controllers/__init__.py 2012-08-13 22:16:01 +0000 |
168 | +++ point_of_sale/controllers/__init__.py 2014-04-29 12:44:05 +0000 |
169 | @@ -1,3 +1,2 @@ |
170 | import main |
171 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
172 | - |
173 | |
174 | === added directory 'point_of_sale/data' |
175 | === added file 'point_of_sale/data/report_paperformat.xml' |
176 | --- point_of_sale/data/report_paperformat.xml 1970-01-01 00:00:00 +0000 |
177 | +++ point_of_sale/data/report_paperformat.xml 2014-04-29 12:44:05 +0000 |
178 | @@ -0,0 +1,20 @@ |
179 | +<?xml version="1.0" encoding="utf-8"?> |
180 | +<openerp> |
181 | + <data> |
182 | + <record id="paperformat_posreceipt" model="report.paperformat"> |
183 | + <field name="name">Point Of Sale Receipt</field> |
184 | + <field name="default" eval="True"/> |
185 | + <field name="format">custom</field> |
186 | + <field name="page_height">150</field> |
187 | + <field name="page_width">60</field> |
188 | + <field name="orientation">Portrait</field> |
189 | + <field name="margin_top">3</field> |
190 | + <field name="margin_bottom">3</field> |
191 | + <field name="margin_left">3</field> |
192 | + <field name="margin_right">3</field> |
193 | + <field name="header_line" eval="False" /> |
194 | + <field name="header_spacing">3</field> |
195 | + <field name="dpi">130</field> |
196 | + </record> |
197 | + </data> |
198 | +</openerp> |
199 | |
200 | === modified file 'point_of_sale/point_of_sale.py' |
201 | --- point_of_sale/point_of_sale.py 2014-04-07 16:33:18 +0000 |
202 | +++ point_of_sale/point_of_sale.py 2014-04-29 12:44:05 +0000 |
203 | @@ -605,7 +605,6 @@ |
204 | return {'value': {'pricelist_id': pricelist}} |
205 | |
206 | def _amount_all(self, cr, uid, ids, name, args, context=None): |
207 | - tax_obj = self.pool.get('account.tax') |
208 | cur_obj = self.pool.get('res.currency') |
209 | res = {} |
210 | for order in self.browse(cr, uid, ids, context=context): |
211 | @@ -858,9 +857,7 @@ |
212 | 'qty': -order_line.qty |
213 | }, context=context) |
214 | |
215 | - new_order = ','.join(map(str,clone_list)) |
216 | abs = { |
217 | - #'domain': "[('id', 'in', ["+new_order+"])]", |
218 | 'name': _('Return Products'), |
219 | 'view_type': 'form', |
220 | 'view_mode': 'form', |
221 | @@ -922,8 +919,6 @@ |
222 | line.product_id.uom_id.id, |
223 | line.qty, partner_id = order.partner_id.id, |
224 | fposition_id=order.partner_id.property_account_position.id)['value']) |
225 | - if line.product_id.description_sale: |
226 | - inv_line['note'] = line.product_id.description_sale |
227 | inv_line['price_unit'] = line.price_unit |
228 | inv_line['discount'] = line.discount |
229 | inv_line['name'] = inv_name |
230 | |
231 | === modified file 'point_of_sale/point_of_sale_data.xml' |
232 | --- point_of_sale/point_of_sale_data.xml 2013-12-02 15:09:25 +0000 |
233 | +++ point_of_sale/point_of_sale_data.xml 2014-04-29 12:44:05 +0000 |
234 | @@ -1,8 +1,6 @@ |
235 | <?xml version="1.0" ?> |
236 | <openerp> |
237 | - <data noupdate="1"> |
238 | - |
239 | - |
240 | + <data> |
241 | <!-- After installation of the module, open the related menu --> |
242 | <record id="action_client_pos_menu" model="ir.actions.client"> |
243 | <field name="name">Open POS Menu</field> |
244 | @@ -27,7 +25,6 @@ |
245 | <field name="body"><![CDATA[<p>Record sale orders, register payments, compute change to return, create invoices, and manage refunds through a specific web touch-screen interface.</p> |
246 | <p>If you install the PoS proxy you will be able to interface OpenERP with retail hardware: barcode scanners, printers, cash registers, weighing machines, credit card payment terminals.</p>]]></field> |
247 | </record> |
248 | - |
249 | </data> |
250 | </openerp> |
251 | |
252 | |
253 | === modified file 'point_of_sale/point_of_sale_report.xml' |
254 | --- point_of_sale/point_of_sale_report.xml 2012-08-02 13:40:12 +0000 |
255 | +++ point_of_sale/point_of_sale_report.xml 2014-04-29 12:44:05 +0000 |
256 | @@ -1,86 +1,71 @@ |
257 | <?xml version="1.0" encoding="iso-8859-1"?> |
258 | <openerp> |
259 | <data> |
260 | + <report id="report_user_label" |
261 | + model="res.users" |
262 | + name="point_of_sale.user.label" |
263 | + string="User Labels" |
264 | + xml="point_of_sale/report/user_label.xml" |
265 | + xsl="point_of_sale/report/user_label.xsl" |
266 | + /> |
267 | |
268 | <report |
269 | id="pos_invoice_report" |
270 | string="Invoice" |
271 | model="pos.order" |
272 | - name="pos.invoice" |
273 | + report_type="qweb-pdf" |
274 | + name="point_of_sale.report_invoice" |
275 | + file="point_of_sale.report_invoice" |
276 | + /> |
277 | + |
278 | + <report |
279 | + id="action_report_pos_receipt" |
280 | + string="Receipt" |
281 | + model="pos.order" |
282 | + report_type="qweb-pdf" |
283 | + name="point_of_sale.report_receipt" |
284 | + file="point_of_sale.report_receipt" |
285 | + /> |
286 | + <record id="action_report_pos_receipt" model="ir.actions.report.xml"> |
287 | + <field name="paperformat_id" ref="point_of_sale.paperformat_posreceipt"/> |
288 | + </record> |
289 | + |
290 | + <report |
291 | + id="pos_lines_report" |
292 | + string="Sales Lines" |
293 | + model="pos.order" |
294 | + report_type="qweb-pdf" |
295 | + name="point_of_sale.report_saleslines" |
296 | + file="point_of_sale.report_saleslines" |
297 | auto="False" |
298 | - multi="True" |
299 | - rml="account/report/account_print_invoice.rml" |
300 | - /> |
301 | + /> |
302 | |
303 | <report |
304 | id="pos_lines_detail" |
305 | string="Details of Sales" |
306 | model="pos.order" |
307 | - name="pos.details" |
308 | - auto="False" |
309 | - multi="True" |
310 | - menu="False" |
311 | - rml="point_of_sale/report/pos_details.rml" |
312 | - /> |
313 | - |
314 | - <report |
315 | - id="pos_details_summary" |
316 | - string="Sales (summary)" |
317 | - model="pos.order" |
318 | - name="pos.details_summary" |
319 | - auto="False" |
320 | - multi="True" |
321 | - rml="point_of_sale/report/pos_details_summary.rml" |
322 | - /> |
323 | - |
324 | - <report |
325 | - id="pos_lines_report" |
326 | - string="Pos Lines" |
327 | - model="pos.order" |
328 | - name="pos.lines" |
329 | - auto="False" |
330 | - multi="True" |
331 | - rml="point_of_sale/report/pos_lines.rml" |
332 | - /> |
333 | - |
334 | - <report |
335 | - id="pos_sales_user" |
336 | - string="Sales Report" |
337 | - model="pos.order" |
338 | - name="pos.sales.user" |
339 | - auto="False" |
340 | - multi="True" |
341 | - menu="False" |
342 | - rml="point_of_sale/report/pos_sales_user.rml" |
343 | - /> |
344 | - |
345 | - <report |
346 | - id="pos_sales_user_today" |
347 | - string="Today's Sales" |
348 | - model="pos.order" |
349 | - name="pos.sales.user.today" |
350 | - auto="False" |
351 | - multi="True" |
352 | - menu="False" |
353 | - rml="point_of_sale/report/pos_sales_user_today.rml" |
354 | - /> |
355 | - |
356 | - <report |
357 | - id="pos_payment_report_user" |
358 | - string="Today's Payment By User" |
359 | - model="pos.order" |
360 | - name="pos.payment.report.user" |
361 | - auto="False" |
362 | - multi="True" |
363 | - menu="False" |
364 | - rml="point_of_sale/report/pos_payment_report_user.rml" |
365 | - /> |
366 | - |
367 | - <report id="report_user_label" |
368 | - model="res.users" |
369 | - name="point_of_sale.user.label" |
370 | - string="User Labels" |
371 | - xml="point_of_sale/report/user_label.xml" |
372 | - xsl="point_of_sale/report/user_label.xsl"/> |
373 | + report_type="qweb-pdf" |
374 | + name="point_of_sale.report_detailsofsales" |
375 | + file="point_of_sale.report_detailsofsales" |
376 | + menu="False" |
377 | + /> |
378 | + |
379 | + <report |
380 | + id="pos_payment_report" |
381 | + string="Today's Payment" |
382 | + model="pos.order" |
383 | + report_type="qweb-pdf" |
384 | + name="point_of_sale.report_payment" |
385 | + file="point_of_sale.report_payment" |
386 | + /> |
387 | + |
388 | + <report |
389 | + id="action_report_pos_session_summary" |
390 | + string="Session Summary" |
391 | + model="pos.session" |
392 | + report_type="qweb-pdf" |
393 | + name="point_of_sale.report_sessionsummary" |
394 | + file="point_of_sale.report_sessionsummary" |
395 | + /> |
396 | </data> |
397 | </openerp> |
398 | |
399 | === modified file 'point_of_sale/report/__init__.py' |
400 | --- point_of_sale/report/__init__.py 2012-08-02 13:40:12 +0000 |
401 | +++ point_of_sale/report/__init__.py 2014-04-29 12:44:05 +0000 |
402 | @@ -21,16 +21,11 @@ |
403 | |
404 | import pos_users_product |
405 | import account_statement |
406 | -import all_closed_cashbox_of_the_day |
407 | import pos_receipt |
408 | import pos_invoice |
409 | import pos_lines |
410 | import pos_details |
411 | -import pos_details_summary |
412 | import pos_payment_report |
413 | -import pos_sales_user |
414 | -import pos_sales_user_today |
415 | -import pos_payment_report_user |
416 | import pos_report |
417 | import pos_order_report |
418 | |
419 | |
420 | === modified file 'point_of_sale/report/account_statement.py' |
421 | --- point_of_sale/report/account_statement.py 2012-12-06 14:56:32 +0000 |
422 | +++ point_of_sale/report/account_statement.py 2014-04-29 12:44:05 +0000 |
423 | @@ -20,8 +20,10 @@ |
424 | ############################################################################## |
425 | |
426 | import time |
427 | +from openerp.osv import osv |
428 | from openerp.report import report_sxw |
429 | |
430 | + |
431 | class account_statement(report_sxw.rml_parse): |
432 | |
433 | def __init__(self, cr, uid, name, context): |
434 | @@ -46,6 +48,11 @@ |
435 | total += line.amount |
436 | return total |
437 | |
438 | -report_sxw.report_sxw('report.account.statement', 'account.bank.statement', 'addons/statement/report/account_statement.rml', parser=account_statement,header='internal') |
439 | + |
440 | +class report_account_statement(osv.AbstractModel): |
441 | + _name = 'report.point_of_sale.report_statement' |
442 | + _inherit = 'report.abstract_report' |
443 | + _template = 'point_of_sale.report_statement' |
444 | + _wrapped_report_class = account_statement |
445 | |
446 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
447 | |
448 | === removed file 'point_of_sale/report/account_statement.rml' |
449 | --- point_of_sale/report/account_statement.rml 2012-11-29 22:26:45 +0000 |
450 | +++ point_of_sale/report/account_statement.rml 1970-01-01 00:00:00 +0000 |
451 | @@ -1,285 +0,0 @@ |
452 | -<?xml version="1.0"?> |
453 | -<document filename="test.pdf"> |
454 | - <template title="Statement" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20"> |
455 | - <pageTemplate id="first"> |
456 | - <frame id="first" x1="36.0" y1="57.0" width="520" height="728"/> |
457 | - </pageTemplate> |
458 | - </template> |
459 | - <stylesheet> |
460 | - <blockTableStyle id="Standard_Outline"> |
461 | - <blockAlignment value="LEFT"/> |
462 | - <blockValign value="TOP"/> |
463 | - </blockTableStyle> |
464 | - <blockTableStyle id="Table1"> |
465 | - <blockAlignment value="LEFT"/> |
466 | - <blockValign value="TOP"/> |
467 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/> |
468 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/> |
469 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> |
470 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/> |
471 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/> |
472 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> |
473 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/> |
474 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/> |
475 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/> |
476 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/> |
477 | - <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="3,0" stop="3,-1"/> |
478 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/> |
479 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/> |
480 | - </blockTableStyle> |
481 | - <blockTableStyle id="Table2"> |
482 | - <blockAlignment value="LEFT"/> |
483 | - <blockValign value="TOP"/> |
484 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/> |
485 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/> |
486 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> |
487 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/> |
488 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/> |
489 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> |
490 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/> |
491 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/> |
492 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/> |
493 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/> |
494 | - <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="3,0" stop="3,-1"/> |
495 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/> |
496 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/> |
497 | - </blockTableStyle> |
498 | - <blockTableStyle id="Table3"> |
499 | - <blockAlignment value="LEFT"/> |
500 | - <blockValign value="TOP"/> |
501 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/> |
502 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/> |
503 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> |
504 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/> |
505 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/> |
506 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> |
507 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/> |
508 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/> |
509 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/> |
510 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/> |
511 | - <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="3,0" stop="3,-1"/> |
512 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/> |
513 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/> |
514 | - </blockTableStyle> |
515 | - <blockTableStyle id="Table4"> |
516 | - <blockAlignment value="LEFT"/> |
517 | - <blockValign value="TOP"/> |
518 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/> |
519 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/> |
520 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> |
521 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/> |
522 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/> |
523 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> |
524 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/> |
525 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/> |
526 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/> |
527 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/> |
528 | - <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="3,0" stop="3,-1"/> |
529 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/> |
530 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/> |
531 | - </blockTableStyle> |
532 | - <blockTableStyle id="Table9"> |
533 | - <blockAlignment value="LEFT"/> |
534 | - <blockValign value="TOP"/> |
535 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/> |
536 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/> |
537 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/> |
538 | - </blockTableStyle> |
539 | - <blockTableStyle id="Table5"> |
540 | - <blockAlignment value="LEFT"/> |
541 | - <blockValign value="TOP"/> |
542 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> |
543 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> |
544 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/> |
545 | - </blockTableStyle> |
546 | - <blockTableStyle id="Table7"> |
547 | - <blockAlignment value="LEFT"/> |
548 | - <blockValign value="TOP"/> |
549 | - <lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/> |
550 | - <lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/> |
551 | - </blockTableStyle> |
552 | - <initialize> |
553 | - <paraStyle name="all" alignment="justify"/> |
554 | - </initialize> |
555 | - <paraStyle name="Standard" fontName="Helvetica"/> |
556 | - <paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/> |
557 | - <paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/> |
558 | - <paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/> |
559 | - <paraStyle name="Caption" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/> |
560 | - <paraStyle name="Index" fontName="Helvetica"/> |
561 | - <paraStyle name="Table Contents" fontName="Helvetica"/> |
562 | - <paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER"/> |
563 | - <paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/> |
564 | - <paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
565 | - <paraStyle name="terp_default_Bold_8" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
566 | - <paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
567 | - <paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
568 | - <paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/> |
569 | - <paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/> |
570 | - <paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> |
571 | - <paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/> |
572 | - <paraStyle name="Footer" fontName="Helvetica"/> |
573 | - <paraStyle name="Horizontal Line" fontName="Helvetica" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/> |
574 | - <paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/> |
575 | - <paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/> |
576 | - <paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/> |
577 | - <paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/> |
578 | - <paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> |
579 | - <paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/> |
580 | - <paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/> |
581 | - <paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
582 | - <paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> |
583 | - <paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> |
584 | - <paraStyle name="terp_default_1" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
585 | - <paraStyle name="terp_default_Right_9_Bold" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> |
586 | - <paraStyle name="terp_default_8_Italic" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
587 | - <images/> |
588 | - </stylesheet> |
589 | - <story> |
590 | - <pto> |
591 | - <pto_header> |
592 | - <blockTable colWidths="131.0,292.0,97.0" style="Table9"> |
593 | - <tr> |
594 | - <td> |
595 | - <para style="terp_tblheader_Details">Name</para> |
596 | - </td> |
597 | - <td> |
598 | - <para style="terp_tblheader_Details">Partner</para> |
599 | - </td> |
600 | - <td> |
601 | - <para style="terp_tblheader_Details_Right">Amount </para> |
602 | - </td> |
603 | - </tr> |
604 | - </blockTable> |
605 | - </pto_header> |
606 | - <para style="terp_default_8">[[ repeatIn(objects,'statement') ]]</para> |
607 | - <para style="terp_header_Centre">Statement</para> |
608 | - <blockTable colWidths="130.0,130.0,130.0,130.0" style="Table1"> |
609 | - <tr> |
610 | - <td> |
611 | - <para style="terp_tblheader_General_Centre">Statement Name</para> |
612 | - </td> |
613 | - <td> |
614 | - <para style="terp_tblheader_General_Centre">Journal</para> |
615 | - </td> |
616 | - <td> |
617 | - <para style="terp_tblheader_General_Centre">Company</para> |
618 | - </td> |
619 | - <td> |
620 | - <para style="terp_tblheader_General_Centre">User</para> |
621 | - </td> |
622 | - </tr> |
623 | - </blockTable> |
624 | - <blockTable colWidths="130.0,130.0,130.0,130.0" style="Table2"> |
625 | - <tr> |
626 | - <td> |
627 | - <para style="terp_default_Centre_8">[[ statement.name ]]</para> |
628 | - </td> |
629 | - <td> |
630 | - <para style="terp_default_Centre_8">[[ statement.journal_id.name ]]</para> |
631 | - </td> |
632 | - <td> |
633 | - <para style="terp_default_Centre_8">[[ statement.company_id.name ]]</para> |
634 | - </td> |
635 | - <td> |
636 | - <para style="terp_default_Centre_8">[[ statement.user_id.name ]]</para> |
637 | - </td> |
638 | - </tr> |
639 | - </blockTable> |
640 | - <para style="terp_default_8"> |
641 | - <font color="white"> </font> |
642 | - </para> |
643 | - <blockTable colWidths="130.0,130.0,130.0,130.0" style="Table3"> |
644 | - <tr> |
645 | - <td> |
646 | - <para style="terp_tblheader_General_Centre">Opening Date</para> |
647 | - </td> |
648 | - <td> |
649 | - <para style="terp_tblheader_General_Centre">Closing Date</para> |
650 | - </td> |
651 | - <td> |
652 | - <para style="terp_tblheader_General_Centre">Starting Balance</para> |
653 | - </td> |
654 | - <td> |
655 | - <para style="terp_tblheader_General_Centre">Ending Balance</para> |
656 | - </td> |
657 | - </tr> |
658 | - </blockTable> |
659 | - <blockTable colWidths="130.0,130.0,130.0,130.0" style="Table4"> |
660 | - <tr> |
661 | - <td> |
662 | - <para style="terp_default_Centre_8">[[ formatLang(statement.date,date=True) ]]</para> |
663 | - </td> |
664 | - <td> |
665 | - <para style="terp_default_Centre_8">[[ formatLang(statement.closing_date,date_time=True)]]</para> |
666 | - </td> |
667 | - <td> |
668 | - <para style="terp_default_Centre_8">[[ formatLang(statement.balance_start, dp='Account', currency_obj = company.currency_id) ]]</para> |
669 | - </td> |
670 | - <td> |
671 | - <para style="terp_default_Centre_8">[[ formatLang(statement.balance_end_real, dp='Account', currency_obj = company.currency_id) ]]</para> |
672 | - </td> |
673 | - </tr> |
674 | - </blockTable> |
675 | - <para style="terp_default_8"> |
676 | - <font color="white"> </font> |
677 | - </para> |
678 | - <blockTable colWidths="131.0,292.0,97.0" style="Table9"> |
679 | - <tr> |
680 | - <td> |
681 | - <para style="terp_tblheader_Details">Name</para> |
682 | - </td> |
683 | - <td> |
684 | - <para style="terp_tblheader_Details">Partner</para> |
685 | - </td> |
686 | - <td> |
687 | - <para style="terp_tblheader_Details_Right">Amount </para> |
688 | - </td> |
689 | - </tr> |
690 | - </blockTable> |
691 | - <section> |
692 | - <para style="terp_default_1">[[ repeatIn(statement.line_ids,'line_ids') and ' ' or removeParentNode('blockTable') ]]</para> |
693 | - <section> |
694 | - <para style="terp_default_1">[[ repeatIn(get_data(statement), 'line_ids')]]</para> |
695 | - <blockTable colWidths="131.0,292.0,97.0" style="Table5"> |
696 | - <tr> |
697 | - <td> |
698 | - <para style="terp_default_9">[[ line_ids.name ]]</para> |
699 | - </td> |
700 | - <td> |
701 | - <para style="terp_default_9">[[ line_ids.partner_id.name ]]</para> |
702 | - </td> |
703 | - <td> |
704 | - <para style="terp_default_Right_9">[[ formatLang(line_ids.amount, dp='Account', currency_obj=company.currency_id) ]]</para> |
705 | - </td> |
706 | - </tr> |
707 | - </blockTable> |
708 | - </section> |
709 | - </section> |
710 | - <blockTable colWidths="374.0,49.0,97.0" style="Table7"> |
711 | - <tr> |
712 | - <td> |
713 | - <para style="terp_default_8"> |
714 | - <font color="white"> </font> |
715 | - </para> |
716 | - </td> |
717 | - <td> |
718 | - <para style="terp_tblheader_Details">Total :</para> |
719 | - </td> |
720 | - <td> |
721 | - <para style="terp_default_Right_9_Bold">[[ formatLang(get_total(statement.line_ids), dp='Account', currency_obj = company.currency_id) ]]</para> |
722 | - </td> |
723 | - </tr> |
724 | - </blockTable> |
725 | - <para style="terp_default_8"> |
726 | - <font color="white"> </font> |
727 | - </para> |
728 | - <para style="terp_default_8"> |
729 | - <font color="white"> </font> |
730 | - </para> |
731 | - <para style="terp_default_8"> |
732 | - <font color="white"> </font> |
733 | - </para> |
734 | - </pto> |
735 | - </story> |
736 | -</document> |
737 | |
738 | === removed file 'point_of_sale/report/account_statement.sxw' |
739 | Binary files point_of_sale/report/account_statement.sxw 2012-11-29 22:26:45 +0000 and point_of_sale/report/account_statement.sxw 1970-01-01 00:00:00 +0000 differ |
740 | === removed file 'point_of_sale/report/all_closed_cashbox_of_the_day.py' |
741 | --- point_of_sale/report/all_closed_cashbox_of_the_day.py 2012-12-06 14:56:32 +0000 |
742 | +++ point_of_sale/report/all_closed_cashbox_of_the_day.py 1970-01-01 00:00:00 +0000 |
743 | @@ -1,140 +0,0 @@ |
744 | -# -*- coding: utf-8 -*- |
745 | -############################################################################## |
746 | -# |
747 | -# OpenERP, Open Source Management Solution |
748 | -# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). |
749 | -# |
750 | -# This program is free software: you can redistribute it and/or modify |
751 | -# it under the terms of the GNU Affero General Public License as |
752 | -# published by the Free Software Foundation, either version 3 of the |
753 | -# License, or (at your option) any later version. |
754 | -# |
755 | -# This program is distributed in the hope that it will be useful, |
756 | -# but WITHOUT ANY WARRANTY; without even the implied warranty of |
757 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
758 | -# GNU Affero General Public License for more details. |
759 | -# |
760 | -# You should have received a copy of the GNU Affero General Public License |
761 | -# along with this program. If not, see <http://www.gnu.org/licenses/>. |
762 | -# |
763 | -############################################################################## |
764 | - |
765 | -import time |
766 | -from openerp.report import report_sxw |
767 | - |
768 | -class all_closed_cashbox_of_the_day(report_sxw.rml_parse): |
769 | - #TOFIX: sql injection problem: SQL Request must be pass from sql injection... |
770 | - def __init__(self, cr, uid, name, context): |
771 | - super(all_closed_cashbox_of_the_day, self).__init__(cr, uid, name, context=context) |
772 | - self.localcontext.update({ |
773 | - 'time': time, |
774 | - 'get_data':self._get_data, |
775 | - 'get_bal':self._get_bal, |
776 | - 'get_lines':self._get_lines, |
777 | - 'get_partner':self._get_partner, |
778 | - 'get_net_total':self._get_net_total, |
779 | - 'get_user':self._get_user, |
780 | - 'get_sub_total':self._get_sub_total, |
781 | - 'get_net_total_starting':self._get_net_total_starting, |
782 | - }) |
783 | - |
784 | - def _get_user(self, line_ids): |
785 | - sql = "select name from res_users where id = %d"%(line_ids['create_uid']) |
786 | - self.cr.execute(sql) |
787 | - user = self.cr.fetchone() |
788 | - return user[0] |
789 | - |
790 | - def _get_data(self, user): |
791 | - data = {} |
792 | - sql = """ SELECT abs.journal_id,abs.id,abs.date,abs.closing_date,abs.name as statement,aj.name as journal,ap.name as period,ru.name as user,rc.name as company, |
793 | - abs.state,abs.balance_end_real FROM account_bank_statement as abs |
794 | - LEFT JOIN account_journal as aj ON aj.id = abs.journal_id |
795 | - LEFT JOIN account_period as ap ON ap.id = abs.period_id |
796 | - LEFT JOIN res_users as ru ON ru.id = abs.user_id |
797 | - LEFT JOIN res_company as rc ON rc.id = abs.company_id |
798 | - WHERE to_char(date_trunc('day',abs.date),'YYYY-MM-DD')::date = current_date and abs.state IN ('confirm','open') and abs.user_id = %d"""%(user.id) |
799 | - self.cr.execute(sql) |
800 | - data = self.cr.dictfetchall() |
801 | - return data |
802 | - |
803 | - def _get_lines(self, statement): |
804 | - data = {} |
805 | - sql = """ select absl.* from account_bank_statement_line as absl, account_bank_statement as abs |
806 | - where absl.statement_id = abs.id and abs.id = %d"""%(statement['id']) |
807 | - self.cr.execute(sql) |
808 | - data = self.cr.dictfetchall() |
809 | - return data |
810 | - |
811 | - def _get_bal(self, data): |
812 | - res = {} |
813 | - sql =""" select sum(pieces*number) as bal from account_cashbox_line where starting_id = %d """%(data['id']) |
814 | - self.cr.execute(sql) |
815 | - res = self.cr.dictfetchall() |
816 | - if res: |
817 | - return res[0]['bal'] |
818 | - else: |
819 | - return 0 |
820 | - |
821 | - def _get_sub_total(self, user, data, date): |
822 | - res={} |
823 | - self.cr.execute(""" select sum(absl.amount) from account_bank_statement as abs |
824 | - LEFT JOIN account_bank_statement_line as absl ON abs.id = absl.statement_id |
825 | - WHERE abs.journal_id = %d |
826 | - and abs.state IN ('confirm','open') |
827 | - and abs.date = '%s' |
828 | - and abs.user_id = %d |
829 | - """%(data,date,user.id)) |
830 | - res = self.cr.fetchall() |
831 | - if res[0][0]: |
832 | - return res[0][0] |
833 | - else: |
834 | - return False |
835 | - |
836 | - def _get_partner(self, statement): |
837 | - res = {} |
838 | - if statement['pos_statement_id']: |
839 | - sql =""" select rp.name from account_bank_statement_line as absl,res_partner as rp |
840 | - where absl.partner_id = rp.id |
841 | - and absl.pos_statement_id = %d"""%(statement['pos_statement_id']) |
842 | - self.cr.execute(sql) |
843 | - res = self.cr.dictfetchall() or {} |
844 | - return res and res[0]['name'] |
845 | - else: |
846 | - return 0.00 |
847 | - |
848 | - def _get_net_total_starting(self, user): |
849 | - lst = [] |
850 | - res={} |
851 | - total_ending_bal = 0.0 |
852 | - total_starting_bal = 0.0 |
853 | - sql = """ SELECT abs.id,abs.balance_end_real as net_total FROM account_bank_statement as abs |
854 | - WHERE to_char(date_trunc('day',abs.date),'YYYY-MM-DD')::date = current_date |
855 | - and abs.state IN ('confirm','open') |
856 | - and abs.user_id = %d"""%(user.id) |
857 | - self.cr.execute(sql) |
858 | - res = self.cr.dictfetchall() |
859 | - for r in res: |
860 | - total_ending_bal += (r['net_total'] or 0.0) |
861 | - sql1 =""" select sum(pieces*number) as bal from account_cashbox_line where starting_id = %d"""%(r['id']) |
862 | - self.cr.execute(sql1) |
863 | - data = self.cr.dictfetchall() |
864 | - if data[0]['bal']: |
865 | - total_starting_bal += data[0]['bal'] |
866 | - lst.append(total_ending_bal) |
867 | - lst.append(total_starting_bal) |
868 | - return lst |
869 | - |
870 | - def _get_net_total(self, user): |
871 | - res={} |
872 | - sql = """select sum(absl.amount) as net_total from account_bank_statement as abs |
873 | - LEFT JOIN account_bank_statement_line as absl ON abs.id = absl.statement_id |
874 | - where abs.state IN ('confirm','open') and abs.user_id = %d |
875 | - and to_char(date_trunc('day',abs.date),'YYYY-MM-DD')::date = current_date """%(user.id) |
876 | - |
877 | - self.cr.execute(sql) |
878 | - res = self.cr.dictfetchall() |
879 | - return res[0]['net_total'] or 0.0 |
880 | - |
881 | -report_sxw.report_sxw('report.all.closed.cashbox.of.the.day', 'account.bank.statement', 'addons/point_of_sale/report/all_closed_cashbox_of_the_day.rml', parser=all_closed_cashbox_of_the_day,header='internal') |
882 | - |
883 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
884 | |
885 | === removed file 'point_of_sale/report/all_closed_cashbox_of_the_day.rml' |
886 | --- point_of_sale/report/all_closed_cashbox_of_the_day.rml 2012-11-29 22:26:45 +0000 |
887 | +++ point_of_sale/report/all_closed_cashbox_of_the_day.rml 1970-01-01 00:00:00 +0000 |
888 | @@ -1,249 +0,0 @@ |
889 | -<?xml version="1.0"?> |
890 | -<document filename="test.pdf"> |
891 | - <template title="Cashbox of the day" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20"> |
892 | - <pageTemplate id="first"> |
893 | - <frame id="first" x1="27.0" y1="57.0" width="512" height="728"/> |
894 | - </pageTemplate> |
895 | - </template> |
896 | - <stylesheet> |
897 | - <blockTableStyle id="Standard_Outline"> |
898 | - <blockAlignment value="LEFT"/> |
899 | - <blockValign value="TOP"/> |
900 | - </blockTableStyle> |
901 | - <blockTableStyle id="Table1"> |
902 | - <blockAlignment value="LEFT"/> |
903 | - <blockValign value="TOP"/> |
904 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/> |
905 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/> |
906 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> |
907 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/> |
908 | - <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="1,0" stop="1,-1"/> |
909 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/> |
910 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> |
911 | - </blockTableStyle> |
912 | - <blockTableStyle id="Table2"> |
913 | - <blockAlignment value="LEFT"/> |
914 | - <blockValign value="TOP"/> |
915 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/> |
916 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/> |
917 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> |
918 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/> |
919 | - <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="1,0" stop="1,-1"/> |
920 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/> |
921 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> |
922 | - </blockTableStyle> |
923 | - <blockTableStyle id="Table3"> |
924 | - <blockAlignment value="LEFT"/> |
925 | - <blockValign value="TOP"/> |
926 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/> |
927 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/> |
928 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/> |
929 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/> |
930 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/> |
931 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="5,-1" stop="5,-1"/> |
932 | - </blockTableStyle> |
933 | - <blockTableStyle id="Table4"> |
934 | - <blockAlignment value="LEFT"/> |
935 | - <blockValign value="TOP"/> |
936 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/> |
937 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/> |
938 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/> |
939 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/> |
940 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/> |
941 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="5,-1" stop="5,-1"/> |
942 | - </blockTableStyle> |
943 | - <blockTableStyle id="Table7"> |
944 | - <blockAlignment value="LEFT"/> |
945 | - <blockValign value="TOP"/> |
946 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/> |
947 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/> |
948 | - </blockTableStyle> |
949 | - <blockTableStyle id="Table5"> |
950 | - <blockAlignment value="LEFT"/> |
951 | - <blockValign value="TOP"/> |
952 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> |
953 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> |
954 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/> |
955 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/> |
956 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/> |
957 | - </blockTableStyle> |
958 | - <initialize> |
959 | - <paraStyle name="all" alignment="justify"/> |
960 | - </initialize> |
961 | - <paraStyle name="P1" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> |
962 | - <paraStyle name="Standard" fontName="Helvetica"/> |
963 | - <paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/> |
964 | - <paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/> |
965 | - <paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/> |
966 | - <paraStyle name="Caption" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/> |
967 | - <paraStyle name="Index" fontName="Helvetica"/> |
968 | - <paraStyle name="Table Contents" fontName="Helvetica"/> |
969 | - <paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER"/> |
970 | - <paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/> |
971 | - <paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
972 | - <paraStyle name="terp_default_Bold_8" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
973 | - <paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
974 | - <paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
975 | - <paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/> |
976 | - <paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/> |
977 | - <paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> |
978 | - <paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/> |
979 | - <paraStyle name="Footer" fontName="Helvetica"/> |
980 | - <paraStyle name="Horizontal Line" fontName="Helvetica" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/> |
981 | - <paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/> |
982 | - <paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/> |
983 | - <paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/> |
984 | - <paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/> |
985 | - <paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> |
986 | - <paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/> |
987 | - <paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/> |
988 | - <paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
989 | - <paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> |
990 | - <paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> |
991 | - <paraStyle name="terp_default_1" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
992 | - <paraStyle name="terp_default_Right_9_Bold" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> |
993 | - <paraStyle name="terp_default_8_Italic" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
994 | - <images/> |
995 | - </stylesheet> |
996 | - <story> |
997 | - <para style="terp_default_8">[[ repeatIn(objects,'statement') ]]</para> |
998 | - <para style="terp_default_8"> |
999 | - <font color="white"> </font> |
1000 | - </para> |
1001 | - <para style="terp_default_8"> |
1002 | - <font color="white"> </font> |
1003 | - </para> |
1004 | - <para style="terp_header_Centre">Today's Closed Cashbox</para> |
1005 | - <para style="terp_default_Right_9"> |
1006 | - <font color="white"> </font> |
1007 | - </para> |
1008 | - <blockTable colWidths="256.0,256.0" style="Table1"> |
1009 | - <tr> |
1010 | - <td> |
1011 | - <para style="terp_tblheader_General_Centre">Company</para> |
1012 | - </td> |
1013 | - <td> |
1014 | - <para style="terp_tblheader_General_Centre">User</para> |
1015 | - </td> |
1016 | - </tr> |
1017 | - </blockTable> |
1018 | - <blockTable colWidths="256.0,256.0" style="Table2"> |
1019 | - <tr> |
1020 | - <td> |
1021 | - <para style="terp_default_Centre_8">[[ company.name ]]</para> |
1022 | - </td> |
1023 | - <td> |
1024 | - <para style="terp_default_Centre_8">[[ user.name ]]</para> |
1025 | - </td> |
1026 | - </tr> |
1027 | - </blockTable> |
1028 | - <para style="Standard"> |
1029 | - <font color="white"> </font> |
1030 | - </para> |
1031 | - <blockTable colWidths="59.0,101.0,75.0,78.0,104.0,95.0" style="Table3"> |
1032 | - <tr> |
1033 | - <td> |
1034 | - <para style="terp_tblheader_General">St.Name</para> |
1035 | - </td> |
1036 | - <td> |
1037 | - <para style="terp_tblheader_General_Centre">Journal</para> |
1038 | - </td> |
1039 | - <td> |
1040 | - <para style="terp_tblheader_General_Centre">Opening Date</para> |
1041 | - </td> |
1042 | - <td> |
1043 | - <para style="terp_tblheader_General_Centre">Closing Date</para> |
1044 | - </td> |
1045 | - <td> |
1046 | - <para style="terp_tblheader_General_Right">Starting Balance</para> |
1047 | - </td> |
1048 | - <td> |
1049 | - <para style="terp_tblheader_General_Right">Ending Balance</para> |
1050 | - </td> |
1051 | - </tr> |
1052 | - </blockTable> |
1053 | - <blockTable colWidths="59.0,101.0,75.0,78.0,104.0,95.0" style="Table4"> |
1054 | - <tr> |
1055 | - <td> |
1056 | - <para style="terp_tblheader_General">Total:</para> |
1057 | - </td> |
1058 | - <td> |
1059 | - <para style="Table Contents"> |
1060 | - <font color="white"> </font> |
1061 | - </para> |
1062 | - </td> |
1063 | - <td> |
1064 | - <para style="Table Contents"> |
1065 | - <font color="white"> </font> |
1066 | - </para> |
1067 | - </td> |
1068 | - <td> |
1069 | - <para style="Table Contents"> |
1070 | - <font color="white"> </font> |
1071 | - </para> |
1072 | - </td> |
1073 | - <td> |
1074 | - <para style="terp_tblheader_General_Right"><u>[[ formatLang(get_net_total_starting(user)[1], currency_obj = company.currency_id)]]</u></para> |
1075 | - </td> |
1076 | - <td> |
1077 | - <para style="terp_tblheader_General_Right"><u>[[ formatLang(get_net_total(user), currency_obj = company.currency_id)]]</u></para> |
1078 | - </td> |
1079 | - </tr> |
1080 | - </blockTable> |
1081 | - <section> |
1082 | - <para style="terp_default_1">[[ repeatIn(get_data(user),'statement') ]]</para> |
1083 | - <blockTable colWidths="60.0,99.0,75.0,79.0,103.0,96.0" style="Table7"> |
1084 | - <tr> |
1085 | - <td> |
1086 | - <para style="terp_default_Bold_8">[[ statement['statement'] ]]</para> |
1087 | - </td> |
1088 | - <td> |
1089 | - <para style="terp_default_Bold_8">[[ statement['journal'] ]]</para> |
1090 | - </td> |
1091 | - <td> |
1092 | - <para style="terp_default_Bold_8">[[ statement['date'] ]]</para> |
1093 | - </td> |
1094 | - <td> |
1095 | - <para style="terp_default_Bold_8">[[ statement['closing_date'] ]]</para> |
1096 | - </td> |
1097 | - <td> |
1098 | - <para style="P1"><u>[[ formatLang(get_bal(statement), currency_obj = company.currency_id)]]</u></para> |
1099 | - </td> |
1100 | - <td> |
1101 | - <para style="P1"><u>[[ formatLang(get_sub_total(user,statement['journal_id'],statement['date']), currency_obj = company.currency_id )]]</u></para> |
1102 | - </td> |
1103 | - </tr> |
1104 | - </blockTable> |
1105 | - <section> |
1106 | - <para style="terp_default_1">[[ repeatIn(get_lines(statement),'line_ids') ]]</para> |
1107 | - <blockTable colWidths="99.0,134.0,129.0,3.0,147.0" style="Table5"> |
1108 | - <tr> |
1109 | - <td> |
1110 | - <para style="terp_default_9">[[ line_ids['name'] ]]</para> |
1111 | - <para style="terp_default_9"> |
1112 | - <font color="white"> </font> |
1113 | - </para> |
1114 | - </td> |
1115 | - <td> |
1116 | - <para style="terp_default_9">[[ get_partner(line_ids) or removeParentNode('font') ]]</para> |
1117 | - </td> |
1118 | - <td> |
1119 | - <para style="terp_default_Right_9">[[ get_user(line_ids) or removeParentNode('font') ]]</para> |
1120 | - </td> |
1121 | - <td> |
1122 | - <para style="Table Contents"> |
1123 | - <font color="white"> </font> |
1124 | - </para> |
1125 | - </td> |
1126 | - <td> |
1127 | - <para style="terp_default_Right_9">[[ formatLang(line_ids['amount'], currency_obj = company.currency_id)]]</para> |
1128 | - </td> |
1129 | - </tr> |
1130 | - </blockTable> |
1131 | - <para style="terp_default_1"> |
1132 | - <font color="white"> </font> |
1133 | - </para> |
1134 | - </section> |
1135 | - </section> |
1136 | - </story> |
1137 | -</document> |
1138 | |
1139 | === removed file 'point_of_sale/report/all_closed_cashbox_of_the_day.sxw' |
1140 | Binary files point_of_sale/report/all_closed_cashbox_of_the_day.sxw 2012-11-29 22:26:45 +0000 and point_of_sale/report/all_closed_cashbox_of_the_day.sxw 1970-01-01 00:00:00 +0000 differ |
1141 | === modified file 'point_of_sale/report/pos_details.py' |
1142 | --- point_of_sale/report/pos_details.py 2013-10-27 12:31:04 +0000 |
1143 | +++ point_of_sale/report/pos_details.py 2014-04-29 12:44:05 +0000 |
1144 | @@ -20,8 +20,10 @@ |
1145 | ############################################################################## |
1146 | |
1147 | import time |
1148 | +from openerp.osv import osv |
1149 | from openerp.report import report_sxw |
1150 | |
1151 | + |
1152 | class pos_details(report_sxw.rml_parse): |
1153 | |
1154 | def _get_invoice(self, inv_id): |
1155 | @@ -180,7 +182,7 @@ |
1156 | 'strip_name': self._strip_name, |
1157 | 'getpayments': self._get_payments, |
1158 | 'getsumdisc': self._get_sum_discount, |
1159 | - 'gettotalofthaday': self._total_of_the_day, |
1160 | + 'gettotaloftheday': self._total_of_the_day, |
1161 | 'gettaxamount': self._get_tax_amount, |
1162 | 'pos_sales_details':self._pos_sales_details, |
1163 | 'getqtytotal2': self._get_qty_total_2, |
1164 | @@ -191,6 +193,11 @@ |
1165 | 'get_user_names': self._get_user_names, |
1166 | }) |
1167 | |
1168 | -report_sxw.report_sxw('report.pos.details', 'pos.order', 'addons/point_of_sale_singer/report/pos_details.rml', parser=pos_details, header='internal') |
1169 | + |
1170 | +class report_pos_details(osv.AbstractModel): |
1171 | + _name = 'report.point_of_sale.report_detailsofsales' |
1172 | + _inherit = 'report.abstract_report' |
1173 | + _template = 'point_of_sale.report_detailsofsales' |
1174 | + _wrapped_report_class = pos_details |
1175 | |
1176 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
1177 | |
1178 | === removed file 'point_of_sale/report/pos_details.rml' |
1179 | --- point_of_sale/report/pos_details.rml 2012-11-29 22:26:45 +0000 |
1180 | +++ point_of_sale/report/pos_details.rml 1970-01-01 00:00:00 +0000 |
1181 | @@ -1,400 +0,0 @@ |
1182 | -<?xml version="1.0"?> |
1183 | -<document filename="test.pdf"> |
1184 | - <template title="Details of Sales" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20"> |
1185 | - <pageTemplate id="first"> |
1186 | - <frame id="first" x1="28.0" y1="57.0" width="511" height="728"/> |
1187 | - </pageTemplate> |
1188 | - </template> |
1189 | - <stylesheet> |
1190 | - <blockTableStyle id="Standard_Outline"> |
1191 | - <blockAlignment value="LEFT"/> |
1192 | - <blockValign value="TOP"/> |
1193 | - </blockTableStyle> |
1194 | - <blockTableStyle id="Table1"> |
1195 | - <blockAlignment value="LEFT"/> |
1196 | - <blockValign value="TOP"/> |
1197 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/> |
1198 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/> |
1199 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> |
1200 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/> |
1201 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/> |
1202 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> |
1203 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/> |
1204 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/> |
1205 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/> |
1206 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/> |
1207 | - <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="3,0" stop="3,-1"/> |
1208 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/> |
1209 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/> |
1210 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="4,0" stop="4,-1"/> |
1211 | - <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="4,0" stop="4,-1"/> |
1212 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="4,0" stop="4,0"/> |
1213 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/> |
1214 | - </blockTableStyle> |
1215 | - <blockTableStyle id="Table2"> |
1216 | - <blockAlignment value="LEFT"/> |
1217 | - <blockValign value="TOP"/> |
1218 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/> |
1219 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/> |
1220 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> |
1221 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/> |
1222 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/> |
1223 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> |
1224 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/> |
1225 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/> |
1226 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/> |
1227 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/> |
1228 | - <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="3,0" stop="3,-1"/> |
1229 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/> |
1230 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/> |
1231 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="4,0" stop="4,-1"/> |
1232 | - <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="4,0" stop="4,-1"/> |
1233 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="4,0" stop="4,0"/> |
1234 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/> |
1235 | - </blockTableStyle> |
1236 | - <blockTableStyle id="Table4"> |
1237 | - <blockAlignment value="LEFT"/> |
1238 | - <blockValign value="TOP"/> |
1239 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/> |
1240 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/> |
1241 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/> |
1242 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/> |
1243 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/> |
1244 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="5,-1" stop="5,-1"/> |
1245 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="6,-1" stop="6,-1"/> |
1246 | - </blockTableStyle> |
1247 | - <blockTableStyle id="Table6"> |
1248 | - <blockAlignment value="LEFT"/> |
1249 | - <blockValign value="TOP"/> |
1250 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> |
1251 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> |
1252 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/> |
1253 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/> |
1254 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/> |
1255 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="5,-1" stop="5,-1"/> |
1256 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="6,-1" stop="6,-1"/> |
1257 | - </blockTableStyle> |
1258 | - <blockTableStyle id="Table3"> |
1259 | - <blockAlignment value="LEFT"/> |
1260 | - <blockValign value="TOP"/> |
1261 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/> |
1262 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/> |
1263 | - </blockTableStyle> |
1264 | - <blockTableStyle id="Table5"> |
1265 | - <blockAlignment value="LEFT"/> |
1266 | - <blockValign value="TOP"/> |
1267 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> |
1268 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> |
1269 | - </blockTableStyle> |
1270 | - <blockTableStyle id="Table9"> |
1271 | - <blockAlignment value="LEFT"/> |
1272 | - <blockValign value="TOP"/> |
1273 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/> |
1274 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/> |
1275 | - </blockTableStyle> |
1276 | - <blockTableStyle id="Table11"> |
1277 | - <blockAlignment value="LEFT"/> |
1278 | - <blockValign value="TOP"/> |
1279 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> |
1280 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> |
1281 | - </blockTableStyle> |
1282 | - <blockTableStyle id="Table8"> |
1283 | - <blockAlignment value="LEFT"/> |
1284 | - <blockValign value="TOP"/> |
1285 | - </blockTableStyle> |
1286 | - <blockTableStyle id="Table7"> |
1287 | - <blockAlignment value="LEFT"/> |
1288 | - <blockValign value="TOP"/> |
1289 | - <lineStyle kind="LINEABOVE" colorName="#000000" start="0,0" stop="0,0"/> |
1290 | - <lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/> |
1291 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,1" stop="0,1"/> |
1292 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,1" stop="1,1"/> |
1293 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> |
1294 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,2" stop="0,2"/> |
1295 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> |
1296 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,2" stop="1,2"/> |
1297 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> |
1298 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,3" stop="0,3"/> |
1299 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> |
1300 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,3" stop="1,3"/> |
1301 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> |
1302 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,4" stop="0,4"/> |
1303 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> |
1304 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,4" stop="1,4"/> |
1305 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> |
1306 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,5" stop="0,5"/> |
1307 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> |
1308 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,5" stop="1,5"/> |
1309 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> |
1310 | - </blockTableStyle> |
1311 | - <initialize> |
1312 | - <paraStyle name="all" alignment="justify"/> |
1313 | - </initialize> |
1314 | - <paraStyle name="Standard" fontName="Helvetica"/> |
1315 | - <paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/> |
1316 | - <paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/> |
1317 | - <paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/> |
1318 | - <paraStyle name="Caption" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/> |
1319 | - <paraStyle name="Index" fontName="Helvetica"/> |
1320 | - <paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/> |
1321 | - <paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
1322 | - <paraStyle name="Table Contents" fontName="Helvetica"/> |
1323 | - <paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER"/> |
1324 | - <paraStyle name="terp_default_Bold_8" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
1325 | - <paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
1326 | - <paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
1327 | - <paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/> |
1328 | - <paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/> |
1329 | - <paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> |
1330 | - <paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/> |
1331 | - <paraStyle name="Footer" fontName="Helvetica"/> |
1332 | - <paraStyle name="Horizontal Line" fontName="Helvetica" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/> |
1333 | - <paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/> |
1334 | - <paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/> |
1335 | - <paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/> |
1336 | - <paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/> |
1337 | - <paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> |
1338 | - <paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/> |
1339 | - <paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/> |
1340 | - <paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
1341 | - <paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> |
1342 | - <paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> |
1343 | - <paraStyle name="terp_default_1" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
1344 | - <paraStyle name="terp_default_Right_9_Bold" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> |
1345 | - <paraStyle name="terp_default_8_Italic" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
1346 | - <images/> |
1347 | - </stylesheet> |
1348 | - <story> |
1349 | - <para style="terp_default_8"> |
1350 | - <font color="white"> </font> |
1351 | - </para> |
1352 | - <para style="terp_header_Centre">Details of Sales</para> |
1353 | - <para style="terp_default_8"> |
1354 | - <font color="white"> </font> |
1355 | - </para> |
1356 | - <blockTable colWidths="104.0,104.0,133.0,85.0,86.0" style="Table1"> |
1357 | - <tr> |
1358 | - <td> |
1359 | - <para style="terp_tblheader_General_Centre">Company</para> |
1360 | - </td> |
1361 | - <td> |
1362 | - <para style="terp_tblheader_General_Centre">Users</para> |
1363 | - </td> |
1364 | - <td> |
1365 | - <para style="terp_tblheader_General_Centre">Print Date</para> |
1366 | - </td> |
1367 | - <td> |
1368 | - <para style="terp_tblheader_General_Centre">Start Period</para> |
1369 | - </td> |
1370 | - <td> |
1371 | - <para style="terp_tblheader_General_Centre">End Period</para> |
1372 | - </td> |
1373 | - </tr> |
1374 | - </blockTable> |
1375 | - <blockTable colWidths="104.0,104.0,133.0,85.0,85.0" style="Table2"> |
1376 | - <tr> |
1377 | - <td> |
1378 | - <para style="terp_default_Centre_8">[[ company.name ]]</para> |
1379 | - </td> |
1380 | - <td> |
1381 | - <para style="terp_default_Centre_8">[[ get_user_names(data['form']['user_ids']) or 'All' ]]</para> |
1382 | - </td> |
1383 | - <td> |
1384 | - <para style="terp_default_Centre_8">[[ formatLang(time.strftime('%Y-%m-%d'),date=True) ]]</para> |
1385 | - </td> |
1386 | - <td> |
1387 | - <para style="terp_default_Centre_8">[[ formatLang(data['form']['date_start'],date=True) ]] </para> |
1388 | - </td> |
1389 | - <td> |
1390 | - <para style="terp_default_Centre_8">[[ formatLang(data['form']['date_end'],date=True) ]] </para> |
1391 | - </td> |
1392 | - </tr> |
1393 | - </blockTable> |
1394 | - <para style="terp_default_8"> |
1395 | - <font color="white"> </font> |
1396 | - </para> |
1397 | - <blockTable colWidths="108.0,54.0,159.0,54.0,75.0,30.0,69.0" style="Table4"> |
1398 | - <tr> |
1399 | - <td> |
1400 | - <para style="terp_tblheader_Details">Date</para> |
1401 | - </td> |
1402 | - <td> |
1403 | - <para style="terp_tblheader_Details">Order</para> |
1404 | - </td> |
1405 | - <td> |
1406 | - <para style="terp_tblheader_Details">Product</para> |
1407 | - </td> |
1408 | - <td> |
1409 | - <para style="terp_tblheader_Details_Right">Price </para> |
1410 | - </td> |
1411 | - <td> |
1412 | - <para style="terp_tblheader_Details_Centre">Qty</para> |
1413 | - </td> |
1414 | - <td> |
1415 | - <para style="terp_tblheader_Details_Right">Disc(%) </para> |
1416 | - </td> |
1417 | - <td> |
1418 | - <para style="terp_tblheader_Details_Centre">Invoiced </para> |
1419 | - </td> |
1420 | - </tr> |
1421 | - </blockTable> |
1422 | - <section> |
1423 | - <para style="terp_default_1">[[ repeatIn(pos_sales_details(data['form']), 'line_ids') ]]</para> |
1424 | - <blockTable colWidths="108.0,54.0,159.0,54.0,75.0,30.0,69.0" style="Table6"> |
1425 | - <tr> |
1426 | - <td> |
1427 | - <para style="terp_default_9">[[ formatLang(line_ids['date_order'],date_time = True) ]]</para> |
1428 | - </td> |
1429 | - <td> |
1430 | - <para style="terp_default_9">[[ line_ids['pos_name'] ]]</para> |
1431 | - </td> |
1432 | - <td> |
1433 | - <para style="terp_default_9">[ [[ line_ids['code'] ]] ] [[ line_ids['name'] ]]</para> |
1434 | - </td> |
1435 | - <td> |
1436 | - <para style="terp_default_Right_9">[[ formatLang(line_ids['price_unit'], dp='Sale Price', currency_obj = company.currency_id) ]]</para> |
1437 | - </td> |
1438 | - <td> |
1439 | - <para style="terp_default_Centre_9">[[ formatLang(line_ids['qty']) ]] [[ line_ids['uom'] ]]</para> |
1440 | - </td> |
1441 | - <td> |
1442 | - <para style="terp_default_Centre_9">[[ formatLang(line_ids['discount'], dp='Sale Price') ]]</para> |
1443 | - </td> |
1444 | - <td> |
1445 | - <para style="terp_default_Centre_9">[[ getinvoice(line_ids['invoice_id']) or removeParentNode('font') ]]</para> |
1446 | - </td> |
1447 | - </tr> |
1448 | - </blockTable> |
1449 | - </section> |
1450 | - <para style="terp_default_8"> |
1451 | - <font color="white"> </font> |
1452 | - </para> |
1453 | - <blockTable colWidths="256.0,256.0" style="Table3"> |
1454 | - <tr> |
1455 | - <td> |
1456 | - <para style="terp_tblheader_Details">Taxes</para> |
1457 | - </td> |
1458 | - <td> |
1459 | - <para style="terp_default_8"> |
1460 | - <font color="white"> </font> |
1461 | - </para> |
1462 | - </td> |
1463 | - </tr> |
1464 | - </blockTable> |
1465 | - <section> |
1466 | - <para style="terp_default_1">[[ repeatIn(gettaxamount(data['form']), 'p')]]</para> |
1467 | - <blockTable colWidths="256.0,256.0" style="Table5"> |
1468 | - <tr> |
1469 | - <td> |
1470 | - <para style="terp_default_9">[[ p['name'] or removeParentNode('para') ]]</para> |
1471 | - </td> |
1472 | - <td> |
1473 | - <para style="terp_default_Right_9_Bold">[[ formatLang(p['amount'], currency_obj = company.currency_id) or removeParentNode('tr') ]]</para> |
1474 | - </td> |
1475 | - </tr> |
1476 | - </blockTable> |
1477 | - <para style="terp_default_1"> |
1478 | - <font color="white"> </font> |
1479 | - </para> |
1480 | - </section> |
1481 | - <para style="terp_default_8"> |
1482 | - <font color="white"> </font> |
1483 | - </para> |
1484 | - <blockTable colWidths="257.0,255.0" style="Table9"> |
1485 | - <tr> |
1486 | - <td> |
1487 | - <para style="terp_tblheader_Details">Payment</para> |
1488 | - </td> |
1489 | - <td> |
1490 | - <para style="terp_default_8"> |
1491 | - <font color="white"> </font> |
1492 | - </para> |
1493 | - </td> |
1494 | - </tr> |
1495 | - </blockTable> |
1496 | - <section> |
1497 | - <para style="terp_default_1">[[ repeatIn(getpayments(data['form']), 'p') ]]</para> |
1498 | - <blockTable colWidths="255.0,255.0" style="Table11"> |
1499 | - <tr> |
1500 | - <td> |
1501 | - <para style="terp_default_9">[[ p['name'] or removeParentNode('para') ]]</para> |
1502 | - </td> |
1503 | - <td> |
1504 | - <para style="terp_default_Right_9_Bold">[[ formatLang(p['sum'], dp='Account', currency_obj = company.currency_id) or removeParentNode('tr') ]]</para> |
1505 | - </td> |
1506 | - </tr> |
1507 | - </blockTable> |
1508 | - <para style="terp_default_1"> |
1509 | - <font color="white"> </font> |
1510 | - </para> |
1511 | - </section> |
1512 | - <para style="terp_default_8"> |
1513 | - <font color="white"> </font> |
1514 | - </para> |
1515 | - <blockTable colWidths="257.0,255.0" style="Table8"> |
1516 | - <tr> |
1517 | - <td> |
1518 | - <para style="terp_tblheader_Details">Summary</para> |
1519 | - </td> |
1520 | - <td> |
1521 | - <para style="terp_default_9"> |
1522 | - <font color="white"> </font> |
1523 | - </para> |
1524 | - </td> |
1525 | - </tr> |
1526 | - </blockTable> |
1527 | - <blockTable colWidths="257.0,254.0" style="Table7"> |
1528 | - <tr> |
1529 | - <td> |
1530 | - <para style="terp_default_Bold_9">Sales total(Revenue)</para> |
1531 | - </td> |
1532 | - <td> |
1533 | - <para style="terp_default_Right_9_Bold">[[ formatLang(getsalestotal2(), dp='Sale Price', currency_obj = company.currency_id) ]]</para> |
1534 | - </td> |
1535 | - </tr> |
1536 | - <tr> |
1537 | - <td> |
1538 | - <para style="terp_default_Bold_9">Qty of product</para> |
1539 | - </td> |
1540 | - <td> |
1541 | - <para style="terp_default_Right_9_Bold">[[ formatLang(getqtytotal2()) ]]</para> |
1542 | - </td> |
1543 | - </tr> |
1544 | - <tr> |
1545 | - <td> |
1546 | - <para style="terp_default_Bold_9">Total invoiced</para> |
1547 | - </td> |
1548 | - <td> |
1549 | - <para style="terp_default_Right_9_Bold">[[ formatLang(getsuminvoice2(data['form']), dp='Sale Price', currency_obj = company.currency_id) ]]</para> |
1550 | - </td> |
1551 | - </tr> |
1552 | - <tr> |
1553 | - <td> |
1554 | - <para style="terp_default_Bold_9">Total discount</para> |
1555 | - </td> |
1556 | - <td> |
1557 | - <para style="terp_default_Right_9_Bold">[[ formatLang(getsumdisc(data['form']), dp='Sale Price', currency_obj = company.currency_id) ]]</para> |
1558 | - </td> |
1559 | - </tr> |
1560 | - <tr> |
1561 | - <td> |
1562 | - <para style="terp_default_Bold_9">Total paid</para> |
1563 | - </td> |
1564 | - <td> |
1565 | - <para style="terp_default_Right_9_Bold">[[ formatLang(getpaidtotal2(), dp='Sale Price', currency_obj = company.currency_id) ]]</para> |
1566 | - </td> |
1567 | - </tr> |
1568 | - <tr> |
1569 | - <td> |
1570 | - <para style="terp_default_Bold_9">Total of the day</para> |
1571 | - </td> |
1572 | - <td> |
1573 | - <para style="terp_default_Right_9_Bold">[[ formatLang(gettotalofthaday(data['form']), dp='Sale Price', currency_obj = company.currency_id) ]]</para> |
1574 | - </td> |
1575 | - </tr> |
1576 | - </blockTable> |
1577 | - <para style="terp_default_8"> |
1578 | - <font color="white"> </font> |
1579 | - </para> |
1580 | - </story> |
1581 | -</document> |
1582 | |
1583 | === removed file 'point_of_sale/report/pos_details.sxw' |
1584 | Binary files point_of_sale/report/pos_details.sxw 2012-11-29 22:26:45 +0000 and point_of_sale/report/pos_details.sxw 1970-01-01 00:00:00 +0000 differ |
1585 | === removed file 'point_of_sale/report/pos_details_summary.py' |
1586 | --- point_of_sale/report/pos_details_summary.py 2014-02-12 12:14:08 +0000 |
1587 | +++ point_of_sale/report/pos_details_summary.py 1970-01-01 00:00:00 +0000 |
1588 | @@ -1,129 +0,0 @@ |
1589 | -# -*- coding: utf-8 -*- |
1590 | -############################################################################## |
1591 | -# |
1592 | -# OpenERP, Open Source Management Solution |
1593 | -# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). |
1594 | -# |
1595 | -# This program is free software: you can redistribute it and/or modify |
1596 | -# it under the terms of the GNU Affero General Public License as |
1597 | -# published by the Free Software Foundation, either version 3 of the |
1598 | -# License, or (at your option) any later version. |
1599 | -# |
1600 | -# This program is distributed in the hope that it will be useful, |
1601 | -# but WITHOUT ANY WARRANTY; without even the implied warranty of |
1602 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1603 | -# GNU Affero General Public License for more details. |
1604 | -# |
1605 | -# You should have received a copy of the GNU Affero General Public License |
1606 | -# along with this program. If not, see <http://www.gnu.org/licenses/>. |
1607 | -# |
1608 | -############################################################################## |
1609 | - |
1610 | -import time |
1611 | -from openerp.report import report_sxw |
1612 | - |
1613 | -class pos_details_summary(report_sxw.rml_parse): |
1614 | - def __init__(self, cr, uid, name, context): |
1615 | - super(pos_details_summary, self).__init__(cr, uid, name, context=context) |
1616 | - self.total = 0.0 |
1617 | - self.localcontext.update({ |
1618 | - 'time': time, |
1619 | - 'strip_name': self._strip_name, |
1620 | - 'getpayments': self._get_payments, |
1621 | - 'getqtytotal': self._get_qty_total, |
1622 | - 'getsumdisc': self._get_sum_discount, |
1623 | - 'getpaidtotal': self._paid_total, |
1624 | - 'gettotalofthaday': self._total_of_the_day, |
1625 | - 'getsuminvoice': self._sum_invoice, |
1626 | - 'gettaxamount': self._get_tax_amount, |
1627 | - 'getsalestotal': self._get_sales_total, |
1628 | - 'getstartperiod': self._get_start_period, |
1629 | - 'getendperiod': self._get_end_period, |
1630 | - 'getcompany':self.get_company |
1631 | - }) |
1632 | - |
1633 | - def get_company(self, objects): |
1634 | - comp=[obj.company_id.name for obj in objects] |
1635 | - return '%s' % (comp[0]) |
1636 | - |
1637 | - def _get_qty_total(self, objects): |
1638 | - #code for the sum of qty_total |
1639 | - return reduce(lambda acc, object: |
1640 | - acc + reduce( |
1641 | - lambda sum_qty, line: |
1642 | - sum_qty + line.qty, |
1643 | - object.lines, |
1644 | - 0 ), |
1645 | - objects, |
1646 | - 0) |
1647 | - |
1648 | - def _get_sum_discount(self, objects): |
1649 | - #code for the sum of discount value |
1650 | - return reduce(lambda acc, object: |
1651 | - acc + reduce( |
1652 | - lambda sum_dis, line: |
1653 | - sum_dis + ((line.price_unit * line.qty ) * (line.discount / 100)), |
1654 | - object.lines, |
1655 | - 0.0), |
1656 | - objects, |
1657 | - 0.0 ) |
1658 | - |
1659 | - def _get_payments(self, objects): |
1660 | - result = {} |
1661 | - for obj in objects: |
1662 | - for statement in obj.statement_ids: |
1663 | - if statement.journal_id: |
1664 | - result[statement.journal_id] = result.get(statement.journal_id, 0.0) + statement.amount |
1665 | - return result |
1666 | - |
1667 | - def _paid_total(self, objects): |
1668 | - return sum(self._get_payments(objects).values(), 0.0) |
1669 | - |
1670 | - def _total_of_the_day(self, objects): |
1671 | - total_paid = self._paid_total(objects) |
1672 | - total_invoiced = self._sum_invoice(objects) |
1673 | - return total_paid - total_invoiced |
1674 | - |
1675 | - def _sum_invoice(self, objects): |
1676 | - return reduce(lambda acc, obj: |
1677 | - acc + obj.invoice_id.amount_total, |
1678 | - [o for o in objects if o.invoice_id and o.invoice_id.number], |
1679 | - 0.0) |
1680 | - |
1681 | - def _ellipsis(self, string, maxlen=100, ellipsis = '...'): |
1682 | - ellipsis = ellipsis or '' |
1683 | - return string[:maxlen - len(ellipsis) ] + (ellipsis, '')[len(string) < maxlen] |
1684 | - |
1685 | - def _strip_name(self, name, maxlen=50): |
1686 | - return self._ellipsis(name, maxlen, ' ...') |
1687 | - |
1688 | - def _get_tax_amount(self, objects): |
1689 | - res = {} |
1690 | - for order in objects: |
1691 | - for line in order.lines: |
1692 | - for tax in line.product_id.taxes_id: |
1693 | - res[tax.name] = res.setdefault(tax.name, 0.0) + (line.price_subtotal_incl - line.price_subtotal) |
1694 | - return res |
1695 | - |
1696 | - def _get_sales_total(self, objects): |
1697 | - return reduce(lambda x, o: x + len(o.lines), objects, 0) |
1698 | - |
1699 | - def _get_start_period(self, objects): |
1700 | - date_orders = sorted([obj.date_order for obj in objects]) |
1701 | - min_date = date_orders[0] |
1702 | - return '%s' % min_date |
1703 | - |
1704 | - |
1705 | - def _get_end_period(self, objects): |
1706 | - date_orders = sorted([obj.date_order for obj in objects]) |
1707 | - max_date = date_orders[-1] |
1708 | - return '%s' % max_date |
1709 | - |
1710 | - |
1711 | -report_sxw.report_sxw('report.pos.details_summary', |
1712 | - 'pos.order', |
1713 | - 'addons/point_of_sale/report/pos_details_summary.rml', |
1714 | - parser=pos_details_summary, |
1715 | - header='internal') |
1716 | - |
1717 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
1718 | |
1719 | === removed file 'point_of_sale/report/pos_details_summary.rml' |
1720 | --- point_of_sale/report/pos_details_summary.rml 2014-02-12 11:30:04 +0000 |
1721 | +++ point_of_sale/report/pos_details_summary.rml 1970-01-01 00:00:00 +0000 |
1722 | @@ -1,315 +0,0 @@ |
1723 | -<?xml version="1.0"?> |
1724 | -<document filename="test.pdf"> |
1725 | - <template title="Details of Sales" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20"> |
1726 | - <pageTemplate id="first"> |
1727 | - <frame id="first" x1="28.0" y1="57.0" width="511" height="728"/> |
1728 | - </pageTemplate> |
1729 | - </template> |
1730 | - <stylesheet> |
1731 | - <blockTableStyle id="Standard_Outline"> |
1732 | - <blockAlignment value="LEFT"/> |
1733 | - <blockValign value="TOP"/> |
1734 | - </blockTableStyle> |
1735 | - <blockTableStyle id="Table1"> |
1736 | - <blockAlignment value="LEFT"/> |
1737 | - <blockValign value="TOP"/> |
1738 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/> |
1739 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/> |
1740 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> |
1741 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/> |
1742 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/> |
1743 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> |
1744 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/> |
1745 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/> |
1746 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/> |
1747 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/> |
1748 | - <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="3,0" stop="3,-1"/> |
1749 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/> |
1750 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/> |
1751 | - </blockTableStyle> |
1752 | - <blockTableStyle id="Table2"> |
1753 | - <blockAlignment value="LEFT"/> |
1754 | - <blockValign value="TOP"/> |
1755 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/> |
1756 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/> |
1757 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> |
1758 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/> |
1759 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/> |
1760 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> |
1761 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/> |
1762 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/> |
1763 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/> |
1764 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/> |
1765 | - <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="3,0" stop="3,-1"/> |
1766 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/> |
1767 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/> |
1768 | - </blockTableStyle> |
1769 | - <blockTableStyle id="Table3"> |
1770 | - <blockAlignment value="LEFT"/> |
1771 | - <blockValign value="TOP"/> |
1772 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/> |
1773 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/> |
1774 | - </blockTableStyle> |
1775 | - <blockTableStyle id="Table5"> |
1776 | - <blockAlignment value="LEFT"/> |
1777 | - <blockValign value="TOP"/> |
1778 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> |
1779 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> |
1780 | - </blockTableStyle> |
1781 | - <blockTableStyle id="Table9"> |
1782 | - <blockAlignment value="LEFT"/> |
1783 | - <blockValign value="TOP"/> |
1784 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/> |
1785 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/> |
1786 | - </blockTableStyle> |
1787 | - <blockTableStyle id="Table11"> |
1788 | - <blockAlignment value="LEFT"/> |
1789 | - <blockValign value="TOP"/> |
1790 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> |
1791 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> |
1792 | - </blockTableStyle> |
1793 | - <blockTableStyle id="Table8"> |
1794 | - <blockAlignment value="LEFT"/> |
1795 | - <blockValign value="TOP"/> |
1796 | - </blockTableStyle> |
1797 | - <blockTableStyle id="Table7"> |
1798 | - <blockAlignment value="LEFT"/> |
1799 | - <blockValign value="TOP"/> |
1800 | - <lineStyle kind="LINEABOVE" colorName="#000000" start="0,0" stop="0,0"/> |
1801 | - <lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/> |
1802 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,1" stop="0,1"/> |
1803 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,1" stop="1,1"/> |
1804 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> |
1805 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,2" stop="0,2"/> |
1806 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> |
1807 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,2" stop="1,2"/> |
1808 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> |
1809 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,3" stop="0,3"/> |
1810 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> |
1811 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,3" stop="1,3"/> |
1812 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> |
1813 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,4" stop="0,4"/> |
1814 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> |
1815 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,4" stop="1,4"/> |
1816 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> |
1817 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,5" stop="0,5"/> |
1818 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> |
1819 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,5" stop="1,5"/> |
1820 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> |
1821 | - </blockTableStyle> |
1822 | - <initialize> |
1823 | - <paraStyle name="all" alignment="justify"/> |
1824 | - </initialize> |
1825 | - <paraStyle name="P1" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
1826 | - <paraStyle name="P2" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
1827 | - <paraStyle name="Standard" fontName="Helvetica"/> |
1828 | - <paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/> |
1829 | - <paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/> |
1830 | - <paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/> |
1831 | - <paraStyle name="Caption" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/> |
1832 | - <paraStyle name="Index" fontName="Helvetica"/> |
1833 | - <paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/> |
1834 | - <paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
1835 | - <paraStyle name="Table Contents" fontName="Helvetica"/> |
1836 | - <paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER"/> |
1837 | - <paraStyle name="terp_default_Bold_8" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
1838 | - <paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
1839 | - <paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
1840 | - <paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/> |
1841 | - <paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/> |
1842 | - <paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> |
1843 | - <paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/> |
1844 | - <paraStyle name="Footer" fontName="Helvetica"/> |
1845 | - <paraStyle name="Horizontal Line" fontName="Helvetica" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/> |
1846 | - <paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/> |
1847 | - <paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/> |
1848 | - <paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/> |
1849 | - <paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/> |
1850 | - <paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> |
1851 | - <paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/> |
1852 | - <paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/> |
1853 | - <paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
1854 | - <paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> |
1855 | - <paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> |
1856 | - <paraStyle name="terp_default_1" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
1857 | - <paraStyle name="terp_default_Right_9_Bold" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> |
1858 | - <paraStyle name="terp_default_8_Italic" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
1859 | - <images/> |
1860 | - </stylesheet> |
1861 | - <story> |
1862 | - <para style="terp_default_8"> |
1863 | - <font color="white"> </font> |
1864 | - </para> |
1865 | - <para style="terp_header_Centre">Details of Sales</para> |
1866 | - <para style="terp_default_8"> |
1867 | - <font color="white"> </font> |
1868 | - </para> |
1869 | - <blockTable colWidths="149.0,124.0,119.0,120.0" style="Table1"> |
1870 | - <tr> |
1871 | - <td> |
1872 | - <para style="terp_tblheader_General_Centre">Company</para> |
1873 | - </td> |
1874 | - <td> |
1875 | - <para style="terp_tblheader_General_Centre">Print Date</para> |
1876 | - </td> |
1877 | - <td> |
1878 | - <para style="terp_tblheader_General_Centre">Start Period</para> |
1879 | - </td> |
1880 | - <td> |
1881 | - <para style="terp_tblheader_General_Centre">End Period</para> |
1882 | - </td> |
1883 | - </tr> |
1884 | - </blockTable> |
1885 | - <blockTable colWidths="148.0,124.0,119.0,119.0" style="Table2"> |
1886 | - <tr> |
1887 | - <td> |
1888 | - <para style="terp_default_Centre_8">[[ company.name ]]</para> |
1889 | - </td> |
1890 | - <td> |
1891 | - <para style="terp_default_Centre_8">[[ formatLang(time.strftime('%Y-%m-%d'),date=True) ]]</para> |
1892 | - </td> |
1893 | - <td> |
1894 | - <para style="terp_default_Centre_8">[[ '%s' % getstartperiod(objects) ]] </para> |
1895 | - </td> |
1896 | - <td> |
1897 | - <para style="terp_default_Centre_8">[[ '%s' % getendperiod(objects) ]]</para> |
1898 | - </td> |
1899 | - </tr> |
1900 | - </blockTable> |
1901 | - <para style="terp_default_8"> |
1902 | - <font color="white"> </font> |
1903 | - </para> |
1904 | - <section> |
1905 | - <para style="Standard"> |
1906 | - <font color="white"> </font> |
1907 | - </para> |
1908 | - </section> |
1909 | - <blockTable colWidths="256.0,256.0" style="Table3"> |
1910 | - <tr> |
1911 | - <td> |
1912 | - <para style="terp_tblheader_Details">Mode of Taxes</para> |
1913 | - </td> |
1914 | - <td> |
1915 | - <para style="terp_default_8"> |
1916 | - <font color="white"> </font> |
1917 | - </para> |
1918 | - </td> |
1919 | - </tr> |
1920 | - </blockTable> |
1921 | - <section> |
1922 | - <para style="terp_default_1">[[ repeatIn(gettaxamount(objects).items(),'p') ]]</para> |
1923 | - <blockTable colWidths="256.0,256.0" style="Table5"> |
1924 | - <tr> |
1925 | - <td> |
1926 | - <para style="P1">[[ p[0] ]]</para> |
1927 | - </td> |
1928 | - <td> |
1929 | - <para style="terp_default_Right_9_Bold">[[ formatLang(p[1], currency_obj=company.currency_id) ]]</para> |
1930 | - </td> |
1931 | - </tr> |
1932 | - </blockTable> |
1933 | - <para style="terp_default_1"> |
1934 | - <font color="white"> </font> |
1935 | - </para> |
1936 | - </section> |
1937 | - <para style="terp_default_8"> |
1938 | - <font color="white"> </font> |
1939 | - </para> |
1940 | - <blockTable colWidths="257.0,255.0" style="Table9"> |
1941 | - <tr> |
1942 | - <td> |
1943 | - <para style="terp_tblheader_Details">Mode of Payment</para> |
1944 | - </td> |
1945 | - <td> |
1946 | - <para style="terp_default_8"> |
1947 | - <font color="white"> </font> |
1948 | - </para> |
1949 | - </td> |
1950 | - </tr> |
1951 | - </blockTable> |
1952 | - <section> |
1953 | - <para style="terp_default_1">[[ repeatIn(getpayments(objects).items(),'t') ]]</para> |
1954 | - <blockTable colWidths="255.0,255.0" style="Table11"> |
1955 | - <tr> |
1956 | - <td> |
1957 | - <para style="P2">[[ t[0].name ]]</para> |
1958 | - </td> |
1959 | - <td> |
1960 | - <para style="terp_default_Right_9_Bold">[[ formatLang(t[1], currency_obj=company.currency_id) ]]</para> |
1961 | - </td> |
1962 | - </tr> |
1963 | - </blockTable> |
1964 | - <para style="terp_default_1"> |
1965 | - <font color="white"> </font> |
1966 | - </para> |
1967 | - </section> |
1968 | - <para style="terp_default_8"> |
1969 | - <font color="white"> </font> |
1970 | - </para> |
1971 | - <blockTable colWidths="257.0,255.0" style="Table8"> |
1972 | - <tr> |
1973 | - <td> |
1974 | - <para style="terp_tblheader_Details">Summary</para> |
1975 | - </td> |
1976 | - <td> |
1977 | - <para style="terp_default_9"> |
1978 | - <font color="white"> </font> |
1979 | - </para> |
1980 | - </td> |
1981 | - </tr> |
1982 | - </blockTable> |
1983 | - <blockTable colWidths="257.0,254.0" style="Table7"> |
1984 | - <tr> |
1985 | - <td> |
1986 | - <para style="terp_default_Bold_9">Sales total</para> |
1987 | - </td> |
1988 | - <td> |
1989 | - <para style="terp_default_Right_9_Bold">[[ '%d' % getsalestotal(objects) ]]</para> |
1990 | - </td> |
1991 | - </tr> |
1992 | - <tr> |
1993 | - <td> |
1994 | - <para style="terp_default_Bold_9">Qty of product</para> |
1995 | - </td> |
1996 | - <td> |
1997 | - <para style="terp_default_Right_9_Bold">[[ '%d' % getqtytotal(objects) ]]</para> |
1998 | - </td> |
1999 | - </tr> |
2000 | - <tr> |
2001 | - <td> |
2002 | - <para style="terp_default_Bold_9">Total invoiced</para> |
2003 | - </td> |
2004 | - <td> |
2005 | - <para style="terp_default_Right_9_Bold">[[ formatLang(getsuminvoice(objects), currency_obj=company.currency_id) ]]</para> |
2006 | - </td> |
2007 | - </tr> |
2008 | - <tr> |
2009 | - <td> |
2010 | - <para style="terp_default_Bold_9">Total discount</para> |
2011 | - </td> |
2012 | - <td> |
2013 | - <para style="terp_default_Right_9_Bold">[[ formatLang(getsumdisc(objects), currency_obj=company.currency_id) ]]</para> |
2014 | - </td> |
2015 | - </tr> |
2016 | - <tr> |
2017 | - <td> |
2018 | - <para style="terp_default_Bold_9">Total paid</para> |
2019 | - </td> |
2020 | - <td> |
2021 | - <para style="terp_default_Right_9_Bold">[[ formatLang(getpaidtotal(objects), currency_obj=company.currency_id) ]]</para> |
2022 | - </td> |
2023 | - </tr> |
2024 | - <tr> |
2025 | - <td> |
2026 | - <para style="terp_default_Bold_9">Total of the day</para> |
2027 | - </td> |
2028 | - <td> |
2029 | - <para style="terp_default_Right_9_Bold">[[ formatLang(gettotalofthaday(objects), currency_obj=company.currency_id) ]]</para> |
2030 | - </td> |
2031 | - </tr> |
2032 | - </blockTable> |
2033 | - <para style="terp_default_8"> |
2034 | - <font color="white"> </font> |
2035 | - </para> |
2036 | - </story> |
2037 | -</document> |
2038 | |
2039 | === removed file 'point_of_sale/report/pos_details_summary.sxw' |
2040 | Binary files point_of_sale/report/pos_details_summary.sxw 2014-02-12 12:14:08 +0000 and point_of_sale/report/pos_details_summary.sxw 1970-01-01 00:00:00 +0000 differ |
2041 | === modified file 'point_of_sale/report/pos_invoice.py' |
2042 | --- point_of_sale/report/pos_invoice.py 2012-12-06 14:56:32 +0000 |
2043 | +++ point_of_sale/report/pos_invoice.py 2014-04-29 12:44:05 +0000 |
2044 | @@ -2,7 +2,7 @@ |
2045 | ############################################################################## |
2046 | # |
2047 | # OpenERP, Open Source Management Solution |
2048 | -# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). |
2049 | +# Copyright (C) 2014-Today OpenERP SA (<http://www.openerp.com>). |
2050 | # |
2051 | # This program is free software: you can redistribute it and/or modify |
2052 | # it under the terms of the GNU Affero General Public License as |
2053 | @@ -19,40 +19,33 @@ |
2054 | # |
2055 | ############################################################################## |
2056 | |
2057 | -import time |
2058 | - |
2059 | -from openerp.report import report_sxw |
2060 | from openerp.osv import osv |
2061 | from openerp.tools.translate import _ |
2062 | |
2063 | -class pos_invoice(report_sxw.rml_parse): |
2064 | - |
2065 | - def __init__(self, cr, uid, name, context): |
2066 | - super(pos_invoice, self).__init__(cr, uid, name, context=context) |
2067 | - self.localcontext.update({ |
2068 | - 'time': time, |
2069 | - }) |
2070 | - |
2071 | - def set_context(self, objects, data, ids, report_type=None): |
2072 | - super(pos_invoice, self).set_context(objects, data, ids, report_type) |
2073 | - iids = [] |
2074 | - nids = [] |
2075 | - |
2076 | - for order in objects: |
2077 | - order.write({'nb_print': order.nb_print + 1}) |
2078 | - |
2079 | - if order.invoice_id and order.invoice_id not in iids: |
2080 | - if not order.invoice_id: |
2081 | - raise osv.except_osv(_('Error!'), _('Please create an invoice for this sale.')) |
2082 | - iids.append(order.invoice_id) |
2083 | - nids.append(order.invoice_id.id) |
2084 | - data['ids'] = nids |
2085 | - self.datas = data |
2086 | - self.ids = nids |
2087 | - self.objects = iids |
2088 | - self.localcontext['data'] = data |
2089 | - self.localcontext['objects'] = iids |
2090 | - |
2091 | -report_sxw.report_sxw('report.pos.invoice', 'pos.order', 'addons/account/report/account_print_invoice.rml', parser= pos_invoice) |
2092 | - |
2093 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
2094 | + |
2095 | +class PosInvoiceReport(osv.AbstractModel): |
2096 | + _name = 'report.point_of_sale.report_invoice' |
2097 | + |
2098 | + def render_html(self, cr, uid, ids, data=None, context=None): |
2099 | + report_obj = self.pool['report'] |
2100 | + posorder_obj = self.pool['pos.order'] |
2101 | + report = report_obj._get_report_from_name(cr, uid, 'account.report_invoice') |
2102 | + selected_orders = posorder_obj.browse(cr, uid, ids, context=context) |
2103 | + |
2104 | + invoiced_posorders_ids = [] |
2105 | + for order in selected_orders: |
2106 | + if order.invoice_id: |
2107 | + invoiced_posorders_ids.append(order.id) |
2108 | + |
2109 | + not_invoiced_orders_ids = list(set(ids) - set(invoiced_posorders_ids)) |
2110 | + if not_invoiced_orders_ids: |
2111 | + not_invoiced_posorders = posorder_obj.browse(cr, uid, not_invoiced_orders_ids, context=context) |
2112 | + not_invoiced_orders_names = list(map(lambda a: a.name, not_invoiced_posorders)) |
2113 | + raise osv.except_osv(_('Error!'), _('No link to an invoice for %s.' % ', '.join(not_invoiced_orders_names))) |
2114 | + |
2115 | + docargs = { |
2116 | + 'doc_ids': ids, |
2117 | + 'doc_model': report.model, |
2118 | + 'docs': selected_orders, |
2119 | + } |
2120 | + return report_obj.render(cr, uid, ids, 'account.report_invoice', docargs, context=context) |
2121 | |
2122 | === modified file 'point_of_sale/report/pos_lines.py' |
2123 | --- point_of_sale/report/pos_lines.py 2012-12-06 14:56:32 +0000 |
2124 | +++ point_of_sale/report/pos_lines.py 2014-04-29 12:44:05 +0000 |
2125 | @@ -20,8 +20,10 @@ |
2126 | ############################################################################## |
2127 | |
2128 | import time |
2129 | +from openerp.osv import osv |
2130 | from openerp.report import report_sxw |
2131 | |
2132 | + |
2133 | class pos_lines(report_sxw.rml_parse): |
2134 | |
2135 | def __init__(self, cr, uid, name, context): |
2136 | @@ -50,6 +52,11 @@ |
2137 | res=self.cr.fetchone()[0] |
2138 | return res |
2139 | |
2140 | -report_sxw.report_sxw('report.pos.lines', 'pos.order', 'addons/point_of_sale/report/pos_lines.rml', parser=pos_lines,header='internal') |
2141 | + |
2142 | +class report_pos_lines(osv.AbstractModel): |
2143 | + _name = 'report.point_of_sale.report_saleslines' |
2144 | + _inherit = 'report.abstract_report' |
2145 | + _template = 'point_of_sale.report_saleslines' |
2146 | + _wrapped_report_class = pos_lines |
2147 | |
2148 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
2149 | |
2150 | === removed file 'point_of_sale/report/pos_lines.rml' |
2151 | --- point_of_sale/report/pos_lines.rml 2012-11-29 22:26:45 +0000 |
2152 | +++ point_of_sale/report/pos_lines.rml 1970-01-01 00:00:00 +0000 |
2153 | @@ -1,239 +0,0 @@ |
2154 | -<?xml version="1.0"?> |
2155 | -<document filename="Sale Lines.pdf"> |
2156 | - <template title="Sale Lines" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20"> |
2157 | - <pageTemplate id="first"> |
2158 | - <frame id="first" x1="27.0" y1="57.0" width="512" height="728"/> |
2159 | - </pageTemplate> |
2160 | - </template> |
2161 | - <stylesheet> |
2162 | - <blockTableStyle id="Standard_Outline"> |
2163 | - <blockAlignment value="LEFT"/> |
2164 | - <blockValign value="TOP"/> |
2165 | - </blockTableStyle> |
2166 | - <blockTableStyle id="Table3"> |
2167 | - <blockAlignment value="LEFT"/> |
2168 | - <blockValign value="TOP"/> |
2169 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/> |
2170 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/> |
2171 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> |
2172 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/> |
2173 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/> |
2174 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> |
2175 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/> |
2176 | - <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="2,0" stop="2,-1"/> |
2177 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/> |
2178 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/> |
2179 | - </blockTableStyle> |
2180 | - <blockTableStyle id="Table4"> |
2181 | - <blockAlignment value="LEFT"/> |
2182 | - <blockValign value="TOP"/> |
2183 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/> |
2184 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/> |
2185 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> |
2186 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/> |
2187 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/> |
2188 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> |
2189 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/> |
2190 | - <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="2,0" stop="2,-1"/> |
2191 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/> |
2192 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/> |
2193 | - </blockTableStyle> |
2194 | - <blockTableStyle id="Tableau6"> |
2195 | - <blockAlignment value="LEFT"/> |
2196 | - <blockValign value="TOP"/> |
2197 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/> |
2198 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/> |
2199 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/> |
2200 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/> |
2201 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/> |
2202 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="5,-1" stop="5,-1"/> |
2203 | - </blockTableStyle> |
2204 | - <blockTableStyle id="Tableau7"> |
2205 | - <blockAlignment value="LEFT"/> |
2206 | - <blockValign value="TOP"/> |
2207 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> |
2208 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> |
2209 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/> |
2210 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/> |
2211 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/> |
2212 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="5,-1" stop="5,-1"/> |
2213 | - </blockTableStyle> |
2214 | - <blockTableStyle id="Table1"> |
2215 | - <blockAlignment value="LEFT"/> |
2216 | - <blockValign value="TOP"/> |
2217 | - <lineStyle kind="LINEABOVE" colorName="#ffffff" start="0,0" stop="0,0"/> |
2218 | - <lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/> |
2219 | - <lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/> |
2220 | - <lineStyle kind="LINEABOVE" colorName="#000000" start="1,2" stop="1,2"/> |
2221 | - <lineStyle kind="LINEABOVE" colorName="#000000" start="2,2" stop="2,2"/> |
2222 | - </blockTableStyle> |
2223 | - <initialize> |
2224 | - <paraStyle name="all" alignment="justify"/> |
2225 | - </initialize> |
2226 | - <paraStyle name="Standard" fontName="Helvetica"/> |
2227 | - <paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/> |
2228 | - <paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/> |
2229 | - <paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/> |
2230 | - <paraStyle name="Table Contents" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/> |
2231 | - <paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/> |
2232 | - <paraStyle name="Caption" fontName="Helvetica-Oblique" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/> |
2233 | - <paraStyle name="Index" fontName="Helvetica"/> |
2234 | - <paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/> |
2235 | - <paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
2236 | - <paraStyle name="terp_default_Bold_8" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
2237 | - <paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
2238 | - <paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
2239 | - <paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/> |
2240 | - <paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/> |
2241 | - <paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> |
2242 | - <paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/> |
2243 | - <paraStyle name="Footer" fontName="Helvetica"/> |
2244 | - <paraStyle name="Horizontal Line" fontName="Helvetica" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/> |
2245 | - <paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/> |
2246 | - <paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/> |
2247 | - <paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/> |
2248 | - <paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/> |
2249 | - <paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> |
2250 | - <paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/> |
2251 | - <paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/> |
2252 | - <paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
2253 | - <paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> |
2254 | - <paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> |
2255 | - <paraStyle name="terp_default_1" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
2256 | - <paraStyle name="terp_default_Right_9_Bold" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> |
2257 | - <paraStyle name="terp_default_8_Italic" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
2258 | - <paraStyle name="Heading 3" fontName="Helvetica-Bold" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/> |
2259 | - <images/> |
2260 | - </stylesheet> |
2261 | - <story> |
2262 | - <para style="terp_default_8">[[repeatIn(objects,'o')]]</para> |
2263 | - <para style="terp_default_8">[[ setLang(o.partner_id.lang) ]]</para> |
2264 | - <para style="terp_header_Centre">Sales lines</para> |
2265 | - <para style="terp_default_8"> |
2266 | - <font color="white"> </font> |
2267 | - </para> |
2268 | - <blockTable colWidths="171.0,170.0,170.0" style="Table3"> |
2269 | - <tr> |
2270 | - <td> |
2271 | - <para style="terp_tblheader_General_Centre">Company</para> |
2272 | - </td> |
2273 | - <td> |
2274 | - <para style="terp_tblheader_General_Centre">Print Date</para> |
2275 | - </td> |
2276 | - <td> |
2277 | - <para style="terp_tblheader_General_Centre">No. Of Articles</para> |
2278 | - </td> |
2279 | - </tr> |
2280 | - </blockTable> |
2281 | - <blockTable colWidths="170.0,170.0,170.0" style="Table4"> |
2282 | - <tr> |
2283 | - <td> |
2284 | - <para style="terp_default_Centre_8">[[ company.name ]]</para> |
2285 | - </td> |
2286 | - <td> |
2287 | - <para style="terp_default_Centre_8">[[ formatLang(time.strftime('%Y-%m-%d'),date = True) ]]</para> |
2288 | - </td> |
2289 | - <td> |
2290 | - <para style="terp_default_Centre_8">[[ formatLang(total_quantity(o)) ]]</para> |
2291 | - </td> |
2292 | - </tr> |
2293 | - </blockTable> |
2294 | - <para style="Standard"> |
2295 | - <font color="white"> </font> |
2296 | - </para> |
2297 | - <para style="terp_default_9"> |
2298 | - <font color="white"> </font> |
2299 | - </para> |
2300 | - <blockTable colWidths="186.0,71.0,71.0,57.0,57.0,71.0" style="Tableau6"> |
2301 | - <tr> |
2302 | - <td> |
2303 | - <para style="terp_tblheader_Details">Description</para> |
2304 | - </td> |
2305 | - <td> |
2306 | - <para style="terp_tblheader_Details_Centre">Tax</para> |
2307 | - </td> |
2308 | - <td> |
2309 | - <para style="terp_tblheader_Details_Right">Quantity</para> |
2310 | - </td> |
2311 | - <td> |
2312 | - <para style="terp_tblheader_Details_Right">Unit Price</para> |
2313 | - </td> |
2314 | - <td> |
2315 | - <para style="terp_tblheader_Details_Centre">Disc. (%)</para> |
2316 | - </td> |
2317 | - <td> |
2318 | - <para style="terp_tblheader_Details_Right">Price</para> |
2319 | - </td> |
2320 | - </tr> |
2321 | - </blockTable> |
2322 | - <section> |
2323 | - <para style="terp_default_1">[[repeatIn(o.lines,'l')]]</para> |
2324 | - <blockTable colWidths="186.0,71.0,71.0,57.0,57.0,71.0" style="Tableau7"> |
2325 | - <tr> |
2326 | - <td> |
2327 | - <para style="terp_default_9">[ [[l.product_id.code]] ] [[l.product_id.name]]</para> |
2328 | - </td> |
2329 | - <td> |
2330 | - <para style="terp_default_Centre_9">[[taxes(l)]]</para> |
2331 | - </td> |
2332 | - <td> |
2333 | - <para style="terp_default_Right_9">[[ formatLang(l.qty) ]] [[l.product_id.uom_id.name]]</para> |
2334 | - </td> |
2335 | - <td> |
2336 | - <para style="terp_default_Right_9">[[ formatLang(l.price_unit) ]] </para> |
2337 | - </td> |
2338 | - <td> |
2339 | - <para style="terp_default_Centre_9">[[ formatLang(l.discount) ]]</para> |
2340 | - </td> |
2341 | - <td> |
2342 | - <para style="terp_default_Right_9">[[ formatLang(l.price_subtotal, currency_obj=o.pricelist_id.currency_id) ]]</para> |
2343 | - </td> |
2344 | - </tr> |
2345 | - </blockTable> |
2346 | - </section> |
2347 | - <blockTable colWidths="356.0,71.0,85.0" style="Table1"> |
2348 | - <tr> |
2349 | - <td> |
2350 | - <para style="terp_default_9"> |
2351 | - <font color="white"> </font> |
2352 | - </para> |
2353 | - </td> |
2354 | - <td> |
2355 | - <para style="terp_default_9">Net Total :</para> |
2356 | - </td> |
2357 | - <td> |
2358 | - <para style="terp_default_Right_9">[[ formatLang(o.amount_total, currency_obj=o.pricelist_id.currency_id) ]]</para> |
2359 | - </td> |
2360 | - </tr> |
2361 | - <tr> |
2362 | - <td> |
2363 | - <para style="terp_default_9"> |
2364 | - <font color="white"> </font> |
2365 | - </para> |
2366 | - </td> |
2367 | - <td> |
2368 | - <para style="terp_default_9">Taxes :</para> |
2369 | - </td> |
2370 | - <td> |
2371 | - <para style="terp_default_Right_9">[[ formatLang(o.amount_tax, currency_obj=o.pricelist_id.currency_id) ]]</para> |
2372 | - </td> |
2373 | - </tr> |
2374 | - <tr> |
2375 | - <td> |
2376 | - <para style="terp_default_9"> |
2377 | - <font color="white"> </font> |
2378 | - </para> |
2379 | - </td> |
2380 | - <td> |
2381 | - <para style="terp_default_Bold_9">Total:</para> |
2382 | - </td> |
2383 | - <td> |
2384 | - <para style="terp_default_Right_9_Bold">[[ formatLang(o.amount_total + o.amount_tax, currency_obj=o.pricelist_id.currency_id) ]]</para> |
2385 | - </td> |
2386 | - </tr> |
2387 | - </blockTable> |
2388 | - <para style="terp_default_9"> |
2389 | - <font color="white"> </font> |
2390 | - </para> |
2391 | - </story> |
2392 | -</document> |
2393 | |
2394 | === removed file 'point_of_sale/report/pos_lines.sxw' |
2395 | Binary files point_of_sale/report/pos_lines.sxw 2012-11-29 22:26:45 +0000 and point_of_sale/report/pos_lines.sxw 1970-01-01 00:00:00 +0000 differ |
2396 | === modified file 'point_of_sale/report/pos_payment_report.py' |
2397 | --- point_of_sale/report/pos_payment_report.py 2012-12-06 14:56:32 +0000 |
2398 | +++ point_of_sale/report/pos_payment_report.py 2014-04-29 12:44:05 +0000 |
2399 | @@ -20,8 +20,10 @@ |
2400 | ############################################################################## |
2401 | |
2402 | import time |
2403 | +from openerp.osv import osv |
2404 | from openerp.report import report_sxw |
2405 | |
2406 | + |
2407 | class pos_payment_report(report_sxw.rml_parse): |
2408 | |
2409 | def __init__(self, cr, uid, name, context): |
2410 | @@ -34,6 +36,7 @@ |
2411 | }) |
2412 | |
2413 | def _pos_payment(self, obj): |
2414 | + self.total = 0 |
2415 | data={} |
2416 | sql = """ select id from pos_order where id = %d"""%(obj.id) |
2417 | self.cr.execute(sql) |
2418 | @@ -59,6 +62,11 @@ |
2419 | def _pos_payment_total(self, o): |
2420 | return self.total |
2421 | |
2422 | -report_sxw.report_sxw('report.pos.payment.report', 'pos.order', 'addons/point_of_sale/report/pos_payment_report.rml', parser=pos_payment_report,header='internal') |
2423 | + |
2424 | +class report_pos_payment(osv.AbstractModel): |
2425 | + _name = 'report.point_of_sale.report_payment' |
2426 | + _inherit = 'report.abstract_report' |
2427 | + _template = 'point_of_sale.report_payment' |
2428 | + _wrapped_report_class = pos_payment_report |
2429 | |
2430 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
2431 | |
2432 | === removed file 'point_of_sale/report/pos_payment_report.rml' |
2433 | --- point_of_sale/report/pos_payment_report.rml 2012-11-29 22:26:45 +0000 |
2434 | +++ point_of_sale/report/pos_payment_report.rml 1970-01-01 00:00:00 +0000 |
2435 | @@ -1,209 +0,0 @@ |
2436 | -<?xml version="1.0"?> |
2437 | -<document filename="test.pdf"> |
2438 | - <template title="Payment" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20"> |
2439 | - <pageTemplate id="first"> |
2440 | - <frame id="first" x1="2.0" y1="57.0" width="537" height="728"/> |
2441 | - </pageTemplate> |
2442 | - </template> |
2443 | - <stylesheet> |
2444 | - <blockTableStyle id="Standard_Outline"> |
2445 | - <blockAlignment value="LEFT"/> |
2446 | - <blockValign value="TOP"/> |
2447 | - </blockTableStyle> |
2448 | - <blockTableStyle id="Table3"> |
2449 | - <blockAlignment value="LEFT"/> |
2450 | - <blockValign value="TOP"/> |
2451 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/> |
2452 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/> |
2453 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> |
2454 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/> |
2455 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/> |
2456 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> |
2457 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/> |
2458 | - <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="2,0" stop="2,-1"/> |
2459 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/> |
2460 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/> |
2461 | - </blockTableStyle> |
2462 | - <blockTableStyle id="Table4"> |
2463 | - <blockAlignment value="LEFT"/> |
2464 | - <blockValign value="TOP"/> |
2465 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/> |
2466 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/> |
2467 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> |
2468 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/> |
2469 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/> |
2470 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> |
2471 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/> |
2472 | - <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="2,0" stop="2,-1"/> |
2473 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/> |
2474 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/> |
2475 | - </blockTableStyle> |
2476 | - <blockTableStyle id="Tableau6"> |
2477 | - <blockAlignment value="LEFT"/> |
2478 | - <blockValign value="TOP"/> |
2479 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/> |
2480 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/> |
2481 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/> |
2482 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/> |
2483 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/> |
2484 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="5,-1" stop="5,-1"/> |
2485 | - </blockTableStyle> |
2486 | - <blockTableStyle id="Tableau7"> |
2487 | - <blockAlignment value="LEFT"/> |
2488 | - <blockValign value="TOP"/> |
2489 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> |
2490 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> |
2491 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/> |
2492 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/> |
2493 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/> |
2494 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="5,-1" stop="5,-1"/> |
2495 | - </blockTableStyle> |
2496 | - <blockTableStyle id="Table1"> |
2497 | - <blockAlignment value="LEFT"/> |
2498 | - <blockValign value="TOP"/> |
2499 | - <lineStyle kind="LINEABOVE" colorName="#ffffff" start="0,0" stop="0,0"/> |
2500 | - <lineStyle kind="LINEABOVE" colorName="#ffffff" start="1,0" stop="1,0"/> |
2501 | - <lineStyle kind="LINEABOVE" colorName="#ffffff" start="2,0" stop="2,0"/> |
2502 | - <lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="-1,-1"/> |
2503 | - </blockTableStyle> |
2504 | - <initialize> |
2505 | - <paraStyle name="all" alignment="justify"/> |
2506 | - </initialize> |
2507 | - <paraStyle name="Standard" fontName="Times-Roman"/> |
2508 | - <paraStyle name="Text body" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/> |
2509 | - <paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/> |
2510 | - <paraStyle name="List" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/> |
2511 | - <paraStyle name="Table Contents" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/> |
2512 | - <paraStyle name="Table Heading" fontName="Times-Roman" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/> |
2513 | - <paraStyle name="Caption" fontName="Times-Italic" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/> |
2514 | - <paraStyle name="Index" fontName="Times-Roman"/> |
2515 | - <paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/> |
2516 | - <paraStyle name="terp_header_center" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> |
2517 | - <paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
2518 | - <paraStyle name="terp_default_Bold_8" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
2519 | - <paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
2520 | - <paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
2521 | - <paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/> |
2522 | - <paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/> |
2523 | - <paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> |
2524 | - <paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/> |
2525 | - <paraStyle name="Footer" fontName="Times-Roman"/> |
2526 | - <paraStyle name="Horizontal Line" fontName="Times-Roman" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/> |
2527 | - <paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/> |
2528 | - <paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/> |
2529 | - <paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/> |
2530 | - <paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/> |
2531 | - <paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> |
2532 | - <paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/> |
2533 | - <paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/> |
2534 | - <paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
2535 | - <paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> |
2536 | - <paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> |
2537 | - <paraStyle name="terp_default_1" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
2538 | - <paraStyle name="terp_default_Right_9_Bold" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> |
2539 | - <paraStyle name="terp_default_8_Italic" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
2540 | - <paraStyle name="Heading 3" fontName="Helvetica-Bold" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/> |
2541 | - </stylesheet> |
2542 | - <images/> |
2543 | - <story> |
2544 | - <para style="terp_default_9"> |
2545 | - <font color="white"> </font> |
2546 | - </para> |
2547 | - <para style="terp_default_9"> |
2548 | - <font color="white"> </font> |
2549 | - </para> |
2550 | - <para style="terp_header_center">Payment For Sale</para> |
2551 | - <para style="terp_default_9"> |
2552 | - <font color="white"> </font> |
2553 | - </para> |
2554 | - <para style="terp_default_9"> |
2555 | - <font color="white"> </font> |
2556 | - </para> |
2557 | - <blockTable colWidths="268.0,268.0" style="Table3"> |
2558 | - <tr> |
2559 | - <td> |
2560 | - <para style="terp_tblheader_General_Centre">Company</para> |
2561 | - </td> |
2562 | - <td> |
2563 | - <para style="terp_tblheader_General_Centre">Print Date</para> |
2564 | - </td> |
2565 | - </tr> |
2566 | - </blockTable> |
2567 | - <blockTable colWidths="268.0,268.0" style="Table4"> |
2568 | - <tr> |
2569 | - <td> |
2570 | - <para style="terp_default_Centre_8">[[ company.name ]]</para> |
2571 | - </td> |
2572 | - <td> |
2573 | - <para style="terp_default_Centre_8">[[ formatLang(time.strftime('%Y-%m-%d'),date = True) ]]</para> |
2574 | - </td> |
2575 | - </tr> |
2576 | - </blockTable> |
2577 | - <para style="Standard"> |
2578 | - <font color="white"> </font> |
2579 | - </para> |
2580 | - <para style="terp_default_9"> |
2581 | - <font color="white"> </font> |
2582 | - </para> |
2583 | - <blockTable colWidths="257.0,71.0,57.0,57.0,71.0" style="Tableau6"> |
2584 | - <tr> |
2585 | - <td> |
2586 | - <para style="terp_tblheader_Details">Product</para> |
2587 | - </td> |
2588 | - <td> |
2589 | - <para style="terp_tblheader_Details_Centre">Qty</para> |
2590 | - </td> |
2591 | - <td> |
2592 | - <para style="terp_tblheader_Details_Centre">Disc.(%)</para> |
2593 | - </td> |
2594 | - <td> |
2595 | - <para style="terp_tblheader_Details_Right">Unit Price</para> |
2596 | - </td> |
2597 | - <td> |
2598 | - <para style="terp_tblheader_Details_Right">Total</para> |
2599 | - </td> |
2600 | - </tr> |
2601 | - </blockTable> |
2602 | - <section> |
2603 | - <para style="terp_default_8">[[ repeatIn(objects,'o') ]]</para> |
2604 | - <section> |
2605 | - <para style="terp_default_8">[[ repeatIn(pos_payment(o), 'line_ids') ]]</para> |
2606 | - <blockTable colWidths="257.0,71.0,57.0,57.0,71.0" style="Tableau7"> |
2607 | - <tr> |
2608 | - <td> |
2609 | - <para style="terp_default_9">[ [[ line_ids['code'] ]] ] [[ line_ids['name'] ]]</para> |
2610 | - </td> |
2611 | - <td> |
2612 | - <para style="terp_default_Right_9">[[ formatLang(line_ids['qty']) ]] [[line_ids['uom'] ]]</para> |
2613 | - </td> |
2614 | - <td> |
2615 | - <para style="terp_default_Right_9">[[ formatLang(line_ids['discount']) ]]</para> |
2616 | - </td> |
2617 | - <td> |
2618 | - <para style="terp_default_Right_9">[[ formatLang(line_ids['price_unit']) ]]</para> |
2619 | - </td> |
2620 | - <td> |
2621 | - <para style="terp_default_Right_9">[[ formatLang(line_ids['total'], currency_obj = company.currency_id) ]]</para> |
2622 | - </td> |
2623 | - |
2624 | - </tr> |
2625 | - </blockTable> |
2626 | - </section> |
2627 | - </section> |
2628 | - <blockTable colWidths="356.0,71.0,85.0" style="Table1"> |
2629 | - <tr> |
2630 | - <td> |
2631 | - <para style="terp_default_9"> |
2632 | - <font color="white"> </font> |
2633 | - </para> |
2634 | - </td> |
2635 | - <td> |
2636 | - <para style="terp_tblheader_Details">Net Total:</para> |
2637 | - </td> |
2638 | - <td> |
2639 | - <para style="terp_default_Right_9_Bold">[[ formatLang(pos_payment_total(o), currency_obj = company.currency_id) or removeParentNode('blockTable')]]</para> |
2640 | - </td> |
2641 | - </tr> |
2642 | - </blockTable> |
2643 | - </story> |
2644 | -</document> |
2645 | |
2646 | === removed file 'point_of_sale/report/pos_payment_report_user.py' |
2647 | --- point_of_sale/report/pos_payment_report_user.py 2012-12-06 14:56:32 +0000 |
2648 | +++ point_of_sale/report/pos_payment_report_user.py 1970-01-01 00:00:00 +0000 |
2649 | @@ -1,64 +0,0 @@ |
2650 | -# -*- coding: utf-8 -*- |
2651 | -############################################################################## |
2652 | -# |
2653 | -# OpenERP, Open Source Management Solution |
2654 | -# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). |
2655 | -# |
2656 | -# This program is free software: you can redistribute it and/or modify |
2657 | -# it under the terms of the GNU Affero General Public License as |
2658 | -# published by the Free Software Foundation, either version 3 of the |
2659 | -# License, or (at your option) any later version. |
2660 | -# |
2661 | -# This program is distributed in the hope that it will be useful, |
2662 | -# but WITHOUT ANY WARRANTY; without even the implied warranty of |
2663 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2664 | -# GNU Affero General Public License for more details. |
2665 | -# |
2666 | -# You should have received a copy of the GNU Affero General Public License |
2667 | -# along with this program. If not, see <http://www.gnu.org/licenses/>. |
2668 | -# |
2669 | -############################################################################## |
2670 | - |
2671 | -import time |
2672 | -from openerp.report import report_sxw |
2673 | - |
2674 | -class pos_payment_report_user(report_sxw.rml_parse): |
2675 | - |
2676 | - def __init__(self, cr, uid, name, context): |
2677 | - super(pos_payment_report_user, self).__init__(cr, uid, name, context=context) |
2678 | - self.total = 0.0 |
2679 | - self.localcontext.update({ |
2680 | - 'time': time, |
2681 | - 'pos_payment_user': self.__pos_payment_user__, |
2682 | - 'pos_payment_user_total':self.__pos_payment_user__total__, |
2683 | - }) |
2684 | - |
2685 | - def __pos_payment_user__(self, form): |
2686 | - data={} |
2687 | - ids = form['user_id'] |
2688 | - sql = "select pt.name,pp.default_code as code,pol.qty,pu.name as uom,pol.discount,pol.price_unit, " \ |
2689 | - "(pol.price_unit * pol.qty * (1 - (pol.discount) / 100.0)) as total " \ |
2690 | - "from pos_order as po,pos_order_line as pol,product_product as pp,product_template as pt,product_uom as pu " \ |
2691 | - "where pt.id=pp.product_tmpl_id and pp.id=pol.product_id and po.id = pol.order_id and pu.id=pt.uom_id " \ |
2692 | - "and po.state in ('paid','invoiced') and to_char(date_trunc('day',po.date_order),'YYYY-MM-DD')::date = current_date " \ |
2693 | - "and po.user_id IN %s" |
2694 | - self.cr.execute (sql, (tuple(ids), )) |
2695 | - data=self.cr.dictfetchall() |
2696 | - return data |
2697 | - |
2698 | - def __pos_payment_user__total__(self, form): |
2699 | - res=[] |
2700 | - ids = form['user_id'] |
2701 | - self.cr.execute ("select sum(pol.price_unit * pol.qty * (1 - (pol.discount) / 100.0)) " \ |
2702 | - "from pos_order as po,pos_order_line as pol,product_product as pp,product_template as pt " \ |
2703 | - "where pt.id=pp.product_tmpl_id and pp.id=pol.product_id and po.id = pol.order_id " \ |
2704 | - "and po.state='paid' and to_char(date_trunc('day',po.date_order),'YYYY-MM-DD')::date = current_date " \ |
2705 | - "and po.user_id IN %s",(tuple(ids),)) |
2706 | - res=self.cr.fetchone() |
2707 | - res = res and res[0] or 0.0 |
2708 | - |
2709 | - return res |
2710 | - |
2711 | -report_sxw.report_sxw('report.pos.payment.report.user', 'pos.order', 'addons/point_of_sale/report/pos_payment_report_user.rml', parser=pos_payment_report_user,header='internal') |
2712 | - |
2713 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
2714 | |
2715 | === removed file 'point_of_sale/report/pos_payment_report_user.rml' |
2716 | --- point_of_sale/report/pos_payment_report_user.rml 2012-11-29 22:26:45 +0000 |
2717 | +++ point_of_sale/report/pos_payment_report_user.rml 1970-01-01 00:00:00 +0000 |
2718 | @@ -1,205 +0,0 @@ |
2719 | -<?xml version="1.0"?> |
2720 | -<document filename="test.pdf"> |
2721 | - <template title="Payment By User" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20"> |
2722 | - <pageTemplate id="first"> |
2723 | - <frame id="first" x1="57.0" y1="57.0" width="481" height="728"/> |
2724 | - </pageTemplate> |
2725 | - </template> |
2726 | - <stylesheet> |
2727 | - <blockTableStyle id="Standard_Outline"> |
2728 | - <blockAlignment value="LEFT"/> |
2729 | - <blockValign value="TOP"/> |
2730 | - </blockTableStyle> |
2731 | - <blockTableStyle id="Table1"> |
2732 | - <blockAlignment value="LEFT"/> |
2733 | - <blockValign value="TOP"/> |
2734 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/> |
2735 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/> |
2736 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> |
2737 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/> |
2738 | - <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="1,0" stop="1,-1"/> |
2739 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/> |
2740 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> |
2741 | - </blockTableStyle> |
2742 | - <blockTableStyle id="Table2"> |
2743 | - <blockAlignment value="LEFT"/> |
2744 | - <blockValign value="TOP"/> |
2745 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/> |
2746 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/> |
2747 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> |
2748 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/> |
2749 | - <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="1,0" stop="1,-1"/> |
2750 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/> |
2751 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> |
2752 | - </blockTableStyle> |
2753 | - <blockTableStyle id="Table3"> |
2754 | - <blockAlignment value="LEFT"/> |
2755 | - <blockValign value="TOP"/> |
2756 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/> |
2757 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/> |
2758 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/> |
2759 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/> |
2760 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/> |
2761 | - </blockTableStyle> |
2762 | - <blockTableStyle id="Table6"> |
2763 | - <blockAlignment value="LEFT"/> |
2764 | - <blockValign value="TOP"/> |
2765 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> |
2766 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> |
2767 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/> |
2768 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/> |
2769 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/> |
2770 | - </blockTableStyle> |
2771 | - <blockTableStyle id="Table5"> |
2772 | - <blockAlignment value="LEFT"/> |
2773 | - <blockValign value="TOP"/> |
2774 | - <lineStyle kind="LINEABOVE" colorName="#000000" start="3,0" stop="3,0"/> |
2775 | - <lineStyle kind="LINEABOVE" colorName="#000000" start="4,0" stop="4,0"/> |
2776 | - </blockTableStyle> |
2777 | - <initialize> |
2778 | - <paraStyle name="all" alignment="justify"/> |
2779 | - </initialize> |
2780 | - <paraStyle name="P1" fontName="Helvetica-Bold" fontSize="16.0" leading="20" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> |
2781 | - <paraStyle name="Standard" fontName="Helvetica"/> |
2782 | - <paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/> |
2783 | - <paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/> |
2784 | - <paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/> |
2785 | - <paraStyle name="Caption" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/> |
2786 | - <paraStyle name="Index" fontName="Helvetica"/> |
2787 | - <paraStyle name="Table Contents" fontName="Helvetica"/> |
2788 | - <paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER"/> |
2789 | - <paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/> |
2790 | - <paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
2791 | - <paraStyle name="terp_default_Bold_8" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
2792 | - <paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
2793 | - <paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
2794 | - <paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/> |
2795 | - <paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/> |
2796 | - <paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> |
2797 | - <paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/> |
2798 | - <paraStyle name="Footer" fontName="Helvetica"/> |
2799 | - <paraStyle name="Horizontal Line" fontName="Helvetica" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/> |
2800 | - <paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/> |
2801 | - <paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/> |
2802 | - <paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/> |
2803 | - <paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/> |
2804 | - <paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> |
2805 | - <paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/> |
2806 | - <paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/> |
2807 | - <paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
2808 | - <paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> |
2809 | - <paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> |
2810 | - <paraStyle name="terp_default_1" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
2811 | - <paraStyle name="terp_default_Right_9_Bold" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> |
2812 | - <paraStyle name="terp_default_8_Italic" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
2813 | - <images/> |
2814 | - </stylesheet> |
2815 | - <story> |
2816 | - <para style="terp_default_8">[[ repeatIn(objects,'order') ]]</para> |
2817 | - <para style="terp_default_8"> |
2818 | - <font color="white"> </font> |
2819 | - </para> |
2820 | - <para style="Standard"> |
2821 | - <font color="white"> </font> |
2822 | - </para> |
2823 | - <para style="P1">Payment By User </para> |
2824 | - <para style="P1"> |
2825 | - <font color="white"> </font> |
2826 | - </para> |
2827 | - <blockTable colWidths="241.0,241.0" style="Table1"> |
2828 | - <tr> |
2829 | - <td> |
2830 | - <para style="terp_tblheader_General_Centre">Company</para> |
2831 | - </td> |
2832 | - <td> |
2833 | - <para style="terp_tblheader_General_Centre">Print Date</para> |
2834 | - </td> |
2835 | - </tr> |
2836 | - </blockTable> |
2837 | - <blockTable colWidths="241.0,241.0" style="Table2"> |
2838 | - <tr> |
2839 | - <td> |
2840 | - <para style="terp_default_Centre_8">[[ company.name ]]</para> |
2841 | - </td> |
2842 | - <td> |
2843 | - <para style="terp_default_Centre_8">[[ formatLang(time.strftime('%Y-%m-%d'),date = True) ]]</para> |
2844 | - </td> |
2845 | - </tr> |
2846 | - </blockTable> |
2847 | - <para style="Standard"> |
2848 | - <font color="white"> </font> |
2849 | - </para> |
2850 | - <para style="Standard"> |
2851 | - <font color="white"> </font> |
2852 | - </para> |
2853 | - <blockTable colWidths="241.0,55.0,61.0,61.0,64.0" style="Table3"> |
2854 | - <tr> |
2855 | - <td> |
2856 | - <para style="terp_tblheader_Details">Product</para> |
2857 | - </td> |
2858 | - <td> |
2859 | - <para style="terp_tblheader_General_Right">Qty</para> |
2860 | - </td> |
2861 | - <td> |
2862 | - <para style="terp_tblheader_General_Right">Disc(%)</para> |
2863 | - </td> |
2864 | - <td> |
2865 | - <para style="terp_tblheader_General_Right">Unit Price</para> |
2866 | - </td> |
2867 | - <td> |
2868 | - <para style="terp_tblheader_General_Right">Total</para> |
2869 | - </td> |
2870 | - </tr> |
2871 | - </blockTable> |
2872 | - <section> |
2873 | - <para style="terp_default_1">[[ repeatIn(pos_payment_user(data['form']), 'line_ids') ]]</para> |
2874 | - <blockTable colWidths="241.0,55.0,61.0,61.0,64.0" style="Table6"> |
2875 | - <tr> |
2876 | - <td> |
2877 | - <para style="terp_default_9">[ [[ line_ids['code'] ]] ] [[ line_ids['name'] ]]</para> |
2878 | - </td> |
2879 | - <td> |
2880 | - <para style="terp_default_Right_9">[[ formatLang(line_ids['qty']) ]] [[line_ids['uom'] ]]</para> |
2881 | - </td> |
2882 | - <td> |
2883 | - <para style="terp_default_Right_9">[[ formatLang(line_ids['discount']) ]]</para> |
2884 | - </td> |
2885 | - <td> |
2886 | - <para style="terp_default_Right_9">[[ formatLang(line_ids['price_unit']) ]]</para> |
2887 | - </td> |
2888 | - <td> |
2889 | - <para style="terp_default_Right_9">[[ formatLang(line_ids['total'], currency_obj = company.currency_id)]]</para> |
2890 | - </td> |
2891 | - </tr> |
2892 | - </blockTable> |
2893 | - </section> |
2894 | - <blockTable colWidths="241.0,56.0,61.0,61.0,64.0" style="Table5"> |
2895 | - <tr> |
2896 | - <td> |
2897 | - <para style="Table Contents"> |
2898 | - <font color="white"> </font> |
2899 | - </para> |
2900 | - </td> |
2901 | - <td> |
2902 | - <para style="Table Contents"> |
2903 | - <font color="white"> </font> |
2904 | - </para> |
2905 | - </td> |
2906 | - <td> |
2907 | - <para style="Table Contents"> |
2908 | - <font color="white"> </font> |
2909 | - </para> |
2910 | - </td> |
2911 | - <td> |
2912 | - <para style="terp_tblheader_General_Right">Total:</para> |
2913 | - </td> |
2914 | - <td> |
2915 | - <para style="terp_default_Right_9">[[ formatLang(pos_payment_user_total(data['form']), currency_obj = company.currency_id) or removeParentNode('blockTable')]]</para> |
2916 | - </td> |
2917 | - </tr> |
2918 | - </blockTable> |
2919 | - <para style="Standard"> |
2920 | - <font color="white"> </font> |
2921 | - </para> |
2922 | - </story> |
2923 | -</document> |
2924 | |
2925 | === removed file 'point_of_sale/report/pos_payment_report_user.sxw' |
2926 | Binary files point_of_sale/report/pos_payment_report_user.sxw 2012-11-29 22:26:45 +0000 and point_of_sale/report/pos_payment_report_user.sxw 1970-01-01 00:00:00 +0000 differ |
2927 | === modified file 'point_of_sale/report/pos_receipt.py' |
2928 | --- point_of_sale/report/pos_receipt.py 2013-10-27 12:31:04 +0000 |
2929 | +++ point_of_sale/report/pos_receipt.py 2014-04-29 12:44:05 +0000 |
2930 | @@ -20,14 +20,17 @@ |
2931 | ############################################################################## |
2932 | |
2933 | import time |
2934 | +from openerp.osv import osv |
2935 | from openerp.report import report_sxw |
2936 | |
2937 | + |
2938 | def titlize(journal_name): |
2939 | words = journal_name.split() |
2940 | while words.pop() != 'journal': |
2941 | continue |
2942 | return ' '.join(words) |
2943 | |
2944 | + |
2945 | class order(report_sxw.rml_parse): |
2946 | |
2947 | def __init__(self, cr, uid, name, context): |
2948 | @@ -71,6 +74,11 @@ |
2949 | data = self.cr.dictfetchall() |
2950 | return data |
2951 | |
2952 | -report_sxw.report_sxw('report.pos.receipt', 'pos.order', 'addons/point_of_sale/report/pos_receipt.rml', parser=order, header=False) |
2953 | + |
2954 | +class report_order_receipt(osv.AbstractModel): |
2955 | + _name = 'report.point_of_sale.report_receipt' |
2956 | + _inherit = 'report.abstract_report' |
2957 | + _template = 'point_of_sale.report_receipt' |
2958 | + _wrapped_report_class = order |
2959 | |
2960 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
2961 | |
2962 | === removed file 'point_of_sale/report/pos_receipt.rml' |
2963 | --- point_of_sale/report/pos_receipt.rml 2013-10-27 12:31:04 +0000 |
2964 | +++ point_of_sale/report/pos_receipt.rml 1970-01-01 00:00:00 +0000 |
2965 | @@ -1,171 +0,0 @@ |
2966 | -<?xml version="1.0"?> |
2967 | -<document filename="test.pdf"> |
2968 | - <template pageSize="(204.0,842.0)" title="Receipt" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20"> |
2969 | - <pageTemplate id="first"> |
2970 | - <frame id="first" x1="0.0" y1="0.0" width="204" height="800"/> |
2971 | - </pageTemplate> |
2972 | - </template> |
2973 | - <stylesheet> |
2974 | - <blockTableStyle id="Standard_Outline"> |
2975 | - <blockAlignment value="LEFT"/> |
2976 | - <blockValign value="TOP"/> |
2977 | - </blockTableStyle> |
2978 | - <blockTableStyle id="Table3"> |
2979 | - <blockAlignment value="LEFT"/> |
2980 | - <blockValign value="TOP"/> |
2981 | - <lineStyle kind="LINEABOVE" colorName="#000000" start="0,1" stop="0,1"/> |
2982 | - <lineStyle kind="LINEABOVE" colorName="#000000" start="1,1" stop="1,1"/> |
2983 | - <lineStyle kind="LINEABOVE" colorName="#000000" start="2,1" stop="2,1"/> |
2984 | - </blockTableStyle> |
2985 | - <blockTableStyle id="Table2"> |
2986 | - <blockAlignment value="LEFT"/> |
2987 | - <blockValign value="TOP"/> |
2988 | - <lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/> |
2989 | - </blockTableStyle> |
2990 | - <blockTableStyle id="Table4"> |
2991 | - <blockAlignment value="LEFT"/> |
2992 | - <blockValign value="TOP"/> |
2993 | - </blockTableStyle> |
2994 | - <blockTableStyle id="Table10"> |
2995 | - <blockAlignment value="LEFT"/> |
2996 | - <blockValign value="TOP"/> |
2997 | - <lineStyle kind="LINEABOVE" colorName="#000000" start="0,1" stop="0,1"/> |
2998 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> |
2999 | - <lineStyle kind="LINEABOVE" colorName="#000000" start="1,1" stop="1,1"/> |
3000 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> |
3001 | - <lineStyle kind="LINEABOVE" colorName="#000000" start="2,1" stop="2,1"/> |
3002 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/> |
3003 | - </blockTableStyle> |
3004 | - <initialize> |
3005 | - <paraStyle name="all" alignment="justify"/> |
3006 | - </initialize> |
3007 | - <paraStyle name="P1" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT"/> |
3008 | - <paraStyle name="P2" fontName="Helvetica" fontSize="8.0" leading="10"/> |
3009 | - <paraStyle name="P3" fontName="Helvetica" fontSize="7.0" leading="9" alignment="LEFT"/> |
3010 | - <paraStyle name="P8" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT"/> |
3011 | - <paraStyle name="Standard" fontName="Helvetica"/> |
3012 | - <paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/> |
3013 | - <paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/> |
3014 | - <paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/> |
3015 | - <paraStyle name="Table Contents" fontName="Helvetica"/> |
3016 | - <paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER"/> |
3017 | - <paraStyle name="Caption" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/> |
3018 | - <paraStyle name="Index" fontName="Helvetica"/> |
3019 | - <paraStyle name="Frame contents" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/> |
3020 | - <paraStyle name="terp_default_Centre_9" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER"/> |
3021 | - <paraStyle name="terp_default_8" rightIndent="0.0" leftIndent="0.0" fontName="Courier" fontSize="10.0" leading="13" alignment="LEFT"/> |
3022 | - <paraStyle name="terp_header_Centre" fontName="Courier-Bold" fontSize="12.0" leading="15" alignment="CENTER"/> |
3023 | - <paraStyle name="terp_default_9b" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT"/> |
3024 | - <paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT"/> |
3025 | - <paraStyle name="terp_default_Bold_9_Right1" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT"/> |
3026 | - <paraStyle name="terp_default_Bold_9_Right2" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT"/> |
3027 | - <paraStyle name="P4" fontName="Courier-Bold" fontSize="10.0" leading="13" alignment="CENTER"/> |
3028 | - <paraStyle name="P5" fontName="Courier-Bold" fontSize="10.0" leading="13" alignment="LEFT"/> |
3029 | - <paraStyle name="P7" fontName="Courier-Bold" fontSize="10.0" leading="13" alignment="RIGHT"/> |
3030 | - <paraStyle name="P6a" fontName="Helvetica" fontSize="10.0" leading="13" alignment="RIGHT"/> |
3031 | - <paraStyle name="P7a" fontName="Courier" fontSize="10.0" leading="13" alignment="RIGHT"/> |
3032 | - <paraStyle name="P6" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica-Bold" fontSize="10.0" leading="13" alignment="RIGHT"/> |
3033 | - <paraStyle name="P13" fontName="Courier-Bold" fontSize="10.0" leading="13" alignment="RIGHT"/> |
3034 | - <paraStyle name="Table" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/> |
3035 | - <images/> |
3036 | - </stylesheet> |
3037 | - <story> |
3038 | - <para style="terp_default_8">[[ repeatIn(objects,'o') ]]</para> |
3039 | - <para style="terp_header_Centre">[[o.user_id.company_id.name]]</para> |
3040 | - <para style="terp_default_Centre_9">[[ address and display_address(address)]]</para> |
3041 | - <para style="terp_default_Centre_9">Tel : [[ address and address.phone ]]</para> |
3042 | - <para style="terp_default_Centre_9">User : [[ o.user_id.name ]]</para> |
3043 | - <para style="terp_default_Centre_9">Warehouse : [[ o.warehouse_id.name ]]</para> |
3044 | - <para style="terp_default_Centre_9">Date : [[ o.date_order ]]</para> |
3045 | - <para style="P4"> |
3046 | - <font color="white"> </font> |
3047 | - </para> |
3048 | - <para style="P4"> |
3049 | - <font color="white"> </font> |
3050 | - </para> |
3051 | - <para style="P4"> |
3052 | - <font color="white"> </font> |
3053 | - </para> |
3054 | - <para style="P4">N° : [[ o.name ]]</para> |
3055 | - <blockTable colWidths="68.0,68.0,68.0" style="Table3"> |
3056 | - <tr> |
3057 | - <td> |
3058 | - <para style="P5">Description</para> |
3059 | - </td> |
3060 | - <td> |
3061 | - <para style="P7">Qty</para> |
3062 | - </td> |
3063 | - <td> |
3064 | - <para style="P7">Price</para> |
3065 | - </td> |
3066 | - </tr> |
3067 | - <tr> |
3068 | - <td> |
3069 | - <para style="P1">[[ repeatIn(o.lines,'line') ]]</para> |
3070 | - <para style="terp_default_9b">[[ line.product_id.name ]]</para> |
3071 | - <para style="terp_default_Right_9"> |
3072 | - <font face="Helvetica">With a [[ line and line.discount == 0.0 and removeParentNode('font') ]] ([[ '%.2f' % line.discount ]]) % discount.</font> |
3073 | - </para> |
3074 | - <para style="terp_default_9b"> |
3075 | - <font color="white"> </font> |
3076 | - </para> |
3077 | - </td> |
3078 | - <td> |
3079 | - <para style="terp_default_Right_9">[[o.state=='cancel' and o.statement_ids and '-' or '']][['%.f' % line.qty ]]</para> |
3080 | - </td> |
3081 | - <td> |
3082 | - <para style="terp_default_Right_9">[[o.state=='cancel' and o.statement_ids and '-' or '']][[ formatLang(net(line.id), currency_obj=company.currency_id) ]] <font face="Helvetica">[[ line and line.discount == 0.0 and removeParentNode('font') ]] ([[ formatLang(line.discount, currency_obj=company.currency_id) ]])</font></para> |
3083 | - </td> |
3084 | - </tr> |
3085 | - </blockTable> |
3086 | - <blockTable colWidths="136.0,68.0" style="Table2"> |
3087 | - <tr> |
3088 | - <td> |
3089 | - <para style="P6a">Taxes :</para> |
3090 | - </td> |
3091 | - <td> |
3092 | - <para style="terp_default_Right_9">[[o.state=='cancel' and o.statement_ids and '-' or '']][[formatLang(o.amount_tax, currency_obj=company.currency_id)]]</para> |
3093 | - </td> |
3094 | - </tr> |
3095 | - </blockTable> |
3096 | - <blockTable colWidths="136.0,68.0" style="Table4"> |
3097 | - <tr> |
3098 | - <td> |
3099 | - <para style="P6">Total :</para> |
3100 | - </td> |
3101 | - <td> |
3102 | - <para style="terp_default_Bold_9_Right2">[[o.state=='cancel' and o.statement_ids and '-' or '']][[formatLang(o.amount_total, currency_obj=company.currency_id)]]</para> |
3103 | - </td> |
3104 | - </tr> |
3105 | - </blockTable> |
3106 | - <blockTable colWidths="102.0,34.0,68.0" style="Table10"> |
3107 | - <tr> |
3108 | - <td> |
3109 | - <para style="P5">Payment Mode</para> |
3110 | - </td> |
3111 | - <td> |
3112 | - <para style="P1"> |
3113 | - <font color="white"> </font> |
3114 | - </para> |
3115 | - </td> |
3116 | - <td> |
3117 | - <para style="P13">Amount</para> |
3118 | - </td> |
3119 | - </tr> |
3120 | - <tr> |
3121 | - <td> |
3122 | - <para style="P1">[[ repeatIn(get_journal_amt(o),'d') ]]</para> |
3123 | - <para style="P2">[[ d['name'] ]]</para> |
3124 | - </td> |
3125 | - <td> |
3126 | - <para style="P1"> |
3127 | - <font color="white"> </font> |
3128 | - </para> |
3129 | - </td> |
3130 | - <td> |
3131 | - <para style="P8">[[ formatLang(d['amt'] or 0, currency_obj=company.currency_id) ]]</para> |
3132 | - </td> |
3133 | - </tr> |
3134 | - </blockTable> |
3135 | - </story> |
3136 | -</document> |
3137 | |
3138 | === removed file 'point_of_sale/report/pos_receipt.sxw' |
3139 | Binary files point_of_sale/report/pos_receipt.sxw 2012-11-29 22:26:45 +0000 and point_of_sale/report/pos_receipt.sxw 1970-01-01 00:00:00 +0000 differ |
3140 | === modified file 'point_of_sale/report/pos_report.py' |
3141 | --- point_of_sale/report/pos_report.py 2013-10-27 12:31:04 +0000 |
3142 | +++ point_of_sale/report/pos_report.py 2014-04-29 12:44:05 +0000 |
3143 | @@ -20,7 +20,6 @@ |
3144 | ############################################################################## |
3145 | |
3146 | from openerp.osv import fields, osv |
3147 | -import time |
3148 | from openerp import tools |
3149 | |
3150 | class report_transaction_pos(osv.osv): |
3151 | |
3152 | === removed file 'point_of_sale/report/pos_sales_user.py' |
3153 | --- point_of_sale/report/pos_sales_user.py 2012-12-06 14:56:32 +0000 |
3154 | +++ point_of_sale/report/pos_sales_user.py 1970-01-01 00:00:00 +0000 |
3155 | @@ -1,50 +0,0 @@ |
3156 | -# -*- coding: utf-8 -*- |
3157 | -############################################################################## |
3158 | -# |
3159 | -# OpenERP, Open Source Management Solution |
3160 | -# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). |
3161 | -# |
3162 | -# This program is free software: you can redistribute it and/or modify |
3163 | -# it under the terms of the GNU Affero General Public License as |
3164 | -# published by the Free Software Foundation, either version 3 of the |
3165 | -# License, or (at your option) any later version. |
3166 | -# |
3167 | -# This program is distributed in the hope that it will be useful, |
3168 | -# but WITHOUT ANY WARRANTY; without even the implied warranty of |
3169 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3170 | -# GNU Affero General Public License for more details. |
3171 | -# |
3172 | -# You should have received a copy of the GNU Affero General Public License |
3173 | -# along with this program. If not, see <http://www.gnu.org/licenses/>. |
3174 | -# |
3175 | -############################################################################## |
3176 | - |
3177 | -import time |
3178 | -from openerp.report import report_sxw |
3179 | - |
3180 | -class pos_sales_user(report_sxw.rml_parse): |
3181 | - |
3182 | - def __init__(self, cr, uid, name, context): |
3183 | - super(pos_sales_user, self).__init__(cr, uid, name, context=context) |
3184 | - self.total = 0.0 |
3185 | - self.localcontext.update({ |
3186 | - 'time': time, |
3187 | - 'get_data':self._get_data, |
3188 | - |
3189 | - }) |
3190 | - |
3191 | - def _get_data(self, form): |
3192 | - dt1 = form['date_start'] + ' 00:00:00' |
3193 | - dt2 = form['date_end'] + ' 23:59:59' |
3194 | - data={} |
3195 | - self.cr.execute("select po.name as pos,po.date_order,rp.name as user,po.state,rc.name " \ |
3196 | - "from pos_order as po,res_users as ru,res_company as rc, res_partner as rp " \ |
3197 | - "where po.date_order >= %s and po.date_order <= %s " \ |
3198 | - "and po.company_id=rc.id and po.user_id=ru.id and po.user_id IN %s and ru.partner_id = rp.id" \ |
3199 | - ,(dt1,dt2,tuple(form['user_id']))) |
3200 | - |
3201 | - return self.cr.dictfetchall() |
3202 | - |
3203 | -report_sxw.report_sxw('report.pos.sales.user', 'pos.order', 'addons/point_of_sale/report/pos_sales_user.rml', parser=pos_sales_user,header='internal') |
3204 | - |
3205 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3206 | |
3207 | === removed file 'point_of_sale/report/pos_sales_user.rml' |
3208 | --- point_of_sale/report/pos_sales_user.rml 2012-05-04 11:57:48 +0000 |
3209 | +++ point_of_sale/report/pos_sales_user.rml 1970-01-01 00:00:00 +0000 |
3210 | @@ -1,175 +0,0 @@ |
3211 | -<?xml version="1.0"?> |
3212 | -<document filename="test.pdf"> |
3213 | - <template title="Sales Report" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20"> |
3214 | - <pageTemplate id="first"> |
3215 | - <frame id="first" x1="27.0" y1="57.0" width="512" height="728"/> |
3216 | - </pageTemplate> |
3217 | - </template> |
3218 | - <stylesheet> |
3219 | - <blockTableStyle id="Standard_Outline"> |
3220 | - <blockAlignment value="LEFT"/> |
3221 | - <blockValign value="TOP"/> |
3222 | - </blockTableStyle> |
3223 | - <blockTableStyle id="Table1"> |
3224 | - <blockAlignment value="LEFT"/> |
3225 | - <blockValign value="TOP"/> |
3226 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/> |
3227 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/> |
3228 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> |
3229 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/> |
3230 | - <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="1,0" stop="1,-1"/> |
3231 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/> |
3232 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> |
3233 | - </blockTableStyle> |
3234 | - <blockTableStyle id="Table2"> |
3235 | - <blockAlignment value="LEFT"/> |
3236 | - <blockValign value="TOP"/> |
3237 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/> |
3238 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/> |
3239 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> |
3240 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/> |
3241 | - <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="1,0" stop="1,-1"/> |
3242 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/> |
3243 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> |
3244 | - </blockTableStyle> |
3245 | - <blockTableStyle id="Table3"> |
3246 | - <blockAlignment value="LEFT"/> |
3247 | - <blockValign value="TOP"/> |
3248 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/> |
3249 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/> |
3250 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/> |
3251 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/> |
3252 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/> |
3253 | - </blockTableStyle> |
3254 | - <blockTableStyle id="Table4"> |
3255 | - <blockAlignment value="LEFT"/> |
3256 | - <blockValign value="TOP"/> |
3257 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> |
3258 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> |
3259 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/> |
3260 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/> |
3261 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/> |
3262 | - </blockTableStyle> |
3263 | - <initialize> |
3264 | - <paraStyle name="all" alignment="justify"/> |
3265 | - </initialize> |
3266 | - <paraStyle name="P1" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/> |
3267 | - <paraStyle name="P2" fontName="Helvetica-Bold" fontSize="16.0" leading="20" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> |
3268 | - <paraStyle name="Standard" fontName="Helvetica"/> |
3269 | - <paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/> |
3270 | - <paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/> |
3271 | - <paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/> |
3272 | - <paraStyle name="Caption" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/> |
3273 | - <paraStyle name="Index" fontName="Helvetica"/> |
3274 | - <paraStyle name="Table Contents" fontName="Helvetica"/> |
3275 | - <paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER"/> |
3276 | - <paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/> |
3277 | - <paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
3278 | - <paraStyle name="terp_default_Bold_8" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
3279 | - <paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
3280 | - <paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
3281 | - <paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/> |
3282 | - <paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/> |
3283 | - <paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> |
3284 | - <paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/> |
3285 | - <paraStyle name="Footer" fontName="Helvetica"/> |
3286 | - <paraStyle name="Horizontal Line" fontName="Helvetica" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/> |
3287 | - <paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/> |
3288 | - <paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/> |
3289 | - <paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/> |
3290 | - <paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/> |
3291 | - <paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> |
3292 | - <paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/> |
3293 | - <paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/> |
3294 | - <paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
3295 | - <paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> |
3296 | - <paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> |
3297 | - <paraStyle name="terp_default_1" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
3298 | - <paraStyle name="terp_default_Right_9_Bold" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> |
3299 | - <paraStyle name="terp_default_8_Italic" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
3300 | - <images/> |
3301 | - </stylesheet> |
3302 | - <story> |
3303 | - <para style="terp_default_8">[[ repeatIn(objects,'order') ]]</para> |
3304 | - <para style="terp_default_8"> |
3305 | - <font color="white"> </font> |
3306 | - </para> |
3307 | - <para style="Standard"> |
3308 | - <font color="white"> </font> |
3309 | - </para> |
3310 | - <para style="P2">Sales Report</para> |
3311 | - <para style="P2"> |
3312 | - <font color="white"> </font> |
3313 | - </para> |
3314 | - <blockTable colWidths="256.0,256.0" style="Table1"> |
3315 | - <tr> |
3316 | - <td> |
3317 | - <para style="terp_tblheader_General_Centre">Company</para> |
3318 | - </td> |
3319 | - <td> |
3320 | - <para style="terp_tblheader_General_Centre">Print Date</para> |
3321 | - </td> |
3322 | - </tr> |
3323 | - </blockTable> |
3324 | - <blockTable colWidths="256.0,256.0" style="Table2"> |
3325 | - <tr> |
3326 | - <td> |
3327 | - <para style="terp_default_Centre_8">[[ company.name ]]</para> |
3328 | - </td> |
3329 | - <td> |
3330 | - <para style="terp_default_Centre_8">[[ formatLang(time.strftime('%Y-%m-%d'),date = True) ]]</para> |
3331 | - </td> |
3332 | - </tr> |
3333 | - </blockTable> |
3334 | - <para style="Standard"> |
3335 | - <font color="white"> </font> |
3336 | - </para> |
3337 | - <para style="Standard"> |
3338 | - <font color="white"> </font> |
3339 | - </para> |
3340 | - <blockTable colWidths="150.0,118.0,97.0,64.0,82.0" style="Table3"> |
3341 | - <tr> |
3342 | - <td> |
3343 | - <para style="terp_tblheader_Details">Name</para> |
3344 | - </td> |
3345 | - <td> |
3346 | - <para style="terp_tblheader_Details_Centre">Date Order</para> |
3347 | - </td> |
3348 | - <td> |
3349 | - <para style="P1">User</para> |
3350 | - </td> |
3351 | - <td> |
3352 | - <para style="terp_tblheader_General_Right">Status</para> |
3353 | - </td> |
3354 | - <td> |
3355 | - <para style="terp_tblheader_Details_Centre">Company</para> |
3356 | - </td> |
3357 | - </tr> |
3358 | - </blockTable> |
3359 | - <section> |
3360 | - <para style="terp_default_1">[[ repeatIn(get_data(data['form']), 'line_ids')]]</para> |
3361 | - <blockTable colWidths="150.0,118.0,97.0,64.0,82.0" style="Table4"> |
3362 | - <tr> |
3363 | - <td> |
3364 | - <para style="terp_default_8">[[ line_ids['pos'] ]]</para> |
3365 | - </td> |
3366 | - <td> |
3367 | - <para style="terp_default_Right_9">[[ formatLang(line_ids['date_order'],date_time = True) ]]</para> |
3368 | - </td> |
3369 | - <td> |
3370 | - <para style="terp_default_Right_9">[[ line_ids['user'] ]]</para> |
3371 | - </td> |
3372 | - <td> |
3373 | - <para style="terp_default_Right_9">[[ line_ids['state'] ]]</para> |
3374 | - </td> |
3375 | - <td> |
3376 | - <para style="terp_default_Right_9">[[ line_ids['name'] ]]</para> |
3377 | - </td> |
3378 | - </tr> |
3379 | - </blockTable> |
3380 | - <para style="terp_default_1"> |
3381 | - <font color="white"> </font> |
3382 | - </para> |
3383 | - </section> |
3384 | - </story> |
3385 | -</document> |
3386 | |
3387 | === removed file 'point_of_sale/report/pos_sales_user.sxw' |
3388 | Binary files point_of_sale/report/pos_sales_user.sxw 2011-01-14 00:11:01 +0000 and point_of_sale/report/pos_sales_user.sxw 1970-01-01 00:00:00 +0000 differ |
3389 | === removed file 'point_of_sale/report/pos_sales_user_today.py' |
3390 | --- point_of_sale/report/pos_sales_user_today.py 2012-12-06 14:56:32 +0000 |
3391 | +++ point_of_sale/report/pos_sales_user_today.py 1970-01-01 00:00:00 +0000 |
3392 | @@ -1,50 +0,0 @@ |
3393 | -# -*- coding: utf-8 -*- |
3394 | -############################################################################## |
3395 | -# |
3396 | -# OpenERP, Open Source Management Solution |
3397 | -# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). |
3398 | -# |
3399 | -# This program is free software: you can redistribute it and/or modify |
3400 | -# it under the terms of the GNU Affero General Public License as |
3401 | -# published by the Free Software Foundation, either version 3 of the |
3402 | -# License, or (at your option) any later version. |
3403 | -# |
3404 | -# This program is distributed in the hope that it will be useful, |
3405 | -# but WITHOUT ANY WARRANTY; without even the implied warranty of |
3406 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3407 | -# GNU Affero General Public License for more details. |
3408 | -# |
3409 | -# You should have received a copy of the GNU Affero General Public License |
3410 | -# along with this program. If not, see <http://www.gnu.org/licenses/>. |
3411 | -# |
3412 | -############################################################################## |
3413 | - |
3414 | -import time |
3415 | -from openerp.report import report_sxw |
3416 | - |
3417 | -class pos_sales_user_today(report_sxw.rml_parse): |
3418 | - |
3419 | - def __init__(self, cr, uid, name, context): |
3420 | - super(pos_sales_user_today, self).__init__(cr, uid, name, context=context) |
3421 | - self.total = 0.0 |
3422 | - self.localcontext.update({ |
3423 | - 'time': time, |
3424 | - 'get_data':self._get_data, |
3425 | - |
3426 | - }) |
3427 | - |
3428 | - def _get_data(self, form): |
3429 | - data={} |
3430 | - ids = form['user_id'] |
3431 | - |
3432 | - self.cr.execute("select po.name as pos,po.date_order,ru.name as user,po.state,rc.name " \ |
3433 | - "from pos_order as po,res_users as ru,res_company as rc " \ |
3434 | - "where to_char(date_trunc('day',po.date_order),'YYYY-MM-DD')::date = current_date " \ |
3435 | - "and po.company_id=rc.id and po.user_id=ru.id and po.user_id IN %s", (tuple(ids), )) |
3436 | - |
3437 | - data = self.cr.dictfetchall() |
3438 | - return data |
3439 | - |
3440 | -report_sxw.report_sxw('report.pos.sales.user.today', 'pos.order', 'addons/point_of_sale/report/pos_sales_user_today.rml', parser=pos_sales_user_today,header='internal') |
3441 | - |
3442 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3443 | |
3444 | === removed file 'point_of_sale/report/pos_sales_user_today.rml' |
3445 | --- point_of_sale/report/pos_sales_user_today.rml 2012-05-04 11:57:48 +0000 |
3446 | +++ point_of_sale/report/pos_sales_user_today.rml 1970-01-01 00:00:00 +0000 |
3447 | @@ -1,175 +0,0 @@ |
3448 | -<?xml version="1.0"?> |
3449 | -<document filename="test.pdf"> |
3450 | - <template title="Todays Sales By User" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20"> |
3451 | - <pageTemplate id="first"> |
3452 | - <frame id="first" x1="27.0" y1="57.0" width="512" height="728"/> |
3453 | - </pageTemplate> |
3454 | - </template> |
3455 | - <stylesheet> |
3456 | - <blockTableStyle id="Standard_Outline"> |
3457 | - <blockAlignment value="LEFT"/> |
3458 | - <blockValign value="TOP"/> |
3459 | - </blockTableStyle> |
3460 | - <blockTableStyle id="Table1"> |
3461 | - <blockAlignment value="LEFT"/> |
3462 | - <blockValign value="TOP"/> |
3463 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/> |
3464 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/> |
3465 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> |
3466 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/> |
3467 | - <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="1,0" stop="1,-1"/> |
3468 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/> |
3469 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> |
3470 | - </blockTableStyle> |
3471 | - <blockTableStyle id="Table2"> |
3472 | - <blockAlignment value="LEFT"/> |
3473 | - <blockValign value="TOP"/> |
3474 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/> |
3475 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/> |
3476 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> |
3477 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/> |
3478 | - <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="1,0" stop="1,-1"/> |
3479 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/> |
3480 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> |
3481 | - </blockTableStyle> |
3482 | - <blockTableStyle id="Table3"> |
3483 | - <blockAlignment value="LEFT"/> |
3484 | - <blockValign value="TOP"/> |
3485 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/> |
3486 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/> |
3487 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/> |
3488 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/> |
3489 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/> |
3490 | - </blockTableStyle> |
3491 | - <blockTableStyle id="Table5"> |
3492 | - <blockAlignment value="LEFT"/> |
3493 | - <blockValign value="TOP"/> |
3494 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> |
3495 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> |
3496 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/> |
3497 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/> |
3498 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/> |
3499 | - </blockTableStyle> |
3500 | - <initialize> |
3501 | - <paraStyle name="all" alignment="justify"/> |
3502 | - </initialize> |
3503 | - <paraStyle name="P1" fontName="Helvetica-Bold" fontSize="16.0" leading="20" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> |
3504 | - <paraStyle name="P2" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/> |
3505 | - <paraStyle name="Standard" fontName="Helvetica"/> |
3506 | - <paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/> |
3507 | - <paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/> |
3508 | - <paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/> |
3509 | - <paraStyle name="Caption" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/> |
3510 | - <paraStyle name="Index" fontName="Helvetica"/> |
3511 | - <paraStyle name="Table Contents" fontName="Helvetica"/> |
3512 | - <paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER"/> |
3513 | - <paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/> |
3514 | - <paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
3515 | - <paraStyle name="terp_default_Bold_8" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
3516 | - <paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
3517 | - <paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
3518 | - <paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/> |
3519 | - <paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/> |
3520 | - <paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> |
3521 | - <paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/> |
3522 | - <paraStyle name="Footer" fontName="Helvetica"/> |
3523 | - <paraStyle name="Horizontal Line" fontName="Helvetica" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/> |
3524 | - <paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/> |
3525 | - <paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/> |
3526 | - <paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/> |
3527 | - <paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/> |
3528 | - <paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> |
3529 | - <paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/> |
3530 | - <paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/> |
3531 | - <paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
3532 | - <paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> |
3533 | - <paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> |
3534 | - <paraStyle name="terp_default_1" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
3535 | - <paraStyle name="terp_default_Right_9_Bold" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> |
3536 | - <paraStyle name="terp_default_8_Italic" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
3537 | - <images/> |
3538 | - </stylesheet> |
3539 | - <story> |
3540 | - <para style="terp_default_8">[[ repeatIn(objects,'order') ]]</para> |
3541 | - <para style="terp_default_8"> |
3542 | - <font color="white"> </font> |
3543 | - </para> |
3544 | - <para style="Standard"> |
3545 | - <font color="white"> </font> |
3546 | - </para> |
3547 | - <para style="P1">Today's Sales By User</para> |
3548 | - <para style="P1"> |
3549 | - <font color="white"> </font> |
3550 | - </para> |
3551 | - <blockTable colWidths="256.0,256.0" style="Table1"> |
3552 | - <tr> |
3553 | - <td> |
3554 | - <para style="terp_tblheader_General_Centre">Company</para> |
3555 | - </td> |
3556 | - <td> |
3557 | - <para style="terp_tblheader_General_Centre">Print Date</para> |
3558 | - </td> |
3559 | - </tr> |
3560 | - </blockTable> |
3561 | - <blockTable colWidths="256.0,256.0" style="Table2"> |
3562 | - <tr> |
3563 | - <td> |
3564 | - <para style="terp_default_Centre_8">[[ company.name ]]</para> |
3565 | - </td> |
3566 | - <td> |
3567 | - <para style="terp_default_Centre_8">[[ formatLang(time.strftime('%Y-%m-%d'),date = True) ]]</para> |
3568 | - </td> |
3569 | - </tr> |
3570 | - </blockTable> |
3571 | - <para style="Standard"> |
3572 | - <font color="white"> </font> |
3573 | - </para> |
3574 | - <para style="Standard"> |
3575 | - <font color="white"> </font> |
3576 | - </para> |
3577 | - <blockTable colWidths="150.0,118.0,97.0,64.0,82.0" style="Table3"> |
3578 | - <tr> |
3579 | - <td> |
3580 | - <para style="terp_tblheader_Details">Name</para> |
3581 | - </td> |
3582 | - <td> |
3583 | - <para style="terp_tblheader_Details_Centre">Date Order</para> |
3584 | - </td> |
3585 | - <td> |
3586 | - <para style="P2">User</para> |
3587 | - </td> |
3588 | - <td> |
3589 | - <para style="terp_tblheader_General_Right">Status</para> |
3590 | - </td> |
3591 | - <td> |
3592 | - <para style="terp_tblheader_Details_Centre">Company</para> |
3593 | - </td> |
3594 | - </tr> |
3595 | - </blockTable> |
3596 | - <section> |
3597 | - <para style="terp_default_1">[[ repeatIn(get_data(data['form']), 'line_ids')]]</para> |
3598 | - <blockTable colWidths="150.0,118.0,97.0,64.0,83.0" style="Table5"> |
3599 | - <tr> |
3600 | - <td> |
3601 | - <para style="terp_default_8">[[ line_ids['pos'] ]]</para> |
3602 | - </td> |
3603 | - <td> |
3604 | - <para style="terp_default_Right_9">[[ formatLang(line_ids['date_order'],date_time = True) ]]</para> |
3605 | - </td> |
3606 | - <td> |
3607 | - <para style="terp_default_Right_9">[[ line_ids['user'] ]]</para> |
3608 | - </td> |
3609 | - <td> |
3610 | - <para style="terp_default_Right_9">[[ line_ids['state'] ]]</para> |
3611 | - </td> |
3612 | - <td> |
3613 | - <para style="terp_default_Right_9">[[ line_ids['name'] ]]</para> |
3614 | - </td> |
3615 | - </tr> |
3616 | - </blockTable> |
3617 | - <para style="terp_default_1"> |
3618 | - <font color="white"> </font> |
3619 | - </para> |
3620 | - </section> |
3621 | - </story> |
3622 | -</document> |
3623 | |
3624 | === removed file 'point_of_sale/report/pos_sales_user_today.sxw' |
3625 | Binary files point_of_sale/report/pos_sales_user_today.sxw 2011-01-14 00:11:01 +0000 and point_of_sale/report/pos_sales_user_today.sxw 1970-01-01 00:00:00 +0000 differ |
3626 | === modified file 'point_of_sale/report/pos_users_product.py' |
3627 | --- point_of_sale/report/pos_users_product.py 2012-12-06 14:56:32 +0000 |
3628 | +++ point_of_sale/report/pos_users_product.py 2014-04-29 12:44:05 +0000 |
3629 | @@ -20,8 +20,10 @@ |
3630 | ############################################################################## |
3631 | |
3632 | import time |
3633 | +from openerp.osv import osv |
3634 | from openerp.report import report_sxw |
3635 | |
3636 | + |
3637 | class pos_user_product(report_sxw.rml_parse): |
3638 | |
3639 | def __init__(self, cr, uid, name, context): |
3640 | @@ -52,17 +54,27 @@ |
3641 | return data |
3642 | |
3643 | def _get_user(self, object): |
3644 | + names = [] |
3645 | + users_obj = self.pool['res.users'] |
3646 | for o in object: |
3647 | - sql = """select ru.name from account_bank_statement as abs,res_users ru |
3648 | + sql = """select ru.id from account_bank_statement as abs,res_users ru |
3649 | where abs.user_id = ru.id |
3650 | and abs.id = %d"""%(o.id) |
3651 | self.cr.execute(sql) |
3652 | data = self.cr.fetchone() |
3653 | - return data[0] |
3654 | + if data: |
3655 | + user = users_obj.browse(self.cr, self.uid, data[0]) |
3656 | + names.append(user.partner_id.name) |
3657 | + return list(set(names)) |
3658 | |
3659 | def _get_total(self, o): |
3660 | return self.total |
3661 | |
3662 | -report_sxw.report_sxw('report.pos.user.product', 'account.bank.statement', 'addons/statement/report/pos_users_product.rml', parser=pos_user_product,header='internal') |
3663 | + |
3664 | +class report_pos_user_product(osv.AbstractModel): |
3665 | + _name = 'report.point_of_sale.report_usersproduct' |
3666 | + _inherit = 'report.abstract_report' |
3667 | + _template = 'point_of_sale.report_usersproduct' |
3668 | + _wrapped_report_class = pos_user_product |
3669 | |
3670 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3671 | |
3672 | === removed file 'point_of_sale/report/pos_users_product.py.WORK' |
3673 | --- point_of_sale/report/pos_users_product.py.WORK 2012-08-02 13:40:12 +0000 |
3674 | +++ point_of_sale/report/pos_users_product.py.WORK 1970-01-01 00:00:00 +0000 |
3675 | @@ -1,68 +0,0 @@ |
3676 | -# -*- encoding: utf-8 -*- |
3677 | -############################################################################## |
3678 | -# |
3679 | -# OpenERP, Open Source Management Solution |
3680 | -# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved |
3681 | -# $Id$ |
3682 | -# |
3683 | -# This program is free software: you can redistribute it and/or modify |
3684 | -# it under the terms of the GNU General Public License as published by |
3685 | -# the Free Software Foundation, either version 3 of the License, or |
3686 | -# (at your option) any later version. |
3687 | -# |
3688 | -# This program is distributed in the hope that it will be useful, |
3689 | -# but WITHOUT ANY WARRANTY; without even the implied warranty of |
3690 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3691 | -# GNU General Public License for more details. |
3692 | -# |
3693 | -# You should have received a copy of the GNU General Public License |
3694 | -# along with this program. If not, see <http://www.gnu.org/licenses/>. |
3695 | -# |
3696 | -############################################################################## |
3697 | -import time |
3698 | -from report import report_sxw |
3699 | - |
3700 | - |
3701 | -class pos_user_product(report_sxw.rml_parse): |
3702 | - |
3703 | - def __init__(self, cr, uid, name, context): |
3704 | - super(pos_user_product, self).__init__(cr, uid, name, context) |
3705 | - self.total = 0.0 |
3706 | - self.localcontext.update({ |
3707 | - 'time': time, |
3708 | - 'get_data':self._get_data, |
3709 | - 'get_user':self._get_user, |
3710 | - 'get_total':self._get_total, |
3711 | - |
3712 | - }) |
3713 | - def _get_data(self,object): |
3714 | - data={} |
3715 | - for o in object : |
3716 | - sql1=""" SELECT distinct(o.id) from account_bank_statement s, account_bank_statement_line l,pos_order o,pos_order_line i where i.order_id=o.id and o.state in ('paid','invoiced') and l.statement_id=s.id and l.pos_statement_id=o.id and s.id=%d"""%(o.id) |
3717 | - self.cr.execute(sql1) |
3718 | - data = self.cr.dictfetchall() |
3719 | - a_l=[] |
3720 | - for r in data: |
3721 | - if r['id']: |
3722 | - a_l.append(r['id']) |
3723 | - a = ','.join(map(str,a_l)) |
3724 | - if len(a_l): |
3725 | - sql2="""SELECT sum(qty) as qty,l.price_unit*sum(l.qty) as amt,t.name as name from product_product p, product_template t, pos_order_line l where order_id in (%s) and p.product_tmpl_id=t.id and l.product_id=p.id group by t.name, l.price_unit"""%(a) |
3726 | - self.cr.execute(sql2) |
3727 | - data = self.cr.dictfetchall() |
3728 | - for d in data: |
3729 | - self.total += d['amt'] |
3730 | - return data |
3731 | - |
3732 | - def _get_user(self,object): |
3733 | - for o in object : |
3734 | - sql = """select ru.name from account_bank_statement as abs,res_users ru |
3735 | - where abs.user_id = ru.id |
3736 | - and abs.id = %d"""%(o.id) |
3737 | - self.cr.execute(sql) |
3738 | - data = self.cr.fetchone() |
3739 | - return data[0] |
3740 | - def _get_total(self): |
3741 | - return self.total |
3742 | - |
3743 | -report_sxw.report_sxw('report.pos.user.product', 'account.bank.statement', 'addons/statement/report/pos_users_product.rml', parser=pos_user_product) |
3744 | |
3745 | === removed file 'point_of_sale/report/pos_users_product.rml' |
3746 | --- point_of_sale/report/pos_users_product.rml 2012-11-29 22:26:45 +0000 |
3747 | +++ point_of_sale/report/pos_users_product.rml 1970-01-01 00:00:00 +0000 |
3748 | @@ -1,219 +0,0 @@ |
3749 | -<?xml version="1.0"?> |
3750 | -<document filename="test.pdf"> |
3751 | - <template title="User's Product'" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20"> |
3752 | - <pageTemplate id="first"> |
3753 | - <frame id="first" x1="36.0" y1="57.0" width="520" height="728"/> |
3754 | - </pageTemplate> |
3755 | - </template> |
3756 | - <stylesheet> |
3757 | - <blockTableStyle id="Standard_Outline"> |
3758 | - <blockAlignment value="LEFT"/> |
3759 | - <blockValign value="TOP"/> |
3760 | - </blockTableStyle> |
3761 | - <blockTableStyle id="Table1"> |
3762 | - <blockAlignment value="LEFT"/> |
3763 | - <blockValign value="TOP"/> |
3764 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/> |
3765 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/> |
3766 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> |
3767 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/> |
3768 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/> |
3769 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> |
3770 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/> |
3771 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/> |
3772 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/> |
3773 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/> |
3774 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/> |
3775 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/> |
3776 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="4,0" stop="4,-1"/> |
3777 | - <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="4,0" stop="4,-1"/> |
3778 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="4,0" stop="4,0"/> |
3779 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/> |
3780 | - </blockTableStyle> |
3781 | - <blockTableStyle id="Table2"> |
3782 | - <blockAlignment value="LEFT"/> |
3783 | - <blockValign value="TOP"/> |
3784 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/> |
3785 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/> |
3786 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> |
3787 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/> |
3788 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/> |
3789 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> |
3790 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/> |
3791 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/> |
3792 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/> |
3793 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/> |
3794 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/> |
3795 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/> |
3796 | - <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="4,0" stop="4,-1"/> |
3797 | - <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="4,0" stop="4,-1"/> |
3798 | - <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="4,0" stop="4,0"/> |
3799 | - <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/> |
3800 | - </blockTableStyle> |
3801 | - <blockTableStyle id="Table3"> |
3802 | - <blockAlignment value="LEFT"/> |
3803 | - <blockValign value="TOP"/> |
3804 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/> |
3805 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/> |
3806 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/> |
3807 | - </blockTableStyle> |
3808 | - <blockTableStyle id="Table6"> |
3809 | - <blockAlignment value="LEFT"/> |
3810 | - <blockValign value="TOP"/> |
3811 | - <lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/> |
3812 | - <lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/> |
3813 | - <lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/> |
3814 | - </blockTableStyle> |
3815 | - <blockTableStyle id="Table5"> |
3816 | - <blockAlignment value="LEFT"/> |
3817 | - <blockValign value="TOP"/> |
3818 | - <lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/> |
3819 | - <lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/> |
3820 | - </blockTableStyle> |
3821 | - <initialize> |
3822 | - <paraStyle name="all" alignment="justify"/> |
3823 | - </initialize> |
3824 | - <paraStyle name="P1" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT"/> |
3825 | - <paraStyle name="P2" fontName="Helvetica-Bold" fontSize="14.0" leading="17" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> |
3826 | - <paraStyle name="Standard" fontName="Helvetica"/> |
3827 | - <paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/> |
3828 | - <paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/> |
3829 | - <paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/> |
3830 | - <paraStyle name="Caption" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/> |
3831 | - <paraStyle name="Index" fontName="Helvetica"/> |
3832 | - <paraStyle name="Table Contents" fontName="Helvetica"/> |
3833 | - <paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER"/> |
3834 | - <paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/> |
3835 | - <paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
3836 | - <paraStyle name="terp_default_Bold_8" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
3837 | - <paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
3838 | - <paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
3839 | - <paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/> |
3840 | - <paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/> |
3841 | - <paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> |
3842 | - <paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/> |
3843 | - <paraStyle name="Footer" fontName="Helvetica"/> |
3844 | - <paraStyle name="Horizontal Line" fontName="Helvetica" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/> |
3845 | - <paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/> |
3846 | - <paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/> |
3847 | - <paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/> |
3848 | - <paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/> |
3849 | - <paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> |
3850 | - <paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/> |
3851 | - <paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/> |
3852 | - <paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
3853 | - <paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> |
3854 | - <paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> |
3855 | - <paraStyle name="terp_default_1" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
3856 | - <paraStyle name="terp_default_Right_9_Bold" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> |
3857 | - <paraStyle name="terp_default_8_Italic" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
3858 | - <images/> |
3859 | - </stylesheet> |
3860 | - <story> |
3861 | - <para style="terp_default_8">[[ repeatIn(objects,'statement') ]]</para> |
3862 | - <para style="terp_default_8"> |
3863 | - <font color="white"> </font> |
3864 | - </para> |
3865 | - <para style="terp_default_8"> |
3866 | - <font color="white"> </font> |
3867 | - </para> |
3868 | - <para style="P2">User's Product</para> |
3869 | - <para style="terp_default_8"> |
3870 | - <font color="white"> </font> |
3871 | - </para> |
3872 | - <para style="terp_default_8"> |
3873 | - <font color="white"> </font> |
3874 | - </para> |
3875 | - <blockTable colWidths="104.0,104.0,104.0,104.0,104.0" style="Table1"> |
3876 | - <tr> |
3877 | - <td> |
3878 | - <para style="terp_tblheader_General_Centre">User</para> |
3879 | - </td> |
3880 | - <td> |
3881 | - <para style="terp_tblheader_General_Centre">Company</para> |
3882 | - </td> |
3883 | - <td> |
3884 | - <para style="terp_tblheader_General_Centre">Print Date</para> |
3885 | - </td> |
3886 | - <td> |
3887 | - <para style="terp_tblheader_General_Centre">Starting Date</para> |
3888 | - </td> |
3889 | - <td> |
3890 | - <para style="terp_tblheader_General_Centre">Ending Date</para> |
3891 | - </td> |
3892 | - </tr> |
3893 | - </blockTable> |
3894 | - <blockTable colWidths="104.0,104.0,104.0,104.0,104.0" style="Table2"> |
3895 | - <tr> |
3896 | - <td> |
3897 | - <para style="terp_default_Centre_8">[[ get_user(objects) ]]</para> |
3898 | - </td> |
3899 | - <td> |
3900 | - <para style="terp_default_Centre_8">[[ company.name ]]</para> |
3901 | - </td> |
3902 | - <td> |
3903 | - <para style="terp_default_Centre_8">[[ formatLang(time.strftime('%Y-%m-%d'),date = True) ]]</para> |
3904 | - </td> |
3905 | - <td> |
3906 | - <para style="terp_default_Centre_8">[[ formatLang(statement.date,date = True) ]]</para> |
3907 | - </td> |
3908 | - <td> |
3909 | - <para style="terp_default_Centre_8">[[ formatLang(statement.closing_date,date_time = True) ]]</para> |
3910 | - </td> |
3911 | - </tr> |
3912 | - </blockTable> |
3913 | - <para style="terp_default_8"> |
3914 | - <font color="white"> </font> |
3915 | - </para> |
3916 | - <blockTable colWidths="356.0,68.0,95.0" style="Table3"> |
3917 | - <tr> |
3918 | - <td> |
3919 | - <para style="terp_tblheader_General">Product</para> |
3920 | - </td> |
3921 | - <td> |
3922 | - <para style="terp_tblheader_General_Right">Qty</para> |
3923 | - </td> |
3924 | - <td> |
3925 | - <para style="terp_tblheader_General_Right">Amount</para> |
3926 | - </td> |
3927 | - </tr> |
3928 | - </blockTable> |
3929 | - <section> |
3930 | - <para style="terp_default_1">[[ repeatIn(get_data(statement), 'line_ids') and ' ' or removeParentNode('blockTable') ]]</para> |
3931 | - <section> |
3932 | - <para style="terp_default_1">[[ repeatIn(get_data(statement), 'line_ids')]]</para> |
3933 | - <blockTable colWidths="356.0,69.0,95.0" style="Table6"> |
3934 | - <tr> |
3935 | - <td> |
3936 | - <para style="terp_default_9">[ [[line_ids['code'] ]] ] [[ line_ids['name'] ]]</para> |
3937 | - </td> |
3938 | - <td> |
3939 | - <para style="terp_default_Right_9">[[ formatLang(line_ids['qty']) ]] [[line_ids['uom'] ]]</para> |
3940 | - </td> |
3941 | - <td> |
3942 | - <para style="terp_default_Right_9">[[ formatLang(line_ids['amt'], currency_obj = company.currency_id) ]]</para> |
3943 | - </td> |
3944 | - </tr> |
3945 | - </blockTable> |
3946 | - </section> |
3947 | - </section> |
3948 | - <blockTable colWidths="357.0,69.0,94.0" style="Table5"> |
3949 | - <tr> |
3950 | - <td> |
3951 | - <para style="P1"> |
3952 | - <font color="white"> </font> |
3953 | - </para> |
3954 | - </td> |
3955 | - <td> |
3956 | - <para style="terp_tblheader_General_Right">Total :</para> |
3957 | - </td> |
3958 | - <td> |
3959 | - <para style="terp_default_Right_9_Bold">[[ formatLang(get_total(statement), currency_obj = company.currency_id) ]]</para> |
3960 | - </td> |
3961 | - </tr> |
3962 | - </blockTable> |
3963 | - <para style="terp_default_8"> |
3964 | - <font color="white"> </font> |
3965 | - </para> |
3966 | - </story> |
3967 | -</document> |
3968 | |
3969 | === removed file 'point_of_sale/report/pos_users_product.sxw' |
3970 | Binary files point_of_sale/report/pos_users_product.sxw 2012-11-29 22:26:45 +0000 and point_of_sale/report/pos_users_product.sxw 1970-01-01 00:00:00 +0000 differ |
3971 | === modified file 'point_of_sale/test/02_order_to_invoice.yml' |
3972 | --- point_of_sale/test/02_order_to_invoice.yml 2014-01-15 09:42:20 +0000 |
3973 | +++ point_of_sale/test/02_order_to_invoice.yml 2014-04-29 12:44:05 +0000 |
3974 | @@ -36,11 +36,16 @@ |
3975 | - state == 'paid' |
3976 | - not invoice_id |
3977 | - |
3978 | - I generate the invoice by pressing the Invoice button that calls the workflow |
3979 | + I set the order as invoiced |
3980 | - |
3981 | !workflow {model: pos.order, action: invoice, ref: pos_order_pos1} |
3982 | - |
3983 | + I generate an invoice from the order |
3984 | +- |
3985 | + !python {model: pos.order}: | |
3986 | + invoice = self.action_invoice(cr, uid, [ref('pos_order_pos1')]) |
3987 | +- |
3988 | I test that the total of the attached invoice is correct |
3989 | - |
3990 | - !assert {model: pos.order, id: pos_order_pos1, string: Invoice not correct}: |
3991 | - - amount_total == (450*2 + 300*3*1.05)*0.95 |
3992 | + !assert {model: pos.order, id: pos_order_pos1, string: Invoice inconsistent with its origin order}: |
3993 | + - invoice_id.amount_total == 1795.5 |
3994 | |
3995 | === added file 'point_of_sale/test/account_statement_reports.yml' |
3996 | --- point_of_sale/test/account_statement_reports.yml 1970-01-01 00:00:00 +0000 |
3997 | +++ point_of_sale/test/account_statement_reports.yml 2014-04-29 12:44:05 +0000 |
3998 | @@ -0,0 +1,72 @@ |
3999 | +- |
4000 | + In order to test Bank Statement feature of account I create a bank statement line and confirm it and check it's move created |
4001 | +- |
4002 | + I select the period and journal for the bank statement |
4003 | +- |
4004 | + !python {model: account.bank.statement}: | |
4005 | + import time |
4006 | + journal = self._default_journal_id(cr, uid, {'lang': u'en_US', 'tz': False, 'active_model': 'ir.ui.menu', |
4007 | + 'journal_type': 'bank', 'period_id': time.strftime('%m'), 'active_ids': [ref('account.menu_bank_statement_tree')], 'active_id': ref('account.menu_bank_statement_tree')}) |
4008 | + assert journal, 'Journal has not been selected' |
4009 | +- |
4010 | + I create a bank statement with Opening and Closing balance 0. |
4011 | +- |
4012 | + !record {model: account.bank.statement, id: account_bank_statement_0}: |
4013 | + balance_end_real: 0.0 |
4014 | + balance_start: 0.0 |
4015 | + date: !eval time.strftime('%Y-%m-%d') |
4016 | + journal_id: account.bank_journal |
4017 | +- |
4018 | + I create bank statement line |
4019 | +- |
4020 | + !python {model: account.bank.statement.line}: | |
4021 | + partner = self.onchange_partner_id(cr, uid, [], ref('base.res_partner_4'), context=None) |
4022 | + vals = { |
4023 | + 'account_id': partner['value']['account_id'], |
4024 | + 'amount': 1000.0, |
4025 | + 'partner_id': ref('base.res_partner_4'), |
4026 | + 'statement_id': ref('account_bank_statement_0'), |
4027 | + 'name': 'EXT001' |
4028 | + } |
4029 | + vals.update(partner.get('value',{})) |
4030 | + line_id = self.create(cr, uid, vals) |
4031 | + assert line_id, "Account bank statement line has not been created" |
4032 | +- |
4033 | + I compute bank statement using Compute button |
4034 | +- |
4035 | + !python {model: account.bank.statement}: | |
4036 | + self.button_dummy(cr, uid, [ref("account_bank_statement_0")]) |
4037 | + |
4038 | +- |
4039 | + I modify the bank statement and set the Closing Balance. |
4040 | +- |
4041 | + !record {model: account.bank.statement, id: account_bank_statement_0}: |
4042 | + balance_end_real: 1000.0 |
4043 | + |
4044 | +- |
4045 | + I confirm the bank statement using Confirm button |
4046 | +- |
4047 | + !python {model: account.bank.statement}: | |
4048 | + self.button_confirm_bank(cr, uid, [ref("account_bank_statement_0")]) |
4049 | +- |
4050 | + Print the account statement report |
4051 | +- |
4052 | + !python {model: account.bank.statement}: | |
4053 | + import os |
4054 | + import openerp.report |
4055 | + from openerp import tools |
4056 | + data, format = openerp.report.render_report(cr, uid, [ref('account_bank_statement_0')], 'point_of_sale.report_statement', {}, {}) |
4057 | + if tools.config['test_report_directory']: |
4058 | + file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-statement.'+format), 'wb+').write(data) |
4059 | + |
4060 | +- |
4061 | + Printing the user s product report |
4062 | +- |
4063 | + !python {model: account.bank.statement}: | |
4064 | + import os |
4065 | + import openerp.report |
4066 | + from openerp import tools |
4067 | + data, format = openerp.report.render_report(cr, uid, [ref('account_bank_statement_0')], 'point_of_sale.report_usersproduct', {}, {}) |
4068 | + if tools.config['test_report_directory']: |
4069 | + file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-usersproduct.'+format), 'wb+').write(data) |
4070 | + |
4071 | |
4072 | === modified file 'point_of_sale/test/point_of_sale_report.yml' |
4073 | --- point_of_sale/test/point_of_sale_report.yml 2013-10-27 12:31:04 +0000 |
4074 | +++ point_of_sale/test/point_of_sale_report.yml 2014-04-29 12:44:05 +0000 |
4075 | @@ -1,24 +1,13 @@ |
4076 | - |
4077 | - In order to test the PDF reports defined on a Point Of Sale,we will print a POS Detail Summary Report |
4078 | -- |
4079 | - !python {model: pos.order}: | |
4080 | - import os |
4081 | - import openerp.report |
4082 | - from openerp import tools |
4083 | - data, format = openerp.report.render_report(cr, uid, [ref('point_of_sale.pos_order_pos1')], 'pos.details_summary', {}, {}) |
4084 | - if tools.config['test_report_directory']: |
4085 | - file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-details_summary report'+format), 'wb+').write(data) |
4086 | - |
4087 | -- |
4088 | In order to test the PDF reports defined on a Point Of Sale, we will print a POS Invoice Report |
4089 | - |
4090 | !python {model: pos.order}: | |
4091 | import os |
4092 | import openerp.report |
4093 | from openerp import tools |
4094 | - data, format = openerp.report.render_report(cr, uid, [ref('point_of_sale.pos_order_pos1')], 'pos.invoice', {}, {}) |
4095 | + data, format = openerp.report.render_report(cr, uid, [ref('pos_order_pos1')], 'point_of_sale.report_invoice', {}, {}) |
4096 | if tools.config['test_report_directory']: |
4097 | - file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-invoice report'+format), 'wb+').write(data) |
4098 | + file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-invoice_report.'+format), 'wb+').write(data) |
4099 | |
4100 | - |
4101 | In order to test the PDF reports defined on a Point Of Sale, we will print a POS Lines Report |
4102 | @@ -27,9 +16,9 @@ |
4103 | import os |
4104 | import openerp.report |
4105 | from openerp import tools |
4106 | - data, format = openerp.report.render_report(cr, uid, [ref('point_of_sale.pos_order_pos1')], 'pos.lines', {}, {}) |
4107 | + data, format = openerp.report.render_report(cr, uid, [ref('pos_order_pos1')], 'point_of_sale.report_saleslines', {}, {}) |
4108 | if tools.config['test_report_directory']: |
4109 | - file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-lines report'+format), 'wb+').write(data) |
4110 | + file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-lines_report.'+format), 'wb+').write(data) |
4111 | |
4112 | - |
4113 | In order to test the PDF reports defined on a Point of Sale, we will print a POS Receipt Report |
4114 | @@ -38,9 +27,9 @@ |
4115 | import os |
4116 | import openerp.report |
4117 | from openerp import tools |
4118 | - data, format = openerp.report.render_report(cr, uid, [ref('point_of_sale.pos_order_pos1')], 'pos.receipt', {}, {}) |
4119 | + data, format = openerp.report.render_report(cr, uid, [ref('pos_order_pos1')], 'point_of_sale.report_receipt', {}, {}) |
4120 | if tools.config['test_report_directory']: |
4121 | - file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-receipt report'+format), 'wb+').write(data) |
4122 | + file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-receipt_report.'+format), 'wb+').write(data) |
4123 | |
4124 | - |
4125 | Print the POS Details Report through the wizard |
4126 | @@ -54,34 +43,12 @@ |
4127 | test_reports.try_report_action(cr, uid, 'action_report_pos_details',wiz_data=data_dict, context=ctx, our_module='point_of_sale') |
4128 | |
4129 | - |
4130 | - In order to test the PDF reports defined on a Point of Sale, we will print a POS Sales User Report |
4131 | -- |
4132 | - !python {model: pos.order}: | |
4133 | - import os, time |
4134 | - import openerp.report |
4135 | - from openerp import tools |
4136 | - data_dict = {'model':'ir.ui.menu', 'form':{'date_start': time.strftime('%Y-%m-%d'), 'date_end': time.strftime('%Y-%m-%d'),'user_id':[ref('base.user_root')] }} |
4137 | - data, format = openerp.report.render_report(cr, uid, [ref('point_of_sale.pos_order_pos1')], 'pos.sales.user', data_dict, {}) |
4138 | - if tools.config['test_report_directory']: |
4139 | - file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-sales_user_report'+format), 'wb+').write(data) |
4140 | -- |
4141 | In order to test the PDF reports defined on a Point of Sale, we will print a POS Payment Report |
4142 | - |
4143 | !python {model: pos.order}: | |
4144 | import os, time |
4145 | import openerp.report |
4146 | from openerp import tools |
4147 | - data, format = openerp.report.render_report(cr, uid, [ref('point_of_sale.pos_order_pos0')], 'pos.payment.report', {}, {}) |
4148 | - if tools.config['test_report_directory']: |
4149 | - file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-payment_report'+format), 'wb+').write(data) |
4150 | -- |
4151 | - In order to test the PDF reports defined on a Point of Sale, we will print a POS Payment User Report |
4152 | -- |
4153 | - !python {model: pos.order}: | |
4154 | - import os, time |
4155 | - import openerp.report |
4156 | - from openerp import tools |
4157 | - data_dict = {'model':'ir.ui.menu', 'form':{'user_id':[ref('base.user_root'),ref('base.user_demo')] }} |
4158 | - data, format = openerp.report.render_report(cr, uid, [ref('point_of_sale.pos_order_pos1')], 'pos.payment.report.user', data_dict, {}) |
4159 | - if tools.config['test_report_directory']: |
4160 | - file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-payment_user_report'+format), 'wb+').write(data) |
4161 | + data, format = openerp.report.render_report(cr, uid, [ref('pos_order_pos0')], 'point_of_sale.report_payment', {}, {}) |
4162 | + if tools.config['test_report_directory']: |
4163 | + file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-payment_report.'+format), 'wb+').write(data) |
4164 | |
4165 | === added directory 'point_of_sale/views' |
4166 | === added file 'point_of_sale/views/report_detailsofsales.xml' |
4167 | --- point_of_sale/views/report_detailsofsales.xml 1970-01-01 00:00:00 +0000 |
4168 | +++ point_of_sale/views/report_detailsofsales.xml 2014-04-29 12:44:05 +0000 |
4169 | @@ -0,0 +1,140 @@ |
4170 | +<?xml version="1.0" encoding="utf-8"?> |
4171 | +<openerp> |
4172 | +<data> |
4173 | +<template id="report_detailsofsales"> |
4174 | + <t t-call="report.html_container"> |
4175 | + <t t-call="report.internal_layout"> |
4176 | + <div class="page"> |
4177 | + <h2>Details of Sales</h2> |
4178 | + |
4179 | + <div class="row mt32"> |
4180 | + <div class="col-xs-3"> |
4181 | + <strong>Company</strong>:<br/> |
4182 | + <span t-esc="res_company.name"/> |
4183 | + </div> |
4184 | + <div class="col-xs-3"> |
4185 | + <strong>Users</strong>:<br/> |
4186 | + <span t-esc="get_user_names(data['form']['user_ids']) or 'All'"/> |
4187 | + </div> |
4188 | + <div class="col-xs-3"> |
4189 | + <strong>Print Date</strong>:<br/> |
4190 | + <span t-esc="formatLang(time.strftime('%Y-%m-%d'),date=True)"/> |
4191 | + </div> |
4192 | + </div> |
4193 | + <div class="row mb32"> |
4194 | + <div class="col-xs-3"> |
4195 | + <strong>Start Period</strong>:<br/> |
4196 | + <span t-esc="formatLang(data['form']['date_start'],date=True)"/> |
4197 | + </div> |
4198 | + <div class="col-xs-3"> |
4199 | + <strong>End Period</strong>:<br/> |
4200 | + <span t-esc="formatLang(data['form']['date_end'],date=True)"/> |
4201 | + </div> |
4202 | + </div> |
4203 | + |
4204 | + <table class="table table-condensed"> |
4205 | + <thead> |
4206 | + <th><strong>Date</strong></th> |
4207 | + <th><strong>Order</strong></th> |
4208 | + <th><strong>Product</strong></th> |
4209 | + <th class="text-right"><strong>Price</strong></th> |
4210 | + <th class="text-center"><strong>Qty</strong></th> |
4211 | + <th class="text-center"><strong>Disc(%)</strong></th> |
4212 | + <th class="text-center"><strong>Invoiced</strong></th> |
4213 | + </thead> |
4214 | + <tbody> |
4215 | + <tr t-foreach="pos_sales_details(data['form'])" t-as="line_ids"> |
4216 | + <td> |
4217 | + <span t-esc="formatLang(line_ids['date_order'], date_time=True)"/> |
4218 | + </td> |
4219 | + <td> |
4220 | + <span t-esc="line_ids['pos_name']"/> |
4221 | + </td> |
4222 | + <td> |
4223 | + [<t t-if="line_ids['code']"> |
4224 | + <span t-esc="line_ids['code']"/> |
4225 | + </t>] |
4226 | + <span t-esc="line_ids['name']"/> |
4227 | + </td> |
4228 | + <td class="text-right"> |
4229 | + <span t-esc="formatLang(line_ids['price_unit'], dp='Sale Price', currency_obj=res_company.currency_id)"/> |
4230 | + </td> |
4231 | + <td class="text-center"> |
4232 | + <span t-esc="formatLang(line_ids['qty'])"/> |
4233 | + <span t-esc="line_ids['uom']"/> |
4234 | + </td> |
4235 | + <td class="text-center"> |
4236 | + <span t-esc="formatLang(line_ids['discount'], dp='Sale Price')"/> |
4237 | + </td> |
4238 | + <td class="text-center"> |
4239 | + <t t-if="line_ids['invoice_id']"> |
4240 | + <span t-esc="getinvoice(line_ids['invoice_id'])"/> |
4241 | + </t> |
4242 | + </td> |
4243 | + </tr> |
4244 | + </tbody> |
4245 | + </table> |
4246 | + |
4247 | + <table class="table table-condensed"> |
4248 | + <tr t-if="gettaxamount(data['form'])"><td colspan="2"><strong>Taxes</strong></td></tr> |
4249 | + <tr t-foreach="gettaxamount(data['form'])" t-as="tax"> |
4250 | + <td><span t-esc="tax['name']"/></td> |
4251 | + <td class="text_right"> |
4252 | + <strong t-esc="formatLang(tax['amount'], currency_obj = res_company.currency_id)"/> |
4253 | + </td> |
4254 | + </tr> |
4255 | + <tr> |
4256 | + <td colspan="2"><strong>Payment</strong></td> |
4257 | + </tr> |
4258 | + <tr t-foreach="getpayments(data['form'])" t-as="payment"> |
4259 | + <td><span t-esc="payment['name']"/></td> |
4260 | + <td class="text-right"> |
4261 | + <strong t-esc="formatLang(payment['sum'], dp='Account', currency_obj=res_company.currency_id)"/> |
4262 | + </td> |
4263 | + </tr> |
4264 | + <tr> |
4265 | + <td colspan="2"><strong>Summary</strong></td> |
4266 | + </tr> |
4267 | + <tr> |
4268 | + <td><strong>Sales total(Revenue)</strong></td> |
4269 | + <td class="text-right"> |
4270 | + <strong t-esc="formatLang(getsalestotal2(), dp='Sale Price', currency_obj=res_company.currency_id)"/> |
4271 | + </td> |
4272 | + </tr> |
4273 | + <tr> |
4274 | + <td><strong>Qty of product</strong></td> |
4275 | + <td class="text-right"> |
4276 | + <strong t-esc="formatLang(getqtytotal2())"/> |
4277 | + </td> |
4278 | + </tr> |
4279 | + <tr> |
4280 | + <td><strong>Total invoiced</strong></td> |
4281 | + <td class="text-right"> |
4282 | + <strong t-esc="formatLang(getsuminvoice2(data['form']), dp='Sale Price', currency_obj=res_company.currency_id)"/> |
4283 | + </td> |
4284 | + </tr> |
4285 | + <tr> |
4286 | + <td><strong>Total discount</strong></td> |
4287 | + <td class="text-right"> |
4288 | + <strong t-esc="formatLang(getsumdisc(data['form']), dp='Sale Price', currency_obj=res_company.currency_id)"/> |
4289 | + </td> |
4290 | + </tr> |
4291 | + <tr> |
4292 | + <td><strong>Total paid</strong></td> |
4293 | + <td class="text-right"> |
4294 | + <strong t-esc="formatLang(getpaidtotal2(), dp='Sale Price', currency_obj=res_company.currency_id)"/> |
4295 | + </td> |
4296 | + </tr> |
4297 | + <tr> |
4298 | + <td><strong>Total of the day</strong></td> |
4299 | + <td class="text-right"> |
4300 | + <strong t-esc="formatLang(gettotaloftheday(data['form']), dp='Sale Price', currency_obj = res_company.currency_id)"/> |
4301 | + </td> |
4302 | + </tr> |
4303 | + </table> |
4304 | + </div> |
4305 | + </t> |
4306 | + </t> |
4307 | +</template> |
4308 | +</data> |
4309 | +</openerp> |
4310 | |
4311 | === added file 'point_of_sale/views/report_payment.xml' |
4312 | --- point_of_sale/views/report_payment.xml 1970-01-01 00:00:00 +0000 |
4313 | +++ point_of_sale/views/report_payment.xml 2014-04-29 12:44:05 +0000 |
4314 | @@ -0,0 +1,91 @@ |
4315 | +<?xml version="1.0" encoding="utf-8"?> |
4316 | +<openerp> |
4317 | +<data> |
4318 | +<template id="report_payment"> |
4319 | + <t t-call="report.html_container"> |
4320 | + <t t-foreach="docs" t-as="o"> |
4321 | + <t t-call="report.internal_layout"> |
4322 | + <div class="page"> |
4323 | + <h2>Today's Payments</h2> |
4324 | + <div class="row mt32 mb32"> |
4325 | + <div class="col-xs-3"> |
4326 | + <strong>Company</strong>: |
4327 | + <br/> |
4328 | + <span t-field="res_company.name"/> |
4329 | + </div> |
4330 | + <div class="col-xs-3"> |
4331 | + <strong>Print date</strong>: |
4332 | + <br/> |
4333 | + <t t-esc="formatLang(time.strftime('%Y-%m-%d'), date='True')"/> |
4334 | + </div> |
4335 | + </div> |
4336 | + <t t-set="pos_payment" t-value="pos_payment(o)"/> |
4337 | + <table class="table table-condensed" t-if="pos_payment"> |
4338 | + <thead> |
4339 | + <tr> |
4340 | + <td> |
4341 | + <strong>Product</strong> |
4342 | + </td> |
4343 | + <td class="text-center"> |
4344 | + <strong>Qty</strong> |
4345 | + </td> |
4346 | + <td class="text-center"> |
4347 | + <strong>Disc.(%)</strong> |
4348 | + </td> |
4349 | + <td class="text-right"> |
4350 | + <strong>Unit Price</strong> |
4351 | + </td> |
4352 | + <td class="text-right"> |
4353 | + <strong>Total</strong> |
4354 | + </td> |
4355 | + </tr> |
4356 | + </thead> |
4357 | + <tbody> |
4358 | + <tr t-foreach="pos_payment" t-as="line_ids"> |
4359 | + <td> |
4360 | + <t t-if="line_ids['code']"> |
4361 | + <span t-esc="line_ids['code']"/> |
4362 | + </t> |
4363 | + <t t-if="line_ids['name']"> |
4364 | + <span t-esc="line_ids['name']"/> |
4365 | + </t> |
4366 | + </td> |
4367 | + <td class="text-right"> |
4368 | + <span t-esc="formatLang(line_ids['qty'])"/> |
4369 | + <t t-if="line_ids['uom']"> |
4370 | + <span t-esc="line_ids['uom']"/> |
4371 | + </t> |
4372 | + </td> |
4373 | + <td class="text-right"> |
4374 | + <span t-esc="formatLang(line_ids['discount'])"/> |
4375 | + </td> |
4376 | + <td class="text-right"> |
4377 | + <span t-esc="formatLang(line_ids['price_unit'])"/> |
4378 | + </td> |
4379 | + <td class="text-right"> |
4380 | + <span t-esc="formatLang(line_ids['total'], currency_obj=res_company.currency_id)"/> |
4381 | + </td> |
4382 | + </tr> |
4383 | + </tbody> |
4384 | + </table> |
4385 | + <div class="row" t-if="pos_payment_total(o)"> |
4386 | + <div class="col-xs-4 pull-right"> |
4387 | + <table class="table table-condensed"> |
4388 | + <tr class="border-black"> |
4389 | + <td> |
4390 | + <strong>Net Total</strong> |
4391 | + </td> |
4392 | + <td class="text-right"> |
4393 | + <span t-esc="formatLang(pos_payment_total(o), currency_obj=res_company.currency_id)"/> |
4394 | + </td> |
4395 | + </tr> |
4396 | + </table> |
4397 | + </div> |
4398 | + </div> |
4399 | + </div> |
4400 | + </t> |
4401 | + </t> |
4402 | + </t> |
4403 | +</template> |
4404 | +</data> |
4405 | +</openerp> |
4406 | |
4407 | === added file 'point_of_sale/views/report_receipt.xml' |
4408 | --- point_of_sale/views/report_receipt.xml 1970-01-01 00:00:00 +0000 |
4409 | +++ point_of_sale/views/report_receipt.xml 2014-04-29 12:44:05 +0000 |
4410 | @@ -0,0 +1,92 @@ |
4411 | +<?xml version="1.0" encoding="utf-8"?> |
4412 | +<openerp> |
4413 | +<data> |
4414 | +<template id="report_receipt"> |
4415 | + <t t-call="report.html_container"> |
4416 | + <t t-foreach="docs" t-as="o"> |
4417 | + <div class="page"> |
4418 | + <div class="row"> |
4419 | + <div class="col-xs-12 text-center"> |
4420 | + <h2 t-esc="o.user_id.company_id.name"/> |
4421 | + <div t-field="o.partner_id" |
4422 | + t-field-options='{"widget": "contact", "fields": ["address", "name", "phone", "fax"], "no_marker": true}'/> |
4423 | + User: <span t-field="o.user_id"/><br/> |
4424 | + Warehouse: <span t-field="o.warehouse_id"/><br/> |
4425 | + Date: <span t-field="o.date_order"/><br/> |
4426 | + </div> |
4427 | + </div> |
4428 | + |
4429 | + <div class="row"> |
4430 | + </div> |
4431 | + |
4432 | + <table class="table table-condensed"> |
4433 | + <thead> |
4434 | + <tr> |
4435 | + <th>Description</th> |
4436 | + <th class="text-right">Quantity</th> |
4437 | + <th class="text-right">Price</th> |
4438 | + </tr> |
4439 | + </thead> |
4440 | + <tbody> |
4441 | + <tr t-foreach="o.lines" t-as="line"> |
4442 | + <td><span t-field="line.product_id"/></td> |
4443 | + <td class="text-right"> |
4444 | + <t t-if="o.state != 'cancel' and o.statement_ids"> |
4445 | + <span t-esc="'%.f' % line.qty"/> |
4446 | + </t> |
4447 | + </td> |
4448 | + <td class="text-right"> |
4449 | + <t t-if="o.state != 'cancel' and o.statement_ids"> |
4450 | + <span t-esc="formatLang(net(line.id), currency_obj=res_company.currency_id)"/> |
4451 | + </t> |
4452 | + <t t-if="line.discount != 0.0"> |
4453 | + <span t-esc="formatLang(line.discount, currency_obj=res_company.currency_id)"/> |
4454 | + </t> |
4455 | + </td> |
4456 | + </tr> |
4457 | + </tbody> |
4458 | + </table> |
4459 | + |
4460 | + <div class="row"> |
4461 | + <div class="col-xs-6 pull-right"> |
4462 | + <table class="table table-condensed"> |
4463 | + <tr class="border-black"> |
4464 | + <td><strong>Taxes</strong></td> |
4465 | + <td class="text-right"> |
4466 | + <strong t-esc="formatLang(o.amount_tax, currency_obj=res_company.currency_id)"/> |
4467 | + </td> |
4468 | + </tr> |
4469 | + <tr> |
4470 | + <td><strong>Total</strong></td> |
4471 | + <td class="text-right"> |
4472 | + <strong t-esc="formatLang(o.amount_total, currency_obj=res_company.currency_id)"/> |
4473 | + </td> |
4474 | + </tr> |
4475 | + </table> |
4476 | + </div> |
4477 | + </div> |
4478 | + |
4479 | + <table class="table table-condensed"> |
4480 | + <thead> |
4481 | + <tr> |
4482 | + <th>Payment Mode</th> |
4483 | + <th>Amount</th> |
4484 | + </tr> |
4485 | + </thead> |
4486 | + <tbody> |
4487 | + <tr t-foreach="get_journal_amt(o)" t-as="d"> |
4488 | + <td> |
4489 | + <span t-esc="d['name']"/> |
4490 | + </td> |
4491 | + <td> |
4492 | + <span t-esc="formatLang(d['amt'], currency_obj=res_company.currency_id)"/> |
4493 | + </td> |
4494 | + </tr> |
4495 | + </tbody> |
4496 | + </table> |
4497 | + </div> |
4498 | + </t> |
4499 | + </t> |
4500 | +</template> |
4501 | +</data> |
4502 | +</openerp> |
4503 | |
4504 | === added file 'point_of_sale/views/report_saleslines.xml' |
4505 | --- point_of_sale/views/report_saleslines.xml 1970-01-01 00:00:00 +0000 |
4506 | +++ point_of_sale/views/report_saleslines.xml 2014-04-29 12:44:05 +0000 |
4507 | @@ -0,0 +1,98 @@ |
4508 | +<?xml version="1.0" encoding="utf-8"?> |
4509 | +<openerp> |
4510 | +<data> |
4511 | +<template id="report_saleslines"> |
4512 | + <t t-call="report.html_container"> |
4513 | + <t t-foreach="docs" t-as="o"> |
4514 | + <t t-call="report.internal_layout"> |
4515 | + <div class="page"> |
4516 | + <h2>POS Lines</h2> |
4517 | + |
4518 | + <div class="row mt32 mb32"> |
4519 | + <div class="col-xs-3"> |
4520 | + <strong>Company</strong>:<br/> |
4521 | + <span t-field="res_company.name"/> |
4522 | + </div> |
4523 | + <div class="col-xs-3"> |
4524 | + <strong>Print date</strong>:<br/> |
4525 | + <t t-esc="formatLang(time.strftime('%Y-%m-%d'), date=True)"/> |
4526 | + </div> |
4527 | + <div class="col-xs-3"> |
4528 | + <strong>No. Of Articles</strong>:<br/> |
4529 | + <t t-esc="total_quantity(o)"/> |
4530 | + </div> |
4531 | + </div> |
4532 | + |
4533 | + <table class="table table-condensed"> |
4534 | + <thead> |
4535 | + <tr> |
4536 | + <th><strong>Description</strong></th> |
4537 | + <th><strong>Tax</strong></th> |
4538 | + <th class="text-right"><strong>Quantity</strong></th> |
4539 | + <th class="text-right"><strong>Unit Price</strong></th> |
4540 | + <th class="text-right" groups="sale.group_discount_per_so_line"><strong>Disc. (%)</strong></th> |
4541 | + <th class="text-right"><strong>Price</strong></th> |
4542 | + </tr> |
4543 | + </thead> |
4544 | + <tbody> |
4545 | + <tr t-foreach="o.lines" t-as="l"> |
4546 | + <td> |
4547 | + <t t-if="l.product_id and l.product_id.code"> |
4548 | + [<span t-field="l.product_id.code"/>] |
4549 | + </t> |
4550 | + <span t-field="l.product_id.name"/> |
4551 | + </td> |
4552 | + <td> |
4553 | + <t t-esc="taxes(l)"/> |
4554 | + </td> |
4555 | + <td class="text-right"> |
4556 | + <span t-field="l.qty"/> |
4557 | + <span t-field="l.product_id.uom_id.name" groups="product.group_uom"/> |
4558 | + </td> |
4559 | + <td class="text-right"> |
4560 | + <span t-field="l.price_unit"/> |
4561 | + </td> |
4562 | + <td class="text-right" groups="sale.group_discount_per_so_line"> |
4563 | + <span t-field="l.discount"/> |
4564 | + </td> |
4565 | + <td class="text-right"> |
4566 | + <span t-field="l.price_subtotal" t-field-options='{"widget": "monetary", "display_currency": "o.pricelist_id.currency_id"}'/> |
4567 | + </td> |
4568 | + </tr> |
4569 | + </tbody> |
4570 | + </table> |
4571 | + |
4572 | + <div class="row"> |
4573 | + <div class="col-xs-4 pull-right"> |
4574 | + <table class="table table-condensed"> |
4575 | + <tr class="border-black"> |
4576 | + <td><strong>Total Without Taxes</strong></td> |
4577 | + <td class="text-right"> |
4578 | + <span t-field="o.amount_total" |
4579 | + t-field-options='{"widget": "monetary", "display_currency": "o.pricelist_id.currency_id"}'/> |
4580 | + </td> |
4581 | + </tr> |
4582 | + <tr> |
4583 | + <td>Taxes</td> |
4584 | + <td class="text-right"> |
4585 | + <span t-field="o.amount_tax" |
4586 | + t-field-options='{"widget": "monetary", "display_currency": "o.pricelist_id.currency_id"}'/> |
4587 | + </td> |
4588 | + </tr> |
4589 | + <tr class="border-black"> |
4590 | + <td><strong>Total</strong></td> |
4591 | + <td class="text-right"> |
4592 | + <span t-esc="(o.amount_total + o.amount_tax)" |
4593 | + t-esc-options='{"widget": "monetary", "display_currency": "o.pricelist_id.currency_id"}'/> |
4594 | + </td> |
4595 | + </tr> |
4596 | + </table> |
4597 | + </div> |
4598 | + </div> |
4599 | + </div> |
4600 | + </t> |
4601 | + </t> |
4602 | + </t> |
4603 | +</template> |
4604 | +</data> |
4605 | +</openerp> |
4606 | |
4607 | === added file 'point_of_sale/views/report_sessionsummary.xml' |
4608 | --- point_of_sale/views/report_sessionsummary.xml 1970-01-01 00:00:00 +0000 |
4609 | +++ point_of_sale/views/report_sessionsummary.xml 2014-04-29 12:44:05 +0000 |
4610 | @@ -0,0 +1,127 @@ |
4611 | +<?xml version="1.0" encoding="utf-8"?> |
4612 | +<openerp> |
4613 | +<data> |
4614 | +<template id="report_sessionsummary"> |
4615 | + <t t-call="report.html_container"> |
4616 | + <t t-foreach="docs" t-as="o"> |
4617 | + <t t-call="report.internal_layout"> |
4618 | + <div class="page"> |
4619 | + <h2>Session Summary: <span t-field="o.name"/></h2> |
4620 | + |
4621 | + <div class="row mt32 mb32"> |
4622 | + <div class="col-xs-3"> |
4623 | + <strong>Responsible</strong>:<br/> |
4624 | + <span t-field="o.user_id"/> |
4625 | + </div> |
4626 | + <div class="col-xs-3"> |
4627 | + <strong>Point of Sale</strong>:<br/> |
4628 | + <span t-field="o.config_id"/> |
4629 | + </div> |
4630 | + <div class="col-xs-3"> |
4631 | + <strong>Opening Date</strong>:<br/> |
4632 | + <span t-field="o.start_at"/> |
4633 | + </div> |
4634 | + <div class="col-xs-3"> |
4635 | + <strong>Closing Date</strong>:<br/> |
4636 | + <span t-field="o.stop_at"/> |
4637 | + </div> |
4638 | + </div> |
4639 | + |
4640 | + <h4>Statement Summary</h4> |
4641 | + |
4642 | + <table class="table table-condensed mb32"> |
4643 | + <thead> |
4644 | + <tr> |
4645 | + <th> |
4646 | + <strong>Reference</strong> |
4647 | + </th> |
4648 | + <th> |
4649 | + <strong>Journal</strong> |
4650 | + </th> |
4651 | + <th class="text-right"> |
4652 | + <strong>Starting Balance</strong> |
4653 | + </th> |
4654 | + <th class="text-right"> |
4655 | + <strong>Total Transactions</strong> |
4656 | + </th> |
4657 | + <th class="text-right"> |
4658 | + <strong>Ending Balance</strong> |
4659 | + </th> |
4660 | + <th class="text-right"> |
4661 | + <strong>Difference</strong> |
4662 | + </th> |
4663 | + <th class="text-right" groups="base.group_multi_currency"> |
4664 | + <strong>Currency</strong> |
4665 | + </th> |
4666 | + <th class="text-right"> |
4667 | + <strong>Status</strong> |
4668 | + </th> |
4669 | + </tr> |
4670 | + </thead> |
4671 | + <tbody> |
4672 | + <tr t-foreach="o.statement_ids" t-as="statement"> |
4673 | + <td><span t-field="statement.name"/></td> |
4674 | + <td><span t-field="statement.journal_id"/></td> |
4675 | + <td class="text-right"> |
4676 | + <span t-field="statement.balance_start" |
4677 | + t-field-options='{"widget": "monetary", "display_currency": "statement.currency"}'/> |
4678 | + </td> |
4679 | + <td class="text-right"> |
4680 | + <span t-field="statement.total_entry_encoding" |
4681 | + t-field-options='{"widget": "monetary", "display_currency": "statement.currency"}'/> |
4682 | + </td> |
4683 | + <td class="text-right"> |
4684 | + <span t-field="statement.balance_end_real" |
4685 | + t-field-options='{"widget": "monetary", "display_currency": "statement.currency"}'/> |
4686 | + </td> |
4687 | + <td class="text-right"> |
4688 | + <span t-field="statement.difference" |
4689 | + t-field-options='{"widget": "monetary", "display_currency": "statement.currency"}'/> |
4690 | + </td> |
4691 | + <td class="text-right" groups="base.group_multi_currency"> |
4692 | + <span t-field="statement.currency" |
4693 | + t-field-options='{"widget": "monetary", "display_currency": "statement.currency"}'/> |
4694 | + </td> |
4695 | + <td class="text-right"><span t-field="statement.state"/></td> |
4696 | + </tr> |
4697 | + </tbody> |
4698 | + </table> |
4699 | + |
4700 | + <t t-foreach="o.statement_ids" t-as="statement"> |
4701 | + <h4 t-if="statement.line_ids">Statement Details: <span t-esc="statement.name"/></h4> |
4702 | + |
4703 | + <table class="table table-condensed" t-if="statement.line_ids"> |
4704 | + <thead> |
4705 | + <tr> |
4706 | + <th>Date</th> |
4707 | + <th>Description</th> |
4708 | + <th>Reference</th> |
4709 | + <th>Partner</th> |
4710 | + <th>Type</th> |
4711 | + <th>Account</th> |
4712 | + <th class="text-right">Amount</th> |
4713 | + </tr> |
4714 | + </thead> |
4715 | + <tbody> |
4716 | + <tr t-foreach="statement.line_ids" t-as="line"> |
4717 | + <td><span t-field="line.date"/></td> |
4718 | + <td><span t-field="line.name"/></td> |
4719 | + <td><span t-field="line.ref"/></td> |
4720 | + <td><span t-field="line.partner_id"/></td> |
4721 | + <td><span t-field="line.type"/></td> |
4722 | + <td><span t-field="line.account_id"/></td> |
4723 | + <td class="text-right"> |
4724 | + <span t-field="line.amount" |
4725 | + t-field-options='{"widget": "monetary", "display_currency": "statement.currency"}'/> |
4726 | + </td> |
4727 | + </tr> |
4728 | + </tbody> |
4729 | + </table> |
4730 | + </t> |
4731 | + </div> |
4732 | + </t> |
4733 | + </t> |
4734 | + </t> |
4735 | +</template> |
4736 | +</data> |
4737 | +</openerp> |
4738 | |
4739 | === added file 'point_of_sale/views/report_statement.xml' |
4740 | --- point_of_sale/views/report_statement.xml 1970-01-01 00:00:00 +0000 |
4741 | +++ point_of_sale/views/report_statement.xml 2014-04-29 12:44:05 +0000 |
4742 | @@ -0,0 +1,85 @@ |
4743 | +<?xml version="1.0" encoding="utf-8"?> |
4744 | +<openerp> |
4745 | +<data> |
4746 | +<template id="report_statement"> |
4747 | + <t t-call="report.html_container"> |
4748 | + <t t-foreach="docs" t-as="o"> |
4749 | + <t t-call="report.internal_layout"> |
4750 | + <div class="page"> |
4751 | + <h2>Statement</h2> |
4752 | + |
4753 | + <div class="row"> |
4754 | + <div class="col-xs-3"> |
4755 | + <strong>Statement Name</strong>:<br/> |
4756 | + <span t-field="o.name"/> |
4757 | + </div> |
4758 | + <div class="col-xs-3"> |
4759 | + <strong>Journal</strong>:<br/> |
4760 | + <span t-field="o.journal_id"/> |
4761 | + </div> |
4762 | + <div class="col-xs-3"> |
4763 | + <strong>Company</strong>:<br/> |
4764 | + <span t-field="o.company_id"/> |
4765 | + </div> |
4766 | + <div class="col-xs-3"> |
4767 | + <strong>User</strong>:<br/> |
4768 | + <span t-field="o.user_id"/> |
4769 | + </div> |
4770 | + </div> |
4771 | + |
4772 | + <div class="row mb32"> |
4773 | + <div class="col-xs-3"> |
4774 | + <strong>Opening Date</strong>:<br/> |
4775 | + <span t-field="o.date"/> |
4776 | + </div> |
4777 | + <div class="col-xs-3"> |
4778 | + <strong>Closing Date</strong>:<br/> |
4779 | + <span t-field="o.closing_date"/> |
4780 | + </div> |
4781 | + <div class="col-xs-3"> |
4782 | + <strong>Starting Balance</strong>:<br/> |
4783 | + <span t-field="o.balance_start" t-field-options='{"widget": "monetary", "display_currency": "res_company.currency_id"}'/> |
4784 | + </div> |
4785 | + <div class="col-xs-3"> |
4786 | + <strong>Ending Balance</strong>:<br/> |
4787 | + <span t-field="o.balance_end_real" t-field-options='{"widget": "monetary", "display_currency": "res_company.currency_id"}'/> |
4788 | + </div> |
4789 | + </div> |
4790 | + |
4791 | + <table class="table table-condensed"> |
4792 | + <thead> |
4793 | + <tr> |
4794 | + <th>Name</th> |
4795 | + <th>Partner</th> |
4796 | + <th class="text-right">Amount</th> |
4797 | + </tr> |
4798 | + </thead> |
4799 | + <tbody> |
4800 | + <tr t-foreach="o.line_ids" t-as="line"> |
4801 | + <td><span t-field="line.name"/></td> |
4802 | + <td><span t-esc="line.partner_id.name"/></td> |
4803 | + <td class="text-right"> |
4804 | + <span t-field="line.amount" |
4805 | + t-field-options='{"widget": "monetary", "display_currency": "res_company.currency_id"}'/> |
4806 | + </td> |
4807 | + </tr> |
4808 | + </tbody> |
4809 | + </table> |
4810 | + |
4811 | + <div class="row"> |
4812 | + <div class="col-xs-4 pull-right"> |
4813 | + <table class="table table-condensed"> |
4814 | + <tr class="border-black"> |
4815 | + <td><strong>Total</strong></td> |
4816 | + <td class="text-right"><span t-esc="formatLang(get_total(o.line_ids), currency_obj=res_company.currency_id)"/></td> |
4817 | + </tr> |
4818 | + </table> |
4819 | + </div> |
4820 | + </div> |
4821 | + </div> |
4822 | + </t> |
4823 | + </t> |
4824 | + </t> |
4825 | +</template> |
4826 | +</data> |
4827 | +</openerp> |
4828 | \ No newline at end of file |
4829 | |
4830 | === added file 'point_of_sale/views/report_usersproduct.xml' |
4831 | --- point_of_sale/views/report_usersproduct.xml 1970-01-01 00:00:00 +0000 |
4832 | +++ point_of_sale/views/report_usersproduct.xml 2014-04-29 12:44:05 +0000 |
4833 | @@ -0,0 +1,79 @@ |
4834 | +<?xml version="1.0" encoding="utf-8"?> |
4835 | +<openerp> |
4836 | +<data> |
4837 | +<template id="report_usersproduct"> |
4838 | + <t t-call="report.html_container"> |
4839 | + <t t-foreach="docs" t-as="o"> |
4840 | + <t t-call="report.internal_layout"> |
4841 | + <div class="page"> |
4842 | + <h2>User's Product</h2> |
4843 | + |
4844 | + <div class="row mb32"> |
4845 | + <div class="col-xs-3"> |
4846 | + <strong>User</strong>:<br/> |
4847 | + <span t-esc="', '.join(get_user(docs))"/> |
4848 | + </div> |
4849 | + <div class="col-xs-3"> |
4850 | + <strong>Company</strong>:<br/> |
4851 | + <span t-field="res_company.name"/> |
4852 | + </div> |
4853 | + <div class="col-xs-3"> |
4854 | + <strong>Print Date</strong>:<br/> |
4855 | + <span t-esc="formatLang(time.strftime('%Y-%m-%d'), date=True)"/> |
4856 | + </div> |
4857 | + <div class="col-xs-3"> |
4858 | + <strong>Starting Date</strong>:<br/> |
4859 | + <span t-esc="formatLang(o.date, date=True)"/> |
4860 | + </div> |
4861 | + </div> |
4862 | + |
4863 | + <div class="row mb32" t-if="o.closing_date"> |
4864 | + <div class="col-xs-3"> |
4865 | + <strong>Ending Date</strong>:<br/> |
4866 | + <span t-esc="formatLang(o.closing_date, date=True)"/> |
4867 | + </div> |
4868 | + </div> |
4869 | + |
4870 | + <table class="table table-condensed"> |
4871 | + <thead> |
4872 | + <tr> |
4873 | + <th>Product</th> |
4874 | + <th class="text-right">Qty</th> |
4875 | + <th class="text-right">Amount</th> |
4876 | + </tr> |
4877 | + </thead> |
4878 | + <tbody> |
4879 | + <tr t-foreach="get_data(o)" t-as="line_ids"> |
4880 | + <td><t t-if="line_ids['code']"> |
4881 | + [<t t-esc="line_ids['code']" />] |
4882 | + </t> |
4883 | + <t t-esc="line_ids['name']" /> |
4884 | + </td> |
4885 | + <td class="text-right"> |
4886 | + <span t-esc="formatLang(line_ids['qty'])" /> |
4887 | + <span t-esc="line_ids['uom']"/> |
4888 | + </td> |
4889 | + <td class="text-right"> |
4890 | + <t t-esc="formatLang(line_ids['amt'], currency_obj=res_company.currency_id)"/> |
4891 | + </td> |
4892 | + </tr> |
4893 | + </tbody> |
4894 | + </table> |
4895 | + |
4896 | + <div class="row"> |
4897 | + <div class="col-xs-4 pull-right"> |
4898 | + <table class="table table-condensed"> |
4899 | + <tr class="border-black"> |
4900 | + <td><strong>Total</strong></td> |
4901 | + <td class="text-right"><span t-esc="formatLang(get_total(o), currency_obj=res_company.currency_id)"/></td> |
4902 | + </tr> |
4903 | + </table> |
4904 | + </div> |
4905 | + </div> |
4906 | + </div> |
4907 | + </t> |
4908 | + </t> |
4909 | + </t> |
4910 | +</template> |
4911 | +</data> |
4912 | +</openerp> |
4913 | |
4914 | === modified file 'point_of_sale/wizard/__init__.py' |
4915 | --- point_of_sale/wizard/__init__.py 2012-11-29 22:26:45 +0000 |
4916 | +++ point_of_sale/wizard/__init__.py 2014-04-29 12:44:05 +0000 |
4917 | @@ -19,18 +19,12 @@ |
4918 | # |
4919 | ############################################################################## |
4920 | |
4921 | +import pos_box |
4922 | import pos_confirm |
4923 | +import pos_details |
4924 | import pos_discount |
4925 | import pos_open_statement |
4926 | -import pos_details |
4927 | -import pos_sales_user |
4928 | -import pos_sales_user_today |
4929 | -import pos_receipt |
4930 | -import pos_payment_report_user |
4931 | -import pos_payment_report |
4932 | import pos_payment |
4933 | import pos_session_opening |
4934 | -import pos_box |
4935 | |
4936 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
4937 | - |
4938 | |
4939 | === modified file 'point_of_sale/wizard/pos_box.py' |
4940 | --- point_of_sale/wizard/pos_box.py 2013-10-27 12:31:04 +0000 |
4941 | +++ point_of_sale/wizard/pos_box.py 2014-04-29 12:44:05 +0000 |
4942 | @@ -1,5 +1,5 @@ |
4943 | |
4944 | -from openerp.osv import osv, fields |
4945 | +from openerp.osv import osv |
4946 | from openerp.tools.translate import _ |
4947 | |
4948 | from openerp.addons.account.wizard.pos_box import CashBox |
4949 | |
4950 | === removed file 'point_of_sale/wizard/pos_box_entries.py' |
4951 | --- point_of_sale/wizard/pos_box_entries.py 2013-10-27 12:31:04 +0000 |
4952 | +++ point_of_sale/wizard/pos_box_entries.py 1970-01-01 00:00:00 +0000 |
4953 | @@ -1,146 +0,0 @@ |
4954 | -# -*- coding: utf-8 -*- |
4955 | -############################################################################## |
4956 | -# |
4957 | -# OpenERP, Open Source Management Solution |
4958 | -# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). |
4959 | -# |
4960 | -# This program is free software: you can redistribute it and/or modify |
4961 | -# it under the terms of the GNU Affero General Public License as |
4962 | -# published by the Free Software Foundation, either version 3 of the |
4963 | -# License, or (at your option) any later version. |
4964 | -# |
4965 | -# This program is distributed in the hope that it will be useful, |
4966 | -# but WITHOUT ANY WARRANTY; without even the implied warranty of |
4967 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
4968 | -# GNU Affero General Public License for more details. |
4969 | -# |
4970 | -# You should have received a copy of the GNU Affero General Public License |
4971 | -# along with this program. If not, see <http://www.gnu.org/licenses/>. |
4972 | -# |
4973 | -############################################################################## |
4974 | - |
4975 | -import time |
4976 | - |
4977 | -from openerp.osv import osv, fields |
4978 | -from openerp.tools.translate import _ |
4979 | - |
4980 | - |
4981 | -def get_journal(self, cr, uid, context=None): |
4982 | - """ |
4983 | - Make the selection list of Cash Journal . |
4984 | - @param self: The object pointer. |
4985 | - @param cr: A database cursor |
4986 | - @param uid: ID of the user currently logged in |
4987 | - @param context: A standard dictionary |
4988 | - @return :Return the list of journal |
4989 | - """ |
4990 | - |
4991 | - journal_obj = self.pool.get('account.journal') |
4992 | - statement_obj = self.pool.get('account.bank.statement') |
4993 | - |
4994 | - j_ids = journal_obj.search(cr, uid, [('journal_user','=',1)], context=context) |
4995 | - obj_ids = statement_obj.search(cr, uid, [('state', '=', 'open'), ('user_id', '=', uid), ('journal_id', 'in', j_ids)], context=context) |
4996 | - res = statement_obj.read(cr, uid, obj_ids, ['journal_id'], context=context) |
4997 | - res = [(r['journal_id']) for r in res] |
4998 | - if not len(res) and context: |
4999 | - raise osv.except_osv(_('Error!'), _('You do not have any open cash register. You must create a payment method or open a cash register.')) |
5000 | - return res |
The diff has been truncated for viewing.