diff --git a/account_financial_report/model/account_financial_report.py b/account_financial_report/model/account_financial_report.py index 46acb7d0..2ca52c27 100644 --- a/account_financial_report/model/account_financial_report.py +++ b/account_financial_report/model/account_financial_report.py @@ -48,6 +48,7 @@ class account_financial_report(osv.osv): 'period_ids': fields.many2many('account.period', 'afr_period_rel', 'afr_id', 'period_id', 'Periods', help='All periods in the fiscal year if empty'), 'analytic_ledger': fields.boolean('Analytic Ledger', help="Allows to Generate an Analytic Ledger for accounts with moves. Available when Balance Sheet and 'Initial | Debit | Credit | YTD' are selected"), + 'journal_ledger': fields.boolean('journal Ledger', help="Allows to Generate an journal Ledger for accounts with moves. Available when Balance Sheet and 'Initial | Debit | Credit | YTD' are selected"), 'tot_check': fields.boolean('Summarize?', help='Checking will add a new line at the end of the Report which will Summarize Columns in Report'), 'lab_str': fields.char('Description', help='Description for the Summary', size=128), diff --git a/account_financial_report/report/balance_full_cols_journal_ledger.rml b/account_financial_report/report/balance_full_cols_journal_ledger.rml new file mode 100644 index 00000000..8852974f --- /dev/null +++ b/account_financial_report/report/balance_full_cols_journal_ledger.rml @@ -0,0 +1,294 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [[setLang(user.lang)]] + + + + + + CODE + + + + ACCOUNT + + + INITIAL + + + DEBIT + + + CREDIT + + + BALANCE + + + + + + + + + + DATE + + + + + PERIOD + + + + REFERENCE + + + JOURNAL ENTRY + + + PARTNER + + + + + + + + + + + + + + + + + +
+ [[ repeatIn([x for x in lines(data['form']) if x['type'] != 'view'], 'a') ]] + + + + + [[ a['type']<>'view' and setTag('para','para',{'fontName':"Courier-Bold"}) or removeParentNode('font') ]] + [[a['label']==True and a['code'] or '' ]] + + + + + [[ ((a['total'] and not a['label']) and setTag('para','para',{'alignment':"RIGHT"}) or (a['type']<>'view' and setTag('para','para',{'fontName':"Courier-Bold"}))) or removeParentNode('font') ]] + [[ a['type']=='view' and a['name'].upper() or a['name'].title() ]] + + + + + [[ a['type']<>'view' and setTag('para','para',{'fontName':"Courier-Bold"}) or removeParentNode('font') ]] + [[ (a['total']==True) and formatLang(a['balanceinit'] and a['balanceinit'] * a.get('change_sign',1.0) or 0.0, digits=2, grouping=True) or '']] + + + + + [[ a['type']<>'view' and setTag('para','para',{'fontName':"Courier-Bold"}) or removeParentNode('font') ]] + [[ (a['total']==True) and formatLang(a['debit'], digits=2, grouping=True) or '']] + + + + + [[ a['type']<>'view' and setTag('para','para',{'fontName':"Courier-Bold"}) or removeParentNode('font') ]] + [[ (a['total']==True) and formatLang(a['credit'], digits=2, grouping=True) or '']] + + + + + [[ a['type']<>'view' and setTag('para','para',{'fontName':"Courier-Bold"}) or removeParentNode('font') ]] + [[ (a['total']==True) and formatLang(a['balance'] and a['balance'] * a.get('change_sign',1.0) or 0.0, digits=2, grouping=True) or '']] + + + + + +
+ [[ repeatIn(a['mayor'], 'm') ]] + + + + + + [[ formatLang( m['date'], date=True) ]] + + + + + [[ m['period'] ]] + + + + + [[ m['name'] ]] [[ m['ref'] and (' - Ref %s'%m['ref']) or '' ]] + + + + + [[ m['entry'] ]] + + + + + + [[ m['partner'] ]] + + + + + [[ a['type']<>'view' and setTag('para','para',{'fontName':"Courier"}) or removeParentNode('font') ]] + [[ (a['total']==True) and formatLang(m['debit'], digits=2, grouping=True) or '']] + + + + + [[ a['type']<>'view' and setTag('para','para',{'fontName':"Courier"}) or removeParentNode('font') ]] + [[ (a['total']==True) and formatLang(m['credit'], digits=2, grouping=True) or '']] + + + + + [[ a['type']<>'view' and setTag('para','para',{'fontName':"Courier"}) or removeParentNode('font') ]] + [[ (a['total']==True) and formatLang(m['balance'] and m['balance'] * a.get('change_sign',1.0) or 0.0, digits=2, grouping=True) or '']] + + + + +
+ +
+ +
+
diff --git a/account_financial_report/report/parser.py b/account_financial_report/report/parser.py index ebb74b92..3ec76c66 100644 --- a/account_financial_report/report/parser.py +++ b/account_financial_report/report/parser.py @@ -827,6 +827,12 @@ report_sxw.report_sxw('report.afr.analytic.ledger', 'account_financial_report/report/balance_full_4_cols_analytic_ledger.rml', parser=account_balance, header=False) + +report_sxw.report_sxw('report.afr.journal.ledger', + 'wizard.report', + 'account_financial_report/report/balance_full_4_cols_journal_ledger.rml', + parser=account_balance, + header=False) report_sxw.report_sxw('report.afr.5cols', 'wizard.report', @@ -845,3 +851,4 @@ report_sxw.report_sxw('report.afr.13cols', 'account_financial_report/report/balance_full_13_cols.rml', parser=account_balance, header=False) + diff --git a/account_financial_report/view/account_financial_report_view.xml b/account_financial_report/view/account_financial_report_view.xml index 40cd1d8f..9a182d72 100644 --- a/account_financial_report/view/account_financial_report_view.xml +++ b/account_financial_report/view/account_financial_report_view.xml @@ -25,6 +25,15 @@ attrs="{'readonly':['|',('columns','!=','four'),('inf_type','!=','BS')],}" on_change='onchange_analytic_ledger(company_id,analytic_ledger)' /> + + + + + diff --git a/account_financial_report/view/report.xml b/account_financial_report/view/report.xml index 3d932a97..e97d73ce 100644 --- a/account_financial_report/view/report.xml +++ b/account_financial_report/view/report.xml @@ -45,6 +45,17 @@ string="Analytic Ledger" header="False" /> + + + + diff --git a/account_financial_report/view/wizard.xml b/account_financial_report/view/wizard.xml index 4136bfb1..0eef999e 100644 --- a/account_financial_report/view/wizard.xml +++ b/account_financial_report/view/wizard.xml @@ -41,6 +41,10 @@ attrs="{'readonly':['|',('columns','!=','four'),('inf_type','!=','BS')],}" on_change='onchange_analytic_ledger(company_id,analytic_ledger)' /> + diff --git a/account_financial_report/wizard/wizard.py b/account_financial_report/wizard/wizard.py index be9ff1eb..d419ca12 100644 --- a/account_financial_report/wizard/wizard.py +++ b/account_financial_report/wizard/wizard.py @@ -50,6 +50,7 @@ class wizard_report(osv.osv_memory): 'periods': fields.many2many('account.period', 'rel_wizard_period', 'wizard_id', 'period_id', 'Periods', help='All periods in the fiscal year if empty'), 'analytic_ledger': fields.boolean('Analytic Ledger', help="Allows to Generate an Analytic Ledger for accounts with moves. Available when Balance Sheet and 'Initial | Debit | Credit | YTD' are selected"), + 'journal_ledger': fields.boolean('Journal Ledger', help="Allows to Generate an Journal Ledger for accounts with moves. Available when Balance Sheet and 'Initial | Debit | Credit | YTD' are selected"), 'tot_check': fields.boolean('Summarize?', help='Checking will add a new line at the end of the Report which will Summarize Columns in Report'), 'lab_str': fields.char('Description', help='Description for the Summary', size=128), @@ -268,6 +269,8 @@ class wizard_report(osv.osv_memory): if data['form']['columns'] == 'four': if data['form']['analytic_ledger'] and data['form']['inf_type'] == 'BS': name = 'afr.analytic.ledger' + elif data['form']['journal_ledger'] and data['form']['inf_type'] == 'BS': + name = 'afr.journal.ledger' else: name = 'afr.4cols' if data['form']['columns'] == 'five':