[MERGE] Merged Automated YAML test for Reports

bzr revid: jvo@tinyerp.com-20100917112944-ja9fgarvimjph4t9
This commit is contained in:
Jay (OpenERP)
2010-09-17 16:59:44 +05:30
88 changed files with 1366 additions and 59 deletions
+1
View File
@@ -134,6 +134,7 @@ module named account_voucher.
'test/account_use_model.yml',
'test/account_validate_account_move.yml',
'test/account_fiscalyear_close.yml',
'test/account_report.yml',
],
'installable': True,
'active': False,
@@ -78,7 +78,7 @@ class report_balancesheet_horizontal(rml_parse.rml_parse, common_report_header):
db_pool = pooler.get_pool(self.cr.dbname)
#Getting Profit or Loss Balance from profit and Loss report
result_pl=self.obj_pl.get_data(data)
result_pl = self.obj_pl.get_data(data)
self.res_bl = self.obj_pl.final_result()
type_pool = db_pool.get('account.account.type')
@@ -86,7 +86,7 @@ class journal_print(report_sxw.rml_parse, common_report_header):
'FROM account_move_line l '
'LEFT JOIN account_journal j ON (l.journal_id=j.id) '
'LEFT JOIN res_currency c on (l.currency_id=c.id)'
'WHERE period_id=%s AND journal_id IN %s ' + self.query_get_clause + ''
'WHERE period_id=%s AND journal_id IN %s ' + self.query_get_clause + ' '
'GROUP BY j.id, j.code, j.name, l.amount_currency,c.code, l.currency_id ',
(period_id, tuple(self.journal_ids)))
return self.cr.dictfetchall()
-2
View File
@@ -212,10 +212,8 @@ class tax_report(rml_parse.rml_parse):
result_accounts.append(account_elem)
ind+=1
return result_accounts
report_sxw.report_sxw('report.account.vat.declaration', 'account.tax.code',
'addons/account/report/tax_report.rml', parser=tax_report, header="internal")
+1 -1
View File
@@ -325,7 +325,7 @@
</tr>
<tr>
<td>
<para style="P9">[[ voucher.line_id and voucher.line_id.name and voucher.line_id.name[1] or removeParentNode('para') ]]</para>
<para style="P9">[[ voucher.line_id and voucher.line_id[0].name or removeParentNode('para') ]]</para>
</td>
<td>
<para style="P2">
+385
View File
@@ -0,0 +1,385 @@
-
In order to test the PDF reports defined on an invoice, we will print an invoice
-
!python {model: account.invoice}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.account.invoice').create(cr, uid, [ref('account.test_invoice_1')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account-invoice.'+format), 'wb+').write(data)
-
In order to test the PDF reports defined on a partner, we will print the Overdue Report
-
!python {model: res.partner}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.account.overdue').create(cr, uid, [ref('base.res_partner_asus'),ref('base.res_partner_agrolait'),ref('base.res_partner_c2c')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account-report_overdue.'+format), 'wb+').write(data)
-
In order to test the PDF reports defined on Account Move, we will print the Voucher Report
-
!python {model: account.move}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.account.move.voucher').create(cr, uid, [ref('account.account_move_0')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account-voucher-report.'+format), 'wb+').write(data)
#-
# Demo data for Account tax code
#-
# !record {model: account.tax.code, id: account_tax_code_0}:
# name : Tax Code Test
#-
# Print Tax Code entries report
#-
# !python {model: account.tax.code}: |
# import netsvc, tools, os
# (data, format) = netsvc.LocalService('report.account.tax.code.entries').create(cr, uid, [ref('account.account_tax_code_0')], {}, {})
# if tools.config['test_report_directory']:
# file(os.path.join(tools.config['test_report_directory'], 'account-tax-code-entries.'+format), 'wb+').write(data)
#-
# Print Vat Declaration Report
#-
# !python {model: account.tax.code}: |
# import netsvc, tools, os
# data_dict = {'model': 'ir.ui.menu', 'form': {'based_on': 'invoices','company_id':ref('base.main_company'),'periods':[]}}
# (data, format) = netsvc.LocalService('report.account.vat.declaration').create(cr, uid, [ref("account.account_tax_code0")], data_dict, {})
# if tools.config['test_report_directory']:
# file(os.path.join(tools.config['test_report_directory'], 'account-vat-declaration.'+format), 'wb+').write(data)
-
In order to test the PDF reports defined on an invoice, we will print an invoice
-
!python {model: account.invoice}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.account.invoice').create(cr, uid, [ref('account.test_invoice_1')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account-invoice.'+format), 'wb+').write(data)
-
Print the Aged Partner Balance Report
-
!python {model: res.partner}: |
import netsvc, tools, os, time
import datetime
from mx.DateTime import *
start = datetime.date.fromtimestamp(time.mktime(time.strptime(time.strftime('%Y-%m-%d'), "%Y-%m-%d")))
start = DateTime(int(start.year), int(start.month), int(start.day))
res = {}
for i in range(5)[::-1]:
stop = start - RelativeDateTime(days=30)
res[str(i)] = {
'name': (i!=0 and (str((5-(i+1)) * 30) + '-' + str((5-i) * 30)) or ('+'+str(4 * 30))),
'stop': start.strftime('%Y-%m-%d'),
'start': (i!=0 and stop.strftime('%Y-%m-%d') or False),
}
start = stop - RelativeDateTime(days=1)
obj_move = self.pool.get('account.move.line')
ctx = {}
fy_id = ref('account.data_fiscalyear')
period_list = self.pool.get('account.period').search(cr, uid, [('fiscalyear_id', 'in', [fy_id])], context=context)
journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'),ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')]
ctx['fiscalyear'] = fy_id
ctx['journal_ids'] = journal_ids
ctx['chart_account_id'] = ref('account.chart0')
query_line = obj_move._query_get(cr, uid, obj='l', context=ctx)
data_dict = {'model': 'ir.ui.menu', 'form': {'chart_account_id':ref('account.chart0'),'initial_balance': 1, 'periods': period_list,'journal_ids':journal_ids, 'page_split': 0, 'date_from': time.strftime('%Y-%m-%d'), 'period_length': 30, 'amount_currency': 0,'query_line' : query_line, 'result_selection': 'customer','direction_selection': 'past','fiscalyear_id':fy_id}}
data_dict['form'].update(res)
(data, format) = netsvc.LocalService('report.account.aged_trial_balance').create(cr, uid, [], data_dict, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account-aged_partner_balance.'+format), 'wb+').write(data)
-
Print the Compare Account Balance Report in Normal mode
-
!python {model: account.account}: |
import netsvc, tools, os, time
data_dict = {'model': 'account.account', 'form': {'id':ref('account.bal'),'chart_account_id':ref('account.chart0'),'select_account': False,'format_perc':0,'show_columns' :0, 'compare_pattern': 'none','account_choice': 'moves','landscape':0,'period_manner': 'actual','fiscalyear': [ref('account.data_fiscalyear')] ,'target_move': 'all','periods': [],'context':{'state':'all'}}}
(data, format) = netsvc.LocalService('report.account.balance.account.balance').create(cr, uid, [ref('account.bal'),ref('account.gpf')], data_dict, {'periods': []})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account-compare-account_balance.'+format), 'wb+').write(data)
-
Print the Compare Account Balance Report in Landscape mode
-
!python {model: account.account}: |
import netsvc, tools, os, time
data_dict = {'model': 'account.account', 'form': {'id':ref('account.bal'),'chart_account_id':ref('account.chart0'),'select_account': False,'format_perc':0,'show_columns' :0, 'compare_pattern': 'none','account_choice': 'moves','landscape':1,'period_manner': 'actual','fiscalyear': [ref('account.data_fiscalyear')] ,'target_move': 'all','periods': [],'context':{'state':'all'}}}
(data, format) = netsvc.LocalService('report.account.account.balance.landscape').create(cr, uid, [ref('account.bal'),ref('account.gpf')], data_dict, {'periods': []})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account-compare-account_balance-landscape.'+format), 'wb+').write(data)
-
Print the Account Balance Sheet in Horizontal mode
-
!python {model: account.account}: |
import netsvc, tools, os, time
data_dict = {'model': 'ir.ui.menu', 'form': {'reserve_account_id':ref('account.rsa') ,'chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','display_type': 1,'journal_ids':[],'fiscalyear': ref('account.data_fiscalyear') ,'target_move': 'all'}}
(data, format) = netsvc.LocalService('report.account.balancesheet.horizontal').create(cr, uid, [], data_dict, {'periods': []})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account-account_balance_sheet_horizontal.'+format), 'wb+').write(data)
-
Print the Account Balance Sheet in Normal mode
-
!python {model: account.account}: |
import netsvc, tools, os, time
data_dict = {'model': 'ir.ui.menu', 'form': {'reserve_account_id':ref('account.rsa') ,'chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','display_type': 0,'journal_ids':[],'fiscalyear': ref('account.data_fiscalyear') ,'target_move': 'all'}}
(data, format) = netsvc.LocalService('report.account.balancesheet').create(cr, uid, [], data_dict, {'periods': []})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account-account_balance_sheet.'+format), 'wb+').write(data)
-
Print the Account Balance Report in Normal mode - From Account Chart
-
!python {model: account.account}: |
import netsvc, tools, os, time
data_dict = {'model': 'account.account', 'form': {'chart_account_id':ref('account.chart0'),'select_account': False,'display_account':'bal_all','format_perc':0,'filter': 'filter_no','show_columns' :0, 'account_choice': 'moves','landscape':0,'period_manner': 'actual','fiscalyear_id': ref('account.data_fiscalyear') ,'target_move': 'all','periods': [],'id':ref('account.bal'),'context':{'state':'all'}}}
(data, format) = netsvc.LocalService('report.account.account.balance').create(cr, uid, [ref('account.bal'),ref('account.gpf')], data_dict, {'periods': []})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account-account_balance-normal.'+format), 'wb+').write(data)
print "Account Balance Report in Normal mode - From Menu"
data_dict.update({'model': 'ir.ui.menu'})
data_dict['form'].update({'active_ids':[ref('account.bal'),ref('account.gpf')]})
(data, format) = netsvc.LocalService('report.account.account.balance').create(cr, uid, [], data_dict, {'periods': []})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account-account_balance-normal-menu.'+format), 'wb+').write(data)
-
Print the Central Journal Report - From Account
-
!python {model: account.journal.period}: |
import netsvc, tools, os, time
fy_id = ref('account.data_fiscalyear')
period_list = self.pool.get('account.period').search(cr, uid, [('fiscalyear_id', 'in', [fy_id])], context=context)
journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'),ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')]
journal_period_ids = self.pool.get('account.journal.period').search(cr, uid, [('journal_id', 'in', journal_ids), ('period_id', 'in', period_list)], context=context)
obj_move = self.pool.get('account.move.line')
ctx = {}
ctx['fiscalyear'] = fy_id
ctx['journal_ids'] = journal_ids
ctx['chart_account_id'] = ref('account.chart0')
query_line = obj_move._query_get(cr, uid, obj='l', context=ctx)
data_dict = {'model': 'account.journal.period', 'id':journal_period_ids[0], 'form': {'chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','amount_currency': 0,'compare_pattern': 'none','account_choice': 'moves','landscape':0,'period_manner': 'actual','fiscalyear_id': fy_id ,'query_line':query_line,'target_move': 'all','periods': period_list,'journal_ids':journal_ids,'id':ref('account.bal') }}
(data, format) = netsvc.LocalService('report.account.central.journal').create(cr, uid, journal_period_ids, data_dict, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account-central_journal.'+format), 'wb+').write(data)
print "Central Journal Report - From Menu"
data_dict.update({'model': 'ir.ui.menu'})
data_dict['form'].update({'active_ids':journal_period_ids})
(data, format) = netsvc.LocalService('report.account.central.journal').create(cr, uid, [], data_dict, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account-central_journal-menu.'+format), 'wb+').write(data)
-
Print the General Journal Report - From Journal
-
!python {model: account.journal.period}: |
import netsvc, tools, os, time
fy_id = ref('account.data_fiscalyear')
period_list = self.pool.get('account.period').search(cr, uid, [('fiscalyear_id', 'in', [fy_id])], context=context)
journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'),ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')]
journal_period_ids = self.pool.get('account.journal.period').search(cr, uid, [('journal_id', 'in', journal_ids), ('period_id', 'in', period_list)], context=context)
obj_move = self.pool.get('account.move.line')
ctx = {}
ctx['fiscalyear'] = fy_id
ctx['journal_ids'] = journal_ids
ctx['chart_account_id'] = ref('account.chart0')
query_line = obj_move._query_get(cr, uid, obj='l', context=ctx)
data_dict = {'model': 'ir.ui.menu','id':journal_period_ids[0], 'form': {'chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','amount_currency': 0,'compare_pattern': 'none','account_choice': 'moves','landscape':0,'period_manner': 'actual','fiscalyear_id': fy_id ,'query_line':query_line,'target_move': 'all','periods': period_list,'journal_ids':journal_ids, 'active_ids':journal_period_ids}}
(data, format) = netsvc.LocalService('report.account.general.journal').create(cr, uid, journal_period_ids, data_dict, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account-general_journal.'+format), 'wb+').write(data)
-
Print the General Ledger Report in Normal Mode
-
!python {model: account.account}: |
import netsvc, tools, os, time
fy_id = ref('account.data_fiscalyear')
period_list = self.pool.get('account.period').search(cr, uid, [('fiscalyear_id', 'in', [fy_id])], context=context)
journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'),ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')]
acc_ids = [ref('account.bal'),ref('account.gpf')]
obj_move = self.pool.get('account.move.line')
ctx = {}
ctx['fiscalyear'] = fy_id
ctx['journal_ids'] = journal_ids
ctx['chart_account_id'] = ref('account.chart0')
query_line = obj_move._query_get(cr, uid, obj='l', context=ctx)
data_dict = {'model': 'account.account', 'form': {'initial_balance': 1,'initial_bal_query': query_line,'chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','sortby': 'sort_date','amount_currency': 0,'landscape':0,'period_manner': 'actual','fiscalyear_id': fy_id ,'query_line':query_line,'target_move': 'all','periods': period_list,'journal_ids':journal_ids,'id':ref('account.bal') }}
(data, format) = netsvc.LocalService('report.account.general.ledger').create(cr, uid, acc_ids, data_dict, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account-general_ledger.'+format), 'wb+').write(data)
print "GL report from menu"
data_dict.update({'model': 'ir.ui.menu'})
data_dict['form'].update({'active_ids': acc_ids})
(data, format) = netsvc.LocalService('report.account.general.ledger').create(cr, uid, [], data_dict, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account-general_ledger-menu.'+format), 'wb+').write(data)
-
Print the General Ledger Report in Landscape Mode
-
!python {model: account.account}: |
import netsvc, tools, os, time
fy_id = ref('account.data_fiscalyear')
period_list = self.pool.get('account.period').search(cr, uid, [('fiscalyear_id', 'in', [fy_id])], context=context)
journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'),ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')]
acc_ids = [ref('account.bal'),ref('account.gpf')]
obj_move = self.pool.get('account.move.line')
ctx = {}
ctx['fiscalyear'] = fy_id
ctx['journal_ids'] = journal_ids
ctx['chart_account_id'] = ref('account.chart0')
query_line = obj_move._query_get(cr, uid, obj='l', context=ctx)
data_dict = {'model': 'account.account', 'form': {'initial_balance': 1,'initial_bal_query':query_line,'chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','sortby': 'sort_date','amount_currency': 0,'landscape':1,'period_manner': 'actual','fiscalyear_id': fy_id ,'query_line':query_line,'target_move': 'all','periods': period_list,'journal_ids':journal_ids,'id':ref('account.bal') }}
(data, format) = netsvc.LocalService('report.account.general.ledger_landscape').create(cr, uid, acc_ids, data_dict, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account-general_ledger-landscape.'+format), 'wb+').write(data)
print "GL report landscape mode from menu"
data_dict.update({'model': 'ir.ui.menu'})
data_dict['form'].update({'active_ids': acc_ids})
(data, format) = netsvc.LocalService('report.account.general.ledger_landscape').create(cr, uid, [], data_dict, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account-general_ledger-landscape-menu.'+format), 'wb+').write(data)
-
Print Journal Report - From Model
-
!python {model: account.journal.period}: |
import netsvc, tools, os, time
fy_id = ref('account.data_fiscalyear')
period_list = self.pool.get('account.period').search(cr, uid, [('fiscalyear_id', 'in', [fy_id])], context=context)
journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'),ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')]
journal_period_ids = self.pool.get('account.journal.period').search(cr, uid, [('journal_id', 'in', journal_ids), ('period_id', 'in', period_list)], context=context)
obj_move = self.pool.get('account.move.line')
ctx = {}
ctx['fiscalyear'] = fy_id
ctx['journal_ids'] = journal_ids
ctx['chart_account_id'] = ref('account.chart0')
query_line = obj_move._query_get(cr, uid, obj='l', context=ctx)
data_dict = {'model': 'account.journal.period', 'id':journal_period_ids[0], 'form': {'sort_selection': 'date','chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','amount_currency': 0,'compare_pattern': 'none','account_choice': 'moves','landscape':0,'period_manner': 'actual','fiscalyear_id': fy_id ,'query_line':query_line,'target_move': 'all','periods': period_list,'journal_ids':journal_ids,'id':ref('account.bal') }}
(data, format) = netsvc.LocalService('report.account.journal.period.print').create(cr, uid, journal_period_ids, data_dict, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account-print_journal.'+format), 'wb+').write(data)
print "Journal Report - From Menu"
data_dict.update({'model': 'ir.ui.menu'})
data_dict['form'].update({'active_ids':journal_period_ids})
(data, format) = netsvc.LocalService('report.account.journal.period.print').create(cr, uid, [], data_dict, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account-print_journal-menu.'+format), 'wb+').write(data)
-
Print the Partner Balance Report
-
!python {model: res.partner}: |
import netsvc, tools, os, time
fy_id = ref('account.data_fiscalyear')
period_list = self.pool.get('account.period').search(cr, uid, [('fiscalyear_id', 'in', [fy_id])], context=context)
journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'),ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')]
obj_move = self.pool.get('account.move.line')
ctx = {}
ctx['fiscalyear'] = fy_id
ctx['journal_ids'] = journal_ids
ctx['chart_account_id'] = ref('account.chart0')
query_line = obj_move._query_get(cr, uid, obj='l', context=ctx)
data_dict = {'model': 'ir.ui.menu', 'form': {'result_selection': 'customer','chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','display_type': 0,'journal_ids':journal_ids,'display_partner': 'non-zero_balance','fiscalyear': fy_id ,'target_move': 'all','query_line':query_line}}
(data, format) = netsvc.LocalService('report.account.partner.balance').create(cr, uid, [], data_dict, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account-partner_balance.'+format), 'wb+').write(data)
-
Print the Partner Ledger Report
-
!python {model: res.partner}: |
import netsvc, tools, os, time
fy_id = ref('account.data_fiscalyear')
period_list = self.pool.get('account.period').search(cr, uid, [('fiscalyear_id', 'in', [fy_id])], context=context)
journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'),ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')]
obj_move = self.pool.get('account.move.line')
ctx = {}
ctx['fiscalyear'] = fy_id
ctx['journal_ids'] = journal_ids
ctx['chart_account_id'] = ref('account.chart0')
query_line = obj_move._query_get(cr, uid, obj='l', context=ctx)
data_dict = {'model': 'ir.ui.menu', 'form': {'initial_bal_query':query_line,'amount_currency': 0,'reconcil': True,'initial_balance':1,'page_split': True,'result_selection': 'customer','chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','display_type': 0,'journal_ids':journal_ids,'display_partner': 'non-zero_balance','fiscalyear': fy_id ,'target_move': 'all','query_line':query_line}}
(data, format) = netsvc.LocalService('report.account.third_party_ledger').create(cr, uid, [], data_dict, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account-partner_ledger.'+format), 'wb+').write(data)
-
Print the Partner Ledger-Other Report
-
!python {model: res.partner}: |
import netsvc, tools, os, time
fy_id = ref('account.data_fiscalyear')
period_list = self.pool.get('account.period').search(cr, uid, [('fiscalyear_id', 'in', [fy_id])], context=context)
journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'),ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')]
obj_move = self.pool.get('account.move.line')
ctx = {}
ctx['fiscalyear'] = fy_id
ctx['journal_ids'] = journal_ids
ctx['chart_account_id'] = ref('account.chart0')
query_line = obj_move._query_get(cr, uid, obj='l', context=ctx)
data_dict = {'model': 'ir.ui.menu', 'form': {'initial_bal_query':query_line,'amount_currency': 0,'reconcil': True,'initial_balance':1,'page_split': False,'result_selection': 'customer','chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','display_type': 0,'journal_ids':journal_ids,'display_partner': 'non-zero_balance','fiscalyear': fy_id ,'target_move': 'all','query_line':query_line}}
(data, format) = netsvc.LocalService('report.account.third_party_ledger_other').create(cr, uid, [], data_dict, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account-partner_ledger-other.'+format), 'wb+').write(data)
-
Print the Profit-Loss Report in Normal Mode
-
!python {model: account.account}: |
import netsvc, tools, os, time
fy_id = ref('account.data_fiscalyear')
period_list = self.pool.get('account.period').search(cr, uid, [('fiscalyear_id', 'in', [fy_id])], context=context)
journal_ids = []
acc_ids = [ref('account.bal'),ref('account.gpf')]
data_dict = {'model': 'ir.ui.menu', 'form': {'display_type': False,'chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','amount_currency': 0,'landscape':0,'period_manner': 'actual','fiscalyear_id': fy_id ,'query_line':'True ','target_move': 'all','periods': period_list,'journal_ids':journal_ids,'id':ref('account.bal'),'active_ids':acc_ids }}
(data, format) = netsvc.LocalService('report.pl.account').create(cr, uid, [], data_dict, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account-profit-loss.'+format), 'wb+').write(data)
-
Print the Profit-Loss Report in Horizontal Mode
-
!python {model: account.account}: |
import netsvc, tools, os, time
fy_id = ref('account.data_fiscalyear')
period_list = self.pool.get('account.period').search(cr, uid, [('fiscalyear_id', 'in', [fy_id])], context=context)
journal_ids = []
acc_ids = [ref('account.bal'),ref('account.gpf')]
data_dict = {'model': 'ir.ui.menu', 'form': {'display_type': True,'chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','amount_currency': 0,'landscape':0,'period_manner': 'actual','fiscalyear_id': fy_id ,'query_line':'True ','target_move': 'all','periods': period_list,'journal_ids':journal_ids,'id':ref('account.bal'),'active_ids':acc_ids }}
(data, format) = netsvc.LocalService('report.pl.account.horizontal').create(cr, uid, [], data_dict, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account-profit-loss-horizontal.'+format), 'wb+').write(data)
@@ -12,6 +12,7 @@
<field name="display_account"/>
<field name="target_move"/>
<field name="display_type"/>
<field name="reserve_account_id"/>
<newline/>
</field>
</field>
@@ -66,6 +66,7 @@ of distribution models.
'wizard/account_crossovered_analytic_view.xml'
],
'demo_xml' : [],
'test' : ['test/acount_analytic_plans_report.yml'],
'installable': True,
'active' : False,
'certificate': '0036417675373',
@@ -96,17 +96,19 @@ class crossovered_analytic(report_sxw.rml_parse):
self.final_list = children_list
selected_ids = line_pool.search(self.cr,self.uid,[('account_id','in',self.final_list)])
if selected_ids:
query="SELECT sum(aal.amount) AS amt, sum(aal.unit_amount) AS qty FROM account_analytic_line AS aal, account_analytic_account AS aaa \
WHERE aal.account_id=aaa.id AND aal.id IN ("+','.join(map(str,selected_ids))+") AND (aal.journal_id " + journal +") AND aal.date>='"+ str(form['date1']) +"'"" AND aal.date<='" + str(form['date2']) + "'"
self.cr.execute(query)
info=self.cr.dictfetchall()
query="SELECT sum(aal.amount) AS amt, sum(aal.unit_amount) AS qty FROM account_analytic_line AS aal, account_analytic_account AS aaa \
WHERE aal.account_id=aaa.id AND aal.id IN ("+','.join(map(str,selected_ids))+") AND (aal.journal_id " + journal +") AND aal.date>='"+ str(form['date1']) +"'"" AND aal.date<='" + str(form['date2']) + "'"
self.cr.execute(query)
info=self.cr.dictfetchall()
res['ref_qty']=info[0]['qty']
res['ref_amt']=info[0]['amt']
self.base_amount= info[0]['amt']
res['ref_qty']=info[0]['qty']
res['ref_amt']=info[0]['amt']
self.base_amount= info[0]['amt']
res['ref_qty']=0.0
res['ref_amt']=0.0
self.base_amount= 0.0
result.append(res)
return result
@@ -0,0 +1,9 @@
-
Print the Cross Overed Report in Normal mode
-
!python {model: account.analytic.account}: |
import netsvc, tools, os, time
data_dict = {'model': 'account.analytic.account', 'form': {'date1':time.strftime("%Y-01-01"),'date2':time.strftime('%Y-%m-%d'),'journal_ids':[6,0,(ref('account.cose_journal_sale'))],'ref':ref('account.analytic_root'),'empty_line':True,'id':ref('account.analytic_root'),'context':{}}}
(data, format) = netsvc.LocalService('report.account.analytic.account.crossovered.analytic').create(cr, uid, [ref('account.analytic_root')], data_dict, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account_analytic_plans-crossovered_analyitic.'+format), 'wb+').write(data)
+1
View File
@@ -63,6 +63,7 @@ Three reports are available:
'demo_xml': ['crossovered_budget_demo.xml'],
'test':[
'test/account_budget.yml',
'test/account_budget_report.yml',
],
'installable': True,
'active': False,
@@ -0,0 +1,27 @@
-
Print the Analytic Budget Report in Normal mode
-
!python {model: account.analytic.account}: |
import netsvc, tools, os, time
data_dict = {'model': 'account.analytic.account', 'form': {'date1':time.strftime("%Y-01-01"),'date2':time.strftime('%Y-%m-%d'),'id':ref('account.analytic_root'),'context':{}}}
(data, format) = netsvc.LocalService('report.account.analytic.account.budget').create(cr, uid, [ref('account.analytic_root')], data_dict, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account_budget-analytic_budget_report.'+format), 'wb+').write(data)
-
Print the Budget Report in Normal mode
-
!python {model: account.budget.post}: |
import netsvc, tools, os, time
data_dict = {'model': 'account.budget.post', 'form': {'date1':time.strftime("%Y-01-01"),'date2':time.strftime('%Y-%m-%d'),'id':ref('account_budget.account_budget_post_sales0'),'context':{}}}
(data, format) = netsvc.LocalService('report.account.analytic.account.budget').create(cr, uid, [ref('account_budget.account_budget_post_sales0')], data_dict, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account_budget-budget_report.'+format), 'wb+').write(data)
-
Print the Cross Overed Budget Report in Normal mode
-
!python {model: crossovered.budget}: |
import netsvc, tools, os, time
data_dict = {'model': 'account.budget.post', 'form': {'date_from':time.strftime("%Y-01-01"),'date_to':time.strftime('%Y-%m-%d'),'report':'analytic-full','id':ref('account_budget.crossovered_budget_budgetoptimistic0'),'context':{}}}
(data, format) = netsvc.LocalService('report.crossovered.budget.report').create(cr, uid, [ref('account_budget.crossovered_budget_budgetoptimistic0')], data_dict, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account_budget-crossovered_budget_report.'+format), 'wb+').write(data)
@@ -42,7 +42,7 @@ class account_budget_crossvered_report(osv.osv_memory):
data = self.read(cr, uid, ids)[0]
datas = {
'ids': context.get('active_ids',[]),
'model': 'crossovered.budge',
'model': 'crossovered.budget',
'form': data
}
datas['form']['report']='analytic-full'
+2 -1
View File
@@ -45,7 +45,8 @@
'account_invoice_layout_report.xml',
'wizard/account_invoice_special_message.xml',
],
'demo_xml': [],
'demo_xml': ['account_invoice_layout_demo.xml'],
'test':['test/account_invoice_layout_report.yml'],
'installable': True,
'active': False,
'certificate': '0057235078173',
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="1">
<record id="demo_message1" model="notify.message">
<field name="name">OpenERP SA</field>
<field name="msg">ERP & CRM Solutions....</field>
</record>
<record id="demo_message1" model="notify.message">
<field name="name">Tiny sprl</field>
<field name="msg">Be Expert with the Experts...</field>
</record>
</data>
</openerp>
@@ -297,7 +297,7 @@
</para>
</td>
<td>
<para style="terp_default_Note">Note: [[ (a['note'] and format(a['note'])) or removeParentNode('tr') ]]</para>
<para style="terp_default_Note">Note: [[ (a['note'] and format(a['note'] or '')) or removeParentNode('tr') ]]</para>
<para style="terp_default_Note">
<font color="white"> </font>
</para>
@@ -337,7 +337,7 @@
</para>
</td>
<td>
<para style="terp_default_9">[[ a['type']=='text' and format(a['name']) or removeParentNode('blockTable') ]]</para>
<para style="terp_default_9">[[ a['type']=='text' and format(a['name'] or '') or removeParentNode('blockTable') ]]</para>
</td>
<td>
<para style="terp_default_9">[[ a['type']=='text' and '' ]]</para>
@@ -467,7 +467,7 @@
<blockTable colWidths="539.0" style="Table_Coment_Payment_Term">
<tr>
<td>
<para style="terp_default_9">[[ format(o.comment or removeParentNode('blockTable')) ]]</para>
<para style="terp_default_9">[[ format(o.comment or '') or removeParentNode('blockTable') ]]</para>
</td>
</tr>
</blockTable>
@@ -477,7 +477,7 @@
<blockTable colWidths="539.0" style="Table_Payment_Terms">
<tr>
<td>
<para style="terp_default_9">[[ format((o.payment_term and o.payment_term.note) or removeParentNode('blockTable')) ]]</para>
<para style="terp_default_9">[[ format((o.payment_term and o.payment_term.note or '') or removeParentNode('blockTable')) ]]</para>
</td>
</tr>
</blockTable>
@@ -0,0 +1,17 @@
-
Print the Invoice layout report in Normal Mode
-
!python {model: account.invoice}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.account.invoice.layout').create(cr, uid, [ref('account.test_invoice_1')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account_invoice_layout.'+format), 'wb+').write(data)
-
Print the Invoice Layout Report with Message in Normal mode
-
!python {model: account.invoice}: |
import netsvc, tools, os, time
data_dict = {'model': 'account.invoice', 'form': {'message':ref('account_invoice_layout.demo_message1'),'id':ref('account.test_invoice_1'),'context':{}}}
(data, format) = netsvc.LocalService('report.notify_account.invoice').create(cr, uid, [ref('account.test_invoice_1')], data_dict, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account_invoice_layout_message_report.'+format), 'wb+').write(data)
+5 -2
View File
@@ -47,8 +47,11 @@
'account_invoice_view.xml',
'account_payment_report.xml',
],
'demo_xml': [],
'test': ['test/account_payment.yml'],
'demo_xml': ['account_payment_demo.xml'],
'test': [
'test/account_payment.yml'
'test/account_payment_report.yml'
],
'installable': True,
'active': False,
'certificate': '0061703998541',
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="1">
<record id="partner_bank_1" model="res.partner.bank">
<field name="name">Reserve Bank</field>
<field name="acc_number">00987654321</field>
<field name="partner_id" ref="base.res_partner_agrolait"></field>
<field name="state" eval="bank"/>
</record>
<record id="payment_mode_1" model="payment.mode">
<field name="name">Direct Payment</field>
<field name="journal" ref="account.sales_journal"/>
<field name="bank_id" ref="account_payment.partner_bank_1"/>
<field name="company_id" ref="base.main_company"/>
</record>
<record id="payment_order_1" model="payment.order">
<field name="reference">ORDER1</field>
<field name="mode" ref="account_payment.payment_mode_1"/>
<field name="user_id" ref="base.user_root"/>
<field name="date_prefered">now</field>
<field name="state">draft</field>
</record>
</data>
</openerp>
@@ -0,0 +1,8 @@
-
In order to test the PDF reports defined on Account Payment, Print a Payment Order
-
!python {model: payment.order}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.payment.order').create(cr, uid, [ref('account_payment.payment_order_1')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account_payment-payment_order_report.'+format), 'wb+').write(data)
+2 -1
View File
@@ -42,7 +42,8 @@
'wizard/account_report_print_indicators_with_pdf_view.xml',
'board_account_report_view.xml',
],
'demo_xml': [],
'demo_xml': ['account_report_demo.xml'],
'test': ['test/account_report.yml'],
'installable': True,
'active': False,
'certificate': '0050976406925',
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="1">
<record id="account_report_1" model="account.report.report">
<field name="name">Account Demo Report</field>
<field name="code">ADR</field>
<field name="type">fiscal</field>
<field name="expression">debit&gt;0.0</field>
</record>
</data>
</openerp>
@@ -119,7 +119,7 @@
</blockTable>
<blockTable colWidths="528.0" repeatRows="1" style="Table7">
<tr>
<td><para style="P5"> <font color="white">[['..........'*(o['level']) ]]</font> <font>[[ format(o['note']) or removeParentNode('blockTable') ]]</font></para></td>
<td><para style="P5"> <font color="white">[['..........'*(o['level']) ]]</font> <font>[[ format(o['note'] or '') or removeParentNode('blockTable') ]]</font></para></td>
</tr>
</blockTable>
</section>
@@ -0,0 +1,17 @@
-
In order to test the PDF reports defined on Account, Print a Financial Statement Report
-
!python {model: account.report.report}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.accounting.report').create(cr, uid, [ref('account_report.account_report_1')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account_report-financial_statement_report.'+format), 'wb+').write(data)
-
Print the Indicators Report in Normal mode
-
!python {model: account.report.history }: |
import netsvc, tools, os, time
data_dict = {'model': 'ir.ui.menu', 'form': {'select_base':'year','base_selection':[ref('account.data_fiscalyear')],'context':{}}}
(data, format) = netsvc.LocalService('report.print.indicators').create(cr, uid, [], data_dict, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account_report-indicators_report.'+format), 'wb+').write(data)
+2 -1
View File
@@ -36,7 +36,8 @@
'account_data.xml',
'wizard/account_reporting_balance_report_view.xml',
],
'demo_xml': [],
'demo_xml': ['account_reporting_demo.xml'],
'test': ['test/account_reporting_report.yml'],
'installable': True,
'active': False,
'certificate': '0072305016797',
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="1">
<record id="account_balance_sheet_1" model="account.report.bs">
<field name="name">My Balance Sheet</field>
<field name="code">MBS</field>
</record>
</data>
</openerp>
@@ -0,0 +1,9 @@
-
Print the Balance Sheet Report in Normal mode
-
!python {model: account.report.bs }: |
import netsvc, tools, os, time
data_dict = {'model': 'account.report.bs', 'form': {'fiscalyear':ref('account.data_fiscalyear'),'periods':[ref('account.period_1'),ref('account.period_2'),ref('account.period_3')],'context':{}}}
(data, format) = netsvc.LocalService('report.account.report.bs').create(cr, uid, [ref('account_reporting.account_balance_sheet_1')], data_dict, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account_reporting-balance_sheet_report.'+format), 'wb+').write(data)
+3 -1
View File
@@ -59,7 +59,9 @@
],
'demo_xml': ['auction_demo.xml','board_auction_demo.xml'],
'test': ['test/auction.yml'],
'test': ['test/auction.yml',
'test/auction_report.yml',
],
'installable': True,
'active': False,
+92
View File
@@ -0,0 +1,92 @@
-
In order to test the PDF reports defined on auction, we will print a auction artist
-
!python {model: auction.lots}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.auction.artists').create(cr, uid, [ref('auction.auction_deposit_1_lot_1'),ref('auction.auction_deposit_1_lot_2')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'action_artist_report.'+format), 'wb+').write(data)
-
In order to test the PDF reports defined on auction, we will print a auction Bid
-
!python {model: auction.bid}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.auction.bids').create(cr, uid, [ref('auction.auction_date_1_bid_3'),ref('auction.auction_date_1_bid_4')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'action_bid_report.'+format), 'wb+').write(data)
-
In order to test the PDF reports defined on auction, we will print a lots list Report
-
!python {model: auction.lots}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.lots.list').create(cr, uid, [ref('auction.auction_deposit_3_lot_1'),ref('auction.auction_deposit_3_lot_2')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'lots_list_report.'+format), 'wb+').write(data)
-
In order to test the PDF reports defined on auction, we will print a lots inventory Report
-
!python {model: auction.lots}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.lots.list.inventory').create(cr, uid, [ref('auction.auction_deposit_4_lot_1'),ref('auction.auction_deposit_4_lot_2')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'lots_inventory_report.'+format), 'wb+').write(data)
-
In order to test the PDF reports defined on auction, we will print a deposit seller Report
-
!python {model: auction.lots}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.deposit.seller').create(cr, uid, [ref('auction.auction_deposit_5_lot_1'),ref('auction.auction_deposit_5_lot_2')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'deposit_seller_report.'+format), 'wb+').write(data)
-
In order to test the PDF reports defined on auction, we will print a catalog
-
!python {model: auction.dates}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.auction.cat_flagy').create(cr, uid, [ref('auction.auction_date_1'),ref('auction.auction_date_2')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'auction-catalog_list.'+format), 'wb+').write(data)
-
In order to test the PDF reports defined on auction, we will print buyer form report
-
!python {model: auction.lots}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.buyer_form_report').create(cr, uid, [ref('auction.auction_deposit_6_lot_1'),ref('auction.auction_deposit_6_lot_2')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'auction-buyer_form.'+format), 'wb+').write(data)
-
In order to test the PDF reports defined on auction, we will print bids phones report
-
!python {model: auction.lots}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.bids.phones.details').create(cr, uid, [ref('auction.auction_deposit_7_lot_1'),ref('auction.auction_deposit_7_lot_2')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'auction-bids_phones_details.'+format), 'wb+').write(data)
-
In order to test the PDF reports defined on a auction, we will print a Auction Total
-
!python {model: auction.lots}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.auction.total.rml').create(cr, uid, [ref('auction.auction_deposit_8_lot_1'),ref('auction.auction_deposit_8_lot_2')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'action_total_report.'+format), 'wb+').write(data)
-
In order to test the PDF reports defined on a auction, we will print a Auction Result
-
!python {model: auction.lots}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.auction.result').create(cr, uid, [ref('auction.auction_deposit_9_lot_1'),ref('auction.auction_deposit_9_lot_2')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'action_result_report.'+format), 'wb+').write(data)
-
In order to test the PDF reports defined on a auction, we will print a Auction Lot
-
!python {model: auction.lots}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.bids.lots').create(cr, uid, [ref('auction.auction_deposit_10_lot_1'),ref('auction.auction_deposit_10_lot_2')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'action_lot_report.'+format), 'wb+').write(data)
+1 -1
View File
@@ -40,7 +40,7 @@
'partner_view.xml'
],
'demo_xml': ['delivery_demo.xml'],
'test':['test/delivery_test.yml',],
'test':['test/delivery_test.yml','test/delivery_report.yml'],
'installable': True,
'active': False,
'certificate': '0033981912253',
+8
View File
@@ -0,0 +1,8 @@
-
In order to test the PDF reports defined on a Delievry, we will print a Delivery Order report
-
!python {model: stock.picking}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.sale.shipping').create(cr, uid, [ref('stock.stock_picking_1')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'delievry-shipping'+format), 'wb+').write(data)
+3 -1
View File
@@ -43,7 +43,9 @@
'wizard/hr_attendance_sign_in_out_view.xml',
],
'demo_xml': ['hr_attendance_demo.xml'],
'test': ['test/test_hr_attendance.yml'],
'test': ['test/test_hr_attendance.yml',
'test/hr_attendance_report.yml'
],
'installable': True,
'active': False,
'certificate': '0063495605613',
@@ -0,0 +1,19 @@
-
In order to test the PDF reports defined on HR Attendance, we will print a report of HR Attendance By Month
-
!python {model: hr.employee}: |
import netsvc, tools, os, time
data_dict = {'model': 'hr.employee', 'form': {'month': time.gmtime()[1], 'year': time.gmtime()[0]}}
(data, format) = netsvc.LocalService('report.hr.attendance.bymonth').create(cr, uid, [ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3')], data_dict, {'active_ids': [ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3')]})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'hr_attendance-by_month_report.'+format), 'wb+').write(data)
-
In order to test the PDF reports defined on HR Attendance, we will print a report of HR Attendance Error
-
!python {model: hr.employee}: |
import netsvc, tools, os, time
data_dict = {'model': 'hr.employee', 'form': {'init_date': time.strftime('%Y-01-01'), 'end_date':time.strftime('%Y-%m-%d'), 'emp_ids': [ref('hr.employee1')], 'max_delay': 120}}
(data, format) = netsvc.LocalService('report.hr.attendance.error').create(cr, uid, [ref('hr.employee1')], data_dict, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'hr_attendance-error_report.'+format), 'wb+').write(data)
+3 -1
View File
@@ -55,7 +55,9 @@
'demo_xml': [
'hr_expense_demo.xml',
],
'test': ['test/test_hr_expense.yml'],
'test': ['test/test_hr_expense.yml',
'test/hr_expense_report.yml',
],
'installable': True,
'active': False,
'certificate': '0062479841789',
@@ -0,0 +1,8 @@
-
In order to test the PDF reports defined on a HR Expense, we will print a HR Expense
-
!python {model: hr.expense.expense}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.hr.expense').create(cr, uid, [ref('hr_expense.hr_expense_expense_septemberexpenses0'),ref('hr_expense.hr_expense_expense_septemberexpenses1')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'hr_expense-report.'+format), 'wb+').write(data)
+3 -1
View File
@@ -65,7 +65,9 @@
'board_hr_holidays_view.xml',
],
'demo_xml': ['hr_holidays_demo.xml',],
'test': ['test/test_hr_holiday.yml'],
'test': ['test/test_hr_holiday.yml',
'test/hr_holidays_report.yml',
],
'installable': True,
'active': False,
'certificate': '0086579209325',
@@ -0,0 +1,14 @@
-
In order to test the PDF reports defined on a HR Holidays, we will print HR Holidays
-
!python {model: hr.holidays}: |
import netsvc, tools, os, time
data_dict = {'model': 'ir.ui.menu', 'form': {'date_from': time.strftime('%Y-%m-01'), 'depts' : [ref('hr.dep_sales')],'holiday_type' : 'Validated' }}
(data, format) = netsvc.LocalService('report.holidays.summary').create(cr, uid, [], data_dict, {'active_ids': [ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3')]})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'hr_holidays-dept_summary_report.'+format), 'wb+').write(data)
data_dict = {'model': 'hr.employee', 'form': {'date_from': time.strftime('%Y-%m-01'), 'depts' : [ref('hr.dep_sales')],'holiday_type' : 'Validated','emp':[ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3')] }}
(data, format) = netsvc.LocalService('report.holidays.summary').create(cr, uid, [], data_dict, {'active_ids': [ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3')]})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'hr_holidays-employee_summary_report.'+format), 'wb+').write(data)
+1
View File
@@ -60,6 +60,7 @@
'test/payslip.yml',
'test/payment_advice.yml',
'test/payroll_register.yml',
'test/hr_payroll_report.yml',
],
'demo_xml': [
'hr_payroll_demo.xml'
@@ -0,0 +1,36 @@
-
In order to test the PDF reports defined on HR Employee Salary, we will print HR Employee Salary
-
!python {model: hr.employee}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.salary.structure').create(cr, uid, [ref('hr_payroll.hr_employee_bonamy0')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'hr_payroll-salary_report.'+format), 'wb+').write(data)
-
In order to test the PDF reports defined on HR Payslip, we will print a HR Payslip
-
!python {model: hr.payslip}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.payslip.pdf').create(cr, uid, [ref('hr_payroll.hr_payslip_salaryslipofbonamyforjune0')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'hr_payroll-payslip_report.'+format), 'wb+').write(data)
-
In order to test the PDF reports defined on HR Employee Salary Details, we will print HR Employee Salary Details
-
!python {model: hr.payslip}: |
import netsvc, tools, os, time
data_dict = {'model': 'ir.ui.menu', 'form': {'fiscalyear_id': ref('account.data_fiscalyear'), 'employee_ids': [ref('hr.employee2')]}}
(data, format) = netsvc.LocalService('report.employees.salary').create(cr, uid, [], data_dict, {'periods': []})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'hr_payroll-employee_salary_detai_report.'+format), 'wb+').write(data)
-
In order to test the PDF reports defined on HR Employee Salary Details, we will print HR Employee Salary Details
-
!python {model: hr.payslip}: |
import netsvc, tools, os, time
data_dict = {'model': 'ir.ui.menu', 'form': {'fiscalyear_id': ref('account.data_fiscalyear'), 'salary_on': 'current_month', 'employee_ids': [ref('hr.employee2')]}}
(data, format) = netsvc.LocalService('report.year.salary').create(cr, uid, [], data_dict, {'periods': []})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'hr_payroll-employee_yearly_salary_detai_report.'+format), 'wb+').write(data)
+3 -1
View File
@@ -50,7 +50,9 @@ to set up a management by affair.
'wizard/hr_timesheet_sign_in_out_view.xml',
],
'demo_xml': ['hr_timesheet_demo.xml'],
'test': ['test/test_hr_timesheet.yml'],
'test': ['test/test_hr_timesheet.yml',
'test/hr_timesheet_invoice_report.yml',
],
'installable': True,
'active': False,
'certificate': '0071405533469',
@@ -0,0 +1,31 @@
-
In order to test the PDF reports defined on a HR Timesheet User Report, we will print a HR Timesheet User Report
-
!python {model: hr.employee}: |
import netsvc, tools, os, time
import datetime
from mx.DateTime import *
start = datetime.date.fromtimestamp(time.mktime(time.strptime(time.strftime('%Y-%m-%d'), "%Y-%m-%d")))
start = DateTime(int(start.year), int(start.month), int(start.day))
month=start.month
year=start.year
data_dict = {'model': 'ir.ui.menu', 'form': {'month': month, 'year' : year, 'user_id' : ref('base.user_root') }}
(data, format) = netsvc.LocalService('report.hr.analytical.timesheet').create(cr, uid, [], data_dict, {'periods': []})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'hr_timesheet-user_report.'+format), 'wb+').write(data)
-
In order to test the PDF reports defined on a HR Timesheet Users Report, we will print a HR Timesheet Users Report
-
!python {model: hr.employee}: |
import netsvc, tools, os, time
import datetime
from mx.DateTime import *
start = datetime.date.fromtimestamp(time.mktime(time.strptime(time.strftime('%Y-%m-%d'), "%Y-%m-%d")))
start = DateTime(int(start.year), int(start.month), int(start.day))
month=start.month
year=start.year
data_dict = {'model': 'ir.ui.menu', 'form': {'month': month, 'year' : year, 'user_ids' : [ref('base.user_root')] }}
(data, format) = netsvc.LocalService('report.hr.analytical.timesheet_users').create(cr, uid, [], data_dict, {'periods': []})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'hr_timesheet-users_report.'+format), 'wb+').write(data)
+3 -1
View File
@@ -47,7 +47,9 @@ reports, eso.""",
],
'demo_xml': ['hr_timesheet_invoice_demo.xml',
],
'test': ['test/test_hr_timesheet_invoice.yml'],
'test': ['test/test_hr_timesheet_invoice.yml'
'test/hr_timesheet_invoice_report.yml',
],
'installable': True,
'active': False,
'certificate': '0056091842381',
@@ -0,0 +1,23 @@
-
In order to test the PDF reports defined on a HR Timesheet Account Analytic Profit, we will print a HR Timesheet Account Analytic Profit
-
!python {model: account.analytic.line}: |
import netsvc, tools, os, time
data_dict = {'model': 'ir.ui.menu', 'form': {'date_from': '2010-09-01', 'employee_ids': [[6, 0, [1, ref('hr.employee2')]]], 'journal_ids': [[6, 0, [1, 2, 3, 4]]], 'date_to': '2010-09-16'}}
(data, format) = netsvc.LocalService('report.account.analytic.profit').create(cr, uid, [], data_dict, {'periods': []})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'hr_timesheet_invoice-account_analytic_profit_report.'+format), 'wb+').write(data)
-
In order to test the PDF reports defined on a HR Cost Ledger, we will print a HR Cost Ledger
-
!python {model: account.analytic.account}: |
import netsvc, tools, os, time
import datetime
from mx.DateTime import *
start = datetime.date.fromtimestamp(time.mktime(time.strptime(time.strftime('%Y-%m-%d'), "%Y-%m-%d")))
start = DateTime(int(start.year), int(start.month), int(start.day))
data_dict = {'model': 'ir.ui.menu', 'form': {'date1': start.strftime('%Y-%m-%d'), 'date2': start.strftime('%Y-%m-%d')}}
(data, format) = netsvc.LocalService('report.hr.timesheet.invoice.account.analytic.account.cost_ledger').create(cr, uid, [], data_dict, {'periods': []})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'hr_timesheet_invoice-cost_ledger_report.'+format), 'wb+').write(data)
+3
View File
@@ -94,6 +94,9 @@ TODO :
"account_journal_view.xml",
"security/ir.model.access.csv",
],
'test' : [
'test/l10n_ch_report.yml',
],
"active": False,
"installable": True,
}
+17
View File
@@ -0,0 +1,17 @@
-
In order to test the PDF reports defined on a l10n_ch, we will print a bvr_report
-
!python {model: account.invoice}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.l10n_ch.bvr').create(cr, uid, [ref('account.test_invoice_1')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'l10ch-bvr_order.'+format), 'wb+').write(data)
-
In order to test the PDF reports defined on a l10n_ch, we will print a bvr_invoice_report
-
!python {model: account.invoice}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.l10n_ch.invoice.bvr').create(cr, uid, [ref('account.test_invoice_1')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'l10ch-bvr_invoice.'+format), 'wb+').write(data)
+2 -1
View File
@@ -48,8 +48,9 @@ Credits: Sistheo Zeekom CrysaLEAD
"security/ir.model.access.csv",
"wizard/fr_report_bilan_view.xml",
"wizard/fr_report_compute_resultant_view.xml",
],
"test": ['test/l10n_fr_report.yml'],
"demo_xml" : [],
"certificate" : "00435321693876313629",
"active": False,
+26
View File
@@ -0,0 +1,26 @@
-
In order to test Generate Fiscalyear Opening Entries wizard of OpenERP I first create a fiscalyear "Fiscal Year 2011" to which the entries will move
-
!record {model: account.fiscalyear, id: account_fiscalyear_0}:
code: FY2011
company_id: base.main_company
date_start: '2011-01-01'
date_stop: '2011-12-31'
name: Fiscal Year 2011
-
In order to test the PDF reports defined on a l10n_fr, we will print a account move line for l10n_fr
-
!python {model: account.move.line}: |
import netsvc, tools, os, time
(data, format) = netsvc.LocalService('report.l10n.fr.bilan').create(cr, uid, [], {'model':'account.move.line', 'form':{'fiscalyear_id': ref('account_fiscalyear_0')}}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'l10n_fr-bilan.'+format), 'wb+').write(data)
-
In order to test the PDF reports defined on a l10n_fr, we will print a compute result for l10n_fr
-
!python {model: account.move.line}: |
import netsvc, tools, os,time
(data, format) = netsvc.LocalService('report.l10n.fr.compute_resultant').create(cr, uid, [], {'model':'account.move.line', 'form':{'fiscalyear_id': ref('account.data_fiscalyear')}}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'l10n_fr-compute_resultant.'+format), 'wb+').write(data)
+1
View File
@@ -41,6 +41,7 @@ This module installs:
'account.tax.template.csv',
'wizard/print_vat_view.xml'
],
'test': ['test/l10n_lu_report.yml'],
'demo_xml': ['account.report.report.csv'],
'installable': True,
'active': False,
+14
View File
@@ -0,0 +1,14 @@
-
It is demo data for the account.tax.code
-
!record {model: account.tax.code, id: account_tax_code_id_r1}:
name: a
-
In order to test the PDF reports defined on a l10u_lu, we will print a vat
-
!python {model: res.partner}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.l10n_lu.tax.report.print').create(cr, uid, [], {'model':'ir.ui.menu', 'form':{'tax_code_id': ref('account_tax_code_id_r1'), 'period_id': ref('account.period_1')}}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'l10n_lu-vat.'+format), 'wb+').write(data)
+2 -3
View File
@@ -49,9 +49,8 @@
'report/report_lunch_order_view.xml',
],
"demo_xml": ['lunch_demo.xml'],
"test": ['test/test_lunch.yml'],
"test": ['test/test_lunch.yml', 'test/lunch_report.yml'],
"installable": True,
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+8
View File
@@ -0,0 +1,8 @@
-
In order to test the PDF reports defined on a lunch, we will print a lunch order
-
!python {model: lunch.order}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.lunch.order').create(cr, uid, [ref('lunch.lunch_order_0'),ref('lunch.lunch_order_1')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'lunch-lunch_order.'+format), 'wb+').write(data)
+2 -1
View File
@@ -92,7 +92,8 @@
'test/mrp_packs.yml',
'test/mrp_phantom_bom.yml',
'test/mrp_production_order.yml',
'test/mrp_report.yml',
],
'installable': True,
'active': False,
+35
View File
@@ -0,0 +1,35 @@
-
In order to test the PDF reports defined on a mrp, we will print a bom order
-
!python {model: mrp.bom}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.bom.structure').create(cr, uid, [ref('mrp.mrp_bom_0'),ref('mrp.mrp_bom_1'),ref('mrp.mrp_bom_2'),ref('mrp.mrp_bom_23'),ref('mrp.mrp_bom_1901'),ref('mrp.mrp_bom_assemblysection0'),ref('mrp.mrp_bom_sidepanel0'),ref('mrp.mrp_bom_defaultbomforshelfofcm1'),ref('mrp.mrp_bom_sidepanel3')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'mrp-bom_order.'+format), 'wb+').write(data)
-
In order to test the PDF reports defined on a mrp, we will print an order
-
!python {model: mrp.production}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.mrp.production.order').create(cr, uid, [ref('mrp.mrp_production_mo1')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'mrp-production_order.'+format), 'wb+').write(data)
-
In order to test the PDF reports defined on a mrp product price, we will print a (mrp)Product Price order
-
!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_order.'+format), 'wb+').write(data)
-
In order to test the PDF reports defined on a mrp workcenter, we will print a (mrp)workcenter
-
!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.'+format), 'wb+').write(data)
+1 -1
View File
@@ -61,7 +61,7 @@
'process/mrp_operation_process.xml'
],
'demo_xml': ['mrp_operation_data.xml'],
'test': ['test/mrp_operations.yml'],
'test': ['test/mrp_operations.yml', 'test/mrp_operations_report.yml'],
'installable': True,
'active': False,
'certificate': '0056233813133',
@@ -0,0 +1,17 @@
-
In order to test the PDF reports defined on a mrp operations, we will print a barcode
-
!python {model: mrp_operations.operation.code}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.mrp.code.barcode').create(cr, uid, [ref('mrp_operations.mrp_op_1'),ref('mrp_operations.mrp_op_2'),ref('mrp_operations.mrp_op_3'),ref('mrp_operations.mrp_op_4'),ref('mrp_operations.mrp_op_5')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'mrp_operations-barcoder.'+format), 'wb+').write(data)
-
In order to test the PDF reports defined on a mrp operations, we will print a workcenters
-
!python {model: mrp.workcenter}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.mrp.wc.barcode').create(cr, uid, [ref('mrp.mrp_workcenter_0'),ref('mrp.mrp_workcenter_1')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'mrp_ workcenter.'+format), 'wb+').write(data)
+5 -5
View File
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
#
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
@@ -15,7 +15,7 @@
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
@@ -31,13 +31,13 @@
* Invoicing (products and/or services)
* Warranty concept
* Repair quotation report
* Notes for the technician and for the final customer
* Notes for the technician and for the final customer
""",
'author': 'OpenERP SA',
'depends': ['mrp', 'sale', 'account'],
'update_xml': [
'security/ir.model.access.csv',
'mrp_repair_sequence.xml',
'mrp_repair_sequence.xml',
'wizard/mrp_repair_cancel_view.xml',
'wizard/mrp_repair_make_invoice_view.xml',
'mrp_repair_view.xml',
@@ -45,7 +45,7 @@
'mrp_repair_report.xml',
],
'demo_xml': [],
'test': ['test/test_mrp_repair.yml'],
'test': ['test/test_mrp_repair.yml', 'test/mrp_repair_report.yml'],
'installable': True,
'active': False,
'certificate': '0060814381277',
@@ -0,0 +1,8 @@
-
In order to test the PDF reports defined on a mrp-repair, we will print a order
-
!python {model: mrp.repair}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.repair.order').create(cr, uid, [ref('mrp_repair.mrp_repair_rma0')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'mrp-repair_order.'+format), 'wb+').write(data)
+4 -1
View File
@@ -73,7 +73,10 @@ Main features :
'statement_report.xml',
],
'demo_xml': ['pos_demo.xml','singer_statement_demo.xml','multi_company_stock_data.xml',],
'test':['test/pos_test.yml',],
'test':['test/pos_test.yml',
'test/pos_report.yml',
'test/pos_details.yml',
'test/pos_payment_report_date.yml'],
'installable': True,
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+60 -1
View File
@@ -1,6 +1,65 @@
<?xml version="1.0"?>
<openerp>
<data>
<!--Resource: pos.order-->
<record id="order_pos1" model="pos.order">
<field model="sale.shop" name="shop_id" search="[]"/>
<field model="res.users" name="user_salesman_id" search="[]"/>
<field name="user_id" ref="base.user_root"/>
<field model="res.partner" name="partner_id" search="[]"/>
<field name="price_type">tax_excluded</field>
<field model="product.pricelist" name="pricelist_id" search="[]"/>
</record>
<record id="order_pos2" model="pos.order">
<field model="sale.shop" name="shop_id" search="[]"/>
<field model="res.users" name="user_salesman_id" search="[]"/>
<field name="user_id" ref="base.user_root"/>
<field model="res.partner" name="partner_id" search="[]"/>
<field name="price_type">tax_excluded</field>
<field model="product.pricelist" name="pricelist_id" search="[]"/>
</record>
<!--Resource: pos.order.line-->
<record id="line1_pos" model="pos.order.line">
<field name="order_id" ref="order_pos1"/>
<field name="date_planned">2010/09/15</field>
<field name="name">[PC3] Medium PC</field>
<field name="product_id" ref="product.product_product_pc3"/>
<field model="res.company" name="company_id" search="[]"/>
<field model="product.uom" name="product_uom" search="[]"/>
<field name="price_unit">450</field>
<field name="qty">2</field>
<field name="notice">No Discount</field>
</record>
<record id="line12_pos" model="pos.order.line">
<field name="order_id" ref="order_pos1"/>
<field name="date_planned">2010/09/15</field>
<field name="name">[PC2] Basic+ PC (assembly on order)</field>
<field name="product_id" ref="product.product_product_pc2"/>
<field model="res.company" name="company_id" search="[]"/>
<field model="product.uom" name="product_uom" search="[]"/>
<field name="price_unit">450</field>
<field name="qty">2</field>
<field name="notice">No Discount</field>
</record>
<record id="line2_pos" model="pos.order.line">
<field name="order_id" ref="order_pos2"/>
<field name="date_planned">2010/09/15</field>
<field name="name">[PC1] Basic PC</field>
<field name="product_id" ref="product.product_product_pc1"/>
<field model="res.company" name="company_id" search="[]"/>
<field model="product.uom" name="product_uom" search="[]"/>
<field name="price_unit">450</field>
<field name="qty">5</field>
<field name="discount">0.10</field>
<field name="notice">Discount Applied</field>
</record>
</data>
</openerp>
@@ -0,0 +1,8 @@
-
In order to test the PDF reports defined on a Point Of Sale, we will print a POS Details report
-
!python {model: ir.ui.menu}: |
import netsvc, tools, os, time
(data, format) = netsvc.LocalService('report.pos.details').create(cr, uid, [], {'model':'ir.ui.menu', 'form':{'date_start': time.strftime('%Y-%m-%d'), 'date_end': time.strftime('%Y-%m-%d') }}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'point_of_sale- pos details report'+format), 'wb+').write(data)
@@ -0,0 +1,8 @@
-
In order to test the PDF reports defined on a Point Of Sale, we will print a POS Sales Lines report
-
!python {model: ir.ui.menu}: |
import netsvc, tools, os, time
(data, format) = netsvc.LocalService('report.pos.payment.report.date').create(cr, uid, [1], {'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')] }}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'point_of_sale- pos sales lines report'+format), 'wb+').write(data)
+53
View File
@@ -0,0 +1,53 @@
-
In order to test the PDF reports defined on a Point Of Sale, we will print a POS Detail Summary report
-
!python {model: pos.order}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.pos.details_summary').create(cr, uid, [ref('point_of_sale.order_pos1'), ref('point_of_sale.order_pos2')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-details_summary report'+format), 'wb+').write(data)
-
In order to test the PDF reports defined on a Point Of Sale, we will print a POS Invoice report
-
!python {model: pos.order}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.pos.invoice').create(cr, uid, [ref('point_of_sale.order_pos1'), ref('point_of_sale.order_pos2')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-invoice report'+format), 'wb+').write(data)
-
In order to test the PDF reports defined on a Point Of Sale, we will print a POS Lines report
-
!python {model: pos.order}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.pos.lines').create(cr, uid, [ref('point_of_sale.order_pos1'), ref('point_of_sale.order_pos2')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-lines report'+format), 'wb+').write(data)
-
In order to test the PDF reports defined on a Point of Sale, we will print a POS Receipt report
-
!python {model: pos.order}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.pos.receipt').create(cr, uid, [ref('point_of_sale.order_pos1'), ref('point_of_sale.order_pos2')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-receipt report'+format), 'wb+').write(data)
-
In order to test the PDF reports defined on a Point of Sale, we will print a POS Receipt With Reimbursement report
-
!python {model: pos.order}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.pos.receipt.with.remboursment').create(cr, uid, [ref('point_of_sale.order_pos1'), ref('point_of_sale.order_pos2')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-receipt with reimbursement report'+format), 'wb+').write(data)
-
In order to test the PDF reports defined on a point of sale, we will print a POS Receipt Without Reimbursement report
-
!python {model: pos.order}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.pos.receipt.without.remboursment').create(cr, uid, [ref('point_of_sale.order_pos1'), ref('point_of_sale.order_pos2')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-receipt without reimbursement report'+format), 'wb+').write(data)
+1
View File
@@ -58,6 +58,7 @@
'company_view.xml',
'process/product_process.xml'
],
'test':['test/product_report.yml'],
'installable': True,
'active': False,
'certificate': '0068861431437',
+17
View File
@@ -0,0 +1,17 @@
-
In order to test the PDF reports defined on Products, we will print a Products Pricelists Report
-
!python {model: product.product}: |
import netsvc, tools, os
data_dict = {'model': 'product.price_list'}
data_dict['form'] = {
'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)
+1
View File
@@ -55,6 +55,7 @@ At the end of the month, the planning manager can also check if the encoded time
],
'test': [
'test/planning_states.yml'
'test/planning_report.yml'
],
'installable': True,
'active': False,
@@ -8,5 +8,13 @@
<field name="manager_id" ref="base.user_root"/>
<field name="member_ids" eval="[(6,0,[ref('base.user_demo')])]"/>
</record>
<record id="project_plannning_1" model="report_account_analytic.planning">
<field name="name">Project_Planning</field>
<field name="business_days">20</field>
<field name="date_from">2010-01-01'</field>
<field name="date_to">2010-12-31</field>
<field name="state">draft</field>
<field name="member_ids" ref="base.user_demo"/>
</record>
</data>
</openerp>
@@ -0,0 +1,8 @@
-
In order to test the PDF reports defined on a Project Planning, we will print Project Planning Report
-
!python {model: report_account_analytic.planning}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.report_account_analytic.planning.print').create(cr, uid, [ref('project_planning.project_plannning_1')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'project_planning-project_planning_report'+format), 'wb+').write(data)
+1
View File
@@ -60,6 +60,7 @@
"board_project_scrum_view.xml",
],
'demo_xml': ['project_scrum_demo.xml'],
'test': ['test/project_scrum_report.yml'],
'installable': True,
'active': False,
}
@@ -0,0 +1,9 @@
-
In order to test the PDF reports defined on a Project Scrum, we will print Project Scrum Sprint Burndown Report
-
!python {model: project.scrum.sprint}: |
import netsvc, tools, os
data_dict = {'model': 'project.scrum.sprint', 'id':ref('project_scrum.scrum_sprint_0')}
(data, format) = netsvc.LocalService('report.scrum.sprint.burndown').create(cr, uid, [ref('project_scrum.scrum_sprint_0')], data_dict, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'project_scrum-project_scrum_sprint_burndown.'+format), 'wb+').write(data)
+1
View File
@@ -60,6 +60,7 @@
'test/purchase_from_picking.yml',
'purchase_unit_test.xml',
'test/procurement_buy.yml',
'test/purchase_report.yml',
],
'demo': ['purchase_demo.xml'],
'installable': True,
+58
View File
@@ -1,6 +1,64 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="1">
<!--Resource: purchase.order-->
<record id="order_purchase1" model="purchase.order">
<field model="stock.location" name="location_id" search="[]"/>
<field model="product.pricelist" name="pricelist_id" search="[]"/>
<field name="user_id" ref="base.user_root"/>
<field model="res.partner" name="partner_id" search="[]"/>
<field model="res.partner.address" name="partner_address_id" search="[]"/>
</record>
<record id="order_purchase2" model="purchase.order">
<field model="stock.location" name="location_id" search="[]"/>
<field model="product.pricelist" name="pricelist_id" search="[]"/>
<field name="user_id" ref="base.user_demo"/>
<field model="res.partner" name="partner_id" search="[]"/>
<field model="res.partner.address" name="partner_address_id" search="[]"/>
</record>
<!--Resource: purchase.order.line-->
<record id="line1_purchase" model="purchase.order.line">
<field name="order_id" ref="order_purchase1"/>
<field name="date_planned">2010/09/15</field>
<field name="name">New server config + material</field>
<field model="product.product" name="product_id" search="[]"/>
<field model="product.uom" name="product_uom" search="[]"/>
<field name="price_unit">150</field>
<field name="product_qty">5</field>
<field name="type">make_to_stock</field>
</record>
<record id="line2_purchase" model="purchase.order.line">
<field name="order_id" ref="order_purchase1"/>
<field name="date_planned">2010/09/15</field>
<field name="name">[PC1] Basic PC</field>
<field name="product_id" ref="product.product_product_pc1"/>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="price_unit">450</field>
<field name="product_qty">2</field>
<field name="product_uom_qty">3</field>
<field name="product_uos_qty">3</field>
<field name="type">make_to_stock</field>
</record>
<record id="line3_purchase" model="purchase.order.line">
<field name="order_id" ref="order_purchase2"/>
<field name="date_planned">2010/09/15</field>
<field name="name">[PC3] Medium PC</field>
<field name="product_id" ref="product.product_product_pc1"/>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="price_unit">900</field>
<field name="product_qty">1</field>
<field name="type">make_to_stock</field>
</record>
<workflow action="purchase_confirm" model="purchase.order" ref="order_purchase2"/>
</data>
</openerp>
+16
View File
@@ -0,0 +1,16 @@
-
In order to test the PDF reports defined on a Purchase Order, we will print a Request Quotation report
-
!python {model: purchase.order}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.purchase.quotation').create(cr, uid, [ref('purchase.order_purchase1'),ref('purchase.order_purchase2')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'purchase-request_quotation'+format), 'wb+').write(data)
-
In order to test the PDF reports defined on a Purchase Order, we will print Purchase Order report
-
!python {model: purchase.order}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.purchase.order').create(cr, uid, [ref('purchase.order_purchase1'),ref('purchase.order_purchase2')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'purchase-purchase_order_report'+format), 'wb+').write(data)
+2 -2
View File
@@ -30,7 +30,7 @@
""",
"depends" : ["purchase","mrp"],
"init_xml" : [],
"demo_xml" : [],
"demo_xml" : ['purchase_requisition_demo.xml'],
"update_xml" : ["wizard/purchase_requisition_partner_view.xml",
"purchase_requisition_data.xml",
"purchase_requisition_view.xml",
@@ -38,7 +38,7 @@
"security/ir.model.access.csv","purchase_requisition_sequence.xml"
],
"active": False,
"test":[],
"test":['test/purchase_requisition_report.yml'],
"installable": True
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="1">
<!--Resource: purchase.requisition-->
<record id="order_purchase_requisition1" model="purchase.requisition">
<field name="name">TE0001</field>
<field name="user_id" model="res.users"/>
<field name="exclusive">multiple</field>
<field name="date_start">2010/09/16 15:56:14</field>
<field name="warehouse_id" model="stock.warehouse"/>
</record>
<!--Resource: purchase.requisition.line-->
<record id="line_purchase_requisition1" model="purchase.requisition.line">
<field name="requisition_id" ref="order_purchase_requisition1"/>
<field name="product_id" ref="product.product_product_pc3"/>
<field name="product_uom_id" model="product.uom" search="[]"/>
<field name="product_qty">5</field>
</record>
</data>
</openerp>
@@ -0,0 +1,8 @@
-
In order to test the PDF reports defined on Purchase Requisition, we will print a Requisition report
-
!python {model: purchase.requisition}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.purchase.requisition').create(cr, uid, [ref('purchase_requisition.order_purchase_requisition1')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'purchase_requisition-purchase_requisition_report.'+format), 'wb+').write(data)
+1
View File
@@ -37,6 +37,7 @@
'intrastat_report.xml'
],
'demo_xml': [],
'test': ['test/report_instratat_report.yml'],
'installable': True,
'active': False,
'certificate': '0056982189085',
@@ -0,0 +1,8 @@
-
In order to test the PDF reports defined using report_instratat module, we print a Instratat Report
-
!python {model: account.invoice}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.account.invoice.intrastat').create(cr, uid, [ref('account.test_invoice_1')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'report_instratat-instrastat_report.'+format), 'wb+').write(data)
+1 -1
View File
@@ -79,7 +79,7 @@
'test/sale_procurement.yml',
'test/invoice_on_ordered_qty.yml',
'test/invoice_on_shipped_qty.yml',
'test/sale_order_print.yml',
'test/sale_report.yml',
],
'installable': True,
'active': False,
-8
View File
@@ -1,8 +0,0 @@
-
In order to test the PDF reports defined on a sale order, we will print a sale order
-
!python {model: sale.order}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.sale.order').create(cr, uid, [ref('sale.order'),ref('sale.order2')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'sale-sale_order.'+format), 'wb+').write(data)
+16
View File
@@ -0,0 +1,16 @@
-
In order to test the PDF reports defined on a sale order, we will print a sale order
-
!python {model: sale.order}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.sale.order').create(cr, uid, [ref('sale.order'),ref('sale.order2')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'sale-sale_order.'+format), 'wb+').write(data)
-
In order to test the PDF reports defined on a sale order, we will print a report for sale prepare allot
-
!python {model: sale.order}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.sale.order.prepare.allot').create(cr, uid, [ref('sale.order'),ref('sale.order2'),ref('sale.order3')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'sale-sale_prepare_allot.'+format), 'wb+').write(data)
+1
View File
@@ -40,6 +40,7 @@
"sale_layout_view.xml",
"sale_layout_report.xml",
],
"test" : ['test/sale_layout_report.yml'],
"active": False,
"installable": True
}
@@ -0,0 +1,8 @@
-
In order to test the PDF reports defined on Sale, we will print a Sale Layout report.
-
!python {model: sale.order}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.sale.order.layout').create(cr, uid, [ref('sale.order')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'sale_layout-sale layout report'+format), 'wb+').write(data)
+3 -1
View File
@@ -74,7 +74,9 @@ Thanks to the double entry management, the inventory controlling is powerful and
"security/ir.model.access.csv",
"board_warehouse_view.xml"
],
'test': ['test/stock_test.yml'],
'test': ['test/stock_test.yml',
'test/stock_report.yml',
],
'installable': True,
'active': False,
'certificate': '0055421559965',
+7 -1
View File
@@ -270,6 +270,12 @@
<field eval="'account.account,'+str(ref('account.a_recv'))" model="account.account" name="value"/>
<field name="company_id" ref="base.main_company"/>
</record>
<record id="stock_picking_1" model="stock.picking">
<field name="name">PACKO1</field>
<field name="type">out</field>
<field name="move_type">direct</field>
<field name="invoice_state">2binvoiced</field>
<field name="company_id" ref="base.main_company"/>
</record>
</data>
</openerp>
+48
View File
@@ -0,0 +1,48 @@
-
In order to test the PDF reports defined on a stock, we will print a Stock Overviewall(childs) report
-
!python {model: stock.location}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.lot.stock.overview_all').create(cr, uid, [ref('stock.stock_location_13')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'stock-overviewall'+format), 'wb+').write(data)
-
In order to test the PDF reports defined on stock location, we will print a lot location report
-
!python {model: stock.location}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.lot.location').create(cr, uid, [ref('stock.stock_location_components')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'stock-stock_lot_location.'+format), 'wb+').write(data)
-
In order to test the PDF reports defined on stock inventory, we will print a Stock Inventory Move report
-
!python {model: stock.inventory}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.stock.inventory.move').create(cr, uid, [ref('stock.stock_inventory_0')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'stock-stock_inventory_move.'+format), 'wb+').write(data)
-
In order to test the PDF reports defined on a stock, we will print a Stock Overview report
-
!python {model: stock.location}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.lot.stock.overview').create(cr, uid, [ref('stock.stock_location_14')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'stock-overview'+format), 'wb+').write(data)
-
In order to test the PDF reports defined on a stock, we will print a Stock Picking List report
-
!python {model: stock.picking}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.stock.picking.list').create(cr, uid, [ref('stock.stock_picking_1')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'stock-picking_list'+format), 'wb+').write(data)
-
In order to test the PDF reports defined on a Stock, we will print Product Stock Report
-
!python {model: product.product}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.stock.product.history').create(cr, uid, [ref('product.product_product_pc1')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'stock-product_stock_report.'+format), 'wb+').write(data)
+1
View File
@@ -47,6 +47,7 @@
'demo_xml': ['survey_demo.xml'],
'test': [
'test/survey00.yml',
'test/survey_report.yml',
],
'installable': True,
'active': False,
+24
View File
@@ -0,0 +1,24 @@
-
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)
-
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)
-
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)