add proper titles
parent
7733badcfe
commit
f4b6c88008
|
@ -41,7 +41,7 @@ class AbstractReportXslx(models.AbstractModel):
|
|||
|
||||
self._define_formats(workbook)
|
||||
|
||||
report_name = self._get_report_name()
|
||||
report_name = self._get_report_name(objects)
|
||||
report_footer = self._get_report_footer()
|
||||
filters = self._get_report_filters(report)
|
||||
self.columns = self._get_report_columns(report)
|
||||
|
@ -349,7 +349,7 @@ class AbstractReportXslx(models.AbstractModel):
|
|||
"""
|
||||
raise NotImplementedError()
|
||||
|
||||
def _get_report_name(self):
|
||||
def _get_report_name(self, objects):
|
||||
"""
|
||||
Allow to define the report name.
|
||||
Report name will be used as sheet name and as report title.
|
||||
|
|
|
@ -10,8 +10,10 @@ class AgedPartnerBalanceXslx(models.AbstractModel):
|
|||
_name = 'report.a_f_r.report_aged_partner_balance_xlsx'
|
||||
_inherit = 'report.account_financial_report.abstract_report_xlsx'
|
||||
|
||||
def _get_report_name(self):
|
||||
return _('Aged Partner Balance')
|
||||
def _get_report_name(self, objects):
|
||||
report = objects
|
||||
return _('Aged Partner Balance - %s - %s') % (
|
||||
report.company_id.name, report.company_id.currency_id.name)
|
||||
|
||||
def _get_report_columns(self, report):
|
||||
if not report.show_move_line_details:
|
||||
|
|
|
@ -11,8 +11,10 @@ class GeneralLedgerXslx(models.AbstractModel):
|
|||
_name = 'report.a_f_r.report_general_ledger_xlsx'
|
||||
_inherit = 'report.account_financial_report.abstract_report_xlsx'
|
||||
|
||||
def _get_report_name(self):
|
||||
return _('General Ledger')
|
||||
def _get_report_name(self, objects):
|
||||
report = objects
|
||||
return _('General Ledger - %s - %s') % (
|
||||
report.company_id.name, report.company_id.currency_id.name)
|
||||
|
||||
def _get_report_columns(self, report):
|
||||
res = {
|
||||
|
|
|
@ -10,8 +10,10 @@ class JournalLedgerXslx(models.AbstractModel):
|
|||
_name = 'report.a_f_r.report_journal_ledger_xlsx'
|
||||
_inherit = 'report.account_financial_report.abstract_report_xlsx'
|
||||
|
||||
def _get_report_name(self):
|
||||
return _('Journal Ledger')
|
||||
def _get_report_name(self, objects):
|
||||
report = objects
|
||||
return _('Journal Ledger - %s - %s') % (
|
||||
report.company_id.name, report.company_id.currency_id.name)
|
||||
|
||||
def _get_report_columns(self, report):
|
||||
columns = [
|
||||
|
|
|
@ -9,8 +9,10 @@ class OpenItemsXslx(models.AbstractModel):
|
|||
_name = 'report.a_f_r.report_open_items_xlsx'
|
||||
_inherit = 'report.account_financial_report.abstract_report_xlsx'
|
||||
|
||||
def _get_report_name(self):
|
||||
return _('Open Items')
|
||||
def _get_report_name(self, objects):
|
||||
report = objects
|
||||
return _('Open Items - %s - %s') % (
|
||||
report.company_id.name, report.company_id.currency_id.name)
|
||||
|
||||
def _get_report_columns(self, report):
|
||||
res = {
|
||||
|
|
|
@ -14,12 +14,13 @@
|
|||
<template id="report_aged_partner_balance_base">
|
||||
<!-- Saved flag fields into variables, used to define columns display -->
|
||||
<t t-set="show_move_line_details" t-value="o.show_move_line_details"/>
|
||||
|
||||
<!-- Defines global variables used by internal layout -->
|
||||
<t t-set="title">Aged Partner Balance</t>
|
||||
<t t-set="title">Aged Partner Balance - <t t-raw="o.company_id.name"/> - <t t-raw="o.company_id.currency_id.name"/></t>
|
||||
<t t-set="company_name" t-value="o.company_id.name"/>
|
||||
|
||||
<div class="page">
|
||||
<div class="page data_table">
|
||||
<div class="row">
|
||||
<h4 class="mt0" t-esc="title or 'Odoo Report'"/>
|
||||
</div>
|
||||
<!-- Display filters -->
|
||||
<t t-call="account_financial_report.report_aged_partner_balance_filters"/>
|
||||
|
||||
|
|
|
@ -17,13 +17,14 @@
|
|||
<t t-set="show_cost_center" t-value="o.show_cost_center"/>
|
||||
<t t-set="foreign_currency" t-value="o.foreign_currency"/>
|
||||
<!-- Defines global variables used by internal layout -->
|
||||
<t t-set="title">General Ledger</t>
|
||||
<t t-set="title">General Ledger - <t t-raw="o.company_id.name"/> - <t t-raw="o.company_id.currency_id.name"/></t>
|
||||
<t t-set="company_name" t-value="o.company_id.name"/>
|
||||
|
||||
<div class="page">
|
||||
<div class="page data_table">
|
||||
<div class="row">
|
||||
<h4 class="mt0" t-esc="title or 'Odoo Report'"/>
|
||||
</div>
|
||||
<!-- Display filters -->
|
||||
<t t-call="account_financial_report.report_general_ledger_filters"/>
|
||||
|
||||
<t t-foreach="o.account_ids" t-as="account">
|
||||
<div class="page_break">
|
||||
<!-- Display account header -->
|
||||
|
|
|
@ -12,12 +12,14 @@
|
|||
</template>
|
||||
|
||||
<template id="report_journal_ledger_base">
|
||||
<t t-set="title">Journal Ledger</t>
|
||||
<t t-set="company_name" t-value="o.company_id.name"/>
|
||||
<t t-set="display_currency" t-value="o.foreign_currency"/>
|
||||
<t t-set="display_account_name" t-value="o.with_account_name"/>
|
||||
|
||||
<div class="page">
|
||||
<t t-set="title">Journal Ledger - <t t-raw="o.company_id.name"/> - <t t-raw="o.company_id.currency_id.name"/></t>
|
||||
<t t-set="company_name" t-value="o.company_id.name"/>
|
||||
<div class="page data_table">
|
||||
<div class="row">
|
||||
<h4 class="mt0" t-esc="title or 'Odoo Report'"/>
|
||||
</div>
|
||||
<t t-if="o.group_option == 'none'">
|
||||
<div class="page_break">
|
||||
<t t-call="account_financial_report.report_journal_all"/>
|
||||
|
|
|
@ -2,16 +2,6 @@
|
|||
<odoo>
|
||||
|
||||
<template id="account_financial_report.internal_layout">
|
||||
<div class="header">
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<span t-esc="title"/>
|
||||
</div>
|
||||
<div class="col-xs-6 text-right">
|
||||
<span t-esc="company_name"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="article">
|
||||
<link href="/account_financial_report/static/src/css/report.css" rel="stylesheet"/>
|
||||
<t t-raw="0" />
|
||||
|
|
|
@ -14,13 +14,13 @@
|
|||
<template id="account_financial_report.report_open_items_base">
|
||||
<!-- Saved flag fields into variables, used to define columns display -->
|
||||
<t t-set="foreign_currency" t-value="o.foreign_currency"/>
|
||||
|
||||
|
||||
<!-- Defines global variables used by internal layout -->
|
||||
<t t-set="title">Open Items</t>
|
||||
<t t-set="title">Open Items - <t t-raw="o.company_id.name"/> - <t t-raw="o.company_id.currency_id.name"/></t>
|
||||
<t t-set="company_name" t-value="o.company_id.name"/>
|
||||
|
||||
<div class="page">
|
||||
<div class="page data_table">
|
||||
<div class="row">
|
||||
<h4 class="mt0" t-esc="title or 'Odoo Report'"/>
|
||||
</div>
|
||||
<!-- Display filters -->
|
||||
<t t-call="account_financial_report.report_open_items_filters"/>
|
||||
|
||||
|
|
|
@ -15,93 +15,95 @@
|
|||
<!-- Saved flag fields into variables, used to define columns display -->
|
||||
<t t-set="show_partner_details" t-value="o.show_partner_details"/>
|
||||
<t t-set="foreign_currency" t-value="o.foreign_currency"/>
|
||||
<!-- Defines global variables used by internal layout -->
|
||||
<t t-set="title">Trial Balance</t>
|
||||
<t t-set="company_name" t-value="o.company_id.name"/>
|
||||
<t t-set="res_company" t-value="o.company_id"/>
|
||||
<!-- Defines global variables used by internal layout -->
|
||||
<t t-set="title">Trial Balance - <t t-raw="o.company_id.name"/> - <t t-raw="o.company_id.currency_id.name"/></t>
|
||||
<t t-set="company_name" t-value="o.company_id.name"/>
|
||||
<t t-set="res_company" t-value="o.company_id"/>
|
||||
<div class="page data_table">
|
||||
<div class="row">
|
||||
<h4 class="mt0" t-esc="title or 'Odoo Report'"/>
|
||||
</div>
|
||||
<!-- Display filters -->
|
||||
<t t-call="account_financial_report.report_trial_balance_filters"/>
|
||||
<div class="act_as_table list_table" style="margin-top: 10px;"/>
|
||||
|
||||
<div class="page">
|
||||
<!-- Display filters -->
|
||||
<t t-call="account_financial_report.report_trial_balance_filters"/>
|
||||
<div class="act_as_table list_table" style="margin-top: 10px;"/>
|
||||
<!-- Display account lines -->
|
||||
<t t-if="not show_partner_details">
|
||||
<div class="act_as_table data_table" style="width: 100%;">
|
||||
<!-- Display account header -->
|
||||
<t t-call="account_financial_report.report_trial_balance_lines_header"/>
|
||||
|
||||
<!-- Display account lines -->
|
||||
<t t-if="not show_partner_details">
|
||||
<div class="act_as_table data_table" style="width: 100%;">
|
||||
<!-- Display account header -->
|
||||
<t t-call="account_financial_report.report_trial_balance_lines_header"/>
|
||||
|
||||
<!-- Display each lines -->
|
||||
<t t-foreach="o.account_ids.filtered(lambda a: not a.hide_line)" t-as="line">
|
||||
<t t-set="type" t-value='"account_type"'/>
|
||||
<!-- Adapt -->
|
||||
<t t-set="style" t-value="'font-size:8px;'"/>
|
||||
<t t-set="padding" t-value="line.level * 4"/>
|
||||
<t t-if="o.hide_account_at_0">
|
||||
<t t-set="style" t-value="'font-size: 14px;'"/>
|
||||
</t>
|
||||
<t t-if="o.hierarchy_on != 'none'">
|
||||
<t t-set="style" t-value="'font-size: ' + str(14 - line.level) + 'px; margin-left: ' + str(line.level * 4) + 'px;'"/>
|
||||
</t>
|
||||
<t t-if="line.account_group_id">
|
||||
<t t-set="style" t-value="style + 'font-weight: bold; color: blue;'"/>
|
||||
</t>
|
||||
|
||||
<!-- Display account lines -->
|
||||
<t t-call="account_financial_report.report_trial_balance_line"/>
|
||||
<!-- Adapt style -->
|
||||
<!-- Display each lines -->
|
||||
<t t-foreach="o.account_ids.filtered(lambda a: not a.hide_line)" t-as="line">
|
||||
<t t-set="type" t-value='"account_type"'/>
|
||||
<!-- Adapt -->
|
||||
<t t-set="style" t-value="'font-size:8px;'"/>
|
||||
<t t-set="padding" t-value="line.level * 4"/>
|
||||
<t t-if="o.hide_account_at_0">
|
||||
<t t-set="style" t-value="'font-size: 14px;'"/>
|
||||
</t>
|
||||
<t t-if="o.hierarchy_on != 'none'">
|
||||
<t t-set="style" t-value="'font-size: ' + str(14 - line.level) + 'px; margin-left: ' + str(line.level * 4) + 'px;'"/>
|
||||
</t>
|
||||
<t t-if="line.account_group_id">
|
||||
<t t-set="style" t-value="style + 'font-weight: bold; color: blue;'"/>
|
||||
</t>
|
||||
|
||||
<!-- Display account lines -->
|
||||
<t t-call="account_financial_report.report_trial_balance_line"/>
|
||||
<!-- Adapt style -->
|
||||
</t>
|
||||
</div>
|
||||
</t>
|
||||
|
||||
<!-- Display partner lines -->
|
||||
<t t-if="show_partner_details">
|
||||
<t t-set="padding" t-value="0"/>
|
||||
<t t-foreach="o.account_ids" t-as="account">
|
||||
<div class="page_break">
|
||||
<t t-set="style" t-value="'font-size:8px;'"/>
|
||||
<t t-set="padding" t-value="account.level * 4"/>
|
||||
<t t-set="style" t-value="'font-size: ' + str(14 - account.level) + 'px; margin-left: ' + str(account.level * 4) + 'px;'"/>
|
||||
|
||||
<!-- Display account header -->
|
||||
<div class="act_as_table list_table" style="margin-top: 10px;"/>
|
||||
<div class="act_as_caption account_title"
|
||||
style="width: 100%;">
|
||||
<t t-set="res_model" t-value="'account.account'"/>
|
||||
<span>
|
||||
<a t-att-data-active-id="account.account_id.id"
|
||||
t-att-data-res-model="res_model"
|
||||
class="o_account_financial_reports_web_action"
|
||||
t-att-style="style">
|
||||
<t t-raw="account.code"/> - <t t-raw="account.name"/></a>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="act_as_table data_table"
|
||||
style="width: 100%;">
|
||||
<!-- Display account/partner header -->
|
||||
<t t-call="account_financial_report.report_trial_balance_lines_header"/>
|
||||
|
||||
<!-- Adapt style -->
|
||||
<t t-set="padding" t-value="padding+4"/>
|
||||
|
||||
<!-- Display each partners -->
|
||||
<t t-foreach="account.partner_ids" t-as="line">
|
||||
<t t-set="type" t-value='"partner_type"'/>
|
||||
<!-- Display partner line -->
|
||||
<t t-call="account_financial_report.report_trial_balance_line"/>
|
||||
</t>
|
||||
<t t-set="padding" t-value="padding-4"/>
|
||||
</div>
|
||||
|
||||
<!-- Display account footer -->
|
||||
<t t-set="type" t-value='"account_type"'/>
|
||||
<t t-call="account_financial_report.report_trial_balance_account_footer"/>
|
||||
|
||||
</div>
|
||||
</t>
|
||||
|
||||
<!-- Display partner lines -->
|
||||
<t t-if="show_partner_details">
|
||||
<t t-set="padding" t-value="0"/>
|
||||
<t t-foreach="o.account_ids" t-as="account">
|
||||
<div class="page_break">
|
||||
<t t-set="style" t-value="'font-size:8px;'"/>
|
||||
<t t-set="padding" t-value="account.level * 4"/>
|
||||
<t t-set="style" t-value="'font-size: ' + str(14 - account.level) + 'px; margin-left: ' + str(account.level * 4) + 'px;'"/>
|
||||
|
||||
<!-- Display account header -->
|
||||
<div class="act_as_table list_table" style="margin-top: 10px;"/>
|
||||
<div class="act_as_caption account_title"
|
||||
style="width: 100%;">
|
||||
<t t-set="res_model" t-value="'account.account'"/>
|
||||
<span>
|
||||
<a t-att-data-active-id="account.account_id.id"
|
||||
t-att-data-res-model="res_model"
|
||||
class="o_account_financial_reports_web_action"
|
||||
t-att-style="style">
|
||||
<t t-raw="account.code"/> - <t t-raw="account.name"/></a>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="act_as_table data_table"
|
||||
style="width: 100%;">
|
||||
<!-- Display account/partner header -->
|
||||
<t t-call="account_financial_report.report_trial_balance_lines_header"/>
|
||||
|
||||
<!-- Adapt style -->
|
||||
<t t-set="padding" t-value="padding+4"/>
|
||||
|
||||
<!-- Display each partners -->
|
||||
<t t-foreach="account.partner_ids" t-as="line">
|
||||
<t t-set="type" t-value='"partner_type"'/>
|
||||
<!-- Display partner line -->
|
||||
<t t-call="account_financial_report.report_trial_balance_line"/>
|
||||
</t>
|
||||
<t t-set="padding" t-value="padding-4"/>
|
||||
</div>
|
||||
|
||||
<!-- Display account footer -->
|
||||
<t t-set="type" t-value='"account_type"'/>
|
||||
<t t-call="account_financial_report.report_trial_balance_account_footer"/>
|
||||
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
</template>
|
||||
<template id="account_financial_report.report_trial_balance_filters">
|
||||
<div class="act_as_table data_table" style="width: 100%;">
|
||||
|
|
|
@ -12,15 +12,15 @@
|
|||
</template>
|
||||
|
||||
<template id="account_financial_report.report_vat_report_base">
|
||||
<t t-set="title">VAT Report - <t t-raw="o.company_id.name"/> - <t t-raw="o.company_id.currency_id.name"/></t>
|
||||
<t t-set="company_name" t-value="o.company_id.name"/>
|
||||
<div class="page data_table">
|
||||
<t t-set="title">VAT Report</t>
|
||||
<div class="row">
|
||||
<h4 class="mt0" t-esc="title or 'Odoo Report'"/>
|
||||
</div>
|
||||
<!-- Display filters -->
|
||||
<t t-call="account_financial_report.report_vat_report_filters"/>
|
||||
<div class="page_break"/>
|
||||
|
||||
<div class="act_as_table data_table" style="width: 100%;">
|
||||
<!-- Display table headers for lines -->
|
||||
<div class="act_as_thead">
|
||||
|
|
|
@ -10,8 +10,10 @@ class TrialBalanceXslx(models.AbstractModel):
|
|||
_name = 'report.a_f_r.report_trial_balance_xlsx'
|
||||
_inherit = 'report.account_financial_report.abstract_report_xlsx'
|
||||
|
||||
def _get_report_name(self):
|
||||
return _('Trial Balance')
|
||||
def _get_report_name(self, objects):
|
||||
report = objects
|
||||
return _('Trial Balance - %s - %s') % (
|
||||
report.company_id.name, report.company_id.currency_id.name)
|
||||
|
||||
def _get_report_columns(self, report):
|
||||
if not report.show_partner_details:
|
||||
|
|
|
@ -8,8 +8,10 @@ class VATReportXslx(models.AbstractModel):
|
|||
_name = 'report.a_f_r.report_vat_report_xlsx'
|
||||
_inherit = 'report.account_financial_report.abstract_report_xlsx'
|
||||
|
||||
def _get_report_name(self):
|
||||
return _('VAT Report')
|
||||
def _get_report_name(self, objects):
|
||||
report = objects
|
||||
return _('VAT Report - %s - %s') % (
|
||||
report.company_id.name, report.company_id.currency_id.name)
|
||||
|
||||
def _get_report_columns(self, report):
|
||||
return {
|
||||
|
|
Loading…
Reference in New Issue