Browse Source

[IMP] account_financial_report:

* fix speed issue in VAT report
* rename Cost Center to Analytic Account in General Ledger
pull/660/head
Jordi Ballester Alomar 5 years ago
committed by Joan Sisquella
parent
commit
e1b62581d2
  1. 4
      account_financial_report/report/general_ledger_xlsx.py
  2. 4
      account_financial_report/report/templates/general_ledger.xml
  3. 3
      account_financial_report/report/vat_report.py
  4. 2
      account_financial_report/wizard/general_ledger_wizard.py
  5. 7
      account_financial_report/wizard/general_ledger_wizard_view.xml

4
account_financial_report/report/general_ledger_xlsx.py

@ -35,9 +35,9 @@ class GeneralLedgerXslx(models.AbstractModel):
]
if report.show_cost_center:
res += [
{'header': _('Cost center'),
{'header': _('Analytic Account'),
'field': 'analytic_account',
'width': 15},
'width': 20},
]
if report.show_analytic_tags:
res += [

4
account_financial_report/report/templates/general_ledger.xml

@ -141,8 +141,8 @@
Label</div>
<t t-if="show_cost_center">
<!--## cost_center-->
<div class="act_as_cell" style="width: 8.03%;">Cost
center</div>
<div class="act_as_cell"
style="width: 8.03%;">Analytic Account</div>
</t>
<t t-if="show_analytic_tags">
<!--## analytic tags-->

3
account_financial_report/report/vat_report.py

@ -44,7 +44,6 @@ class VATReport(models.AbstractModel):
domain = [('company_id', '=', company_id),
('date', '>=', date_from),
('date', '<=', date_to),
('tax_ids', '!=', False),
('tax_exigible', '=', True)]
if only_posted_moves:
domain += [('move_id.state', '=', 'posted')]
@ -68,6 +67,8 @@ class VATReport(models.AbstractModel):
domain=net_domain,
fields=ml_fields,
)
taxed_move_lines = list(
filter(lambda d: d['tax_ids'], taxed_move_lines))
vat_data = []
for tax_move_line in tax_move_lines:
vat_data.append({

2
account_financial_report/wizard/general_ledger_wizard.py

@ -100,7 +100,7 @@ class GeneralLedgerReportWizard(models.TransientModel):
default=True,
)
show_cost_center = fields.Boolean(
string='Show Cost Center',
string='Show Analytic Account',
default=True,
)

7
account_financial_report/wizard/general_ledger_wizard_view.xml

@ -61,10 +61,11 @@
widget="many2many_tags"
options="{'no_create': True}"/>
</page>
<page string="Filter cost centers" groups="analytic.group_analytic_accounting">
<page string="Filter analytic accounts" groups="analytic.group_analytic_accounting">
<field name="cost_center_ids" nolabel="1"
options="{'no_create': True}"
groups="analytic.group_analytic_accounting"/>
widget="many2many_tags"
options="{'no_create': True}"/>
</page>
<page string="Filter analytic tags">
<field name="analytic_tag_ids" widget="many2many_tags" nolabel="1" options="{'no_create': True}"/>

Loading…
Cancel
Save