From d16304e57b0f0a9fe02f17af9d461421bd426d4e Mon Sep 17 00:00:00 2001 From: Denis Durepos Date: Wed, 12 Mar 2025 13:48:10 -0400 Subject: [PATCH] Refactored layout to add pst to base external layout instead of each of the inherited views. --- .../tests/test_report_tax_numbers.py | 4 +- l10n_ca_pst_reports/views/external_layout.xml | 141 ++---------------- 2 files changed, 16 insertions(+), 129 deletions(-) diff --git a/l10n_ca_pst_reports/tests/test_report_tax_numbers.py b/l10n_ca_pst_reports/tests/test_report_tax_numbers.py index d7977f3..266bb7c 100644 --- a/l10n_ca_pst_reports/tests/test_report_tax_numbers.py +++ b/l10n_ca_pst_reports/tests/test_report_tax_numbers.py @@ -43,7 +43,7 @@ class TestReportTaxNumbers(TransactionCase): text = self._get_pdf_content('account.report_invoice', self.invoice.id) # Check for GST and PST numbers - self.assertIn('GST: 123456789', text, "GST number not found in invoice") + self.assertIn('GST/HST: 123456789', text, "GST number not found in invoice") self.assertIn('PST: PST12345', text, "PST number not found in invoice") def test_different_layouts(self): @@ -59,7 +59,7 @@ class TestReportTaxNumbers(TransactionCase): text = self._get_pdf_content('account.report_invoice', self.invoice.id) # Check for GST and PST numbers - self.assertIn('GST: 123456789', text, + self.assertIn('GST/HST: 123456789', text, f"GST number not found in invoice with {layout} layout") self.assertIn('PST: PST12345', text, f"PST number not found in invoice with {layout} layout") \ No newline at end of file diff --git a/l10n_ca_pst_reports/views/external_layout.xml b/l10n_ca_pst_reports/views/external_layout.xml index f17a91b..c50f6c1 100644 --- a/l10n_ca_pst_reports/views/external_layout.xml +++ b/l10n_ca_pst_reports/views/external_layout.xml @@ -1,136 +1,23 @@ -