Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MIG][16.0] base_report_to_printer #307

Merged
merged 72 commits into from
Dec 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
989d835
base_calendar passed away
guewen Nov 12, 2014
1a2187e
[FIX] Bug #19 avoid crash when using 'raw' option
Dec 28, 2014
808b77f
Do no longer returns a PDF when a report is printed
guewen Jan 21, 2015
edbd401
Add OCA as author of OCA addons
gurneyalex Mar 2, 2015
28d2db8
Compatibility fix for report with custom parser
nbessi Jan 30, 2015
60625f6
The alteration of the context has no effect
guewen Jan 30, 2015
22d77ed
Improve bloated condition test
nbessi Feb 6, 2015
875acba
[FIX] base_report_to_printer: make get_pdf callable from 8.0 api
anthony-muschang May 19, 2015
04211d7
[FIX] test if the module is installed before monkey patching
vrenaville Jun 15, 2015
ce8de57
[PEP8]
yvaucher Aug 18, 2015
42848b4
[UPD] prefix versions with 8.0
sbidoul Oct 9, 2015
51e9383
pass context to printer to use it for example in print_options()
intero-chz Oct 25, 2015
cf963bc
Add support for multiple copies
alexis-via Nov 2, 2015
3350cfc
[IMP] Soft fail on missing cups import
Dec 10, 2015
2150beb
[MIG] base_report_to_printer: Upgrade to v9
lasley Jul 4, 2016
d857852
Fix placeholder for repo in readme.rst
yvaucher Oct 5, 2016
40aaef2
[10.0][MIG] base_report_to_printer (#68)
Apr 5, 2017
a19de17
[MIG] Rename manifest files
pedrobaeza Oct 6, 2016
94f0aa8
[10] FIX format parameter (#84)
angelmoya Apr 11, 2017
58e79a7
Update README.rst
blutecsolutions May 1, 2017
de1c0f8
[FIX] base_report_to_printer: A button method should be @api.multi
Jun 23, 2017
713218f
[FIX] Minor bugfixes
gdgellatly Aug 9, 2017
44f6d9d
[MIG] base_report_to_printer: Migrate to v11.0
Oct 3, 2017
6b5a56e
[WIP] Commit before rebase on latest #109 for user and view updates
gdgellatly Oct 5, 2017
4ced2e7
FIX view
fmdl Jan 14, 2018
59e5d79
[FIX] base_report_to_printer: Stateless tests (#123)
yajo Jan 19, 2018
fcb54dc
Bump base_report_to_printer version to 11.0.2.1.0
yvaucher Feb 2, 2018
4ae9748
[FIX] Allow to generate printing options without a report
Feb 13, 2018
c77539a
[FIX] Permission issue
May 7, 2018
8e14f00
[FIX] missing super declaration
etobella Jun 20, 2018
1e65884
[FIX][base_report_to_printer] - behaviour to print the report succesf…
Jun 22, 2018
26bb51d
[FIX] Group inheritance
max3903 Jun 28, 2018
841f183
Translated using Weblate (Spanish)
etobella Nov 13, 2018
4cd58f2
[WIP] Migrate base_report_to_printer to V12
gdgellatly Jan 30, 2019
b260be0
[MIG] base_report_to_printer: Migration to 13.0
schout-it Sep 30, 2019
0ba27c3
[FIX] .travis.yml: Update definition
pedrobaeza Oct 1, 2019
1a6f6d9
Update base_report_to_printer/__manifest__.py
schout-it Oct 18, 2019
a72cf15
Added job state 'cups-filter-crashed'.
igh-fp Aug 18, 2020
cd9f5a5
Added translation using Weblate (Spanish (Argentina))
ibuioli Oct 18, 2020
f999660
Translated using Weblate (Spanish (Argentina))
ibuioli Oct 18, 2020
c07cae1
[IMP] base_report_to_printer: archive printers
Oct 6, 2020
627596a
[IMP] base_report_to_printer: black, isort, prettier
CarlosRoca13 Jan 12, 2021
776b2b4
[MIG] base_report_to_printer: Migration to v14
Jan 12, 2021
d0bbb3f
[FIX] base_report_to_printer: Fixed tests
CarlosRoca13 Jan 12, 2021
843b047
[UPD] Update base_report_to_printer.pot
oca-travis Jan 13, 2021
aa2fb74
[UPD] README.rst
OCA-git-bot Jan 13, 2021
9ebd006
[IMP] base_report_to_printer: Avoid writing on printing printers/jobs…
guewen Feb 4, 2021
e36c758
[IMP] 14.0 base_report_to_printer: improve job title
gurneyalex Nov 9, 2021
6958671
[FIX] base_report_to_printer: error printing in external network.
LoisRForgeFlow Nov 16, 2021
a058709
[UPD] README.rst
OCA-git-bot Dec 2, 2021
1220603
base_report_to_printer 14.0.1.1.0
OCA-git-bot Dec 2, 2021
c704278
[14.0][IMP] base_report_to_printer: Add test page printing
rousseldenis Dec 9, 2021
d17e3f7
[14.0][IMP] base_report_to_printer: Remove deprecated Warning
rousseldenis Dec 9, 2021
4f78847
base_report_to_printer 14.0.1.1.1
OCA-git-bot Dec 11, 2021
7d0df6d
[14.0][IMP] base_report_to_printer: Add Raw test page printing
rousseldenis Dec 20, 2021
64853f4
Added translation using Weblate (Swedish)
simonstromb Jan 10, 2022
6d84cd1
Translated using Weblate (Swedish)
simonstromb Jan 10, 2022
16b1bc2
[UPD] Update base_report_to_printer.pot
oca-travis Feb 17, 2022
99aec27
base_report_to_printer 14.0.1.2.0
OCA-git-bot Feb 17, 2022
d8dc5a3
Update translation files
oca-transbot Feb 17, 2022
129da01
[IMP] base_report_to_printer: allow connect to protected server
fmdl Dec 10, 2021
2aa08fa
[UPD] Update base_report_to_printer.pot
oca-travis Feb 22, 2022
4a9e367
base_report_to_printer 14.0.2.0.0
OCA-git-bot Feb 22, 2022
714074a
Update translation files
oca-transbot Feb 22, 2022
c9f24a0
[IMP] base_report_to_printer: black, isort, prettier
BT-dmontull Mar 3, 2022
26d4a16
[15.0][MIG] base_report_to_printer: Migration to 15.0
BT-dmontull Mar 4, 2022
68d298c
[MIG] base_report_to_printer: Finish migration to 15.0
matiasperalta1 Aug 25, 2022
d552853
[UPD] Update base_report_to_printer.pot
Oct 25, 2022
f4e1b35
[UPD] README.rst
OCA-git-bot Oct 25, 2022
1b03a06
Update translation files
weblate Oct 25, 2022
a697ac3
[IMP] base_report_to_printer: black, isort, prettier
glitchov Dec 7, 2022
220cf83
[MIG] base_report_to_printer: Migration to 16.0
glitchov Dec 7, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
174 changes: 174 additions & 0 deletions base_report_to_printer/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
=================
Report to printer
=================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
: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/15.0/base_report_to_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-15-0/report-print-send-15-0-base_report_to_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/15.0
:alt: Try me on Runbot

|badge1| |badge2| |badge3| |badge4| |badge5|

This module allows users to send reports to a printer attached to the server.

It adds an optional behaviour on reports to send it directly to a printer.

* `Send to Client` is the default behaviour providing you a downloadable PDF
* `Send to Printer` prints the report on selected printer

It detects trays on printers installation plus permits to select the
paper source on which you want to print directly.

Report behaviour is defined by settings.

You will find this option on default user config, on default report
config and on specific config per user per report.

This allows you to dedicate a specific paper source for example for
preprinted paper such as payment slip.

Settings can be configured:

* globally
* per user
* per report
* per user and report

**Table of contents**

.. contents::
:local:

Installation
============

To install this module, you need to:

#. Install PyCups - https://pypi.python.org/pypi/pycups

.. code-block:: bash

sudo apt-get install cups
sudo apt-get install libcups2-dev
sudo apt-get install python3-dev
sudo pip install pycups

Configuration
=============

To configure this module, you need to:

#. Enable the "Printing / Print User" option under access
rights to give users the ability to view the print menu.


The jobs will be sent to the printer with a name matching the print_report_name
of the report (truncated at 80 characters). By default this will not be
displayed by CUPS web interface or in Odoo. To see this information, you need
to change the configuration of your CUPS server and set the JobPrivateValue
directive to "job-name", and reload the server. See `cupsd.conf(5)
<https://www.cups.org/doc/man-cupsd.conf.html>` for details.

Usage
=====

Guidelines for use:

* To update the CUPS printers in *Settings > Printing > Update Printers
from CUPS*
* To print a report on a specific printer or tray, you can change
these in *Settings > Printing > Reports* to define default behaviour.
* To print a report on a specific printer and/or tray for a user, you can
change these in *Settings > Printing > Reports* in
*Specific actions per user*
* Users may also select a default action, printer or tray in their preferences.

When no tray is configured for a report and a user, the
default tray setup on the CUPS server is used.

Changelog
=========

13.0.1.0.0 (2019-09-30)
~~~~~~~~~~~~~~~~~~~~~~~

* [RELEASE] Port from V12.

12.0.1.0.0 (2018-02-04)
~~~~~~~~~~~~~~~~~~~~~~~

* [RELEASE] Port from V11.

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_printer%0Aversion:%2015.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.

Credits
=======

Authors
~~~~~~~

* Agile Business Group & Domsense
* Pegueroles SCP
* NaN
* LasLabs
* Camptocamp
* Open for Small Business Ltd

Contributors
~~~~~~~~~~~~

* Ferran Pegueroles <ferran@pegueroles.com>
* Albert Cervera i Areny <albert@nan-tic.com>
* Davide Corio <davide.corio@agilebg.com>
* Lorenzo Battistini <lorenzo.battistini@agilebg.com>
* Yannick Vaucher <yannick.vaucher@camptocamp.com>
* Lionel Sausin <ls@numerigraphe.com>
* Guewen Baconnier <guewen.baconnier@camptocamp.com>
* Dave Lasley <dave@laslabs.com>
* Sylvain Garancher <sylvain.garancher@syleam.fr>
* Jairo Llopis <jairo.llopis@tecnativa.com>
* Graeme Gellatly <graeme@o4sb.com>
* Rod Schouteden <rod@schout-it.be>
* Alexandre Fayolle <alexandre.fayolle@camptocamp.com>
* Matias Peralta <mnp@adhoc.com.ar>

Maintainers
~~~~~~~~~~~

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

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/15.0/base_report_to_printer>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
9 changes: 9 additions & 0 deletions base_report_to_printer/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Copyright (c) 2007 Ferran Pegueroles <ferran@pegueroles.com>
# Copyright (c) 2009 Albert Cervera i Areny <albert@nan-tic.com>
# Copyright (C) 2011 Agile Business Group sagl (<http://www.agilebg.com>)
# Copyright (C) 2011 Domsense srl (<http://www.domsense.com>)
# Copyright (C) 2013-2014 Camptocamp (<http://www.camptocamp.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import models
from . import wizards
37 changes: 37 additions & 0 deletions base_report_to_printer/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Copyright (c) 2007 Ferran Pegueroles <ferran@pegueroles.com>
# Copyright (c) 2009 Albert Cervera i Areny <albert@nan-tic.com>
# Copyright (C) 2011 Agile Business Group sagl (<http://www.agilebg.com>)
# Copyright (C) 2011 Domsense srl (<http://www.domsense.com>)
# Copyright (C) 2013-2014 Camptocamp (<http://www.camptocamp.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Report to printer",
"version": "16.0.1.0.0",
"category": "Generic Modules/Base",
"author": "Agile Business Group & Domsense, Pegueroles SCP, NaN,"
" LasLabs, Camptocamp, Odoo Community Association (OCA),"
" Open for Small Business Ltd",
"website": "https://github.com/OCA/report-print-send",
"license": "AGPL-3",
"depends": ["web"],
"data": [
"data/printing_data.xml",
"security/security.xml",
"views/printing_printer.xml",
"views/printing_server.xml",
"views/printing_job.xml",
"views/printing_report.xml",
"views/res_users.xml",
"views/ir_actions_report.xml",
"wizards/printing_printer_update_wizard_view.xml",
],
"assets": {
"web.assets_backend": [
"/base_report_to_printer/static/src/js/qweb_action_manager.esm.js",
],
},
"installable": True,
"application": False,
"external_dependencies": {"python": ["pycups"]},
}
33 changes: 33 additions & 0 deletions base_report_to_printer/data/printing_data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" ?>
<odoo noupdate="1">
<!-- printing.action -->
<record model="printing.action" id="printing_action_1">
<field name="name">Send to Printer</field>
<field name="action_type">server</field>
</record>
<record model="printing.action" id="printing_action_2">
<field name="name">Send to Client</field>
<field name="action_type">client</field>
</record>
<!-- properties -->
<record forcecreate="True" id="property_printing_action_id" model="ir.property">
<field name="name">property_printing_action_id</field>
<field
name="fields_id"
search="[('model', '=', 'ir.actions.report'), ('name', '=', 'property_printing_action_id')]"
/>
<field name="value" eval="'printing.action,' + str(printing_action_2)" />
</record>
<record forcecreate="True" id="ir_cron_update_printers" model="ir.cron">
<field name="name">Update Printers Jobs</field>
<field name="active" eval="True" />
<field name="user_id" ref="base.user_root" />
<field name="interval_number">1</field>
<field name="interval_type">minutes</field>
<field name="numbercall">-1</field>
<field name="doall" eval="False" />
<field name="model_id" ref="base_report_to_printer.model_printing_server" />
<field name="state">code</field>
<field name="code">model.action_update_jobs()</field>
</record>
</odoo>
Loading