Skip to content

Commit 5ebb27a

Browse files
[MIG] l10n_din5008_move_name: Migration to 19.0
1 parent 390e785 commit 5ebb27a

File tree

7 files changed

+31
-23
lines changed

7 files changed

+31
-23
lines changed

l10n_din5008_move_name/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
from . import models
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
# Copyright 2025 Dixmit
2+
# Copyright 2026 Michael Tietz (MT Software) <mtietz@mt-software.de>
23
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
34

45
{
56
"name": "L10n DIN5008 Move Name",
67
"summary": """Add Account move name on the name of the move""",
7-
"version": "17.0.1.1.0",
8+
"version": "19.0.1.0.0",
89
"license": "AGPL-3",
9-
"author": "Dixmit,Odoo Community Association (OCA)",
10+
"author": "Dixmit, MT Software, Odoo Community Association (OCA)",
1011
"website": "https://github.com/OCA/l10n-germany",
1112
"depends": ["l10n_din5008"],
13+
"data": ["report/din5008_report.xml"],
1214
}

l10n_din5008_move_name/models/__init__.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

l10n_din5008_move_name/models/account_move.py

Lines changed: 0 additions & 17 deletions
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
- Enric Tobella (`Dixmit <https://www.dixmit.com/>`__)
2+
- Michael Tietz (MT Software) <mtietz@mt-software.de>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<odoo>
3+
<template
4+
id="report_invoice_document"
5+
inherit_id="l10n_din5008.report_invoice_document"
6+
priority="100"
7+
>
8+
<xpath expr="//t[@t-set='din5008_document_title']/span" position="after">
9+
<span t-if="o and o._name == 'account.move'">
10+
<t t-out="o.name" />
11+
</span>
12+
</xpath>
13+
</template>
14+
</odoo>

l10n_din5008_move_name/tests/test_din5008.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Copyright 2025 Dixmit
2+
# Copyright 2026 Michael Tietz (MT Software) <mtietz@mt-software.de>
23
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
34

45
from odoo.addons.base.tests.common import BaseCommon
@@ -9,6 +10,9 @@ class TestDatevExport(BaseCommon):
910
def setUpClass(cls):
1011
super().setUpClass()
1112
cls.company = cls.env.company
13+
cls.company.external_report_layout_id = cls.env.ref(
14+
"l10n_din5008.report_layout_din5008"
15+
).view_id
1216
cls.JournalObj = cls.env["account.journal"]
1317
cls.sale_journal = cls.JournalObj.search(
1418
[
@@ -59,5 +63,11 @@ def test_name(self):
5963
}
6064
)
6165
invoice.action_post()
62-
# Check the name of the invoice
63-
self.assertIn(invoice.name, invoice.l10n_din5008_document_title)
66+
html, _ = self.env["ir.actions.report"]._render_qweb_html(
67+
"account.report_invoice_with_payments", invoice.ids
68+
)
69+
expected = (
70+
"Invoice\\n </span>\\n "
71+
+ f"<span>\\n {invoice.name}"
72+
)
73+
self.assertIn(expected, str(html))

0 commit comments

Comments
 (0)