@@ -496,19 +496,19 @@
[[data['form']['amount_currency'] == True or removeParentNode('blockTable')]]
|
- [[ '..'*(o.level-1) ]][[ o.code ]] [[ o.name ]]
+ [[ '..'*(o.level-1) ]][[ o.code ]] [[ o.name ]]
|
- [[ formatLang(sum_debit_account(o), digits=get_digits(dp='Account')) ]]
+ [[ formatLang(sum_debit_account(o), digits=get_digits(dp='Account')) ]]
|
- [[ formatLang(sum_credit_account(o), digits=get_digits(dp='Account')) ]]
+ [[ formatLang(sum_credit_account(o), digits=get_digits(dp='Account')) ]]
|
- [[ formatLang(sum_balance_account(o), digits=get_digits(dp='Account')) ]] [[ company.currency_id.symbol ]]
+ [[ formatLang(sum_balance_account(o), digits=get_digits(dp='Account')) ]] [[ company.currency_id.symbol ]]
|
- [[ o.currency_id and formatLang(sum_currency_amount_account(o), digits=get_digits(dp='Account')) + o.currency_id.code or '' ]]
+ [[ o.currency_id and formatLang(sum_currency_amount_account(o), digits=get_digits(dp='Account')) + o.currency_id.code or '' ]]
|
@@ -526,7 +526,7 @@
[[ line['lcode'] ]]
|
- [[ strip_name(line['partner_name'],21) ]]
+ [[ strip_name(line['partner_name'],20) ]]
|
[[ strip_name(line['lref'],17) ]]
@@ -535,7 +535,7 @@
[[ line['move'] ]]
|
- [[ strip_name(line['lname'],26) ]]
+ [[ strip_name(line['lname'],22) ]]
|
[[ strip_name(line['line_corresp'],18) ]]
@@ -598,16 +598,16 @@
[[ data['form']['amount_currency'] == False or removeParentNode('blockTable') ]]
|
- [[ '..'*(o.level-1) ]][[ o.code ]] [[ o.name ]]
+ [[ '..'*(o.level-1) ]][[ o.code ]] [[ o.name ]]
|
- [[ formatLang(sum_debit_account(o), digits=get_digits(dp='Account')) ]]
+ [[ formatLang(sum_debit_account(o), digits=get_digits(dp='Account')) ]]
|
- [[ formatLang(sum_credit_account(o), digits=get_digits(dp='Account')) ]]
+ [[ formatLang(sum_credit_account(o), digits=get_digits(dp='Account')) ]]
|
- [[ formatLang(sum_balance_account(o), digits=get_digits(dp='Account')) ]] [[ company.currency_id.symbol ]]
+ [[ formatLang(sum_balance_account(o), digits=get_digits(dp='Account')) ]] [[ company.currency_id.symbol ]]
|
@@ -625,7 +625,7 @@
[[ line['lcode'] ]]
|
- [[ strip_name(line['partner_name'],25) ]]
+ [[ strip_name(line['partner_name'],24) ]]
|
[[ strip_name(line['lref'],21) ]]
@@ -634,7 +634,7 @@
[[ line['move'] ]]
|
- [[ strip_name(line['lname'],35) ]]
+ [[ strip_name(line['lname'],28) ]]
|
[[ strip_name(line['line_corresp'],23) ]]
diff --git a/addons/account/report/account_journal.rml b/addons/account/report/account_journal.rml
index a81c634ddc8..9b0ac55bb56 100644
--- a/addons/account/report/account_journal.rml
+++ b/addons/account/report/account_journal.rml
@@ -229,7 +229,7 @@
- [[ display_currency(data) == False or removeParentNode('blockTable') ]]
+ [[ display_currency(data) == False or removeParentNode('blockTable') ]]
| Date |
Ref |
@@ -256,14 +256,14 @@
[[ strip_name(line.ref,20) ]] |
[[ line.move_id.name <> '/' and line.move_id.name or ('*'+str(line.move_id.id)) ]] |
[[ line.account_id.code ]] |
- [[ line.partner_id and strip_name(line.partner_id.name,16) ]] |
- [[ strip_name(line.name,35) ]] |
+ [[ line.partner_id and strip_name(line.partner_id.name,17) ]] |
+ [[ strip_name(line.name,27) ]] |
[[ formatLang(line.debit) ]] [[ company.currency_id.symbol ]] |
[[ formatLang(line.credit) ]] [[ company.currency_id.symbol ]] |
- [[ display_currency(data) or removeParentNode('blockTable') ]]
+ [[ display_currency(data) or removeParentNode('blockTable') ]]
| Date |
Ref |
@@ -293,7 +293,7 @@
[[ strip_name(line.ref,20) ]] |
[[ line.move_id.name <> '/' and line.move_id.name or ('*'+str(line.move_id.id)) ]] |
[[ line.account_id.code ]] |
- [[ line.partner_id and strip_name(line.partner_id.name,16) ]] |
+ [[ line.partner_id and strip_name(line.partner_id.name,15) ]] |
[[ strip_name(line.name,17) ]] |
[[ formatLang(line.debit) ]] [[ company.currency_id.symbol ]] |
[[ formatLang(line.credit) ]] [[ company.currency_id.symbol ]] |
diff --git a/addons/account/report/account_partner_ledger.rml b/addons/account/report/account_partner_ledger.rml
index 1a32bc13bde..69faa977da1 100644
--- a/addons/account/report/account_partner_ledger.rml
+++ b/addons/account/report/account_partner_ledger.rml
@@ -262,11 +262,11 @@
-
+
-
+
@@ -274,67 +274,65 @@
-
- [[ display_currency(data) == False or removeParentNode('blockTable') ]]
-
- |
- Date
- |
-
- JNRL
- |
-
- Ref
- |
-
- Account
- |
-
- Entry Label
- |
-
- Debit
- |
-
- Credit
- |
-
- Balance
- |
-
-
-
- [[ display_currency(data) == True or removeParentNode('blockTable') ]]
-
- |
- Date
- |
-
- JNRL
- |
-
- Ref
- |
-
- Account
- |
-
- Entry Label
- |
-
- Debit
- |
-
- Credit
- |
-
- Balance
- |
-
- Currency
- |
-
-
+
+
+ |
+ Date
+ |
+
+ JNRL
+ |
+
+ Ref
+ |
+
+ Account
+ |
+
+ Entry Label
+ |
+
+ Debit
+ |
+
+ Credit
+ |
+
+ Balance
+ |
+
+
+
+
+ |
+ Date
+ |
+
+ JNRL
+ |
+
+ Ref
+ |
+
+ Account
+ |
+
+ Entry Label
+ |
+
+ Debit
+ |
+
+ Credit
+ |
+
+ Balance
+ |
+
+ Currency
+ |
+
+
[[ repeatIn(objects, 'p') ]]
[[ setLang(p.lang) ]]
@@ -439,7 +437,7 @@
[[ display_currency(data) == False or removeParentNode('section') ]]
-
+
Date
@@ -490,47 +488,47 @@
|
- Initial Balance
+ Initial Balance
|
- [[ formatLang(get_intial_balance(p)[0][0])]]
+ [[ formatLang(get_intial_balance(p)[0][0])]]
|
- [[ formatLang(get_intial_balance(p)[0][1]) ]]
+ [[ formatLang(get_intial_balance(p)[0][1]) ]]
|
- [[ formatLang(get_intial_balance(p)[0][2]) ]] [[ company.currency_id.symbol ]]
+ [[ formatLang(get_intial_balance(p)[0][2]) ]] [[ company.currency_id.symbol ]]
|
[[ repeatIn(lines(p), 'line') ]]
-
+
|
- [[ formatLang(line['date'],date=True) ]]
+ [[ formatLang(line['date'],date=True) ]]
|
- [[ line['code'] ]]
+ [[ line['code'] ]]
|
- [[ line['move_name'] ]]
+ [[ line['move_name'] ]]
|
- [[ line['a_code'] ]]
+ [[ line['a_code'] ]]
|
- [[ strip_name(line['ref'],10) ]] - [[ strip_name(line['name'],15) ]]
+ [[ strip_name(line['ref'],10) ]] - [[ strip_name(line['name'],15) ]]
|
- [[ formatLang((line['debit'])) ]]
+ [[ formatLang((line['debit'])) ]]
|
- [[ formatLang((line['credit'])) ]]
+ [[ formatLang((line['credit'])) ]]
|
- [[ formatLang((line['progress'])) ]] [[ company.currency_id.symbol ]]
+ [[ formatLang((line['progress'])) ]] [[ company.currency_id.symbol ]]
|
@@ -540,7 +538,7 @@
[[ display_currency(data) == True or removeParentNode('section') ]]
-
+
|
Date
@@ -571,7 +569,7 @@
|
-
+
[[ p.ref ]] - [[ p.name ]]
@@ -594,7 +592,7 @@
[[ data['form']['initial_balance']==True or removeParentNode('section') ]]
-
+
Initial Balance
@@ -618,35 +616,35 @@
[[ repeatIn(lines(p), 'line') ]]
-
+
|
- [[ formatLang(line['date'],date=True) ]]
+ [[ formatLang(line['date'],date=True) ]]
|
- [[ line['code'] ]]
+ [[ line['code'] ]]
|
- [[ line['move_name'] ]]
+ [[ line['move_name'] ]]
|
- [[ line['a_code'] ]]
+ [[ line['a_code'] ]]
|
- [[ strip_name(line['ref'],5) ]] - [[ strip_name(line['name'],5) ]]
+ [[ strip_name(line['ref'],8) ]] - [[ strip_name(line['name'],7) ]]
|
- [[ formatLang((line['debit'])) ]]
+ [[ formatLang((line['debit'])) ]]
|
- [[ formatLang((line['credit'])) ]]
+ [[ formatLang((line['credit'])) ]]
|
- [[ formatLang((line['progress'])) ]] [[ company.currency_id.symbol ]]
+ [[ formatLang((line['progress'])) ]] [[ company.currency_id.symbol ]]
|
- [[ (line['currency_id']==None or line['amount_currency']==None) and removeParentNode('font') ]] [[ formatLang(line['amount_currency'] ) ]] [[ line['currency_code'] or '' ]]
+ [[ (line['currency_id']==None or line['amount_currency']==None) and removeParentNode('font') ]] [[ formatLang(line['amount_currency'] ) ]] [[ line['currency_code'] or '' ]]
|
@@ -655,4 +653,4 @@
-
\ No newline at end of file
+
diff --git a/addons/account/report/account_partner_ledger_other.rml b/addons/account/report/account_partner_ledger_other.rml
index b3dec993cdb..22942e15c78 100644
--- a/addons/account/report/account_partner_ledger_other.rml
+++ b/addons/account/report/account_partner_ledger_other.rml
@@ -262,11 +262,11 @@
-
+
-
+
@@ -274,67 +274,67 @@
-
- [[ display_currency(data) == False or removeParentNode('blockTable') ]]
-
- |
- Date
- |
-
- JNRL
- |
-
- Ref
- |
-
- Account
- |
-
- Entry Label
- |
-
- Debit
- |
-
- Credit
- |
-
- Balance
- |
-
-
-
- [[ display_currency(data) == True or removeParentNode('blockTable') ]]
-
- |
- Date
- |
-
- JNRL
- |
-
- Ref
- |
-
- Account
- |
-
- Entry Label
- |
-
- Debit
- |
-
- Credit
- |
-
- Balance
- |
-
- Currency
- |
-
-
+
+ [[ display_currency(data) == False or removeParentNode('blockTable') ]]
+
+ |
+ Date
+ |
+
+ JNRL
+ |
+
+ Ref
+ |
+
+ Account
+ |
+
+ Entry Label
+ |
+
+ Debit
+ |
+
+ Credit
+ |
+
+ Balance
+ |
+
+
+
+ [[ display_currency(data) == True or removeParentNode('blockTable') ]]
+
+ |
+ Date
+ |
+
+ JNRL
+ |
+
+ Ref
+ |
+
+ Account
+ |
+
+ Entry Label
+ |
+
+ Debit
+ |
+
+ Credit
+ |
+
+ Balance
+ |
+
+ Currency
+ |
+
+
@@ -434,7 +434,7 @@
-
+
[[ display_currency(data) == False or removeParentNode('blockTable') ]]
@@ -493,53 +493,53 @@
|
- Initial Balance
+ Initial Balance
|
- [[ formatLang(get_intial_balance(p)[0][0])]]
+ [[ formatLang(get_intial_balance(p)[0][0])]]
|
- [[ formatLang(get_intial_balance(p)[0][1]) ]]
+ [[ formatLang(get_intial_balance(p)[0][1]) ]]
|
- [[ formatLang(get_intial_balance(p)[0][2]) ]] [[ company.currency_id.symbol ]]
+ [[ formatLang(get_intial_balance(p)[0][2]) ]] [[ company.currency_id.symbol ]]
|
[[ repeatIn(lines(p), 'line') ]]
-
+
|
- [[ formatLang(line['date'],date=True) ]]
+ [[ formatLang(line['date'],date=True) ]]
|
- [[ line['code'] ]]
+ [[ line['code'] ]]
|
- [[ line['move_name'] ]]
+ [[ line['move_name'] ]]
|
- [[ line['a_code'] ]]
+ [[ line['a_code'] ]]
|
- [[ strip_name(line['ref'],10) ]] - [[ strip_name(line['name'],15) ]]
+ [[ strip_name(line['ref'],10) ]] - [[ strip_name(line['name'],15) ]]
|
- [[ formatLang((line['debit'])) ]]
+ [[ formatLang((line['debit'])) ]]
|
- [[ formatLang((line['credit'])) ]]
+ [[ formatLang((line['credit'])) ]]
|
- [[ formatLang((line['progress'])) ]] [[ company.currency_id.symbol ]]
+ [[ formatLang((line['progress'])) ]] [[ company.currency_id.symbol ]]
|
-
+
[[ display_currency(data) == True or removeParentNode('blockTable') ]]
@@ -578,7 +578,7 @@
[[ display_currency(data) == True or removeParentNode('section') ]]
-
+
[[ p.ref ]] - [[ p.name ]]
@@ -601,22 +601,22 @@
[[ data['form']['initial_balance']==True or removeParentNode('section') ]]
-
+
|
- Initial Balance
+ Initial Balance
|
- [[ formatLang(get_intial_balance(p)[0][0])]]
+ [[ formatLang(get_intial_balance(p)[0][0])]]
|
- [[ formatLang(get_intial_balance(p)[0][1]) ]]
+ [[ formatLang(get_intial_balance(p)[0][1]) ]]
|
- [[ formatLang(get_intial_balance(p)[0][2]) ]] [[ company.currency_id.symbol ]]
+ [[ formatLang(get_intial_balance(p)[0][2]) ]] [[ company.currency_id.symbol ]]
|
-
+
|
@@ -625,35 +625,35 @@
[[ repeatIn(lines(p), 'line') ]]
-
+
|
- [[ formatLang(line['date'],date=True) ]]
+ [[ formatLang(line['date'],date=True) ]]
|
- [[ line['code'] ]]
+ [[ line['code'] ]]
|
- [[ line['move_name'] ]]
+ [[ line['move_name'] ]]
|
- [[ line['a_code'] ]]
+ [[ line['a_code'] ]]
|
- [[ strip_name(line['ref'],5) ]] - [[ strip_name(line['name'],5) ]]
+ [[ strip_name(line['ref'],8) ]] - [[ strip_name(line['name'],7) ]]
|
- [[ formatLang((line['debit'])) ]]
+ [[ formatLang((line['debit'])) ]]
|
- [[ formatLang((line['credit'])) ]]
+ [[ formatLang((line['credit'])) ]]
|
- [[ formatLang((line['progress'])) ]] [[ company.currency_id.symbol ]]
+ [[ formatLang((line['progress'])) ]] [[ company.currency_id.symbol ]]
|
- [[ (line['currency_id']==None or line['amount_currency']==None) and removeParentNode('font') ]] [[ formatLang(line['amount_currency'] ) ]] [[ line['currency_code'] or '' ]]
+ [[ (line['currency_id']==None or line['amount_currency']==None) and removeParentNode('font') ]] [[ formatLang(line['amount_currency'] ) ]] [[ line['currency_code'] or '' ]]
|
@@ -662,4 +662,4 @@
-
\ No newline at end of file
+
diff --git a/addons/account/report/account_print_invoice.rml b/addons/account/report/account_print_invoice.rml
index 80ccd2aabae..b4492e05b0d 100644
--- a/addons/account/report/account_print_invoice.rml
+++ b/addons/account/report/account_print_invoice.rml
@@ -27,6 +27,10 @@
+
+
+
+
@@ -41,6 +45,10 @@
+
+
+
+
@@ -178,20 +186,23 @@
-
+
|
- Document
+ Description
|
Invoice Date
|
+
+ Origin
+ |
- Partner Ref.
+ Your Reference
|
-
+
|
[[ o.name or ' ' ]]
@@ -199,6 +210,9 @@
|
[[ formatLang(o.date_invoice,date=True) ]]
|
+
+ [[ o.origin or '' ]]
+ |
[[ (o.address_invoice_id and o.address_invoice_id.partner_id and o.address_invoice_id.partner_id.ref) or ' ' ]]
|
@@ -207,31 +221,31 @@
-
+
|
- Description
+ Description
|
- Taxes
+ Taxes
|
- Quantity
+ Quantity
|
- Unit Price
+ Unit Price
|
- Disc.(%)
+ Disc.(%)
|
- Price
+ Price
|
[[ repeatIn(o.invoice_line,'l') ]]
-
+
|
[[ l.name ]]
@@ -246,7 +260,7 @@
[[ formatLang(l.price_unit) ]]
|
- [[ formatLang(l.discount, digits=get_digits(dp='Account')) ]]
+ [[ formatLang(l.discount, digits=get_digits(dp='Account')) ]]
|
[[ formatLang(l.price_subtotal, digits=get_digits(dp='Account')) ]] [[ o.currency_id.symbol ]]
@@ -284,7 +298,7 @@
|
-
+
|
@@ -393,4 +407,4 @@
-
\ No newline at end of file
+
diff --git a/addons/account/report/account_profit_loss.rml b/addons/account/report/account_profit_loss.rml
index 33e69d02e96..582885d89dc 100644
--- a/addons/account/report/account_profit_loss.rml
+++ b/addons/account/report/account_profit_loss.rml
@@ -231,7 +231,7 @@
[[ final_result()['type'] == 'Net Profit' and final_result()['type'] or removeParentNode('blockTable') ]]
|
- [[ final_result()['balance'] and final_result()['type'] == 'Net Loss' and formatLang(abs(final_result()['balance'])) ]] [[ final_result()['balance'] and final_result()['type'] == 'Net Loss' and company.currency_id.symbol ]]
+ [[ final_result()['balance'] and final_result()['type'] == 'Net Profit' and formatLang(abs(final_result()['balance'])) ]] [[ final_result()['balance'] and final_result()['type'] == 'Net Profit' and company.currency_id.symbol ]]
|
diff --git a/addons/account/test/account_report.yml b/addons/account/test/account_report.yml
index aaf45de3212..312db44cd0c 100644
--- a/addons/account/test/account_report.yml
+++ b/addons/account/test/account_report.yml
@@ -28,7 +28,6 @@
(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
-
@@ -37,311 +36,183 @@
(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)
-
-
Print the Aged Partner Balance Report
-
- !python {model: res.partner}: |
- import time
- from datetime import datetime
- from dateutil.relativedelta import relativedelta
- start = datetime.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 - relativedelta(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 - relativedelta(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)
- from tools.test_reports import try_report
- try_report(cr, uid, 'report.account.aged_trial_balance', [], data_dict, context={})
+ !python {model: account.account}: |
+ ctx={}
+ ctx.update({'model': 'account.account','active_ids':[ref('account.chart0')],'active_id':ref('account.chart0')})
+ data_dict = {'chart_account_id':ref('account.chart0')}
+ from tools import test_reports
+ test_reports.try_report_action(cr, uid, 'action_account_aged_balance_view',wiz_data=data_dict, context=ctx, our_module='account')
-
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)
-
+ ctx={}
+ ctx.update({'model': 'account.account','active_ids':[ref('account.chart0')]})
+ data_dict = {'chart_account_id':ref('account.chart0'),'display_type': True}
+ from tools import test_reports
+ test_reports.try_report_action(cr, uid, 'action_account_bs_report',wiz_data=data_dict, context=ctx, our_module='account')
-
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)
-
+ ctx={}
+ ctx.update({'model': 'account.account','active_ids':[ref('account.chart0')]})
+ data_dict = {'chart_account_id':ref('account.chart0'),'display_type': False}
+ from tools import test_reports
+ test_reports.try_report_action(cr, uid, 'action_account_bs_report',wiz_data=data_dict, context=ctx, our_module='account')
-
- Print the Account Balance Report in Normal mode - From Account Chart
+ Print the Account Balance Report in Normal mode through the wizard - 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)
-
- 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)
-
+ ctx={}
+ ctx.update({'model': 'account.account','active_ids':[ref('account.chart0')]})
+ data_dict = {'chart_account_id':ref('account.chart0')}
+ from tools import test_reports
+ test_reports.try_report_action(cr, uid, 'action_account_balance_menu',wiz_data=data_dict, context=ctx, our_module='account')
-
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)
-
- 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)
+ 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={}
+ ctx.update({'model': 'account.journal.period','active_ids':journal_ids})
+ data_dict = {'chart_account_id':ref('account.chart0')}
+ from tools import test_reports
+ test_reports.try_report_action(cr, uid, 'action_account_central_journal',wiz_data=data_dict, context=ctx, our_module='account')
-
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)
-
+ 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={}
+ ctx.update({'model': 'account.journal.period','active_ids':journal_ids})
+ data_dict = {'chart_account_id':ref('account.chart0')}
+ from tools import test_reports
+ test_reports.try_report_action(cr, uid, 'action_account_general_journal',wiz_data=data_dict, context=ctx, our_module='account')
-
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)
-
- 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)
+ ctx={}
+ ctx.update({'model': 'account.account','active_ids':[ref('account.chart0')]})
+ data_dict = {'chart_account_id':ref('account.chart0'),'landscape':False}
+ from tools import test_reports
+ test_reports.try_report_action(cr, uid, 'action_account_general_ledger_menu',wiz_data=data_dict, context=ctx, our_module='account')
-
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)
-
- 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)
-
+ ctx={}
+ ctx.update({'model': 'account.account','active_ids':[ref('account.chart0')]})
+ data_dict = {'chart_account_id':ref('account.chart0'),'landscape':True}
+ from tools import test_reports
+ test_reports.try_report_action(cr, uid, 'action_account_general_ledger_menu',wiz_data=data_dict, context=ctx, our_module='account')
-
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)
-
- 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)
-
+ ctx={}
+ ctx.update({'model': 'account.journal.period','active_ids':journal_ids})
+ data_dict = {'chart_account_id':ref('account.chart0')}
+ from tools import test_reports
+ test_reports.try_report_action(cr, uid, 'action_account_print_journal',wiz_data=data_dict, context=ctx, our_module='account')
-
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')]
- 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', 'form': {'result_selection': 'customer','chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','display_type': 0,'journal_ids':journal_ids,'active_ids':journal_period_ids,'display_partner': 'all','fiscalyear': fy_id ,'target_move': 'all','query_line':query_line}}
- (data, format) = netsvc.LocalService('report.account.partner.balance').create(cr, uid, journal_period_ids, data_dict, {})
- if tools.config['test_report_directory']:
- file(os.path.join(tools.config['test_report_directory'], 'account-partner_balance.'+format), 'wb+').write(data)
-
+ !python {model: account.account}: |
+ ctx={}
+ data_dict = {'chart_account_id':ref('account.chart0')}
+ ctx.update({'model': 'account.account','active_ids':[ref('account.chart0')],'active_id':ref('account.chart0')})
+ from tools import test_reports
+ test_reports.try_report_action(cr, uid, 'action_account_partner_balance',wiz_data=data_dict, context=ctx, our_module='account')
-
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)
-
+ !python {model: account.account}: |
+ ctx={}
+ data_dict = {'chart_account_id':ref('account.chart0'),'page_split': True}
+ ctx.update({'model': 'account.account','active_ids':[ref('account.chart0')],'active_id':ref('account.chart0')})
+ from tools import test_reports
+ test_reports.try_report_action(cr, uid, 'action_account_partner_ledger',wiz_data=data_dict, context=ctx, our_module='account')
-
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)
-
+ ctx={}
+ data_dict = {'chart_account_id':ref('account.chart0'),'page_split': False}
+ ctx.update({'model': 'account.account','active_ids':[ref('account.chart0')],'active_id':ref('account.chart0')})
+ from tools import test_reports
+ test_reports.try_report_action(cr, uid, 'action_account_partner_ledger',wiz_data=data_dict, context=ctx, our_module='account')
-
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)
-
+ ctx={}
+ ctx.update({'model': 'account.account','active_ids':[ref('account.chart0')]})
+ data_dict = {'chart_account_id':ref('account.chart0'),'display_type': False}
+ from tools import test_reports
+ test_reports.try_report_action(cr, uid, 'action_account_pl_report',wiz_data=data_dict, context=ctx, our_module='account')
-
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)
+ ctx={}
+ ctx.update({'model': 'account.account','active_ids':[ref('account.chart0')]})
+ data_dict = {'chart_account_id':ref('account.chart0'),'display_type': True}
+ from tools import test_reports
+ test_reports.try_report_action(cr, uid, 'action_account_pl_report',wiz_data=data_dict, context=ctx, our_module='account')
+-
+ Print the Analytic Balance Report through the wizard
+-
+ !python {model: account.analytic.account}: |
+ ctx={}
+ ctx.update({'model': 'account.analytic.account','active_ids': [ref('account.analytic_root')]})
+ data_dict = {}
+ 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}: |
+ 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 = {}
+ 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}: |
+ 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 = {}
+ 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}: |
+ ctx={}
+ ctx.update({'model': 'account.analytic.journal','active_ids': [ref('account.cose_journal_sale'), ref('account.exp'), ref('account.sit')]})
+ data_dict = {}
+ 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}: |
+ ctx={}
+ ctx.update({'model': 'account.analytic.account','active_ids': [ref('account.analytic_root')]})
+ data_dict = {}
+ 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')
diff --git a/addons/account/wizard/account_report_aged_partner_balance.py b/addons/account/wizard/account_report_aged_partner_balance.py
index f76beb6bee1..5cb5d52c413 100644
--- a/addons/account/wizard/account_report_aged_partner_balance.py
+++ b/addons/account/wizard/account_report_aged_partner_balance.py
@@ -79,7 +79,8 @@ class account_aged_trial_balance(osv.osv_memory):
}
start = stop + relativedelta(days=1)
data['form'].update(res)
-
+ if data.get('form',False):
+ data['ids']=[data['form'].get('chart_account_id',False)]
return {
'type': 'ir.actions.report.xml',
'report_name': 'account.aged_trial_balance',
diff --git a/addons/account_analytic_plans/report/crossovered_analytic.rml b/addons/account_analytic_plans/report/crossovered_analytic.rml
index 0292522206d..6e331ed1b83 100644
--- a/addons/account_analytic_plans/report/crossovered_analytic.rml
+++ b/addons/account_analytic_plans/report/crossovered_analytic.rml
@@ -150,7 +150,7 @@
Amount
- Percentage
+ Perc(%)
|
@@ -222,7 +222,7 @@
Amount
- Percentage
+ Perc(%)
|
@@ -301,4 +301,4 @@
-
\ No newline at end of file
+
diff --git a/addons/account_budget/test/account_budget_report.yml b/addons/account_budget/test/account_budget_report.yml
index d0766e31196..40b0175f045 100644
--- a/addons/account_budget/test/account_budget_report.yml
+++ b/addons/account_budget/test/account_budget_report.yml
@@ -1,27 +1,33 @@
-
- Print the Analytic Budget Report in Normal mode
+ Print the Analytic Budget Report through wizard
-
!python {model: account.analytic.account}: |
import netsvc, tools, os, time
- data_dict = {'model': 'account.analytic.account', 'form': {'date_from':time.strftime("%Y-01-01"),'date_to':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)
+ ctx={}
+ ctx.update({'model': 'account.analytic.account','active_ids': [ref('account.analytic_root')]})
+ data_dict = {}
+ from tools import test_reports
+ test_reports.try_report_action(cr, uid, 'action_account_budget_analytic',wiz_data=data_dict, context=ctx, our_module='account_budget')
+
-
- Print the Budget Report in Normal mode
+ Print the Budget Report through wizard
-
!python {model: account.budget.post}: |
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'),'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)
+ ctx={}
+ ctx.update({'model': 'account.budget.post','active_ids': [ref('account_budget.account_budget_post_sales0')]})
+ data_dict = {}
+ from tools import test_reports
+ test_reports.try_report_action(cr, uid, 'action_account_budget_report',wiz_data=data_dict, context=ctx, our_module='account_budget')
+
-
- Print the CrossOvered Budget Report in Normal mode
+ Print the CrossOvered Budget Report mode through wizard
-
!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)
+ ctx={}
+ ctx.update({'model': 'account.budget.post','active_ids': [ref('account_budget.crossovered_budget_budgetoptimistic0')]})
+ data_dict = {}
+ from tools import test_reports
+ test_reports.try_report_action(cr, uid, 'action_account_budget_crossvered_report',wiz_data=data_dict, context=ctx, our_module='account_budget')
+
diff --git a/addons/account_invoice_layout/report/report_account_invoice_layout.rml b/addons/account_invoice_layout/report/report_account_invoice_layout.rml
index 7841a3a0d47..dd802503430 100644
--- a/addons/account_invoice_layout/report/report_account_invoice_layout.rml
+++ b/addons/account_invoice_layout/report/report_account_invoice_layout.rml
@@ -27,6 +27,10 @@
+
+
+
+
@@ -41,6 +45,10 @@
+
+
+
+
@@ -237,20 +245,23 @@
-
+
|
- Document
+ Description
|
Invoice Date
|
+
+ Origin
+ |
- Partner Ref.
+ Your Reference
|
-
+
|
[[ o.name ]]
@@ -258,6 +269,9 @@
|
[[ formatLang(o.date_invoice,date=True) ]]
|
+
+ [[ o.name or '' ]]
+ |
[[ (o.address_invoice_id and o.address_invoice_id.partner_id and o.address_invoice_id.partner_id.ref) or ' ' ]]
|
@@ -493,4 +507,4 @@
-
\ No newline at end of file
+
diff --git a/addons/account_invoice_layout/report/special_message_invoice.rml b/addons/account_invoice_layout/report/special_message_invoice.rml
index ab7f02f0b6d..b9cdafee0bf 100644
--- a/addons/account_invoice_layout/report/special_message_invoice.rml
+++ b/addons/account_invoice_layout/report/special_message_invoice.rml
@@ -27,6 +27,10 @@
+
+
+
+
@@ -41,6 +45,10 @@
+
+
+
+
@@ -241,20 +249,23 @@
-
+
|
- Document
+ Description
|
Invoice Date
|
+
+ Origin
+ |
- Partner Ref.
+ Your Reference
|
-
+
|
[[ o.name ]]
@@ -262,6 +273,9 @@
|
[[ formatLang(o.date_invoice,date=True) ]]
|
+
+ [[ o.name or '' ]]
+ |
[[ (o.address_invoice_id and o.address_invoice_id.partner_id and o.address_invoice_id.partner_id.ref) or ' ' ]]
|
@@ -382,7 +396,7 @@
-
+
|
@@ -390,14 +404,14 @@
|
- Net Total:
+ Net Total :
|
[[ formatLang(o.amount_untaxed, digits=get_digits(dp='Account')) ]] [[ o.currency_id.symbol ]]
|
-
+
|
@@ -405,14 +419,14 @@
|
- Taxes:
+ Taxes :
|
[[ formatLang(o.amount_tax, digits=get_digits(dp='Account')) ]] [[ o.currency_id.symbol ]]
|
-
+
|
@@ -420,7 +434,7 @@
|
- Total:
+ Total :
|
[[ formatLang(o.amount_total, digits=get_digits(dp='Account')) ]] [[ o.currency_id.symbol ]]
@@ -511,4 +525,4 @@
-
\ No newline at end of file
+
diff --git a/addons/account_invoice_layout/test/account_invoice_layout_report.yml b/addons/account_invoice_layout/test/account_invoice_layout_report.yml
index cdaccf0630c..91967358a3d 100644
--- a/addons/account_invoice_layout/test/account_invoice_layout_report.yml
+++ b/addons/account_invoice_layout/test/account_invoice_layout_report.yml
@@ -19,12 +19,14 @@
(data, format) = netsvc.LocalService('report.account.invoice.layout').create(cr, uid, [ref('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
+ Print the Invoice Layout Report with Message through wizard
-
!python {model: account.invoice}: |
- import netsvc, tools, os, time
- data_dict = {'model': 'account.invoice', 'form': {'message':ref('account_invoice_layout.demo_message1'),'id':ref('test_invoice_1'),'context':{}}}
- (data, format) = netsvc.LocalService('report.notify_account.invoice').create(cr, uid, [ref('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)
\ No newline at end of file
+ ctx={}
+ ctx.update({'model': 'account.invoice','active_ids': [ref('test_invoice_1')]})
+ data_dict = {'message':ref('account_invoice_layout.demo_message1')}
+ from tools import test_reports
+ test_reports.try_report_action(cr, uid, 'action_account_invoice_special_msg',wiz_data=data_dict, context=ctx, our_module='account_invoice_layout')
+
diff --git a/addons/account_payment/report/order.rml b/addons/account_payment/report/order.rml
index e47691f54d7..9198b12db25 100644
--- a/addons/account_payment/report/order.rml
+++ b/addons/account_payment/report/order.rml
@@ -210,7 +210,7 @@
[[ o.date_prefered == 'fixed' and 'Fixed date' or removeParentNode('para') ]]
|
- [[ get_company_currency() ]]
+ [[ o.user_id and o.user_id.company_id and o.user_id.company_id.currency_id and o.user_id.company_id.currency_id.name or '' ]]
|
@@ -287,4 +287,4 @@
-
\ No newline at end of file
+
diff --git a/addons/delivery/report/shipping.rml b/addons/delivery/report/shipping.rml
index 42fcd71a693..563c3bda826 100644
--- a/addons/delivery/report/shipping.rml
+++ b/addons/delivery/report/shipping.rml
@@ -125,7 +125,7 @@
- [[ (not(o.sale_id) and o.type== 'out') and 'Error, no sale order attached to this picking !' or removeParentNode('para') ]]
+
@@ -226,4 +226,4 @@
-
\ No newline at end of file
+
diff --git a/addons/hr_attendance/report/bymonth.xsl b/addons/hr_attendance/report/bymonth.xsl
index 3975e4d1d11..23e7fb14b3d 100644
--- a/addons/hr_attendance/report/bymonth.xsl
+++ b/addons/hr_attendance/report/bymonth.xsl
@@ -29,7 +29,7 @@
- Attendance By Month
+ Attendances By Month
week
diff --git a/addons/hr_attendance/test/hr_attendance_report.yml b/addons/hr_attendance/test/hr_attendance_report.yml
index d26f6ddb9bc..523b64ee70d 100644
--- a/addons/hr_attendance/test/hr_attendance_report.yml
+++ b/addons/hr_attendance/test/hr_attendance_report.yml
@@ -1,19 +1,20 @@
-
- In order to test the PDF reports defined on HR Attendance, we will print a report of HR Attendance By Month
+ Print the HR Attendance Report By Month through the wizard
-
!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)
-
+ import time
+ ctx={}
+ ctx.update({'model': 'hr.employee','active_ids': [ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3')]})
+ data_dict = {}
+ from tools import test_reports
+ test_reports.try_report_action(cr, uid, 'action_hr_attendance_month',wiz_data=data_dict, context=ctx, our_module='hr_attendance')
+-
+ Print HR Attendance Error Report through the wizard
-
- 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)
+ import time
+ ctx={}
+ ctx.update({'model': 'hr.employee','active_ids': [ref('hr.employee1')]})
+ data_dict = {'init_date': time.strftime('%Y-01-01')}
+ from tools import test_reports
+ test_reports.try_report_action(cr, uid, 'action_hr_attendance_error',wiz_data=data_dict, context=ctx, our_module='hr_attendance')
diff --git a/addons/hr_expense/report/expense.rml b/addons/hr_expense/report/expense.rml
index b12971564b1..eeb9854c059 100644
--- a/addons/hr_expense/report/expense.rml
+++ b/addons/hr_expense/report/expense.rml
@@ -68,10 +68,8 @@
-
-
-
-
+
+
@@ -113,7 +111,7 @@
-
+
|
Date
@@ -122,7 +120,7 @@
Name
|
- Ref.
+ Ref.
|
Unit Price
@@ -131,7 +129,7 @@
Qty
|
- Total Price
+ Price
|
@@ -176,7 +174,7 @@
-
+
|
Date
@@ -185,7 +183,7 @@
Name
|
- Ref.
+ Ref.
|
Unit Price
@@ -194,7 +192,7 @@
Qty
|
- Total Price
+ Price
|
@@ -203,7 +201,7 @@
[[ repeatIn(o.line_ids,'line') ]]
-
+
|
[[ formatLang(line.date_value,date=True) ]]
@@ -256,7 +254,7 @@
|
-
+
|
@@ -264,17 +262,7 @@
|
-
-
-
- |
-
-
-
-
- |
-
- Total:
+ Total:
|
[[ formatLang(o.amount) ]] [[ o.currency_id.symbol ]]
diff --git a/addons/hr_holidays/report/holidays_summary.xsl b/addons/hr_holidays/report/holidays_summary.xsl
index c0a24e551ff..a65425dd0b3 100644
--- a/addons/hr_holidays/report/holidays_summary.xsl
+++ b/addons/hr_holidays/report/holidays_summary.xsl
@@ -244,7 +244,6 @@
|
digits
-
|
diff --git a/addons/hr_holidays/test/hr_holidays_report.yml b/addons/hr_holidays/test/hr_holidays_report.yml
index 9faf7358b53..bc0b4efa51f 100644
--- a/addons/hr_holidays/test/hr_holidays_report.yml
+++ b/addons/hr_holidays/test/hr_holidays_report.yml
@@ -1,14 +1,22 @@
-
- In order to test the PDF reports defined on a HR Holidays, we will print HR Holidays
+ Print the HR Holidays(Summary Department) Report through the wizard
-
!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)
\ No newline at end of file
+ import time
+ ctx={}
+ ctx.update({'model': 'hr.department','active_ids': [ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3')]})
+ data_dict = {'date_from': time.strftime('%Y-%m-01'), 'depts' : [(6,0,[ref('hr.dep_sales')])],'holiday_type' : 'Validated'}
+ from tools import test_reports
+ test_reports.try_report_action(cr, uid, 'action_hr_holidays_summary_dept',wiz_data=data_dict, context=ctx, our_module='hr_holidays')
+
+-
+ Print the HR Holidays(Summary Employee) Report through the wizard
+-
+ !python {model: hr.holidays}: |
+ import time
+ ctx={}
+ ctx.update({'model': 'hr.employee','active_ids': [ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3')]})
+ data_dict = {'date_from': time.strftime('%Y-%m-01'), 'emp' : [(6,0,[ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3')])],'holiday_type' : 'Validated'}
+ from tools import test_reports
+ test_reports.try_report_action(cr, uid, 'action_hr_holidays_summary_employee',wiz_data=data_dict, context=ctx, our_module='hr_holidays')
+
diff --git a/addons/hr_payroll/__openerp__.py b/addons/hr_payroll/__openerp__.py
index b305e6bf92b..ec228407e4b 100644
--- a/addons/hr_payroll/__openerp__.py
+++ b/addons/hr_payroll/__openerp__.py
@@ -58,7 +58,7 @@
'test/payslip.yml',
'test/payment_advice.yml',
'test/payroll_register.yml',
-# 'test/hr_payroll_report.yml',
+ # 'test/hr_payroll_report.yml',
],
'demo_xml': [
'hr_payroll_demo.xml'
diff --git a/addons/hr_payroll/test/hr_payroll_report.yml b/addons/hr_payroll/test/hr_payroll_report.yml
index 35020d30ceb..90866d84cfa 100644
--- a/addons/hr_payroll/test/hr_payroll_report.yml
+++ b/addons/hr_payroll/test/hr_payroll_report.yml
@@ -1,6 +1,6 @@
-
In order to test the PDF reports defined on HR Payroll, we will print Employees' Salary Structure
--
+-
!python {model: hr.employee}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.salary.structure').create(cr, uid, [ref('hr_payroll.hr_employee_bonamy0')], {}, {})
@@ -9,7 +9,7 @@
-
Print 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')], {}, {})
@@ -17,23 +17,25 @@
file(os.path.join(tools.config['test_report_directory'], 'hr_payroll-payslip_report.'+format), 'wb+').write(data)
-
- Print HR Employee Salary Details
+ Print Employee Salary Statement through wizard
-
!python {model: hr.payslip}: |
- import netsvc, tools, os, time
- emp_ids = [ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3'),ref('hr_payroll.hr_employee_bonamy0')]
- data_dict = {'model': 'ir.ui.menu', 'form': {'fiscalyear_id': ref('account.data_fiscalyear'), 'employee_ids': emp_ids, 'ids':emp_ids }}
- (data, format) = netsvc.LocalService('report.employees.salary').create(cr, uid, [], data_dict, {'active_ids': emp_ids})
- if tools.config['test_report_directory']:
- file(os.path.join(tools.config['test_report_directory'], 'hr_payroll-employee_salary_detail_report.'+format), 'wb+').write(data)
--
- Print HR Employee Salary Details Annual basis
--
- !python {model: hr.payslip}: |
- import netsvc, tools, os, time
- emp_ids = [ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3'),ref('hr_payroll.hr_employee_bonamy0')]
- data_dict = {'model': 'hr.payslip', 'form': {'fiscalyear_id': ref('account.data_fiscalyear'), 'salary_on': 'current_month', 'employee_ids': emp_ids, 'ids':emp_ids}}
- (data, format) = netsvc.LocalService('report.year.salary').create(cr, uid, [], data_dict,{'active_ids': emp_ids} )
- if tools.config['test_report_directory']:
- file(os.path.join(tools.config['test_report_directory'], 'hr_payroll-employee_yearly_salary_detail_report.'+format), 'wb+').write(data)
+ import time
+ ctx={}
+ ctx.update({'model': 'hr.employee','active_ids': [ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3'),ref('hr_payroll.hr_employee_bonamy0')]})
+ data_dict = {'employee_ids': [(6,0,[ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3'),ref('hr_payroll.hr_employee_bonamy0')])], 'date_from': time.strftime('%Y-01-01'), 'date_to': time.strftime('%Y-%m-%d')}
+ from tools import test_reports
+ test_reports.try_report_action(cr, uid, 'action_hr_payroll_employees_detail',wiz_data=data_dict, context=ctx, our_module='hr_payroll')
+
+-
+ Print Salary Register through wizard
+-
+ !python {model: hr.payslip}: |
+ import time
+ ctx={}
+ ctx.update({'model': 'hr.payslip','active_ids': [ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3'),ref('hr_payroll.hr_employee_bonamy0')]})
+ data_dict = {'employee_ids': [(6,0,[ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3'),ref('hr_payroll.hr_employee_bonamy0')])], 'date_from': time.strftime('%Y-01-01'), 'date_to': time.strftime('%Y-%m-%d')}
+ from tools import test_reports
+ test_reports.try_report_action(cr, uid, 'action_hr_payroll_year_salary',wiz_data=data_dict, context=ctx, our_module='hr_payroll')
+
diff --git a/addons/hr_payroll/wizard/hr_payroll_employees_detail.py b/addons/hr_payroll/wizard/hr_payroll_employees_detail.py
index 2bb36b6f282..2cb14a53f82 100644
--- a/addons/hr_payroll/wizard/hr_payroll_employees_detail.py
+++ b/addons/hr_payroll/wizard/hr_payroll_employees_detail.py
@@ -59,10 +59,10 @@ class hr_payroll_employees_detail(osv.osv_memory):
if context is None:
context = {}
datas = {'ids': context.get('active_ids', [])}
-
res = self.read(cr, uid, ids, ['employee_ids', 'date_from', 'date_to'], context=context)
res = res and res[0] or {}
datas['form'] = res
+ datas['ids'] = res.get('employee_ids',[])
return {
'type': 'ir.actions.report.xml',
'report_name': 'employees.salary',
@@ -71,4 +71,4 @@ class hr_payroll_employees_detail(osv.osv_memory):
hr_payroll_employees_detail()
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/hr_payroll/wizard/hr_payroll_year_salary.py b/addons/hr_payroll/wizard/hr_payroll_year_salary.py
index 41caf5f4109..cb7d73b6394 100644
--- a/addons/hr_payroll/wizard/hr_payroll_year_salary.py
+++ b/addons/hr_payroll/wizard/hr_payroll_year_salary.py
@@ -64,6 +64,7 @@ class hr_payroll_year_salary(osv.osv_memory):
res = self.read(cr, uid, ids, ['employee_ids', 'date_from', 'date_to', 'salary_on'], context=context)
res = res and res[0] or {}
datas['form'] = res
+ datas['ids'] = res.get('employee_ids',[])
return {
'type': 'ir.actions.report.xml',
'report_name': 'year.salary',
@@ -72,4 +73,4 @@ class hr_payroll_year_salary(osv.osv_memory):
hr_payroll_year_salary()
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/hr_timesheet/report/user_timesheet.xsl b/addons/hr_timesheet/report/user_timesheet.xsl
index b4a5a8c8d25..b58e8af33b2 100644
--- a/addons/hr_timesheet/report/user_timesheet.xsl
+++ b/addons/hr_timesheet/report/user_timesheet.xsl
@@ -48,7 +48,7 @@
- Timesheet
+ Timesheet by Employee
diff --git a/addons/hr_timesheet/test/hr_timesheet_report.yml b/addons/hr_timesheet/test/hr_timesheet_report.yml
index b1cd445a35d..5005c5d724d 100644
--- a/addons/hr_timesheet/test/hr_timesheet_report.yml
+++ b/addons/hr_timesheet/test/hr_timesheet_report.yml
@@ -1,23 +1,21 @@
-
- In order to test the PDF reports defined on Employee, we will print Timesheet of a User
+ Print the HR Timesheet By Employee report through the wizard
-
!python {model: hr.employee}: |
import netsvc, tools, os, time
- month = time.gmtime()[1]
- year = time.gmtime()[0]
- data_dict = {'model': 'ir.ui.menu', 'form': {'month': month, 'year' : year, 'employee_id' : ref('hr.employee1') }}
- (data, format) = netsvc.LocalService('report.hr.analytical.timesheet').create(cr, uid, [], data_dict, {})
- if tools.config['test_report_directory']:
- file(os.path.join(tools.config['test_report_directory'], 'hr_timesheet-user_report.'+format), 'wb+').write(data)
+ ctx={}
+ ctx.update({'model': 'hr.employee','active_ids': []})
+ data_dict = {'month': time.gmtime()[1], 'year': time.gmtime()[0], 'employee_id' : ref('hr.employee1')}
+ from tools import test_reports
+ test_reports.try_report_action(cr, uid, 'action_hr_timesheet_my',wiz_data=data_dict, context=ctx, our_module='hr_timesheet')
-
- In order to test the PDF reports defined on Employee, we will print Timesheet of Users
+ Print the HR Timesheet By Employee report through the wizard
-
!python {model: hr.employee}: |
import netsvc, tools, os, time
- month = time.gmtime()[1]
- year = time.gmtime()[0]
- data_dict = {'model': 'ir.ui.menu', 'form': {'month': month, 'year' : year, 'employee_ids' : [ref('hr.employee1')] }}
- (data, format) = netsvc.LocalService('report.hr.analytical.timesheet_users').create(cr, uid, [], data_dict, {})
- if tools.config['test_report_directory']:
- file(os.path.join(tools.config['test_report_directory'], 'hr_timesheet-users_report.'+format), 'wb+').write(data)
+ ctx={}
+ ctx.update({'model': 'hr.employee','active_ids': []})
+ data_dict = {'month': time.gmtime()[1], 'year': time.gmtime()[0], 'employee_ids' : [(6,0,[ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3')])]}
+ from tools import test_reports
+ test_reports.try_report_action(cr, uid, 'action_hr_timesheet_users',wiz_data=data_dict, context=ctx, our_module='hr_timesheet')
\ No newline at end of file
diff --git a/addons/hr_timesheet_invoice/test/hr_timesheet_invoice_report.yml b/addons/hr_timesheet_invoice/test/hr_timesheet_invoice_report.yml
index 32f22e7eb4b..886bb89b5b7 100644
--- a/addons/hr_timesheet_invoice/test/hr_timesheet_invoice_report.yml
+++ b/addons/hr_timesheet_invoice/test/hr_timesheet_invoice_report.yml
@@ -7,14 +7,14 @@
(data, format) = netsvc.LocalService('report.account.analytic.profit').create(cr, uid, [], data_dict, {})
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 HR Cost Ledger, we will print report of HR Cost Ledger
+ Print the HR Cost Ledger report through the wizard
-
!python {model: account.analytic.account}: |
import netsvc, tools, os, time
+ ctx={}
acc_ids = [ref('account.analytic_absences'),ref('account.analytic_internal'),ref('account.analytic_sednacom'),ref('account.analytic_thymbra'),ref('account.analytic_partners_camp_to_camp')]
- data_dict = {'model': 'ir.ui.menu', 'form': {'date1': time.strftime('%Y-01-01'), 'date2': time.strftime('%Y-%m-%d')}}
- (data, format) = netsvc.LocalService('report.hr.timesheet.invoice.account.analytic.account.cost_ledger').create(cr, uid, acc_ids, data_dict, {'active_ids': acc_ids})
- 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)
+ ctx.update({'model': 'ir.ui.menu','active_ids': acc_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_hr_timesheet_invoice_cost_ledger',wiz_data=data_dict, context=ctx, our_module='hr_timesheet_invoice')
diff --git a/addons/lunch/report/order.rml b/addons/lunch/report/order.rml
index 05a1b69c446..5bd5beafc15 100644
--- a/addons/lunch/report/order.rml
+++ b/addons/lunch/report/order.rml
@@ -164,7 +164,7 @@
-
+
@@ -184,4 +184,4 @@
-
\ No newline at end of file
+
diff --git a/addons/mrp/report/price.py b/addons/mrp/report/price.py
index 53063bd7ad6..76bcc4b92da 100644
--- a/addons/mrp/report/price.py
+++ b/addons/mrp/report/price.py
@@ -129,7 +129,7 @@ class report_custom(report_rml):
%s
%s
- """ % (_('Component'), _('Component suppliers'), _('Quantity'),_('Cost Price per Uom'), _('Supplier Price per Uom'))
+ """ % (_('Components'), _('Components suppliers'), _('Quantity'),_('Cost Price per Uom'), _('Supplier Price per Uom'))
purchase_price_digits = rml_obj.get_digits(dp='Purchase Price')
@@ -176,7 +176,7 @@ class report_custom(report_rml):
xml += "" + xml_tmp + ''
xml += """
- """ + _('Component Cost of ') + str(number) +' '+ product.uom_id.name + """:
+ """ + _('Components Cost of ') + str(number) +' '+ product.uom_id.name + """:
"""+ rml_obj.formatLang(total_strd, digits=purchase_price_digits) +' '+ company_currency.symbol + """
diff --git a/addons/mrp/test/mrp_report.yml b/addons/mrp/test/mrp_report.yml
index db9a83d495b..48126b5edcd 100644
--- a/addons/mrp/test/mrp_report.yml
+++ b/addons/mrp/test/mrp_report.yml
@@ -17,19 +17,22 @@
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)
+ 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 Work Center 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')
+
diff --git a/addons/point_of_sale/report/pos_lines.rml b/addons/point_of_sale/report/pos_lines.rml
index b0a2e606897..22ff18e0231 100644
--- a/addons/point_of_sale/report/pos_lines.rml
+++ b/addons/point_of_sale/report/pos_lines.rml
@@ -199,7 +199,7 @@
|
- Net Total
+ Net Total :
|
[[ formatLang(o.amount_total) ]] [[o.pricelist_id.currency_id.symbol ]]
@@ -212,7 +212,7 @@
|
- Taxes
+ Taxes :
|
[[ formatLang(o.amount_tax) ]] [[o.pricelist_id.currency_id. symbol ]]
@@ -236,4 +236,4 @@
-
\ No newline at end of file
+
diff --git a/addons/point_of_sale/test/point_of_sale_report.yml b/addons/point_of_sale/test/point_of_sale_report.yml
index d058c8fd691..1a77e8f30d4 100644
--- a/addons/point_of_sale/test/point_of_sale_report.yml
+++ b/addons/point_of_sale/test/point_of_sale_report.yml
@@ -51,22 +51,29 @@
(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)
+
-
- In order to test the PDF reports defined on a Point Of Sale, we will print a POS Payment Report
+ Print the POS Payment Report through the wizard
-
!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)
+ import time
+ ctx={}
+ ctx.update({'model': 'ir.ui.menu','active_ids': []})
+ data_dict = {'date_start': time.strftime('%Y-%m-%d'), 'date_end': time.strftime('%Y-%m-%d'), 'user_id': [(6,0,[ref('base.user_root')])] }
+ from tools import test_reports
+ test_reports.try_report_action(cr, uid, 'action_report_pos_payment_repport_date',wiz_data=data_dict, context=ctx, our_module='point_of_sale')
+
-
- In order to test the PDF reports defined on a Point Of Sale, we will print a POS Details Report
+ Print the POS Details Report through the wizard
-
!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)
+ import time
+ ctx={}
+ ctx.update({'model': 'ir.ui.menu','active_ids': []})
+ data_dict = {'date_start': time.strftime('%Y-%m-%d'), 'date_end': time.strftime('%Y-%m-%d')}
+ from tools import test_reports
+ test_reports.try_report_action(cr, uid, 'action_report_pos_details',wiz_data=data_dict, context=ctx, our_module='point_of_sale')
+
-
I create a cash journal.
-
diff --git a/addons/point_of_sale/wizard/pos_details.py b/addons/point_of_sale/wizard/pos_details.py
index 8a63ae97dbd..c6793b7b437 100644
--- a/addons/point_of_sale/wizard/pos_details.py
+++ b/addons/point_of_sale/wizard/pos_details.py
@@ -51,6 +51,8 @@ class pos_details(osv.osv_memory):
res = self.read(cr, uid, ids, ['date_start', 'date_end'], context=context)
res = res and res[0] or {}
datas['form'] = res
+ if res.get('id',False):
+ datas['ids']=[res['id']]
return {
'type': 'ir.actions.report.xml',
'report_name': 'pos.details',
diff --git a/addons/point_of_sale/wizard/pos_payment_report_date.py b/addons/point_of_sale/wizard/pos_payment_report_date.py
index 49e21c01c05..e498eef6697 100644
--- a/addons/point_of_sale/wizard/pos_payment_report_date.py
+++ b/addons/point_of_sale/wizard/pos_payment_report_date.py
@@ -44,7 +44,8 @@ class pos_payment_report_date(osv.osv_memory):
res = self.read(cr, uid, ids, ['date_start', 'date_end', 'user_id'], context=context)
res = res and res[0] or {}
datas['form'] = res
-
+ if res.get('id',False):
+ datas['ids']=[res['id']]
return {
'type': 'ir.actions.report.xml',
'report_name': 'pos.payment.report.date',
diff --git a/addons/point_of_sale/wizard/pos_sales_user_today.py b/addons/point_of_sale/wizard/pos_sales_user_today.py
index 33c9dc8f3fc..d9dbc82d294 100644
--- a/addons/point_of_sale/wizard/pos_sales_user_today.py
+++ b/addons/point_of_sale/wizard/pos_sales_user_today.py
@@ -47,7 +47,6 @@ class pos_sales_user_today(osv.osv_memory):
res = self.read(cr, uid, ids, ['user_id'], context=context)
res = res and res[0] or {}
datas['form'] = res
-
return {
'type': 'ir.actions.report.xml',
'report_name': 'pos.sales.user.today',
diff --git a/addons/product/test/product_report.yml b/addons/product/test/product_report.yml
index de86f392e5b..397c2c9d0b6 100644
--- a/addons/product/test/product_report.yml
+++ b/addons/product/test/product_report.yml
@@ -1,17 +1,16 @@
-
- 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,
+ 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')
+
+
diff --git a/addons/project_planning/report/report_planning.rml b/addons/project_planning/report/report_planning.rml
index 43dab8eb5b4..7d46de5e025 100644
--- a/addons/project_planning/report/report_planning.rml
+++ b/addons/project_planning/report/report_planning.rml
@@ -1,8 +1,8 @@
-
-
+
+
-
+
@@ -15,7 +15,6 @@
-
@@ -24,17 +23,21 @@
-
-
-
-
-
+
+
+
+
+
+
+
+
+
@@ -42,33 +45,24 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -77,139 +71,149 @@
+
+
+
+
+
+
+
+
+
+
+
- [[ repeatIn(objects, 'o') ]]
-
+ [[ repeatIn(objects, 'o') ]]
+
-
+ HR Planning
+ [[ o.name]]
+
- HR Planning
-
+
-
+
|
- Responsible: [[ o.user_id.name ]]
+ Responsible : [[ o.user_id.name ]]
|
- [[ o.name]]
- |
-
- From: [[ formatLang(o.date_from,date=True) ]]
- To: [[ formatLang(o.date_to,date=True) ]]
+ From : [[ formatLang(o.date_from,date=True) ]] To : [[ formatLang(o.date_to,date=True) ]]
|
-
-
-
-
-
-
-
+
|
- Summary by user
-
+
+
+
+ Summary by user
+
|
-
+
|
- User
+ User
|
- Total Planned Tasks
+ Total planned tasks
|
- Remaining tasks
+ Remaining tasks
|
- Time without
- tasks
+ Time without tasks
|
- Timesheet
- |
-
-
- |
- [[ repeatIn(o.planning_user_ids , 'u') ]] [[ u.user_id.name ]]
- |
-
- [[ formatLang(u.plan_tasks) ]]
- |
-
- [[ formatLang(u.tasks) ]]
- |
-
- [[ formatLang(u.free) ]]
- |
-
- [[ formatLang(u.timesheet) ]]
+ Timesheet
|
-
-
-
-
+
+ [[ repeatIn(o.planning_user_ids , 'u') ]]
+
+
+ |
+ [[ u.user_id.name ]]
+ |
+
+ [[ formatLang(u.plan_tasks) ]]
+ |
+
+ [[ formatLang(u.tasks) ]]
+ |
+
+ [[ formatLang(u.free) ]]
+ |
+
+ [[ formatLang(u.timesheet) ]]
+ |
+
+
+
+
|
- Summary by project
-
+
+
+
+ Summary by project
+
|
-
+
|
- Project
+ Project
|
- Total Planned Tasks
+ Total planned tasks
|
- Remaining tasks
+ Remaining tasks
|
- Time without
- tasks
+ Time without tasks
|
- Timesheet
- |
-
-
- |
- [[ repeatIn(o.planning_account , 'l') ]] [ [[ l.account_id.code ]] ] [[ l.account_id.name ]]
- |
-
- [[ formatLang(l.plan_tasks) ]]
- |
-
- [[ formatLang(l.tasks) ]]
- |
-
- [[ formatLang(l.plan_open) ]]
- |
-
- [[ formatLang(l.timesheet) ]]
+ Timesheet
|
-
-
-
+
+ [[ repeatIn(o.planning_account , 'l') ]]
+
+
+ |
+ [ [[ l.account_id.code ]] ] [[ l.account_id.name ]]
+ |
+
+ [[ formatLang(l.plan_tasks) ]]
+ |
+
+ [[ formatLang(l.tasks) ]]
+ |
+
+ [[ formatLang(l.plan_open) ]]
+ |
+
+ [[ formatLang(l.timesheet) ]]
+ |
+
+
+
-
\ No newline at end of file
+
diff --git a/addons/purchase/report/order.rml b/addons/purchase/report/order.rml
index f9782edfb6d..c12a04b586f 100644
--- a/addons/purchase/report/order.rml
+++ b/addons/purchase/report/order.rml
@@ -131,25 +131,25 @@
-
+
|
- Description
+ Description
|
- Taxes
+ Taxes
|
- Date Req.
+ Date Req.
|
- Qty
+ Qty
|
- Unit Price
+ Unit Price
|
- Net Price
+ Net Price
|
@@ -251,31 +251,31 @@
-
+
|
- Description
+ Description
|
- Taxes
+ Taxes
|
- Date Req.
+ Date Req.
|
- Qty
+ Qty
|
- Unit Price
+ Unit Price
|
- Net Price
+ Net Price
|
[[repeatIn(o.order_line,'line')]]
-
+
|
[[ line.name ]]
@@ -284,7 +284,7 @@
[[ ', '.join(map(lambda x: x.name, line.taxes_id)) ]]
|
- [[ formatLang( line.date_planned, date=True) ]]
+ [[ formatLang( line.date_planned, date=True) ]]
|
[[ formatLang(line.product_qty ) ]] [[ line.product_uom.name ]]
@@ -328,7 +328,7 @@
|
-
+
|
@@ -384,4 +384,4 @@
-
\ No newline at end of file
+
diff --git a/addons/sale/board_sale_view.xml b/addons/sale/board_sale_view.xml
index 7c2ae788bf7..f40cebed684 100644
--- a/addons/sale/board_sale_view.xml
+++ b/addons/sale/board_sale_view.xml
@@ -10,7 +10,7 @@
board.board
form
- | | | | | | | | | | |