[account_financial_report] adds the following features to Trial Balance:
- Adds 'Period balance' column - Renames the option 'Hide accounts at 0'. Means no initial, no debit, credit or ending balance for the period. - Fixes logic to remove lines with 0 activity for the period.pull/481/head
parent
eb4e875146
commit
7e651aa6fe
|
@ -1298,8 +1298,6 @@ ORDER BY
|
||||||
0.0 AS final_balance
|
0.0 AS final_balance
|
||||||
FROM
|
FROM
|
||||||
account_account a
|
account_account a
|
||||||
INNER JOIN
|
|
||||||
account_account_type at ON a.user_type_id = at.id
|
|
||||||
INNER JOIN
|
INNER JOIN
|
||||||
account_move_line ml
|
account_move_line ml
|
||||||
ON a.id = ml.account_id
|
ON a.id = ml.account_id
|
||||||
|
@ -1339,12 +1337,8 @@ ORDER BY
|
||||||
SELECT
|
SELECT
|
||||||
0.0 AS initial_balance,
|
0.0 AS initial_balance,
|
||||||
SUM(ml.balance) AS final_balance
|
SUM(ml.balance) AS final_balance
|
||||||
"""
|
|
||||||
sub_subquery_sum_amounts += """
|
|
||||||
FROM
|
FROM
|
||||||
account_account a
|
account_account a
|
||||||
INNER JOIN
|
|
||||||
account_account_type at ON a.user_type_id = at.id
|
|
||||||
INNER JOIN
|
INNER JOIN
|
||||||
account_move_line ml
|
account_move_line ml
|
||||||
ON a.id = ml.account_id
|
ON a.id = ml.account_id
|
||||||
|
|
|
@ -35,7 +35,12 @@
|
||||||
<!-- Adapt -->
|
<!-- Adapt -->
|
||||||
<t t-set="style" t-value="'font-size:8px;'"/>
|
<t t-set="style" t-value="'font-size:8px;'"/>
|
||||||
<t t-set="padding" t-value="line.level * 4"/>
|
<t t-set="padding" t-value="line.level * 4"/>
|
||||||
<t t-set="style" t-value="'font-size: ' + str(14 - line.level) + 'px; margin-left: ' + str(line.level * 4) + 'px;'"/>
|
<t t-if="o.hide_account_at_0">
|
||||||
|
<t t-set="style" t-value="'font-size: 14px;'"/>
|
||||||
|
</t>
|
||||||
|
<t t-if="not o.hide_account_at_0">
|
||||||
|
<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-if="line.account_group_id">
|
||||||
<t t-set="style" t-value="style + 'font-weight: bold; color: blue;'"/>
|
<t t-set="style" t-value="style + 'font-weight: bold; color: blue;'"/>
|
||||||
</t>
|
</t>
|
||||||
|
@ -113,8 +118,8 @@
|
||||||
<t t-if="not o.only_posted_moves">All entries</t>
|
<t t-if="not o.only_posted_moves">All entries</t>
|
||||||
</div>
|
</div>
|
||||||
<div class="act_as_cell">
|
<div class="act_as_cell">
|
||||||
<t t-if="o.hide_account_balance_at_0">Hide</t>
|
<t t-if="o.hide_account_at_0">Hide</t>
|
||||||
<t t-if="not o.hide_account_balance_at_0">Show</t>
|
<t t-if="not o.hide_account_at_0">Show</t>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -143,6 +148,8 @@
|
||||||
<div class="act_as_cell" style="width: 9.64%;">Debit</div>
|
<div class="act_as_cell" style="width: 9.64%;">Debit</div>
|
||||||
<!--## Credit-->
|
<!--## Credit-->
|
||||||
<div class="act_as_cell" style="width: 9.64%;">Credit</div>
|
<div class="act_as_cell" style="width: 9.64%;">Credit</div>
|
||||||
|
<!--## Period balance-->
|
||||||
|
<div class="act_as_cell" style="width: 9.64%;">Period balance</div>
|
||||||
<!--## Ending balance-->
|
<!--## Ending balance-->
|
||||||
<div class="act_as_cell" style="width: 9.64%;">Ending balance</div>
|
<div class="act_as_cell" style="width: 9.64%;">Ending balance</div>
|
||||||
<t t-if="foreign_currency">
|
<t t-if="foreign_currency">
|
||||||
|
@ -359,6 +366,38 @@
|
||||||
</span>
|
</span>
|
||||||
</t>
|
</t>
|
||||||
</div>
|
</div>
|
||||||
|
<!--## Period balance-->
|
||||||
|
<div class="act_as_cell amount">
|
||||||
|
<t t-if="type == 'account_type'">
|
||||||
|
<t t-if="line.account_id">
|
||||||
|
<t t-set="domain"
|
||||||
|
t-value="[('account_id', '=', line.account_id.id),
|
||||||
|
('date', '>=', line.report_id.date_from),
|
||||||
|
('date', '<=', line.report_id.date_to)]"/>
|
||||||
|
<span>
|
||||||
|
<a t-att-data-domain="domain"
|
||||||
|
t-att-data-res-model="'account.move.line'"
|
||||||
|
class="o_account_financial_reports_web_action_monetary_multi"
|
||||||
|
t-att-style="style">
|
||||||
|
<t t-att-style="style" t-raw="line.period_balance" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
|
||||||
|
</span>
|
||||||
|
</t>
|
||||||
|
</t>
|
||||||
|
<t t-if="type == 'partner_type'">
|
||||||
|
<t t-set="domain"
|
||||||
|
t-value="[('account_id', '=', line.report_account_id.account_id.id),
|
||||||
|
('partner_id', '=', line.partner_id.id),
|
||||||
|
('date', '>=', line.report_account_id.report_id.date_from),
|
||||||
|
('date', '<=', line.report_account_id.report_id.date_to)]"/>
|
||||||
|
<span>
|
||||||
|
<a t-att-data-domain="domain"
|
||||||
|
t-att-data-res-model="'account.move.line'"
|
||||||
|
class="o_account_financial_reports_web_action_monetary_multi"
|
||||||
|
t-att-style="style">
|
||||||
|
<t t-att-style="style" t-raw="line.period_balance" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
|
||||||
|
</span>
|
||||||
|
</t>
|
||||||
|
</div>
|
||||||
<!--## Ending balance-->
|
<!--## Ending balance-->
|
||||||
<div class="act_as_cell amount">
|
<div class="act_as_cell amount">
|
||||||
<t t-if="type == 'account_type'">
|
<t t-if="type == 'account_type'">
|
||||||
|
@ -551,6 +590,21 @@
|
||||||
<t t-att-style="style" t-raw="account.credit" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
|
<t t-att-style="style" t-raw="account.credit" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
<!--## Period Balance -->
|
||||||
|
<div class="act_as_cell amount" style="width: 9.64%;">
|
||||||
|
<t t-set="domain"
|
||||||
|
t-value="[('account_id', '=', account.account_id.id),
|
||||||
|
('date', '>=', account.report_id.date_from),
|
||||||
|
('date', '<=', account.report_id.date_to),
|
||||||
|
('period_balance', '<>', 0)]"/>
|
||||||
|
<span>
|
||||||
|
<a t-att-data-domain="domain"
|
||||||
|
t-att-data-res-model="'account.move.line'"
|
||||||
|
class="o_account_financial_reports_web_action_monetary_multi"
|
||||||
|
t-att-style="style">
|
||||||
|
<t t-att-style="style" t-raw="account.period_balance" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
<!--## Ending balance-->
|
<!--## Ending balance-->
|
||||||
<div class="act_as_cell amount" style="width: 9.64%;">
|
<div class="act_as_cell amount" style="width: 9.64%;">
|
||||||
<t t-set="domain"
|
<t t-set="domain"
|
||||||
|
|
|
@ -24,18 +24,26 @@ class TrialBalanceReport(models.TransientModel):
|
||||||
date_to = fields.Date()
|
date_to = fields.Date()
|
||||||
fy_start_date = fields.Date()
|
fy_start_date = fields.Date()
|
||||||
only_posted_moves = fields.Boolean()
|
only_posted_moves = fields.Boolean()
|
||||||
hide_account_balance_at_0 = fields.Boolean()
|
hide_account_at_0 = fields.Boolean()
|
||||||
foreign_currency = fields.Boolean()
|
foreign_currency = fields.Boolean()
|
||||||
company_id = fields.Many2one(comodel_name='res.company')
|
company_id = fields.Many2one(comodel_name='res.company')
|
||||||
filter_account_ids = fields.Many2many(comodel_name='account.account')
|
filter_account_ids = fields.Many2many(comodel_name='account.account')
|
||||||
filter_partner_ids = fields.Many2many(comodel_name='res.partner')
|
filter_partner_ids = fields.Many2many(comodel_name='res.partner')
|
||||||
filter_journal_ids = fields.Many2many(comodel_name='account.journal')
|
filter_journal_ids = fields.Many2many(comodel_name='account.journal')
|
||||||
show_partner_details = fields.Boolean()
|
show_partner_details = fields.Boolean()
|
||||||
hierarchy_on = fields.Selection([('computed', 'Computed Accounts'),
|
hierarchy_on = fields.Selection(
|
||||||
('relation', 'Child Accounts')],
|
[('computed', 'Computed Accounts'),
|
||||||
string='Hierarchy On',
|
('relation', 'Child Accounts'),
|
||||||
required=True,
|
('none', 'No hierarchy')],
|
||||||
default='computed')
|
string='Hierarchy On',
|
||||||
|
required=True,
|
||||||
|
default='computed',
|
||||||
|
help="""Computed Accounts: Use when the account group have codes
|
||||||
|
that represent prefixes of the actual accounts.\n
|
||||||
|
Child Accounts: Use when your account groups are hierarchical.\n
|
||||||
|
No hierarchy: Use to display just the accounts, without any grouping.
|
||||||
|
""",
|
||||||
|
)
|
||||||
|
|
||||||
# General Ledger Report Data fields,
|
# General Ledger Report Data fields,
|
||||||
# used as base for compute the data reports
|
# used as base for compute the data reports
|
||||||
|
@ -94,6 +102,7 @@ class TrialBalanceReportAccount(models.TransientModel):
|
||||||
initial_balance_foreign_currency = fields.Float(digits=(16, 2))
|
initial_balance_foreign_currency = fields.Float(digits=(16, 2))
|
||||||
debit = fields.Float(digits=(16, 2))
|
debit = fields.Float(digits=(16, 2))
|
||||||
credit = fields.Float(digits=(16, 2))
|
credit = fields.Float(digits=(16, 2))
|
||||||
|
period_balance = fields.Float(digits=(16, 2))
|
||||||
final_balance = fields.Float(digits=(16, 2))
|
final_balance = fields.Float(digits=(16, 2))
|
||||||
final_balance_foreign_currency = fields.Float(digits=(16, 2))
|
final_balance_foreign_currency = fields.Float(digits=(16, 2))
|
||||||
|
|
||||||
|
@ -128,6 +137,7 @@ class TrialBalanceReportPartner(models.TransientModel):
|
||||||
initial_balance_foreign_currency = fields.Float(digits=(16, 2))
|
initial_balance_foreign_currency = fields.Float(digits=(16, 2))
|
||||||
debit = fields.Float(digits=(16, 2))
|
debit = fields.Float(digits=(16, 2))
|
||||||
credit = fields.Float(digits=(16, 2))
|
credit = fields.Float(digits=(16, 2))
|
||||||
|
period_balance = fields.Float(digits=(16, 2))
|
||||||
final_balance = fields.Float(digits=(16, 2))
|
final_balance = fields.Float(digits=(16, 2))
|
||||||
final_balance_foreign_currency = fields.Float(digits=(16, 2))
|
final_balance_foreign_currency = fields.Float(digits=(16, 2))
|
||||||
|
|
||||||
|
@ -186,7 +196,7 @@ class TrialBalanceReportCompute(models.TransientModel):
|
||||||
'date_from': self.date_from,
|
'date_from': self.date_from,
|
||||||
'date_to': self.date_to,
|
'date_to': self.date_to,
|
||||||
'only_posted_moves': self.only_posted_moves,
|
'only_posted_moves': self.only_posted_moves,
|
||||||
'hide_account_balance_at_0': self.hide_account_balance_at_0,
|
'hide_account_at_0': self.hide_account_at_0,
|
||||||
'foreign_currency': self.foreign_currency,
|
'foreign_currency': self.foreign_currency,
|
||||||
'company_id': self.company_id.id,
|
'company_id': self.company_id.id,
|
||||||
'filter_account_ids': [(6, 0, account_ids.ids)],
|
'filter_account_ids': [(6, 0, account_ids.ids)],
|
||||||
|
@ -220,18 +230,28 @@ class TrialBalanceReportCompute(models.TransientModel):
|
||||||
self._inject_partner_values()
|
self._inject_partner_values()
|
||||||
if not self.filter_account_ids:
|
if not self.filter_account_ids:
|
||||||
self._inject_account_group_values()
|
self._inject_account_group_values()
|
||||||
if self.hierarchy_on == 'computed':
|
if self.hierarchy_on != 'none':
|
||||||
self._update_account_group_computed_values()
|
if self.hierarchy_on == 'computed':
|
||||||
else:
|
self._update_account_group_computed_values()
|
||||||
self._update_account_group_child_values()
|
else:
|
||||||
self._update_account_sequence()
|
self._update_account_group_child_values()
|
||||||
self._add_account_group_account_values()
|
self._update_account_sequence()
|
||||||
|
self._add_account_group_account_values()
|
||||||
self.refresh()
|
self.refresh()
|
||||||
if not self.filter_account_ids:
|
if not self.filter_account_ids and self.hierarchy_on != 'none':
|
||||||
self._compute_group_accounts()
|
self._compute_group_accounts()
|
||||||
else:
|
else:
|
||||||
for line in self.account_ids:
|
for line in self.account_ids:
|
||||||
line.write({'level': 0})
|
line.write({'level': 0})
|
||||||
|
if self.hide_account_at_0:
|
||||||
|
self.env.cr.execute("""
|
||||||
|
DELETE FROM report_trial_balance_account
|
||||||
|
WHERE report_id=%s
|
||||||
|
AND (initial_balance IS NULL OR initial_balance = 0)
|
||||||
|
AND (debit IS NULL OR debit = 0)
|
||||||
|
AND (credit IS NULL OR credit = 0)
|
||||||
|
AND (final_balance IS NULL OR final_balance = 0)
|
||||||
|
""", [self.id])
|
||||||
|
|
||||||
def _inject_account_values(self, account_ids):
|
def _inject_account_values(self, account_ids):
|
||||||
"""Inject report values for report_trial_balance_account"""
|
"""Inject report values for report_trial_balance_account"""
|
||||||
|
@ -249,6 +269,7 @@ INSERT INTO
|
||||||
initial_balance,
|
initial_balance,
|
||||||
debit,
|
debit,
|
||||||
credit,
|
credit,
|
||||||
|
period_balance,
|
||||||
final_balance,
|
final_balance,
|
||||||
currency_id,
|
currency_id,
|
||||||
initial_balance_foreign_currency,
|
initial_balance_foreign_currency,
|
||||||
|
@ -265,6 +286,7 @@ SELECT
|
||||||
coalesce(rag.initial_balance, 0) AS initial_balance,
|
coalesce(rag.initial_balance, 0) AS initial_balance,
|
||||||
coalesce(rag.final_debit - rag.initial_debit, 0) AS debit,
|
coalesce(rag.final_debit - rag.initial_debit, 0) AS debit,
|
||||||
coalesce(rag.final_credit - rag.initial_credit, 0) AS credit,
|
coalesce(rag.final_credit - rag.initial_credit, 0) AS credit,
|
||||||
|
coalesce(rag.final_balance - rag.initial_balance, 0) AS period_balance,
|
||||||
coalesce(rag.final_balance, 0) AS final_balance,
|
coalesce(rag.final_balance, 0) AS final_balance,
|
||||||
rag.currency_id AS currency_id,
|
rag.currency_id AS currency_id,
|
||||||
coalesce(rag.initial_balance_foreign_currency, 0)
|
coalesce(rag.initial_balance_foreign_currency, 0)
|
||||||
|
@ -278,9 +300,6 @@ FROM
|
||||||
WHERE
|
WHERE
|
||||||
acc.id in %s
|
acc.id in %s
|
||||||
"""
|
"""
|
||||||
if self.hide_account_balance_at_0:
|
|
||||||
query_inject_account += """ AND
|
|
||||||
final_balance IS NOT NULL AND final_balance != 0"""
|
|
||||||
query_inject_account_params = (
|
query_inject_account_params = (
|
||||||
self.id,
|
self.id,
|
||||||
self.env.uid,
|
self.env.uid,
|
||||||
|
@ -304,6 +323,7 @@ INSERT INTO
|
||||||
initial_balance_foreign_currency,
|
initial_balance_foreign_currency,
|
||||||
debit,
|
debit,
|
||||||
credit,
|
credit,
|
||||||
|
period_balance,
|
||||||
final_balance,
|
final_balance,
|
||||||
final_balance_foreign_currency
|
final_balance_foreign_currency
|
||||||
)
|
)
|
||||||
|
@ -317,6 +337,7 @@ SELECT
|
||||||
rpg.initial_balance_foreign_currency AS initial_balance_foreign_currency,
|
rpg.initial_balance_foreign_currency AS initial_balance_foreign_currency,
|
||||||
rpg.final_debit - rpg.initial_debit AS debit,
|
rpg.final_debit - rpg.initial_debit AS debit,
|
||||||
rpg.final_credit - rpg.initial_credit AS credit,
|
rpg.final_credit - rpg.initial_credit AS credit,
|
||||||
|
rpg.final_balance - rpg.initial_balance AS period_balance,
|
||||||
rpg.final_balance AS final_balance,
|
rpg.final_balance AS final_balance,
|
||||||
rpg.final_balance_foreign_currency AS final_balance_foreign_currency
|
rpg.final_balance_foreign_currency AS final_balance_foreign_currency
|
||||||
FROM
|
FROM
|
||||||
|
|
|
@ -30,22 +30,26 @@ class TrialBalanceXslx(models.AbstractModel):
|
||||||
'field': 'credit',
|
'field': 'credit',
|
||||||
'type': 'amount',
|
'type': 'amount',
|
||||||
'width': 14},
|
'width': 14},
|
||||||
5: {'header': _('Ending balance'),
|
5: {'header': _('Period balance'),
|
||||||
|
'field': 'period_balance',
|
||||||
|
'type': 'amount',
|
||||||
|
'width': 14},
|
||||||
|
6: {'header': _('Ending balance'),
|
||||||
'field': 'final_balance',
|
'field': 'final_balance',
|
||||||
'type': 'amount',
|
'type': 'amount',
|
||||||
'width': 14},
|
'width': 14},
|
||||||
}
|
}
|
||||||
if report.foreign_currency:
|
if report.foreign_currency:
|
||||||
foreign_currency = {
|
foreign_currency = {
|
||||||
6: {'header': _('Cur.'),
|
7: {'header': _('Cur.'),
|
||||||
'field': 'currency_id',
|
'field': 'currency_id',
|
||||||
'field_currency_balance': 'currency_id',
|
'field_currency_balance': 'currency_id',
|
||||||
'type': 'many2one', 'width': 7},
|
'type': 'many2one', 'width': 7},
|
||||||
7: {'header': _('Initial balance'),
|
8: {'header': _('Initial balance'),
|
||||||
'field': 'initial_balance_foreign_currency',
|
'field': 'initial_balance_foreign_currency',
|
||||||
'type': 'amount_currency',
|
'type': 'amount_currency',
|
||||||
'width': 14},
|
'width': 14},
|
||||||
8: {'header': _('Ending balance'),
|
9: {'header': _('Ending balance'),
|
||||||
'field': 'final_balance_foreign_currency',
|
'field': 'final_balance_foreign_currency',
|
||||||
'type': 'amount_currency',
|
'type': 'amount_currency',
|
||||||
'width': 14},
|
'width': 14},
|
||||||
|
@ -67,7 +71,11 @@ class TrialBalanceXslx(models.AbstractModel):
|
||||||
'field': 'credit',
|
'field': 'credit',
|
||||||
'type': 'amount',
|
'type': 'amount',
|
||||||
'width': 14},
|
'width': 14},
|
||||||
4: {'header': _('Ending balance'),
|
4: {'header': _('Period balance'),
|
||||||
|
'field': 'period_balance',
|
||||||
|
'type': 'amount',
|
||||||
|
'width': 14},
|
||||||
|
5: {'header': _('Ending balance'),
|
||||||
'field': 'final_balance',
|
'field': 'final_balance',
|
||||||
'type': 'amount',
|
'type': 'amount',
|
||||||
'width': 14},
|
'width': 14},
|
||||||
|
@ -97,8 +105,8 @@ class TrialBalanceXslx(models.AbstractModel):
|
||||||
[_('Target moves filter'),
|
[_('Target moves filter'),
|
||||||
_('All posted entries') if report.only_posted_moves else _(
|
_('All posted entries') if report.only_posted_moves else _(
|
||||||
'All entries')],
|
'All entries')],
|
||||||
[_('Account balance at 0 filter'),
|
[_('Account at 0 filter'),
|
||||||
_('Hide') if report.hide_account_balance_at_0 else _('Show')],
|
_('Hide') if report.hide_account_at_0 else _('Show')],
|
||||||
[_('Show foreign currency'),
|
[_('Show foreign currency'),
|
||||||
_('Yes') if report.foreign_currency else _('No')],
|
_('Yes') if report.foreign_currency else _('No')],
|
||||||
]
|
]
|
||||||
|
|
|
@ -31,21 +31,28 @@ class TrialBalanceReportWizard(models.TransientModel):
|
||||||
string='Target Moves',
|
string='Target Moves',
|
||||||
required=True,
|
required=True,
|
||||||
default='all')
|
default='all')
|
||||||
hierarchy_on = fields.Selection([('computed', 'Computed Accounts'),
|
hierarchy_on = fields.Selection(
|
||||||
('relation', 'Child Accounts')],
|
[('computed', 'Computed Accounts'),
|
||||||
string='Hierarchy On',
|
('relation', 'Child Accounts'),
|
||||||
required=True,
|
('none', 'No hierarchy')],
|
||||||
default='computed')
|
string='Hierarchy On',
|
||||||
|
required=True,
|
||||||
|
default='computed',
|
||||||
|
help="""Computed Accounts: Use when the account group have codes
|
||||||
|
that represent prefixes of the actual accounts.\n
|
||||||
|
Child Accounts: Use when your account groups are hierarchical.\n
|
||||||
|
No hierarchy: Use to display just the accounts, without any grouping.
|
||||||
|
""",
|
||||||
|
)
|
||||||
account_ids = fields.Many2many(
|
account_ids = fields.Many2many(
|
||||||
comodel_name='account.account',
|
comodel_name='account.account',
|
||||||
string='Filter accounts',
|
string='Filter accounts',
|
||||||
)
|
)
|
||||||
hide_account_balance_at_0 = fields.Boolean(
|
hide_account_at_0 = fields.Boolean(
|
||||||
string='Hide account ending balance at 0',
|
string='Hide accounts at 0', default=True,
|
||||||
help='Use this filter to hide an account or a partner '
|
help='When this option is enabled, the trial balance will '
|
||||||
'with an ending balance at 0. '
|
'not display accounts that have initial balance = '
|
||||||
'If partners are filtered, '
|
'debit = credit = end balance = 0',
|
||||||
'debits and credits totals will not match the trial balance.'
|
|
||||||
)
|
)
|
||||||
receivable_accounts_only = fields.Boolean()
|
receivable_accounts_only = fields.Boolean()
|
||||||
payable_accounts_only = fields.Boolean()
|
payable_accounts_only = fields.Boolean()
|
||||||
|
@ -114,10 +121,8 @@ class TrialBalanceReportWizard(models.TransientModel):
|
||||||
"""Handle partners change."""
|
"""Handle partners change."""
|
||||||
if self.show_partner_details:
|
if self.show_partner_details:
|
||||||
self.receivable_accounts_only = self.payable_accounts_only = True
|
self.receivable_accounts_only = self.payable_accounts_only = True
|
||||||
self.hide_account_balance_at_0 = True
|
|
||||||
else:
|
else:
|
||||||
self.receivable_accounts_only = self.payable_accounts_only = False
|
self.receivable_accounts_only = self.payable_accounts_only = False
|
||||||
self.hide_account_balance_at_0 = False
|
|
||||||
|
|
||||||
@api.multi
|
@api.multi
|
||||||
def button_export_html(self):
|
def button_export_html(self):
|
||||||
|
@ -155,7 +160,7 @@ class TrialBalanceReportWizard(models.TransientModel):
|
||||||
'date_from': self.date_from,
|
'date_from': self.date_from,
|
||||||
'date_to': self.date_to,
|
'date_to': self.date_to,
|
||||||
'only_posted_moves': self.target_move == 'posted',
|
'only_posted_moves': self.target_move == 'posted',
|
||||||
'hide_account_balance_at_0': self.hide_account_balance_at_0,
|
'hide_account_at_0': self.hide_account_at_0,
|
||||||
'foreign_currency': self.foreign_currency,
|
'foreign_currency': self.foreign_currency,
|
||||||
'company_id': self.company_id.id,
|
'company_id': self.company_id.id,
|
||||||
'filter_account_ids': [(6, 0, self.account_ids.ids)],
|
'filter_account_ids': [(6, 0, self.account_ids.ids)],
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
</group>
|
</group>
|
||||||
<group name="other_filters">
|
<group name="other_filters">
|
||||||
<field name="target_move" widget="radio"/>
|
<field name="target_move" widget="radio"/>
|
||||||
<field name="hide_account_balance_at_0"/>
|
<field name="hide_account_at_0"/>
|
||||||
<field name="show_partner_details"/>
|
<field name="show_partner_details"/>
|
||||||
<field name="hierarchy_on" widget="radio" attrs="{'invisible':[('show_partner_details','=',True)]}"/>
|
<field name="hierarchy_on" widget="radio" attrs="{'invisible':[('show_partner_details','=',True)]}"/>
|
||||||
<field name="foreign_currency"/>
|
<field name="foreign_currency"/>
|
||||||
|
|
Loading…
Reference in New Issue