Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0][FIX] l10n_th_account_tax_report: check tax date null #445

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions l10n_th_account_tax_report/reports/tax_report.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
/>
</div>
<div class="col-6 text-right custom_footer">
<span class="page" />
/
<span class="topage" />
<span class="page" />
/
<span class="topage" />
</div>
</div>
</div>
Expand Down Expand Up @@ -118,7 +118,7 @@
<t t-out="n" />
</div>
<div class="act_as_cell left">
<t t-out="line.tax_date.strftime('%d/%m/%Y')" />
<t t-out="line.tax_date and line.tax_date.strftime('%d/%m/%Y')" />
</div>
<div class="act_as_cell left">
<t t-out="line.tax_invoice_number" />
Expand Down
10 changes: 5 additions & 5 deletions l10n_th_account_tax_report/reports/tax_report_rd.xml
Original file line number Diff line number Diff line change
Expand Up @@ -237,23 +237,23 @@
<t t-set="n" t-value="n + 1" />
<span t-out="n" />
</td>
<td>
<td class="text-center">
<span
t-out="(line.tax_date + relativedelta(years=543)).strftime('%d/%m/%Y')"
t-out="line.tax_date and (line.tax_date + relativedelta(years=543)).strftime('%d/%m/%Y')"
/>
</td>
<td>
<td class="text-center">
<span t-out="line.tax_invoice_number" />
</td>
<td>
<td class="text-center">
<t t-out="line.name" />
</td>
<td>
<span
t-out="line.partner_id.display_name"
/>
</td>
<td>
<td class="text-center">
<span t-out="line.partner_id.vat" />
</td>
<td>
Expand Down
1 change: 0 additions & 1 deletion l10n_th_account_tax_report/reports/tax_report_xlsx.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ def _get_tax_template(self):
"header": {"value": "Date"},
"data": {
"value": self._render("tax_date"),
"type": "datetime",
"format": FORMATS["format_date_dmy_right"],
},
"width": 12,
Expand Down
3 changes: 3 additions & 0 deletions l10n_th_account_tax_report/static/src/scss/style_report.scss
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@
.custom_footer {
font-size: 7px !important;
}
.text-right {
text-align: right;
}
.page_break {
page-break-inside: avoid;
}
Expand Down
Loading