Skip to content

Commit 53831f3

Browse files
committed
[MIG] l10n_din5008_move_name: Migration to 18.0
1 parent 4b78073 commit 53831f3

File tree

8 files changed

+42
-48
lines changed

8 files changed

+42
-48
lines changed

l10n_din5008_move_name/README.rst

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
.. image:: https://odoo-community.org/readme-banner-image
2-
:target: https://odoo-community.org/get-involved?utm_source=readme
3-
:alt: Odoo Community Association
4-
51
======================
62
L10n DIN5008 Move Name
73
======================
@@ -17,17 +13,17 @@ L10n DIN5008 Move Name
1713
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
1814
:target: https://odoo-community.org/page/development-status
1915
:alt: Beta
20-
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
16+
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
2117
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
2218
:alt: License: AGPL-3
2319
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fl10n--germany-lightgray.png?logo=github
24-
:target: https://github.com/OCA/l10n-germany/tree/17.0/l10n_din5008_move_name
20+
:target: https://github.com/OCA/l10n-germany/tree/18.0/l10n_din5008_move_name
2521
:alt: OCA/l10n-germany
2622
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
27-
:target: https://translation.odoo-community.org/projects/l10n-germany-17-0/l10n-germany-17-0-l10n_din5008_move_name
23+
:target: https://translation.odoo-community.org/projects/l10n-germany-18-0/l10n-germany-18-0-l10n_din5008_move_name
2824
:alt: Translate me on Weblate
2925
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
30-
:target: https://runboat.odoo-community.org/builds?repo=OCA/l10n-germany&target_branch=17.0
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/l10n-germany&target_branch=18.0
3127
:alt: Try me on Runboat
3228

3329
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -45,7 +41,7 @@ Bug Tracker
4541
Bugs are tracked on `GitHub Issues <https://github.com/OCA/l10n-germany/issues>`_.
4642
In case of trouble, please check there if your issue has already been reported.
4743
If you spotted it first, help us to smash it by providing a detailed and welcomed
48-
`feedback <https://github.com/OCA/l10n-germany/issues/new?body=module:%20l10n_din5008_move_name%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
44+
`feedback <https://github.com/OCA/l10n-germany/issues/new?body=module:%20l10n_din5008_move_name%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
4945

5046
Do not contact contributors directly about support or help with technical issues.
5147

@@ -75,6 +71,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
7571
mission is to support the collaborative development of Odoo features and
7672
promote its widespread use.
7773

78-
This module is part of the `OCA/l10n-germany <https://github.com/OCA/l10n-germany/tree/17.0/l10n_din5008_move_name>`_ project on GitHub.
74+
This module is part of the `OCA/l10n-germany <https://github.com/OCA/l10n-germany/tree/18.0/l10n_din5008_move_name>`_ project on GitHub.
7975

8076
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

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

l10n_din5008_move_name/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
{
55
"name": "L10n DIN5008 Move Name",
66
"summary": """Add Account move name on the name of the move""",
7-
"version": "17.0.1.1.0",
7+
"version": "18.0.1.0.0",
88
"license": "AGPL-3",
99
"author": "Dixmit,Odoo Community Association (OCA)",
1010
"website": "https://github.com/OCA/l10n-germany",

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: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<odoo>
3+
<data>
4+
<template
5+
id="report_invoice_document"
6+
inherit_id="l10n_din5008.report_invoice_document"
7+
>
8+
<xpath
9+
expr='//span[@t-if="o and o._name == &apos;account.move&apos;"]'
10+
position="after"
11+
>
12+
<span t-if="o and o.is_sale_document(True)">
13+
<t t-out="o.name" />
14+
</span>
15+
</xpath>
16+
</template>
17+
</data>
18+
</odoo>

l10n_din5008_move_name/static/description/index.html

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
55
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
6-
<title>README.rst</title>
6+
<title>L10n DIN5008 Move Name</title>
77
<style type="text/css">
88

99
/*
@@ -360,21 +360,16 @@
360360
</style>
361361
</head>
362362
<body>
363-
<div class="document">
363+
<div class="document" id="l10n-din5008-move-name">
364+
<h1 class="title">L10n DIN5008 Move Name</h1>
364365

365-
366-
<a class="reference external image-reference" href="https://odoo-community.org/get-involved?utm_source=readme">
367-
<img alt="Odoo Community Association" src="https://odoo-community.org/readme-banner-image" />
368-
</a>
369-
<div class="section" id="l10n-din5008-move-name">
370-
<h1>L10n DIN5008 Move Name</h1>
371366
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
372367
!! This file is generated by oca-gen-addon-readme !!
373368
!! changes will be overwritten. !!
374369
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
375370
!! source digest: sha256:071ce3476c6ce828794e6fa27e869b3d638d5faf240fa8137457ffdb78998420
376371
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
377-
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/l10n-germany/tree/17.0/l10n_din5008_move_name"><img alt="OCA/l10n-germany" src="https://img.shields.io/badge/github-OCA%2Fl10n--germany-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/l10n-germany-17-0/l10n-germany-17-0-l10n_din5008_move_name"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/l10n-germany&amp;target_branch=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
372+
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/l10n-germany/tree/18.0/l10n_din5008_move_name"><img alt="OCA/l10n-germany" src="https://img.shields.io/badge/github-OCA%2Fl10n--germany-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/l10n-germany-18-0/l10n-germany-18-0-l10n_din5008_move_name"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/l10n-germany&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
378373
<p>This module shows the invoice name on the title of the DIN 5008</p>
379374
<p><strong>Table of contents</strong></p>
380375
<div class="contents local topic" id="contents">
@@ -389,41 +384,40 @@ <h1>L10n DIN5008 Move Name</h1>
389384
</ul>
390385
</div>
391386
<div class="section" id="bug-tracker">
392-
<h2><a class="toc-backref" href="#toc-entry-1">Bug Tracker</a></h2>
387+
<h1><a class="toc-backref" href="#toc-entry-1">Bug Tracker</a></h1>
393388
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/l10n-germany/issues">GitHub Issues</a>.
394389
In case of trouble, please check there if your issue has already been reported.
395390
If you spotted it first, help us to smash it by providing a detailed and welcomed
396-
<a class="reference external" href="https://github.com/OCA/l10n-germany/issues/new?body=module:%20l10n_din5008_move_name%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
391+
<a class="reference external" href="https://github.com/OCA/l10n-germany/issues/new?body=module:%20l10n_din5008_move_name%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
397392
<p>Do not contact contributors directly about support or help with technical issues.</p>
398393
</div>
399394
<div class="section" id="credits">
400-
<h2><a class="toc-backref" href="#toc-entry-2">Credits</a></h2>
395+
<h1><a class="toc-backref" href="#toc-entry-2">Credits</a></h1>
401396
<div class="section" id="authors">
402-
<h3><a class="toc-backref" href="#toc-entry-3">Authors</a></h3>
397+
<h2><a class="toc-backref" href="#toc-entry-3">Authors</a></h2>
403398
<ul class="simple">
404399
<li>Dixmit</li>
405400
</ul>
406401
</div>
407402
<div class="section" id="contributors">
408-
<h3><a class="toc-backref" href="#toc-entry-4">Contributors</a></h3>
403+
<h2><a class="toc-backref" href="#toc-entry-4">Contributors</a></h2>
409404
<ul class="simple">
410405
<li>Enric Tobella (<tt class="docutils literal">Dixmit <span class="pre">&lt;https://www.dixmit.com/&gt;</span></tt>__)</li>
411406
</ul>
412407
</div>
413408
<div class="section" id="maintainers">
414-
<h3><a class="toc-backref" href="#toc-entry-5">Maintainers</a></h3>
409+
<h2><a class="toc-backref" href="#toc-entry-5">Maintainers</a></h2>
415410
<p>This module is maintained by the OCA.</p>
416411
<a class="reference external image-reference" href="https://odoo-community.org">
417412
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
418413
</a>
419414
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
420415
mission is to support the collaborative development of Odoo features and
421416
promote its widespread use.</p>
422-
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/l10n-germany/tree/17.0/l10n_din5008_move_name">OCA/l10n-germany</a> project on GitHub.</p>
417+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/l10n-germany/tree/18.0/l10n_din5008_move_name">OCA/l10n-germany</a> project on GitHub.</p>
423418
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
424419
</div>
425420
</div>
426421
</div>
427-
</div>
428422
</body>
429423
</html>

l10n_din5008_move_name/tests/test_din5008.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ def setUpClass(cls):
4444
"standard_price": 50.0,
4545
}
4646
)
47+
cls.action_check_report = cls.env.ref("account.account_invoices")
4748

4849
def test_name(self):
4950
"""Test the name of the invoice"""
@@ -59,5 +60,9 @@ def test_name(self):
5960
}
6061
)
6162
invoice.action_post()
63+
64+
content = self.env["ir.actions.report"]._render_qweb_pdf(
65+
self.action_check_report.xml_id, res_ids=invoice.ids
66+
)
6267
# Check the name of the invoice
63-
self.assertIn(invoice.name, invoice.l10n_din5008_document_title)
68+
self.assertIn(invoice.name, content[0].decode())

0 commit comments

Comments
 (0)