@@ -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.symbol 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_balance.py b/addons/account/report/account_partner_balance.py
index ab3cfd70970..eacafb02eda 100644
--- a/addons/account/report/account_partner_balance.py
+++ b/addons/account/report/account_partner_balance.py
@@ -28,8 +28,6 @@ from common_report_header import common_report_header
class partner_balance(report_sxw.rml_parse, common_report_header):
def __init__(self, cr, uid, name, context=None):
- if context is None:
- context = {}
super(partner_balance, self).__init__(cr, uid, name, context=context)
self.account_ids = []
self.localcontext.update( {
@@ -276,6 +274,7 @@ class partner_balance(report_sxw.rml_parse, common_report_header):
return temp_res
def _sum_litige(self):
+ #gives the total of move lines with blocked boolean set to TRUE for the report selection
move_state = ['draft','posted']
if self.target_move == 'posted':
move_state = ['posted']
@@ -296,12 +295,15 @@ class partner_balance(report_sxw.rml_parse, common_report_header):
return temp_res
def _get_partners(self):
+ cr, uid = self.cr, self.uid
+ context = self.localcontext # all of it?
+
if self.result_selection == 'customer':
- return 'Receivable Accounts'
+ return _('Receivable Accounts')
elif self.result_selection == 'supplier':
- return 'Payable Accounts'
+ return _('Payable Accounts')
elif self.result_selection == 'customer_supplier':
- return 'Receivable and Payable Accounts'
+ return _('Receivable and Payable Accounts')
return ''
report_sxw.report_sxw('report.account.partner.balance', 'res.partner', 'account/report/account_partner_balance.rml',parser=partner_balance, header="internal")
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_analysis/account_analytic_analysis.py b/addons/account_analytic_analysis/account_analytic_analysis.py
index 9c3034fe127..01c34459289 100644
--- a/addons/account_analytic_analysis/account_analytic_analysis.py
+++ b/addons/account_analytic_analysis/account_analytic_analysis.py
@@ -384,7 +384,7 @@ class account_analytic_account(osv.osv):
'ca_to_invoice': fields.function(_analysis_all, method=True, multi='analytic_analysis', type='float', string='Uninvoiced Amount',
help="If invoice from analytic account, the remaining amount you can invoice to the customer based on the total costs.",
digits_compute=dp.get_precision('Account')),
- 'ca_theorical': fields.function(_analysis_all, method=True, multi='analytic_analysis', type='float', string='Theorical Revenue',
+ 'ca_theorical': fields.function(_analysis_all, method=True, multi='analytic_analysis', type='float', string='Theoretical Revenue',
help="Based on the costs you had on the project, what would have been the revenue if all these costs have been invoiced at the normal sale price provided by the pricelist.",
digits_compute=dp.get_precision('Account')),
'hours_quantity': fields.function(_analysis_all, method=True, multi='analytic_analysis', type='float', string='Hours Tot',
@@ -410,7 +410,7 @@ class account_analytic_account(osv.osv):
'real_margin': fields.function(_real_margin_calc, method=True, type='float', string='Real Margin',
help="Computed using the formula: Invoiced Amount - Total Costs.",
digits_compute=dp.get_precision('Account')),
- 'theorical_margin': fields.function(_theorical_margin_calc, method=True, type='float', string='Theorical Margin',
+ 'theorical_margin': fields.function(_theorical_margin_calc, method=True, type='float', string='Theoretical Margin',
help="Computed using the formula: Theorial Revenue - Total Costs",
digits_compute=dp.get_precision('Account')),
'real_margin_rate': fields.function(_real_margin_rate_calc, method=True, type='float', string='Real Margin Rate (%)',
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_anglo_saxon/i18n/fr_BE.po b/addons/account_anglo_saxon/i18n/fr_BE.po
deleted file mode 100644
index 54f33713af6..00000000000
--- a/addons/account_anglo_saxon/i18n/fr_BE.po
+++ /dev/null
@@ -1,54 +0,0 @@
-# Translation of OpenERP Server.
-# This file contains the translation of the following modules:
-# * account_anglo_saxon
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: OpenERP Server 6.0dev\n"
-"Report-Msgid-Bugs-To: support@openerp.com\n"
-"POT-Creation-Date: 2009-11-24 12:50:50+0000\n"
-"PO-Revision-Date: 2009-11-24 12:50:50+0000\n"
-"Last-Translator: <>\n"
-"Language-Team: \n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: \n"
-"Plural-Forms: \n"
-
-#. module: account_anglo_saxon
-#: view:product.category:0
-msgid " Accounting Property"
-msgstr ""
-
-#. module: account_anglo_saxon
-#: model:ir.module.module,description:account_anglo_saxon.module_meta_information
-msgid "This module will support the Anglo-Saxons accounting methodology by \n"
-" changing the accounting logic with stock transactions. The difference between the Anglo-Saxon accounting countries \n"
-" and the Rhine or also called Continental accounting countries is the moment of taking the Cost of Goods Sold versus Cost of Sales. \n"
-" Anglo-Saxons accounting does take the cost when sales invoice is created, Continental accounting will take the cost at he moment the goods are shipped.\n"
-" This module will add this functionality by using a interim account, to store the value of shipped goods and will contra book this interim account \n"
-" when the invoice is created to transfer this amount to the debtor or creditor account."
-msgstr ""
-
-#. module: account_anglo_saxon
-#: model:ir.module.module,shortdesc:account_anglo_saxon.module_meta_information
-msgid "Stock Account"
-msgstr ""
-
-#. module: account_anglo_saxon
-#: constraint:ir.ui.view:0
-msgid "Invalid XML for View Architecture!"
-msgstr ""
-
-#. module: account_anglo_saxon
-#: field:product.category,property_account_creditor_price_difference_categ:0
-#: field:product.template,property_account_creditor_price_difference:0
-msgid "Price Difference Account"
-msgstr ""
-
-#. module: account_anglo_saxon
-#: help:product.category,property_account_creditor_price_difference_categ:0
-#: help:product.template,property_account_creditor_price_difference:0
-msgid "This account will be used to value price difference between purchase price and cost price."
-msgstr ""
-
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_coda/i18n/fr_BE.po b/addons/account_coda/i18n/fr_BE.po
deleted file mode 100644
index f9055a016bd..00000000000
--- a/addons/account_coda/i18n/fr_BE.po
+++ /dev/null
@@ -1,163 +0,0 @@
-# Translation of OpenERP Server.
-# This file contains the translation of the following modules:
-# * account_coda
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: OpenERP Server 6.0dev\n"
-"Report-Msgid-Bugs-To: support@openerp.com\n"
-"POT-Creation-Date: 2009-11-24 13:11:29+0000\n"
-"PO-Revision-Date: 2009-11-24 13:11:29+0000\n"
-"Last-Translator: <>\n"
-"Language-Team: \n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: \n"
-"Plural-Forms: \n"
-
-#. module: account_coda
-#: field:account.coda,journal_id:0
-#: wizard_field:account.coda_import,init,journal_id:0
-msgid "Bank Journal"
-msgstr ""
-
-#. module: account_coda
-#: constraint:ir.model:0
-msgid "The Object name must start with x_ and not contain any special character !"
-msgstr ""
-
-#. module: account_coda
-#: wizard_field:account.coda_import,extraction,note:0
-msgid "Log"
-msgstr ""
-
-#. module: account_coda
-#: wizard_button:account.coda_import,extraction,open:0
-msgid "_Open Statement"
-msgstr ""
-
-#. module: account_coda
-#: model:ir.module.module,shortdesc:account_coda.module_meta_information
-msgid "Account CODA"
-msgstr ""
-
-#. module: account_coda
-#: field:account.coda,name:0
-msgid "Coda file"
-msgstr ""
-
-#. module: account_coda
-#: wizard_view:account.coda_import,init:0
-msgid "Clic on 'New' to select your file :"
-msgstr ""
-
-#. module: account_coda
-#: model:ir.actions.wizard,name:account_coda.wizard_account_coda_import
-msgid "Import Coda File"
-msgstr ""
-
-#. module: account_coda
-#: constraint:ir.actions.act_window:0
-msgid "Invalid model name in the action definition."
-msgstr ""
-
-#. module: account_coda
-#: field:account.coda,note:0
-msgid "Import log"
-msgstr ""
-
-#. module: account_coda
-#: wizard_field:account.coda_import,init,def_receivable:0
-msgid "Default receivable Account"
-msgstr ""
-
-#. module: account_coda
-#: model:ir.module.module,description:account_coda.module_meta_information
-msgid "Module provides functionality to import\n"
-" bank statements from .csv file.\n"
-" Import coda file wizard is used to import bank statements."
-msgstr ""
-
-#. module: account_coda
-#: wizard_button:account.coda_import,extraction,end:0
-msgid "_Close"
-msgstr ""
-
-#. module: account_coda
-#: field:account.coda,statement_id:0
-msgid "Generated Bank Statement"
-msgstr ""
-
-#. module: account_coda
-#: view:account.coda:0
-#: model:ir.actions.act_window,name:account_coda.act_account_payment_account_bank_statement
-#: model:ir.actions.act_window,name:account_coda.action_account_coda
-msgid "Coda import"
-msgstr ""
-
-#. module: account_coda
-#: field:account.coda,user_id:0
-msgid "User"
-msgstr ""
-
-#. module: account_coda
-#: constraint:ir.ui.view:0
-msgid "Invalid XML for View Architecture!"
-msgstr ""
-
-#. module: account_coda
-#: model:ir.model,name:account_coda.model_account_coda
-msgid "coda for an Account"
-msgstr ""
-
-#. module: account_coda
-#: wizard_field:account.coda_import,init,def_payable:0
-msgid "Default Payable Account"
-msgstr ""
-
-#. module: account_coda
-#: model:ir.ui.menu,name:account_coda.menu_account_coda
-msgid "Coda Statements"
-msgstr ""
-
-#. module: account_coda
-#: model:ir.ui.menu,name:account_coda.menu_account_coda_wizard
-msgid "Import Coda Statements"
-msgstr ""
-
-#. module: account_coda
-#: wizard_button:account.coda_import,init,extraction:0
-msgid "_Ok"
-msgstr ""
-
-#. module: account_coda
-#: wizard_view:account.coda_import,extraction:0
-#: wizard_view:account.coda_import,init:0
-msgid "Import Coda Statement"
-msgstr ""
-
-#. module: account_coda
-#: field:account.bank.statement,coda_id:0
-msgid "Coda"
-msgstr ""
-
-#. module: account_coda
-#: wizard_view:account.coda_import,extraction:0
-msgid "Results :"
-msgstr ""
-
-#. module: account_coda
-#: wizard_field:account.coda_import,init,coda:0
-msgid "Coda File"
-msgstr ""
-
-#. module: account_coda
-#: field:account.coda,date:0
-msgid "Import Date"
-msgstr ""
-
-#. module: account_coda
-#: wizard_view:account.coda_import,init:0
-msgid "Select your bank journal :"
-msgstr ""
-
diff --git a/addons/account_invoice_layout/account_invoice_layout_demo.xml b/addons/account_invoice_layout/account_invoice_layout_demo.xml
index e49079c9656..96f285caabf 100644
--- a/addons/account_invoice_layout/account_invoice_layout_demo.xml
+++ b/addons/account_invoice_layout/account_invoice_layout_demo.xml
@@ -4,11 +4,7 @@
OpenERP SA
- ERP & CRM Solutions....
-
-
- Tiny sprl
- Be Expert with the Experts...
+ ERP & CRM Solutions...
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/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py
index 4e08ad9112b..ba5264d759b 100644
--- a/addons/account_voucher/account_voucher.py
+++ b/addons/account_voucher/account_voucher.py
@@ -49,8 +49,9 @@ account_move_line()
class account_voucher(osv.osv):
- def _get_type(self, cr, uid, ids, context=None):
- if context is None: context = {}
+ def _get_type(self, cr, uid, context=None):
+ if context is None:
+ context = {}
return context.get('type', False)
def _get_period(self, cr, uid, context=None):
@@ -775,7 +776,7 @@ class account_voucher(osv.osv):
'date': inv.date,
'credit': diff > 0 and diff or 0.0,
'debit': diff < 0 and -diff or 0.0,
- 'amount_currency': company_currency <> current_currency and currency_pool.compute(cr, uid, company_currency, current_currency, diff * -1, context=context_multi_currency) or 0.0,
+ 'amount_currency': company_currency <> current_currency and currency_pool.compute(cr, uid, company_currency, current_currency, diff * -1, context=context_multi_currency) or 0.0,
'currency_id': company_currency <> current_currency and current_currency or False,
}
diff --git a/addons/account_voucher/voucher_sales_purchase_view.xml b/addons/account_voucher/voucher_sales_purchase_view.xml
index 3367b08583b..918099487ab 100644
--- a/addons/account_voucher/voucher_sales_purchase_view.xml
+++ b/addons/account_voucher/voucher_sales_purchase_view.xml
@@ -167,7 +167,7 @@
-
+
@@ -286,7 +286,7 @@
-
+
diff --git a/addons/audittrail/audittrail_view.xml b/addons/audittrail/audittrail_view.xml
index 1229a63f860..6f6b461d1a6 100644
--- a/addons/audittrail/audittrail_view.xml
+++ b/addons/audittrail/audittrail_view.xml
@@ -82,7 +82,7 @@
-
diff --git a/addons/hr_holidays/migrations/1.5/post-00-change-requests-signs.py b/addons/base_crypt/__init__.py
old mode 100644
new mode 100755
similarity index 74%
rename from addons/hr_holidays/migrations/1.5/post-00-change-requests-signs.py
rename to addons/base_crypt/__init__.py
index 9e4a5a45cb1..a8b9a6b0740
--- a/addons/hr_holidays/migrations/1.5/post-00-change-requests-signs.py
+++ b/addons/base_crypt/__init__.py
@@ -1,8 +1,7 @@
-# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2010 Tiny SPRL ().
+# Copyright (C) 2004-2009 Tiny SPRL ().
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
@@ -18,8 +17,7 @@
# along with this program. If not, see .
#
##############################################################################
-__name__ = "Change signs of old holiday requests"
-def migrate(cr, version):
- cr.execute("DELETE FROM hr_holidays WHERE number_of_days < 0")
- cr.execute("UPDATE hr_holidays SET number_of_days = -number_of_days, type ='remove'")
+from service import security
+import crypt
+
diff --git a/addons/base_crypt/__openerp__.py b/addons/base_crypt/__openerp__.py
new file mode 100755
index 00000000000..d6c0bbd82e3
--- /dev/null
+++ b/addons/base_crypt/__openerp__.py
@@ -0,0 +1,43 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2009 Tiny SPRL ().
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# 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 .
+#
+##############################################################################
+{
+ "name" : "Base - Password Encryption",
+ "version" : "1.1",
+ "author" : "FS3 & OpenERP SA",
+ "maintainer" : "OpenERP SA",
+ "website" : "http://www.openerp.com",
+ "category" : "Generic Modules/Base",
+ "description": """This module replaces the cleartext password in the database with a password hash,
+preventing anyone from reading the original password.
+For your existing user base, the removal of the cleartext passwords occurs the first time
+a user logs into the database, after installing base_crypt.
+After installing this module it won't be possible to recover a forgotten password for your
+users, the only solution is for an admin to set a new password.
+
+Note: installing this module does not mean you can ignore basic security measures,
+as the password is still transmitted unencrypted on the network (by the client),
+unless you are using a secure protocol such as XML-RPCS.
+ """,
+ "depends" : ["base"],
+ "data" : [],
+ "active": False,
+ "installable": True,
+}
diff --git a/addons/base_crypt/crypt.py b/addons/base_crypt/crypt.py
new file mode 100755
index 00000000000..259404dc95b
--- /dev/null
+++ b/addons/base_crypt/crypt.py
@@ -0,0 +1,256 @@
+# Notice:
+# ------
+#
+# Implements encrypting functions.
+#
+# Copyright (c) 2008, F S 3 Consulting Inc.
+#
+# Maintainer:
+# Alec Joseph Rivera (agifs3.ph)
+#
+#
+# Warning:
+# -------
+#
+# This program as such is intended to be used by professional programmers
+# who take the whole responsibility of assessing all potential consequences
+# resulting from its eventual inadequacies and bugs. End users who are
+# looking for a ready-to-use solution with commercial guarantees and
+# support are strongly adviced to contract a Free Software Service Company.
+#
+# This program is Free Software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation; either version 2 of the License, or (at your
+# option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+# Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the:
+#
+# Free Software Foundation, Inc.
+# 59 Temple Place - Suite 330
+# Boston, MA 02111-1307
+# USA.
+
+from random import seed, sample
+from string import letters, digits
+from osv import fields,osv
+import pooler
+import tools
+from tools.translate import _
+from service import security
+
+magic_md5 = '$1$'
+
+def gen_salt( length=8, symbols=letters + digits ):
+ seed()
+ return ''.join( sample( symbols, length ) )
+
+# The encrypt_md5 is based on Mark Johnson's md5crypt.py, which in turn is
+# based on FreeBSD src/lib/libcrypt/crypt.c (1.2) by Poul-Henning Kamp.
+# Mark's port can be found in ActiveState ASPN Python Cookbook. Kudos to
+# Poul and Mark. -agi
+#
+# Original license:
+#
+# * "THE BEER-WARE LICENSE" (Revision 42):
+# *
+# * wrote this file. As long as you retain this
+# * notice you can do whatever you want with this stuff. If we meet some
+# * day, and you think this stuff is worth it, you can buy me a beer in
+# * return.
+# *
+# * Poul-Henning Kamp
+
+import md5
+
+def encrypt_md5( raw_pw, salt, magic=magic_md5 ):
+ hash = md5.new( raw_pw + magic + salt )
+ stretch = md5.new( raw_pw + salt + raw_pw).digest()
+
+ for i in range( 0, len( raw_pw ) ):
+ hash.update( stretch[i % 16] )
+
+ i = len( raw_pw )
+
+ while i:
+ if i & 1:
+ hash.update('\x00')
+ else:
+ hash.update( raw_pw[0] )
+ i >>= 1
+
+ saltedmd5 = hash.digest()
+
+ for i in range( 1000 ):
+ hash = md5.new()
+
+ if i & 1:
+ hash.update( raw_pw )
+ else:
+ hash.update( saltedmd5 )
+
+ if i % 3:
+ hash.update( salt )
+ if i % 7:
+ hash.update( raw_pw )
+ if i & 1:
+ hash.update( saltedmd5 )
+ else:
+ hash.update( raw_pw )
+
+ saltedmd5 = hash.digest()
+
+ itoa64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
+
+ rearranged = ''
+ for a, b, c in ((0, 6, 12), (1, 7, 13), (2, 8, 14), (3, 9, 15), (4, 10, 5)):
+ v = ord( saltedmd5[a] ) << 16 | ord( saltedmd5[b] ) << 8 | ord( saltedmd5[c] )
+
+ for i in range(4):
+ rearranged += itoa64[v & 0x3f]
+ v >>= 6
+
+ v = ord( saltedmd5[11] )
+
+ for i in range( 2 ):
+ rearranged += itoa64[v & 0x3f]
+ v >>= 6
+
+ return magic + salt + '$' + rearranged
+
+class users(osv.osv):
+ _name="res.users"
+ _inherit="res.users"
+ # agi - 022108
+ # Add handlers for 'input_pw' field.
+
+ def set_pw(self, cr, uid, id, name, value, args, context):
+ if not value:
+ raise osv.except_osv(_('Error'), _("Please specify the password !"))
+
+ obj = pooler.get_pool(cr.dbname).get('res.users')
+ if not hasattr(obj, "_salt_cache"):
+ obj._salt_cache = {}
+
+ salt = obj._salt_cache[id] = gen_salt()
+ encrypted = encrypt_md5(value, salt)
+ cr.execute('update res_users set password=%s where id=%s',
+ (encrypted.encode('utf-8'), int(id)))
+ cr.commit()
+ del value
+
+ def get_pw( self, cr, uid, ids, name, args, context ):
+ cr.execute('select id, password from res_users where id in %s', (tuple(map(int, ids)),))
+ stored_pws = cr.fetchall()
+ res = {}
+
+ for id, stored_pw in stored_pws:
+ res[id] = stored_pw
+
+ return res
+
+ _columns = {
+ # The column size could be smaller as it is meant to store a hash, but
+ # an existing column cannot be downsized; thus we use the original
+ # column size.
+ 'password': fields.function(get_pw, fnct_inv=set_pw, type='char',
+ method=True, size=64, string='Password', invisible=True,
+ store=True),
+ }
+
+ def login(self, db, login, password):
+ cr = pooler.get_db(db).cursor()
+ cr.execute('select password, id from res_users where login=%s',
+ (login.encode('utf-8'),))
+ stored_pw = id = cr.fetchone()
+
+ if stored_pw:
+ stored_pw = stored_pw[0]
+ id = id[1]
+ else:
+ # Return early if there is no such login.
+ return False
+
+ stored_pw = self.maybe_encrypt(cr, stored_pw, id)
+
+ # Calculate an encrypted password from the user-provided
+ # password.
+ obj = pooler.get_pool(db).get('res.users')
+ if not hasattr(obj, "_salt_cache"):
+ obj._salt_cache = {}
+ salt = obj._salt_cache[id] = stored_pw[len(magic_md5):11]
+ encrypted_pw = encrypt_md5(password, salt)
+
+ # Check if the encrypted password matches against the one in the db.
+ cr.execute('select id from res_users where id=%s and password=%s and active', (int(id), encrypted_pw.encode('utf-8')))
+ res = cr.fetchone()
+ cr.close()
+
+ if res:
+ return res[0]
+ else:
+ return False
+
+ def check(self, db, uid, passwd):
+ # Get a chance to hash all passwords in db before using the uid_cache.
+ obj = pooler.get_pool(db).get('res.users')
+ if not hasattr(obj, "_salt_cache"):
+ obj._salt_cache = {}
+ self._uid_cache.get(db, {}).clear()
+
+ cached_pass = self._uid_cache.get(db, {}).get(uid)
+ if (cached_pass is not None) and cached_pass == passwd:
+ return True
+
+ cr = pooler.get_db(db).cursor()
+ if uid not in obj._salt_cache:
+ cr.execute('select login from res_users where id=%s', (int(uid),))
+ stored_login = cr.fetchone()
+ if stored_login:
+ stored_login = stored_login[0]
+
+ if not self.login(db,stored_login,passwd):
+ return False
+
+ salt = obj._salt_cache[uid]
+ cr.execute('select count(id) from res_users where id=%s and password=%s',
+ (int(uid), encrypt_md5(passwd, salt)))
+ res = cr.fetchone()[0]
+ cr.close()
+ if not bool(res):
+ raise Exception('AccessDenied')
+
+ if res:
+ if self._uid_cache.has_key(db):
+ ulist = self._uid_cache[db]
+ ulist[uid] = passwd
+ else:
+ self._uid_cache[db] = {uid: passwd}
+ return bool(res)
+
+ def maybe_encrypt(self, cr, pw, id):
+ # If the password 'pw' is not encrypted, then encrypt all passwords
+ # in the db. Returns the (possibly newly) encrypted password for 'id'.
+
+ if pw[0:len(magic_md5)] != magic_md5:
+ cr.execute('select id, password from res_users')
+ res = cr.fetchall()
+ for i, p in res:
+ encrypted = p
+ if p[0:len(magic_md5)] != magic_md5:
+ encrypted = encrypt_md5(p, gen_salt())
+ cr.execute('update res_users set password=%s where id=%s',
+ (encrypted.encode('utf-8'), int(i)))
+ if i == id:
+ encrypted_res = encrypted
+ cr.commit()
+ return encrypted_res
+ return pw
+
+users()
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/base_crypt/i18n/base_crypt.pot b/addons/base_crypt/i18n/base_crypt.pot
new file mode 100755
index 00000000000..d62691cb699
--- /dev/null
+++ b/addons/base_crypt/i18n/base_crypt.pot
@@ -0,0 +1,37 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+# * base_crypt
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 5.0.6\n"
+"Report-Msgid-Bugs-To: support@openerp.com\n"
+"POT-Creation-Date: 2009-11-26 09:12:09+0000\n"
+"PO-Revision-Date: 2009-11-26 09:12:09+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: base_crypt
+#: model:ir.module.module,description:base_crypt.module_meta_information
+msgid "Module for password encryption."
+msgstr ""
+
+#. module: base_crypt
+#: constraint:ir.ui.view:0
+msgid "Invalid XML for View Architecture!"
+msgstr ""
+
+#. module: base_crypt
+#: model:ir.module.module,shortdesc:base_crypt.module_meta_information
+msgid "Base"
+msgstr ""
+
+#. module: base_crypt
+#: field:res.users,input_pw:0
+msgid "Password"
+msgstr ""
+
diff --git a/addons/base_crypt/i18n/sv.po b/addons/base_crypt/i18n/sv.po
new file mode 100644
index 00000000000..a20776a2100
--- /dev/null
+++ b/addons/base_crypt/i18n/sv.po
@@ -0,0 +1,40 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+# * base_crypt
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 5.0.14\n"
+"Report-Msgid-Bugs-To: support@openerp.com\n"
+"POT-Creation-Date: 2009-11-26 09:12+0000\n"
+"PO-Revision-Date: 2010-11-23 02:16+0000\n"
+"Last-Translator: Olivier Dony (OpenERP) \n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2010-12-15 05:38+0000\n"
+"X-Generator: Launchpad (build Unknown)\n"
+
+#. module: base_crypt
+#: model:ir.module.module,description:base_crypt.module_meta_information
+msgid "Module for password encryption."
+msgstr ""
+
+#. module: base_crypt
+#: constraint:ir.ui.view:0
+msgid "Invalid XML for View Architecture!"
+msgstr ""
+
+#. module: base_crypt
+#: model:ir.module.module,shortdesc:base_crypt.module_meta_information
+msgid "Base"
+msgstr ""
+
+#. module: base_crypt
+#: field:res.users,input_pw:0
+msgid "Password"
+msgstr ""
+
+#~ msgid "Module for password encryption.KKKKKKKKKKKKKKKKKKK"
+#~ msgstr "Module for password encryption.KKKKKKKKKKKKKKKKKKK"
diff --git a/addons/base_module_doc_rst/i18n/fr_BE.po b/addons/base_module_doc_rst/i18n/fr_BE.po
deleted file mode 100644
index 1a0e3c0f141..00000000000
--- a/addons/base_module_doc_rst/i18n/fr_BE.po
+++ /dev/null
@@ -1,57 +0,0 @@
-# Translation of OpenERP Server.
-# This file contains the translation of the following modules:
-# * base_module_doc_rst
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: OpenERP Server 6.0dev\n"
-"Report-Msgid-Bugs-To: support@openerp.com\n"
-"POT-Creation-Date: 2009-01-28 00:45:34+0000\n"
-"PO-Revision-Date: 2009-01-28 00:45:34+0000\n"
-"Last-Translator: <>\n"
-"Language-Team: \n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: \n"
-"Plural-Forms: \n"
-
-#. module: base_module_doc_rst
-#: wizard_view:tech.guide.rst,init:0
-msgid "Technical Guide in rst format"
-msgstr "Guide Technique au format rst"
-
-#. module: base_module_doc_rst
-#: wizard_field:tech.guide.rst,init,name:0
-msgid "filename"
-msgstr "Nom du Fichier"
-
-#. module: base_module_doc_rst
-#: model:ir.actions.wizard,name:base_module_doc_rst.wiz_tech_guide_rst
-msgid "Create RST Technical Guide"
-msgstr "Crée le Guide Technical au format rst"
-
-#. module: base_module_doc_rst
-#: wizard_view:tech.guide.rst,init:0
-msgid "Please choose a file where the Technical Guide will be written."
-msgstr "Choisissez un fichier où le Guide Technique sera créé."
-
-#. module: base_module_doc_rst
-#: wizard_field:tech.guide.rst,init,rst_file:0
-msgid "file"
-msgstr "Fichier"
-
-#. module: base_module_doc_rst
-#: wizard_button:tech.guide.rst,init,end:0
-msgid "Close"
-msgstr "Fermer"
-
-#. module: base_module_doc_rst
-#: model:ir.module.module,shortdesc:base_module_doc_rst.module_meta_information
-msgid "Module Technical Guide in Restructured Text "
-msgstr ""
-
-#. module: base_module_doc_rst
-#: wizard_view:tech.guide.rst,init:0
-msgid "Create Technical Guide in rst format"
-msgstr "Crée le Guide Technique au format rst"
-
diff --git a/addons/board/security/ir.model.access.csv b/addons/board/security/ir.model.access.csv
index 0110e1678ae..1b0abd337c7 100644
--- a/addons/board/security/ir.model.access.csv
+++ b/addons/board/security/ir.model.access.csv
@@ -4,4 +4,5 @@
"access_board_note_type","board.note.type","model_board_note_type","base.group_user",1,1,1,1
"access_board_note","board.note","model_board_note","base.group_user",1,1,1,1
"access_board_board_sale_salesman","board.board.sale.salesman","model_board_board","base.group_sale_salesman",1,1,1,1
-
+"access_res_log_report_system","res.log.report system","model_res_log_report",base.group_system,1,0,0,0
+"access_res_log_report_erp_manager","res.log.report erp_manager","model_res_log_report",base.group_erp_manager,1,0,0,0
diff --git a/addons/crm/crm_meeting_view.xml b/addons/crm/crm_meeting_view.xml
index c27a50cf37b..2b3f610dabd 100644
--- a/addons/crm/crm_meeting_view.xml
+++ b/addons/crm/crm_meeting_view.xml
@@ -44,7 +44,7 @@
-
+
diff --git a/addons/crm/crm_phonecall_view.xml b/addons/crm/crm_phonecall_view.xml
index 6c66dc94848..7a60af9533b 100644
--- a/addons/crm/crm_phonecall_view.xml
+++ b/addons/crm/crm_phonecall_view.xml
@@ -60,7 +60,7 @@