Merged from jas branch
bzr revid: apa@tinyerp.com-20101222104738-41ozbv20gv93bt5p
This commit is contained in:
@@ -131,9 +131,10 @@ module named account_voucher.
|
||||
'test/account_validate_account_move.yml',
|
||||
'test/account_fiscalyear_close.yml',
|
||||
'test/account_bank_statement.yml',
|
||||
'test/account_cash_statement.yml',
|
||||
'test/account_report.yml',
|
||||
],
|
||||
'project/test/project_report.yml',
|
||||
'test/account_cash_statement.yml',
|
||||
],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
'certificate': '0080331923549',
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
-
|
||||
Print the Analytic Balance Report through the wizard
|
||||
-
|
||||
!python {model: account.analytic.account}: |
|
||||
import netsvc, tools, os, time
|
||||
ctx={}
|
||||
ctx.update({'model': 'account.analytic.account','active_ids': [ref('account.analytic_root')]})
|
||||
data_dict = {'date1' : time.strftime('%Y-01-01'), 'date2' : time.strftime('%Y-%m-%d'), 'empty_acc' : True}
|
||||
from tools import test_reports
|
||||
test_reports.try_report_action(cr, uid, 'action_account_analytic_balance',wiz_data=data_dict, context=ctx, our_module='account')
|
||||
|
||||
-
|
||||
Print the Cost Ledger Report through the wizard
|
||||
-
|
||||
!python {model: account.analytic.account}: |
|
||||
import netsvc, tools, os, time
|
||||
ctx={}
|
||||
ctx.update({'model': 'account.analytic.account','active_ids': [ref('account.analytic_root'),ref('account.analytic_absences'),ref('account.analytic_internal'),ref('account.analytic_our_super_product')]})
|
||||
data_dict = {'date1' : time.strftime('%Y-01-01'), 'date2' : time.strftime('%Y-%m-%d')}
|
||||
from tools import test_reports
|
||||
test_reports.try_report_action(cr, uid, 'action_account_analytic_cost',wiz_data=data_dict, context=ctx, our_module='account')
|
||||
|
||||
-
|
||||
Print the Cost Ledger(Only Quantities) Report through the wizard
|
||||
-
|
||||
!python {model: account.analytic.account}: |
|
||||
import netsvc, tools, os, time
|
||||
ctx={}
|
||||
ctx.update({'model': 'account.analytic.account','active_ids': [ref('account.analytic_root'),ref('account.analytic_absences'),ref('account.analytic_internal'),ref('account.analytic_our_super_product')]})
|
||||
data_dict = {'date1' : time.strftime('%Y-01-01'), 'date2' : time.strftime('%Y-%m-%d')}
|
||||
from tools import test_reports
|
||||
test_reports.try_report_action(cr, uid, 'action_account_analytic_cost_ledger_journal',wiz_data=data_dict, context=ctx, our_module='account')
|
||||
|
||||
-
|
||||
Print the Analytic Journal Report through the wizard
|
||||
-
|
||||
!python {model: account.analytic.journal}: |
|
||||
import netsvc, tools, os, time
|
||||
ctx={}
|
||||
ctx.update({'model': 'account.analytic.journal','active_ids': [ref('account.cose_journal_sale'), ref('account.exp'), ref('account.sit')]})
|
||||
data_dict = {'date1' : time.strftime('%Y-01-01'), 'date2' : time.strftime('%Y-%m-%d')}
|
||||
from tools import test_reports
|
||||
test_reports.try_report_action(cr, uid, 'action_account_analytic_journal',wiz_data=data_dict, context=ctx, our_module='account')
|
||||
|
||||
#-
|
||||
# Print the Inverted Analytic Balance Report through the wizard
|
||||
#-
|
||||
# !python {model: account.analytic.account}: |
|
||||
# import netsvc, tools, os, time
|
||||
# ctx={}
|
||||
# ctx.update({'model': 'account.analytic.account','active_ids': []})
|
||||
# data_dict = {'date1' : time.strftime('%Y-01-01'), 'date2' : time.strftime('%Y-%m-%d')}
|
||||
# from tools import test_reports
|
||||
# test_reports.try_report_action(cr, uid, 'action_account_analytic_invert_balance',wiz_data=data_dict, context=ctx, our_module='account')
|
||||
@@ -17,19 +17,24 @@
|
||||
file(os.path.join(tools.config['test_report_directory'], 'mrp-production_order_report.'+format), 'wb+').write(data)
|
||||
|
||||
-
|
||||
In order to test the PDF reports defined on a MRP, we will print Product Price Report
|
||||
Print Product Price Report through the wizard
|
||||
-
|
||||
!python {model: product.product}: |
|
||||
import netsvc, tools, os
|
||||
(data, format) = netsvc.LocalService('report.product.price').create(cr, uid, [1,2,3,5], {'model':'product.product', 'form':{'number': 1}}, {})
|
||||
if tools.config['test_report_directory']:
|
||||
file(os.path.join(tools.config['test_report_directory'], 'mrp-product_price_report.'+format), 'wb+').write(data)
|
||||
import netsvc, tools, os, time
|
||||
ctx={}
|
||||
ctx.update({'model': 'product.product','active_ids': [1,2,3,5]})
|
||||
data_dict = {'number': 1}
|
||||
from tools import test_reports
|
||||
test_reports.try_report_action(cr, uid, 'action_view_mrp_product_price_wizard',wiz_data=data_dict, context=ctx, our_module='mrp')
|
||||
|
||||
-
|
||||
In order to test the PDF reports defined on a MRP, we will print Workcenter Load Report
|
||||
Print Workcenter Load Report through the wizard
|
||||
-
|
||||
!python {model: mrp.workcenter}: |
|
||||
import netsvc, tools, os, time
|
||||
(data, format) = netsvc.LocalService('report.mrp.workcenter.load').create(cr, uid, [ref('mrp_workcenter_0'),ref('mrp_workcenter_1')], {'model':'mrp.workcenter', 'form':{'time_unit': 'day', 'measure_unit': 'hours'}}, {})
|
||||
if tools.config['test_report_directory']:
|
||||
file(os.path.join(tools.config['test_report_directory'], 'mrp-workcenter_load_report.'+format), 'wb+').write(data)
|
||||
ctx={}
|
||||
ctx.update({'model': 'mrp.workcenter','active_ids': [ref('mrp_workcenter_0'),ref('mrp_workcenter_1')]})
|
||||
data_dict = {'time_unit': 'day', 'measure_unit': 'hours'}
|
||||
from tools import test_reports
|
||||
test_reports.try_report_action(cr, uid, 'action_mrp_workcenter_load_wizard',wiz_data=data_dict, context=ctx, our_module='mrp')
|
||||
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
-
|
||||
In order to test the PDF reports defined on Products, we will print a Products Pricelists Report
|
||||
-
|
||||
Print the Products Pricelists Report through the wizard
|
||||
-
|
||||
!python {model: product.product}: |
|
||||
import netsvc, tools, os
|
||||
data_dict = {'model': 'product.product'}
|
||||
data_dict['form'] = {
|
||||
'qty1': 1,
|
||||
import netsvc, tools, os, time
|
||||
ctx={}
|
||||
ctx.update({'model': 'product.product','active_ids': [ref('product.product_product_pc1'), ref('product.product_product_pc3')]})
|
||||
data_dict = {'qty1': 1,
|
||||
'qty2': 5,
|
||||
'qty3': 10,
|
||||
'qty4': 0,
|
||||
'qty5': 0,
|
||||
'price_list':ref('product.list0')
|
||||
}
|
||||
(data, format) = netsvc.LocalService('report.product.pricelist').create(cr, uid, [ref('product.product_product_pc1'), ref('product.product_product_pc3')], data_dict, {})
|
||||
if tools.config['test_report_directory']:
|
||||
file(os.path.join(tools.config['test_report_directory'], 'product-product_pricelist'+format), 'wb+').write(data)
|
||||
'price_list':ref('product.list0')}
|
||||
from tools import test_reports
|
||||
test_reports.try_report_action(cr, uid, 'action_product_price_list',wiz_data=data_dict, context=ctx, our_module='product')
|
||||
|
||||
|
||||
|
||||
@@ -1,24 +1,32 @@
|
||||
-
|
||||
In order to test the PDF reports defined on a Survey, we will print Survey Analysis Report
|
||||
-
|
||||
!python {model: survey}: |
|
||||
import netsvc, tools, os
|
||||
(data, format) = netsvc.LocalService('report.survey.analysis').create(cr, uid, [ref('survey.survey_partner_feedback')], {}, {})
|
||||
if tools.config['test_report_directory']:
|
||||
file(os.path.join(tools.config['test_report_directory'], 'survey-survey_analysis_report.'+format), 'wb+').write(data)
|
||||
Print the Survey Browse Response Report through the wizard
|
||||
-
|
||||
In order to test the PDF reports defined on a Survey, we will print Survey Browse Response Report
|
||||
-
|
||||
!python {model: survey}: |
|
||||
import netsvc, tools, os
|
||||
(data, format) = netsvc.LocalService('report.survey.browse.response').create(cr, uid, [ref('survey.survey_partner_feedback')], {}, {})
|
||||
if tools.config['test_report_directory']:
|
||||
file(os.path.join(tools.config['test_report_directory'], 'survey-survey_browse_response_report.'+format), 'wb+').write(data)
|
||||
import netsvc, tools, os, time
|
||||
ctx={}
|
||||
ctx.update({'model': 'survey','active_ids': [(6,0,[ref('survey.survey_partner_feedback')])]})
|
||||
data_dict = {'response_ids' : [(6,0,[ref('survey.survey_partner_feedback')])], 'page_number' : True, 'without_pagebreak': True}
|
||||
from tools import test_reports
|
||||
test_reports.try_report_action(cr, uid, 'action_view_survey_print_answer',wiz_data=data_dict, context=ctx, our_module='survey')
|
||||
|
||||
-
|
||||
Print the Survey Analysis Report through the wizard
|
||||
-
|
||||
In order to test the PDF reports defined on a Survey, we will print Survey Form Report
|
||||
-
|
||||
!python {model: survey}: |
|
||||
import netsvc, tools, os
|
||||
(data, format) = netsvc.LocalService('report.survey.form').create(cr, uid, [ref('survey.survey_partner_feedback')], {}, {})
|
||||
if tools.config['test_report_directory']:
|
||||
file(os.path.join(tools.config['test_report_directory'], 'survey-survey_form_report.'+format), 'wb+').write(data)
|
||||
import netsvc, tools, os, time
|
||||
ctx={}
|
||||
ctx.update({'model': 'survey','active_ids': [(6,0,[ref('survey.survey_partner_feedback')])]})
|
||||
data_dict = {'survey_ids' : [(6,0,[ref('survey.survey_partner_feedback')])]}
|
||||
from tools import test_reports
|
||||
test_reports.try_report_action(cr, uid, 'action_view_survey_print_statistics',wiz_data=data_dict, context=ctx, our_module='survey')
|
||||
|
||||
-
|
||||
Print the Survey Form Report through the wizard
|
||||
-
|
||||
!python {model: survey}: |
|
||||
import netsvc, tools, os, time
|
||||
ctx={}
|
||||
ctx.update({'model': 'survey','active_ids': [(6,0,[ref('survey.survey_partner_feedback')])]})
|
||||
data_dict = {'survey_ids' : [(6,0,[ref('survey.survey_partner_feedback')])], 'page_number' : True, 'without_pagebreak': True}
|
||||
from tools import test_reports
|
||||
test_reports.try_report_action(cr, uid, 'action_view_survey_print',wiz_data=data_dict, context=ctx, our_module='survey')
|
||||
|
||||
Reference in New Issue
Block a user