Browse Source

[FIX] account_financial_report: fix data format

use t-options to display data fields in accordance with the country-specific format.
pull/725/head
Dorin Hongu 4 years ago
parent
commit
b06d1538c0
  1. 3
      account_financial_report/report/aged_partner_balance.py
  2. 8
      account_financial_report/report/open_items.py
  3. 2
      account_financial_report/report/templates/aged_partner_balance.xml
  4. 3
      account_financial_report/report/templates/general_ledger.xml
  5. 4
      account_financial_report/report/templates/open_items.xml
  6. 4
      account_financial_report/report/templates/vat_report.xml

3
account_financial_report/report/aged_partner_balance.py

@ -439,7 +439,8 @@ class AgedPartnerBalanceReport(models.AbstractModel):
account_ids = data["account_ids"]
partner_ids = data["partner_ids"]
date_at = data["date_at"]
date_at_object = datetime.strptime(date_at, "%Y-%m-%d").date()
date_at = datetime.strptime(date_at, "%Y-%m-%d").date()
date_at_object = date_at
date_from = data["date_from"]
only_posted_moves = data["only_posted_moves"]
show_move_line_details = data["show_move_line_details"]

8
account_financial_report/report/open_items.py

@ -353,8 +353,10 @@ class OpenItemsReport(models.AbstractModel):
company_id = data["company_id"]
account_ids = data["account_ids"]
partner_ids = data["partner_ids"]
date_at = data["date_at"]
date_at_object = datetime.strptime(date_at, "%Y-%m-%d").date()
date_at = datetime.strptime(
data["date_at"], "%Y-%m-%d"
).date() # data["date_at"]
date_at_object = date_at # datetime.strptime(date_at, "%Y-%m-%d").date()
date_from = data["date_from"]
target_move = data["target_move"]
show_partner_details = data["show_partner_details"]
@ -381,7 +383,7 @@ class OpenItemsReport(models.AbstractModel):
"show_partner_details": data["show_partner_details"],
"company_name": company.display_name,
"currency_name": company.currency_id.name,
"date_at": date_at_object.strftime("%d/%m/%Y"),
"date_at": date_at_object,
"hide_account_at_0": data["hide_account_at_0"],
"target_move": data["target_move"],
"journals_data": journals_data,

2
account_financial_report/report/templates/aged_partner_balance.xml

@ -94,7 +94,7 @@
</div>
<div class="act_as_row">
<div class="act_as_cell">
<span t-esc="date_at" />
<span t-esc="date_at" t-options="{'widget': 'date'}" />
</div>
<div class="act_as_cell">
<t t-if="only_posted_moves">All posted entries</t>

3
account_financial_report/report/templates/general_ledger.xml

@ -115,7 +115,8 @@
</div>
<div class="act_as_row">
<div class="act_as_cell">
From: <span t-esc="date_from" /> To: <span t-esc="date_to" />
From: <span t-esc="date_from" t-options="{'widget': 'date'}" />
To: <span t-esc="date_to" t-options="{'widget': 'date'}" />
</div>
<div class="act_as_cell">
<t t-if="only_posted_moves">All posted entries</t>

4
account_financial_report/report/templates/open_items.xml

@ -110,7 +110,7 @@
</div>
<div class="act_as_row">
<div class="act_as_cell">
<span t-esc="date_at" />
<span t-esc="date_at" t-options="{'widget': 'date'}" />
</div>
<div class="act_as_cell">
<t t-if="target_move == 'posted'">All posted entries</t>
@ -172,7 +172,7 @@
<div class="act_as_row lines">
<!--## date-->
<div class="act_as_cell left">
<span t-raw="line['date'].strftime('%d/%m/%Y')" />
<span t-esc="line['date']" t-options="{'widget': 'date'}" />
</div>
<!--## move-->
<div class="act_as_cell left">

4
account_financial_report/report/templates/vat_report.xml

@ -179,10 +179,10 @@
</div>
<div class="act_as_row">
<div class="act_as_cell">
<span t-esc="date_from" />
<span t-esc="date_from" t-options="{'widget': 'date'}" />
</div>
<div class="act_as_cell">
<span t-esc="date_to" />
<span t-esc="date_to" t-options="{'widget': 'date'}" />
</div>
<div class="act_as_cell">
<span t-esc="based_on" />

Loading…
Cancel
Save