[16.0][MIG] base_report_to_label_printer

This commit is contained in:
hda
2023-06-05 18:38:42 +02:00
parent e99a0704eb
commit 763b847a20
7 changed files with 73 additions and 38 deletions

View File

@@ -14,14 +14,14 @@ Report to label printer
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Freport--print--send-lightgray.png?logo=github
:target: https://github.com/OCA/report-print-send/tree/14.0/base_report_to_label_printer
:target: https://github.com/OCA/report-print-send/tree/16.0/base_report_to_label_printer
:alt: OCA/report-print-send
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/report-print-send-14-0/report-print-send-14-0-base_report_to_label_printer
:target: https://translation.odoo-community.org/projects/report-print-send-16-0/report-print-send-16-0-base_report_to_label_printer
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/144/14.0
:alt: Try me on Runbot
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/webui/builds.html?repo=OCA/report-print-send&target_branch=16.0
:alt: Try me on Runboat
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -43,7 +43,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OCA/report-print-send/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/report-print-send/issues/new?body=module:%20base_report_to_label_printer%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/report-print-send/issues/new?body=module:%20base_report_to_label_printer%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
Do not contact contributors directly about support or help with technical issues.
@@ -55,6 +55,11 @@ Authors
* Raumschmiede GmbH - Christopher Hansen
Contributors
~~~~~~~~~~~~
* Hughes Damry <hughes.damry@acsone.eu>
Maintainers
~~~~~~~~~~~
@@ -68,6 +73,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
This module is part of the `OCA/report-print-send <https://github.com/OCA/report-print-send/tree/14.0/base_report_to_label_printer>`_ project on GitHub.
This module is part of the `OCA/report-print-send <https://github.com/OCA/report-print-send/tree/16.0/base_report_to_label_printer>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

View File

@@ -3,7 +3,7 @@
{
"name": "Report to label printer",
"version": "14.0.1.0.0",
"version": "16.0.1.0.0",
"category": "Generic Modules/Base",
"author": "Raumschmiede GmbH - Christopher Hansen,"
" Odoo Community Association (OCA)",

View File

@@ -4,8 +4,10 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Project-Id-Version: Odoo Server 16.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-06-05 17:00+0000\n"
"PO-Revision-Date: 2023-06-05 17:00+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@@ -18,24 +20,6 @@ msgstr ""
msgid "Default Label Printer"
msgstr ""
#. module: base_report_to_label_printer
#: model:ir.model.fields,field_description:base_report_to_label_printer.field_ir_actions_report__display_name
#: model:ir.model.fields,field_description:base_report_to_label_printer.field_res_users__display_name
msgid "Display Name"
msgstr ""
#. module: base_report_to_label_printer
#: model:ir.model.fields,field_description:base_report_to_label_printer.field_ir_actions_report__id
#: model:ir.model.fields,field_description:base_report_to_label_printer.field_res_users__id
msgid "ID"
msgstr ""
#. module: base_report_to_label_printer
#: model:ir.model.fields,field_description:base_report_to_label_printer.field_ir_actions_report____last_update
#: model:ir.model.fields,field_description:base_report_to_label_printer.field_res_users____last_update
msgid "Last Modified on"
msgstr ""
#. module: base_report_to_label_printer
#: model:ir.model,name:base_report_to_label_printer.model_ir_actions_report
msgid "Report Action"
@@ -48,5 +32,5 @@ msgstr ""
#. module: base_report_to_label_printer
#: model:ir.model,name:base_report_to_label_printer.model_res_users
msgid "Users"
msgid "User"
msgstr ""

View File

@@ -0,0 +1,36 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * base_report_to_label_printer
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-06-05 17:00+0000\n"
"PO-Revision-Date: 2023-06-05 17:00+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: base_report_to_label_printer
#: model:ir.model.fields,field_description:base_report_to_label_printer.field_res_users__default_label_printer_id
msgid "Default Label Printer"
msgstr "Imprimante étiquettes par défaut"
#. module: base_report_to_label_printer
#: model:ir.model,name:base_report_to_label_printer.model_ir_actions_report
msgid "Report Action"
msgstr ""
#. module: base_report_to_label_printer
#: model:ir.model.fields,field_description:base_report_to_label_printer.field_ir_actions_report__label
msgid "Report is a Label"
msgstr "Le rapport est une étiquette"
#. module: base_report_to_label_printer
#: model:ir.model,name:base_report_to_label_printer.model_res_users
msgid "User"
msgstr "Utilisateur"

View File

@@ -0,0 +1 @@
* Hughes Damry <hughes.damry@acsone.eu>

View File

@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils: http://docutils.sourceforge.net/" />
<title>Report to label printer</title>
<style type="text/css">
@@ -367,7 +367,7 @@ ul.auto-toc {
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external" 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" 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" href="https://github.com/OCA/report-print-send/tree/14.0/base_report_to_label_printer"><img alt="OCA/report-print-send" src="https://img.shields.io/badge/github-OCA%2Freport--print--send-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/report-print-send-14-0/report-print-send-14-0-base_report_to_label_printer"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/144/14.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p><a class="reference external" 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" 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" href="https://github.com/OCA/report-print-send/tree/16.0/base_report_to_label_printer"><img alt="OCA/report-print-send" src="https://img.shields.io/badge/github-OCA%2Freport--print--send-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/report-print-send-16-0/report-print-send-16-0-base_report_to_label_printer"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runboat.odoo-community.org/webui/builds.html?repo=OCA/report-print-send&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module makes it possible to print specific reports to a label printer that is configured on the user.</p>
<p>To do this, the following must be configured:</p>
<ul class="simple">
@@ -380,7 +380,8 @@ ul.auto-toc {
<li><a class="reference internal" href="#bug-tracker" id="id1">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="id2">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="id3">Authors</a></li>
<li><a class="reference internal" href="#maintainers" id="id4">Maintainers</a></li>
<li><a class="reference internal" href="#contributors" id="id4">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="id5">Maintainers</a></li>
</ul>
</li>
</ul>
@@ -390,7 +391,7 @@ ul.auto-toc {
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/report-print-send/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OCA/report-print-send/issues/new?body=module:%20base_report_to_label_printer%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<a class="reference external" href="https://github.com/OCA/report-print-send/issues/new?body=module:%20base_report_to_label_printer%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
@@ -401,14 +402,20 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
<li>Raumschmiede GmbH - Christopher Hansen</li>
</ul>
</div>
<div class="section" id="contributors">
<h2><a class="toc-backref" href="#id4">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>
</ul>
</div>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#id4">Maintainers</a></h2>
<h2><a class="toc-backref" href="#id5">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" /></a>
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/report-print-send/tree/14.0/base_report_to_label_printer">OCA/report-print-send</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/report-print-send/tree/16.0/base_report_to_label_printer">OCA/report-print-send</a> project on GitHub.</p>
<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>
</div>
</div>

View File

@@ -5,11 +5,13 @@ from odoo.tests.common import TransactionCase
class TestIrActionsReport(TransactionCase):
def setUp(self):
super(TestIrActionsReport, self).setUp()
self.Model = self.env["ir.actions.report"]
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.env = cls.env(context=dict(cls.env.context, tracking_disable=True))
self.server = self.env["printing.server"].create({})
cls.Model = cls.env["ir.actions.report"]
cls.server = cls.env["printing.server"].create({})
def new_printer(self):
return self.env["printing.printer"].create(