2010-09-16 09:03:39 +00:00
|
|
|
-
|
2010-09-17 12:29:36 +00:00
|
|
|
In order to test the PDF reports defined on a Point Of Sale, we will print a POS Invoice Report
|
2010-09-28 07:25:50 +00:00
|
|
|
-
|
2010-09-16 09:03:39 +00:00
|
|
|
!python {model: pos.order}: |
|
2013-02-09 06:29:29 +00:00
|
|
|
import os
|
2013-02-22 13:35:11 +00:00
|
|
|
import openerp.report
|
|
|
|
from openerp import tools
|
[REM] removed details_summary, sales_user, sales_user_today, payment_user reports, wizards and rml
[REM] dead code: pos_box_entries.py/xml, pos_box_out.py/xml, pos_return_view.py/xml
[ADD] lines, invoice, cashbox of the day, payment, receipt, users product reports converted to QWeb. Added YML tests for the bank statement reports.
[FIX] closed cashbox of the day sql using old fields in its queries, yml test not correctly generating an invoice from a pos order
bzr revid: sle@openerp.com-20140414104954-xj10wi640tyr3ufe
2014-04-14 10:49:54 +00:00
|
|
|
data, format = openerp.report.render_report(cr, uid, [ref('pos_order_pos1')], 'point_of_sale.report_invoice', {}, {})
|
2010-09-16 09:03:39 +00:00
|
|
|
if tools.config['test_report_directory']:
|
2014-04-28 16:20:32 +00:00
|
|
|
file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-invoice_report.'+format), 'wb+').write(data)
|
2010-09-28 07:25:50 +00:00
|
|
|
|
2010-09-16 09:03:39 +00:00
|
|
|
-
|
2010-09-17 12:29:36 +00:00
|
|
|
In order to test the PDF reports defined on a Point Of Sale, we will print a POS Lines Report
|
2010-09-28 07:25:50 +00:00
|
|
|
-
|
2010-09-16 09:03:39 +00:00
|
|
|
!python {model: pos.order}: |
|
2013-02-09 06:29:29 +00:00
|
|
|
import os
|
2013-02-22 13:35:11 +00:00
|
|
|
import openerp.report
|
|
|
|
from openerp import tools
|
[REM] removed details_summary, sales_user, sales_user_today, payment_user reports, wizards and rml
[REM] dead code: pos_box_entries.py/xml, pos_box_out.py/xml, pos_return_view.py/xml
[ADD] lines, invoice, cashbox of the day, payment, receipt, users product reports converted to QWeb. Added YML tests for the bank statement reports.
[FIX] closed cashbox of the day sql using old fields in its queries, yml test not correctly generating an invoice from a pos order
bzr revid: sle@openerp.com-20140414104954-xj10wi640tyr3ufe
2014-04-14 10:49:54 +00:00
|
|
|
data, format = openerp.report.render_report(cr, uid, [ref('pos_order_pos1')], 'point_of_sale.report_saleslines', {}, {})
|
2010-09-16 09:03:39 +00:00
|
|
|
if tools.config['test_report_directory']:
|
2014-04-28 16:20:32 +00:00
|
|
|
file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-lines_report.'+format), 'wb+').write(data)
|
2010-09-28 07:25:50 +00:00
|
|
|
|
2010-09-16 09:03:39 +00:00
|
|
|
-
|
2010-09-17 12:29:36 +00:00
|
|
|
In order to test the PDF reports defined on a Point of Sale, we will print a POS Receipt Report
|
2010-09-28 07:25:50 +00:00
|
|
|
-
|
2010-09-16 09:03:39 +00:00
|
|
|
!python {model: pos.order}: |
|
2013-02-09 06:29:29 +00:00
|
|
|
import os
|
2013-02-22 13:35:11 +00:00
|
|
|
import openerp.report
|
|
|
|
from openerp import tools
|
[REM] removed details_summary, sales_user, sales_user_today, payment_user reports, wizards and rml
[REM] dead code: pos_box_entries.py/xml, pos_box_out.py/xml, pos_return_view.py/xml
[ADD] lines, invoice, cashbox of the day, payment, receipt, users product reports converted to QWeb. Added YML tests for the bank statement reports.
[FIX] closed cashbox of the day sql using old fields in its queries, yml test not correctly generating an invoice from a pos order
bzr revid: sle@openerp.com-20140414104954-xj10wi640tyr3ufe
2014-04-14 10:49:54 +00:00
|
|
|
data, format = openerp.report.render_report(cr, uid, [ref('pos_order_pos1')], 'point_of_sale.report_receipt', {}, {})
|
2010-09-16 09:03:39 +00:00
|
|
|
if tools.config['test_report_directory']:
|
2014-04-28 16:20:32 +00:00
|
|
|
file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-receipt_report.'+format), 'wb+').write(data)
|
2010-09-28 07:25:50 +00:00
|
|
|
|
2010-09-16 09:03:39 +00:00
|
|
|
-
|
2011-12-11 10:51:30 +00:00
|
|
|
Print the POS Details Report through the wizard
|
2010-09-28 07:25:50 +00:00
|
|
|
-
|
2010-09-17 12:29:36 +00:00
|
|
|
!python {model: ir.ui.menu}: |
|
2010-12-24 07:22:29 +00:00
|
|
|
import time
|
2010-12-21 13:12:10 +00:00
|
|
|
ctx={}
|
|
|
|
ctx.update({'model': 'ir.ui.menu','active_ids': []})
|
2011-09-13 06:20:36 +00:00
|
|
|
data_dict = {'date_start': time.strftime('%Y-%m-%d'), 'date_end': time.strftime('%Y-%m-%d'), 'user_ids': [(6,0,[ref('base.user_root')])]}
|
2013-02-09 06:24:36 +00:00
|
|
|
from openerp.tools import test_reports
|
2010-12-21 13:12:10 +00:00
|
|
|
test_reports.try_report_action(cr, uid, 'action_report_pos_details',wiz_data=data_dict, context=ctx, our_module='point_of_sale')
|
|
|
|
|
2010-09-17 12:29:36 +00:00
|
|
|
-
|
|
|
|
In order to test the PDF reports defined on a Point of Sale, we will print a POS Payment Report
|
2010-09-28 07:25:50 +00:00
|
|
|
-
|
2010-09-17 12:29:36 +00:00
|
|
|
!python {model: pos.order}: |
|
2013-02-09 06:28:21 +00:00
|
|
|
import os, time
|
2013-02-22 13:35:11 +00:00
|
|
|
import openerp.report
|
|
|
|
from openerp import tools
|
[REM] removed details_summary, sales_user, sales_user_today, payment_user reports, wizards and rml
[REM] dead code: pos_box_entries.py/xml, pos_box_out.py/xml, pos_return_view.py/xml
[ADD] lines, invoice, cashbox of the day, payment, receipt, users product reports converted to QWeb. Added YML tests for the bank statement reports.
[FIX] closed cashbox of the day sql using old fields in its queries, yml test not correctly generating an invoice from a pos order
bzr revid: sle@openerp.com-20140414104954-xj10wi640tyr3ufe
2014-04-14 10:49:54 +00:00
|
|
|
data, format = openerp.report.render_report(cr, uid, [ref('pos_order_pos0')], 'point_of_sale.report_payment', {}, {})
|
2010-09-17 12:29:36 +00:00
|
|
|
if tools.config['test_report_directory']:
|
2014-04-28 16:20:32 +00:00
|
|
|
file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-payment_report.'+format), 'wb+').write(data)
|