add proper titles
parent
7733badcfe
commit
f4b6c88008
|
@ -41,7 +41,7 @@ class AbstractReportXslx(models.AbstractModel):
|
||||||
|
|
||||||
self._define_formats(workbook)
|
self._define_formats(workbook)
|
||||||
|
|
||||||
report_name = self._get_report_name()
|
report_name = self._get_report_name(objects)
|
||||||
report_footer = self._get_report_footer()
|
report_footer = self._get_report_footer()
|
||||||
filters = self._get_report_filters(report)
|
filters = self._get_report_filters(report)
|
||||||
self.columns = self._get_report_columns(report)
|
self.columns = self._get_report_columns(report)
|
||||||
|
@ -349,7 +349,7 @@ class AbstractReportXslx(models.AbstractModel):
|
||||||
"""
|
"""
|
||||||
raise NotImplementedError()
|
raise NotImplementedError()
|
||||||
|
|
||||||
def _get_report_name(self):
|
def _get_report_name(self, objects):
|
||||||
"""
|
"""
|
||||||
Allow to define the report name.
|
Allow to define the report name.
|
||||||
Report name will be used as sheet name and as report title.
|
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'
|
_name = 'report.a_f_r.report_aged_partner_balance_xlsx'
|
||||||
_inherit = 'report.account_financial_report.abstract_report_xlsx'
|
_inherit = 'report.account_financial_report.abstract_report_xlsx'
|
||||||
|
|
||||||
def _get_report_name(self):
|
def _get_report_name(self, objects):
|
||||||
return _('Aged Partner Balance')
|
report = objects
|
||||||
|
return _('Aged Partner Balance - %s - %s') % (
|
||||||
|
report.company_id.name, report.company_id.currency_id.name)
|
||||||
|
|
||||||
def _get_report_columns(self, report):
|
def _get_report_columns(self, report):
|
||||||
if not report.show_move_line_details:
|
if not report.show_move_line_details:
|
||||||
|
|
|
@ -11,8 +11,10 @@ class GeneralLedgerXslx(models.AbstractModel):
|
||||||
_name = 'report.a_f_r.report_general_ledger_xlsx'
|
_name = 'report.a_f_r.report_general_ledger_xlsx'
|
||||||
_inherit = 'report.account_financial_report.abstract_report_xlsx'
|
_inherit = 'report.account_financial_report.abstract_report_xlsx'
|
||||||
|
|
||||||
def _get_report_name(self):
|
def _get_report_name(self, objects):
|
||||||
return _('General Ledger')
|
report = objects
|
||||||
|
return _('General Ledger - %s - %s') % (
|
||||||
|
report.company_id.name, report.company_id.currency_id.name)
|
||||||
|
|
||||||
def _get_report_columns(self, report):
|
def _get_report_columns(self, report):
|
||||||
res = {
|
res = {
|
||||||
|
|
|
@ -10,8 +10,10 @@ class JournalLedgerXslx(models.AbstractModel):
|
||||||
_name = 'report.a_f_r.report_journal_ledger_xlsx'
|
_name = 'report.a_f_r.report_journal_ledger_xlsx'
|
||||||
_inherit = 'report.account_financial_report.abstract_report_xlsx'
|
_inherit = 'report.account_financial_report.abstract_report_xlsx'
|
||||||
|
|
||||||
def _get_report_name(self):
|
def _get_report_name(self, objects):
|
||||||
return _('Journal Ledger')
|
report = objects
|
||||||
|
return _('Journal Ledger - %s - %s') % (
|
||||||
|
report.company_id.name, report.company_id.currency_id.name)
|
||||||
|
|
||||||
def _get_report_columns(self, report):
|
def _get_report_columns(self, report):
|
||||||
columns = [
|
columns = [
|
||||||
|
|
|
@ -9,8 +9,10 @@ class OpenItemsXslx(models.AbstractModel):
|
||||||
_name = 'report.a_f_r.report_open_items_xlsx'
|
_name = 'report.a_f_r.report_open_items_xlsx'
|
||||||
_inherit = 'report.account_financial_report.abstract_report_xlsx'
|
_inherit = 'report.account_financial_report.abstract_report_xlsx'
|
||||||
|
|
||||||
def _get_report_name(self):
|
def _get_report_name(self, objects):
|
||||||
return _('Open Items')
|
report = objects
|
||||||
|
return _('Open Items - %s - %s') % (
|
||||||
|
report.company_id.name, report.company_id.currency_id.name)
|
||||||
|
|
||||||
def _get_report_columns(self, report):
|
def _get_report_columns(self, report):
|
||||||
res = {
|
res = {
|
||||||
|
|
|
@ -14,12 +14,13 @@
|
||||||
<template id="report_aged_partner_balance_base">
|
<template id="report_aged_partner_balance_base">
|
||||||
<!-- Saved flag fields into variables, used to define columns display -->
|
<!-- Saved flag fields into variables, used to define columns display -->
|
||||||
<t t-set="show_move_line_details" t-value="o.show_move_line_details"/>
|
<t t-set="show_move_line_details" t-value="o.show_move_line_details"/>
|
||||||
|
|
||||||
<!-- Defines global variables used by internal layout -->
|
<!-- 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"/>
|
<t t-set="company_name" t-value="o.company_id.name"/>
|
||||||
|
<div class="page data_table">
|
||||||
<div class="page">
|
<div class="row">
|
||||||
|
<h4 class="mt0" t-esc="title or 'Odoo Report'"/>
|
||||||
|
</div>
|
||||||
<!-- Display filters -->
|
<!-- Display filters -->
|
||||||
<t t-call="account_financial_report.report_aged_partner_balance_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="show_cost_center" t-value="o.show_cost_center"/>
|
||||||
<t t-set="foreign_currency" t-value="o.foreign_currency"/>
|
<t t-set="foreign_currency" t-value="o.foreign_currency"/>
|
||||||
<!-- Defines global variables used by internal layout -->
|
<!-- 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"/>
|
<t t-set="company_name" t-value="o.company_id.name"/>
|
||||||
|
<div class="page data_table">
|
||||||
<div class="page">
|
<div class="row">
|
||||||
|
<h4 class="mt0" t-esc="title or 'Odoo Report'"/>
|
||||||
|
</div>
|
||||||
<!-- Display filters -->
|
<!-- Display filters -->
|
||||||
<t t-call="account_financial_report.report_general_ledger_filters"/>
|
<t t-call="account_financial_report.report_general_ledger_filters"/>
|
||||||
|
|
||||||
<t t-foreach="o.account_ids" t-as="account">
|
<t t-foreach="o.account_ids" t-as="account">
|
||||||
<div class="page_break">
|
<div class="page_break">
|
||||||
<!-- Display account header -->
|
<!-- Display account header -->
|
||||||
|
|
|
@ -12,12 +12,14 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template id="report_journal_ledger_base">
|
<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_currency" t-value="o.foreign_currency"/>
|
||||||
<t t-set="display_account_name" t-value="o.with_account_name"/>
|
<t t-set="display_account_name" t-value="o.with_account_name"/>
|
||||||
|
<t t-set="title">Journal Ledger - <t t-raw="o.company_id.name"/> - <t t-raw="o.company_id.currency_id.name"/></t>
|
||||||
<div class="page">
|
<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'">
|
<t t-if="o.group_option == 'none'">
|
||||||
<div class="page_break">
|
<div class="page_break">
|
||||||
<t t-call="account_financial_report.report_journal_all"/>
|
<t t-call="account_financial_report.report_journal_all"/>
|
||||||
|
|
|
@ -2,16 +2,6 @@
|
||||||
<odoo>
|
<odoo>
|
||||||
|
|
||||||
<template id="account_financial_report.internal_layout">
|
<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">
|
<div class="article">
|
||||||
<link href="/account_financial_report/static/src/css/report.css" rel="stylesheet"/>
|
<link href="/account_financial_report/static/src/css/report.css" rel="stylesheet"/>
|
||||||
<t t-raw="0" />
|
<t t-raw="0" />
|
||||||
|
|
|
@ -14,13 +14,13 @@
|
||||||
<template id="account_financial_report.report_open_items_base">
|
<template id="account_financial_report.report_open_items_base">
|
||||||
<!-- Saved flag fields into variables, used to define columns display -->
|
<!-- Saved flag fields into variables, used to define columns display -->
|
||||||
<t t-set="foreign_currency" t-value="o.foreign_currency"/>
|
<t t-set="foreign_currency" t-value="o.foreign_currency"/>
|
||||||
|
|
||||||
|
|
||||||
<!-- Defines global variables used by internal layout -->
|
<!-- 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"/>
|
<t t-set="company_name" t-value="o.company_id.name"/>
|
||||||
|
<div class="page data_table">
|
||||||
<div class="page">
|
<div class="row">
|
||||||
|
<h4 class="mt0" t-esc="title or 'Odoo Report'"/>
|
||||||
|
</div>
|
||||||
<!-- Display filters -->
|
<!-- Display filters -->
|
||||||
<t t-call="account_financial_report.report_open_items_filters"/>
|
<t t-call="account_financial_report.report_open_items_filters"/>
|
||||||
|
|
||||||
|
|
|
@ -16,11 +16,13 @@
|
||||||
<t t-set="show_partner_details" t-value="o.show_partner_details"/>
|
<t t-set="show_partner_details" t-value="o.show_partner_details"/>
|
||||||
<t t-set="foreign_currency" t-value="o.foreign_currency"/>
|
<t t-set="foreign_currency" t-value="o.foreign_currency"/>
|
||||||
<!-- Defines global variables used by internal layout -->
|
<!-- Defines global variables used by internal layout -->
|
||||||
<t t-set="title">Trial Balance</t>
|
<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="company_name" t-value="o.company_id.name"/>
|
||||||
<t t-set="res_company" t-value="o.company_id"/>
|
<t t-set="res_company" t-value="o.company_id"/>
|
||||||
|
<div class="page data_table">
|
||||||
<div class="page">
|
<div class="row">
|
||||||
|
<h4 class="mt0" t-esc="title or 'Odoo Report'"/>
|
||||||
|
</div>
|
||||||
<!-- Display filters -->
|
<!-- Display filters -->
|
||||||
<t t-call="account_financial_report.report_trial_balance_filters"/>
|
<t t-call="account_financial_report.report_trial_balance_filters"/>
|
||||||
<div class="act_as_table list_table" style="margin-top: 10px;"/>
|
<div class="act_as_table list_table" style="margin-top: 10px;"/>
|
||||||
|
|
|
@ -12,15 +12,15 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template id="account_financial_report.report_vat_report_base">
|
<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">
|
<div class="page data_table">
|
||||||
<t t-set="title">VAT Report</t>
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<h4 class="mt0" t-esc="title or 'Odoo Report'"/>
|
<h4 class="mt0" t-esc="title or 'Odoo Report'"/>
|
||||||
</div>
|
</div>
|
||||||
<!-- Display filters -->
|
<!-- Display filters -->
|
||||||
<t t-call="account_financial_report.report_vat_report_filters"/>
|
<t t-call="account_financial_report.report_vat_report_filters"/>
|
||||||
<div class="page_break"/>
|
<div class="page_break"/>
|
||||||
|
|
||||||
<div class="act_as_table data_table" style="width: 100%;">
|
<div class="act_as_table data_table" style="width: 100%;">
|
||||||
<!-- Display table headers for lines -->
|
<!-- Display table headers for lines -->
|
||||||
<div class="act_as_thead">
|
<div class="act_as_thead">
|
||||||
|
|
|
@ -10,8 +10,10 @@ class TrialBalanceXslx(models.AbstractModel):
|
||||||
_name = 'report.a_f_r.report_trial_balance_xlsx'
|
_name = 'report.a_f_r.report_trial_balance_xlsx'
|
||||||
_inherit = 'report.account_financial_report.abstract_report_xlsx'
|
_inherit = 'report.account_financial_report.abstract_report_xlsx'
|
||||||
|
|
||||||
def _get_report_name(self):
|
def _get_report_name(self, objects):
|
||||||
return _('Trial Balance')
|
report = objects
|
||||||
|
return _('Trial Balance - %s - %s') % (
|
||||||
|
report.company_id.name, report.company_id.currency_id.name)
|
||||||
|
|
||||||
def _get_report_columns(self, report):
|
def _get_report_columns(self, report):
|
||||||
if not report.show_partner_details:
|
if not report.show_partner_details:
|
||||||
|
|
|
@ -8,8 +8,10 @@ class VATReportXslx(models.AbstractModel):
|
||||||
_name = 'report.a_f_r.report_vat_report_xlsx'
|
_name = 'report.a_f_r.report_vat_report_xlsx'
|
||||||
_inherit = 'report.account_financial_report.abstract_report_xlsx'
|
_inherit = 'report.account_financial_report.abstract_report_xlsx'
|
||||||
|
|
||||||
def _get_report_name(self):
|
def _get_report_name(self, objects):
|
||||||
return _('VAT Report')
|
report = objects
|
||||||
|
return _('VAT Report - %s - %s') % (
|
||||||
|
report.company_id.name, report.company_id.currency_id.name)
|
||||||
|
|
||||||
def _get_report_columns(self, report):
|
def _get_report_columns(self, report):
|
||||||
return {
|
return {
|
||||||
|
|
Loading…
Reference in New Issue