Skip to content

Commit

Permalink
[MIG] base_report_to_label_printer: Migration to 18.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Kimkhoi3010 committed Jan 22, 2025
1 parent 618aa22 commit f14470f
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 13 deletions.
9 changes: 9 additions & 0 deletions base_report_to_label_printer/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,15 @@ Contributors
------------

- Hughes Damry <hughes.damry@acsone.eu>
- Khoi (Kien Kim) khoikk@trobz.com

Other credits
-------------

The migration of this module from 16.0 to 18.0 was financially supported
by:

- Camptocamp.

Maintainers
-----------
Expand Down
2 changes: 1 addition & 1 deletion base_report_to_label_printer/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

{
"name": "Report to label printer",
"version": "16.0.1.0.1",
"version": "18.0.1.0.1",
"category": "Generic Modules/Base",
"author": "Raumschmiede GmbH - Christopher Hansen,"
" Odoo Community Association (OCA)",
Expand Down
1 change: 1 addition & 0 deletions base_report_to_label_printer/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
- Hughes Damry \<<hughes.damry@acsone.eu>\>
- Khoi (Kien Kim) khoikk@trobz.com
3 changes: 3 additions & 0 deletions base_report_to_label_printer/readme/CREDITS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
The migration of this module from 16.0 to 18.0 was financially supported by:

- Camptocamp.
14 changes: 12 additions & 2 deletions base_report_to_label_printer/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,8 @@ <h1 class="title">Report to label printer</h1>
<li><a class="reference internal" href="#credits" id="toc-entry-2">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="toc-entry-3">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="toc-entry-4">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="toc-entry-5">Maintainers</a></li>
<li><a class="reference internal" href="#other-credits" id="toc-entry-5">Other credits</a></li>
<li><a class="reference internal" href="#maintainers" id="toc-entry-6">Maintainers</a></li>
</ul>
</li>
</ul>
Expand All @@ -409,10 +410,19 @@ <h2><a class="toc-backref" href="#toc-entry-3">Authors</a></h2>
<h2><a class="toc-backref" href="#toc-entry-4">Contributors</a></h2>
<ul class="simple">
<li>Hughes Damry &lt;<a class="reference external" href="mailto:hughes.damry&#64;acsone.eu">hughes.damry&#64;acsone.eu</a>&gt;</li>
<li>Khoi (Kien Kim) <a class="reference external" href="mailto:khoikk&#64;trobz.com">khoikk&#64;trobz.com</a></li>
</ul>
</div>
<div class="section" id="other-credits">
<h2><a class="toc-backref" href="#toc-entry-5">Other credits</a></h2>
<p>The migration of this module from 16.0 to 18.0 was financially supported
by:</p>
<ul class="simple">
<li>Camptocamp.</li>
</ul>
</div>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#toc-entry-5">Maintainers</a></h2>
<h2><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h2>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org">
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
Expand Down
24 changes: 14 additions & 10 deletions base_report_to_label_printer/tests/test_ir_actions_report.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# Copyright (C) 2022 Raumschmiede GmbH - Christopher Hansen (<https://www.raumschmiede.de>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo.tests.common import TransactionCase
import logging
from odoo.addons.base.tests.common import BaseCommon


class TestIrActionsReport(TransactionCase):
class TestIrActionsReport(BaseCommon):
@classmethod
def setUpClass(cls):
super().setUpClass()
Expand Down Expand Up @@ -36,11 +37,14 @@ def test_print_behavior_user_label_printer(self):
report.label = True
self.env.user.printing_action = "client"
self.env.user.default_label_printer_id = self.new_printer()
self.assertEqual(
report.behaviour(),
{
"action": "client",
"printer": self.env.user.default_label_printer_id,
"tray": False,
},
)
with (
self.assertLogs(level=logging.WARNING) as logs,
):
self.assertEqual(
report.behaviour(),
{
"action": "client",
"printer": self.env.user.default_label_printer_id,
"tray": False,
},
)

0 comments on commit f14470f

Please sign in to comment.