Add Purchase order template

This commit is contained in:
2026-04-07 11:42:09 +02:00
parent 3480eb8a7a
commit 00330008d1
6 changed files with 2040 additions and 0 deletions

View File

@@ -313,6 +313,7 @@ class PurchaseTradeTestCase(ModuleTestCase):
invoice_report_template='invoice_melya.fodt',
invoice_cndn_report_template='invoice_ict_final.fodt',
invoice_prepayment_report_template='prepayment.fodt',
invoice_payment_order_report_template='payment_order.fodt',
purchase_report_template='purchase_melya.fodt',
)
]
@@ -340,6 +341,12 @@ class PurchaseTradeTestCase(ModuleTestCase):
'report': 'account_invoice/invoice_ict_final.fodt',
}),
'account_invoice/invoice_ict_final.fodt')
self.assertEqual(
report_class._resolve_configured_report_path({
'name': 'Payment Order',
'report': 'account_invoice/payment_order.fodt',
}),
'account_invoice/payment_order.fodt')
def test_invoice_report_raises_when_template_is_missing(self):
'invoice report must fail clearly when no template is configured'
@@ -350,6 +357,7 @@ class PurchaseTradeTestCase(ModuleTestCase):
invoice_report_template='',
invoice_cndn_report_template='',
invoice_prepayment_report_template='',
invoice_payment_order_report_template='',
)
]
@@ -362,6 +370,11 @@ class PurchaseTradeTestCase(ModuleTestCase):
'name': 'Invoice',
'report': 'account_invoice/invoice.fodt',
})
with self.assertRaises(UserError):
report_class._resolve_configured_report_path({
'name': 'Payment Order',
'report': 'account_invoice/payment_order.fodt',
})
def test_sale_report_uses_templates_from_configuration(self):
'sale report paths are resolved from purchase_trade configuration'