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

[18.0][MIG] base_report_to_printer: Migration to 18.0 #371

Open
wants to merge 128 commits into
base: 18.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
128 commits
Select commit Hold shift + click to select a range
acedcfe
base_calendar passed away
guewen Nov 12, 2014
b919317
[FIX] Bug #19 avoid crash when using 'raw' option
Dec 28, 2014
c282385
Do no longer returns a PDF when a report is printed
guewen Jan 21, 2015
3d50a33
Add OCA as author of OCA addons
gurneyalex Mar 2, 2015
030e14b
Compatibility fix for report with custom parser
nbessi Jan 30, 2015
4aa6b4b
The alteration of the context has no effect
guewen Jan 30, 2015
7b5bf5e
Improve bloated condition test
nbessi Feb 6, 2015
d5fac51
[FIX] base_report_to_printer: make get_pdf callable from 8.0 api
anthony-muschang May 19, 2015
7aa2392
[FIX] test if the module is installed before monkey patching
vrenaville Jun 15, 2015
6e68bba
[PEP8]
yvaucher Aug 18, 2015
7a5094c
[UPD] prefix versions with 8.0
sbidoul Oct 9, 2015
521a3eb
pass context to printer to use it for example in print_options()
intero-chz Oct 25, 2015
14dceb9
Add support for multiple copies
alexis-via Nov 2, 2015
39783ee
[IMP] Soft fail on missing cups import
Dec 10, 2015
49fdb7f
[MIG] base_report_to_printer: Upgrade to v9
lasley Jul 4, 2016
21b1933
Fix placeholder for repo in readme.rst
yvaucher Oct 5, 2016
cbdf1b1
[10.0][MIG] base_report_to_printer (#68)
Apr 5, 2017
ae358a2
[MIG] Rename manifest files
pedrobaeza Oct 6, 2016
b2a7527
[10] FIX format parameter (#84)
angelmoya Apr 11, 2017
4999731
Update README.rst
blutecsolutions May 1, 2017
fbca73e
[FIX] base_report_to_printer: A button method should be @api.multi
Jun 23, 2017
fccad1e
[FIX] Minor bugfixes
gdgellatly Aug 9, 2017
6380ffb
[MIG] base_report_to_printer: Migrate to v11.0
Oct 3, 2017
98feb8a
[WIP] Commit before rebase on latest #109 for user and view updates
gdgellatly Oct 5, 2017
fa3e714
FIX view
fmdl Jan 14, 2018
c7a3ec5
[FIX] base_report_to_printer: Stateless tests (#123)
yajo Jan 19, 2018
a656f1d
Bump base_report_to_printer version to 11.0.2.1.0
yvaucher Feb 2, 2018
d0f340c
[FIX] Allow to generate printing options without a report
Feb 13, 2018
16371a4
[FIX] Permission issue
May 7, 2018
bbc99a7
[FIX] missing super declaration
etobella Jun 20, 2018
127c54a
[FIX][base_report_to_printer] - behaviour to print the report succesf…
Jun 22, 2018
da0fd74
[FIX] Group inheritance
max3903 Jun 28, 2018
a64e5a4
Translated using Weblate (Spanish)
etobella Nov 13, 2018
12c5421
[WIP] Migrate base_report_to_printer to V12
gdgellatly Jan 30, 2019
987deeb
[MIG] base_report_to_printer: Migration to 13.0
schout-it Sep 30, 2019
32a6d7c
[FIX] .travis.yml: Update definition
pedrobaeza Oct 1, 2019
76b9260
Update base_report_to_printer/__manifest__.py
schout-it Oct 18, 2019
c6df932
Added job state 'cups-filter-crashed'.
igh-fp Aug 18, 2020
7bab990
Added translation using Weblate (Spanish (Argentina))
ibuioli Oct 18, 2020
21e97c0
Translated using Weblate (Spanish (Argentina))
ibuioli Oct 18, 2020
0700b15
[IMP] base_report_to_printer: archive printers
Oct 6, 2020
fdcb2ae
[IMP] base_report_to_printer: black, isort, prettier
CarlosRoca13 Jan 12, 2021
b8b6f60
[MIG] base_report_to_printer: Migration to v14
Jan 12, 2021
33b8156
[FIX] base_report_to_printer: Fixed tests
CarlosRoca13 Jan 12, 2021
8d97538
[UPD] Update base_report_to_printer.pot
oca-travis Jan 13, 2021
70d3a77
[UPD] README.rst
OCA-git-bot Jan 13, 2021
bb755aa
[IMP] base_report_to_printer: Avoid writing on printing printers/jobs…
guewen Feb 4, 2021
2aa2979
[IMP] 14.0 base_report_to_printer: improve job title
gurneyalex Nov 9, 2021
f00a467
[FIX] base_report_to_printer: error printing in external network.
LoisRForgeFlow Nov 16, 2021
9abf3a9
[UPD] README.rst
OCA-git-bot Dec 2, 2021
f478705
base_report_to_printer 14.0.1.1.0
OCA-git-bot Dec 2, 2021
a27c544
[14.0][IMP] base_report_to_printer: Add test page printing
rousseldenis Dec 9, 2021
eda8a08
[14.0][IMP] base_report_to_printer: Remove deprecated Warning
rousseldenis Dec 9, 2021
c2261d0
base_report_to_printer 14.0.1.1.1
OCA-git-bot Dec 11, 2021
969f4da
[14.0][IMP] base_report_to_printer: Add Raw test page printing
rousseldenis Dec 20, 2021
54ec6b0
Added translation using Weblate (Swedish)
simonstromb Jan 10, 2022
7860a7e
Translated using Weblate (Swedish)
simonstromb Jan 10, 2022
b6aacff
[UPD] Update base_report_to_printer.pot
oca-travis Feb 17, 2022
d38a34c
base_report_to_printer 14.0.1.2.0
OCA-git-bot Feb 17, 2022
ea8cb06
Update translation files
oca-transbot Feb 17, 2022
06cf9a6
[IMP] base_report_to_printer: allow connect to protected server
fmdl Dec 10, 2021
892af97
[UPD] Update base_report_to_printer.pot
oca-travis Feb 22, 2022
eac464c
base_report_to_printer 14.0.2.0.0
OCA-git-bot Feb 22, 2022
af84056
Update translation files
oca-transbot Feb 22, 2022
f5cb9af
[IMP] base_report_to_printer: black, isort, prettier
BT-dmontull Mar 3, 2022
b21121d
[15.0][MIG] base_report_to_printer: Migration to 15.0
BT-dmontull Mar 4, 2022
f077a81
[MIG] base_report_to_printer: Finish migration to 15.0
matiasperalta1 Aug 25, 2022
167048c
[UPD] Update base_report_to_printer.pot
Oct 25, 2022
43a365f
[UPD] README.rst
OCA-git-bot Oct 25, 2022
97f31f2
Update translation files
weblate Oct 25, 2022
5c77a2e
[MIG] base_report_to_printer: Migration to 16.0
glitchov Dec 7, 2022
794f3c6
[UPD] Update base_report_to_printer.pot
Dec 14, 2022
cbd9565
[UPD] README.rst
OCA-git-bot Dec 14, 2022
0072af5
Update translation files
weblate Dec 14, 2022
ff9bb66
[14.0][IMP] base_report_to_printer: Add Text render document to printer
rousseldenis Dec 20, 2021
5bb226e
[14.0][FIX] base_report_to_printer: Manage text print_document()
rousseldenis Dec 29, 2021
8b71727
[14.0][IMP] base_report_to_printer: Add tests for text documents
rousseldenis Dec 29, 2021
aa6ec50
[ADD] base_report_to_printer: Print attachments wizard
grindtildeath Apr 27, 2020
0551fba
[MIG] base_report_to_printer: Print attachments wizard
sebalix Aug 6, 2020
18df114
fix(#259): handle case of print attachment wizard
gurneyalex Mar 9, 2022
e16f524
[ADD] access right for wizrard print attachment and fix trans format
Jan 21, 2022
8e7443f
FIX bad field used for labeling at print
StephaneMangin Jul 12, 2022
6038cd4
base_report_to_printer: fix translation-positional-used
sebalix Dec 15, 2022
32ccb73
[UPD] Update base_report_to_printer.pot
Dec 21, 2022
1505bf5
[UPD] README.rst
OCA-git-bot Dec 21, 2022
67de83f
base_report_to_printer 16.0.1.1.0
OCA-git-bot Dec 21, 2022
72a1b59
Update translation files
weblate Dec 21, 2022
02ae4b7
[16.0][FIX] base_report_to_printer: Expected singleton
willer-mo Mar 3, 2023
8bdbab8
base_report_to_printer 16.0.1.1.1
OCA-git-bot Mar 3, 2023
d3553b9
base_report_to_printer: fix views
alexis-via Mar 17, 2023
be5d217
base_report_to_printer 16.0.1.1.2
OCA-git-bot Apr 20, 2023
58ca3f2
Translated using Weblate (Italian)
francesco-ooops Jun 22, 2023
067bf96
Translated using Weblate (Italian)
francesco-ooops Jul 12, 2023
c378a50
Translated using Weblate (Italian)
mymage Jul 13, 2023
caca7b9
Translated using Weblate (Spanish)
Ivorra78 Jul 23, 2023
4c535ff
Fix for unexpected 'nombre' on base_report_to_printer/i18n/es.po
micheledic Jul 27, 2023
92d642c
base_report_to_printer 16.0.1.1.3
OCA-git-bot Jul 27, 2023
431f6bc
[IMP] base_report_to_printer: Add neutralization queries
micheledic Jul 28, 2023
00c69d5
base_report_to_printer 16.0.1.1.4
OCA-git-bot Jul 28, 2023
3fb91be
[UPD] README.rst
OCA-git-bot Sep 3, 2023
1154546
Translated using Weblate (French)
Nov 3, 2023
92efbd0
[FIX] base_report_to_printer: fix encoding
jbaudoux Dec 6, 2023
bf99cd5
[BOT] post-merge updates
OCA-git-bot Dec 6, 2023
4174621
Translated using Weblate (Italian)
mymage Jan 15, 2024
efc4fff
Translated using Weblate (Italian)
mymage Jan 15, 2024
4f77ec1
Translated using Weblate (Italian)
mymage Jan 17, 2024
7b15d25
[IMP] base_report_to_printer: pre-commit auto fixes
john-herholz-dt Mar 8, 2024
d3894b4
[MIG] base_report_to_printer: Migration to 17.0
john-herholz-dt Mar 8, 2024
ffa3451
[UPD] Update base_report_to_printer.pot
Mar 8, 2024
9497392
[BOT] post-merge updates
OCA-git-bot Mar 8, 2024
83c8c4c
Update translation files
weblate Mar 8, 2024
039649d
[FIX] line too long
sbidoul May 1, 2024
4d16713
[BOT] post-merge updates
OCA-git-bot May 1, 2024
1086fae
Translated using Weblate (Italian)
mymage May 23, 2024
b89613f
Translated using Weblate (Italian)
mymage Jun 6, 2024
cc5646e
Translated using Weblate (Swedish)
jakobkrabbe Jun 12, 2024
9fb5fd4
Translated using Weblate (Chinese (Simplified) (zh_CN))
xtanuiha Jun 13, 2024
2614df0
Translated using Weblate (Chinese (Simplified) (zh_CN))
xtanuiha Jun 14, 2024
57fda28
[14.0][FIX] base_report_to_printer: Don't use safe_eval as module
rousseldenis Dec 20, 2021
9efa4f5
oca-port: blacklist PR(s) 242 for base_report_to_printer
trisdoan Oct 3, 2024
71678f2
[FIX] base_report_to_printer: access error and wrong translated terms
trisdoan Oct 9, 2024
64f778e
base_report_to_printer: fix string
alexis-via Nov 3, 2023
43eab67
[IMP] base_report_to_printer: out of connection fallback to client
chienandalu Jan 31, 2024
92723f3
[FIX] base_report_to_printer: update printers wizard
chienandalu Sep 20, 2023
b719f7e
[IMP] base_report_to_printer: Add printer option to launch reports in…
sergio-teruel Oct 26, 2024
995e8fa
[IMP] base_report_to_printer: exceptions notifications
chienandalu Nov 11, 2024
05716e3
[IMP] base_report_to_printer: pre-commit auto fixes
trisdoan Nov 19, 2024
128c02e
[MIG] base_report_to_printer: Migration to 18.0
trisdoan Oct 14, 2024
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
5 changes: 5 additions & 0 deletions .oca/oca-port/blacklist/base_report_to_printer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"pull_requests": {
"242": "(auto) Nothing to port from PR #242"
}
}
201 changes: 201 additions & 0 deletions base_report_to_printer/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
=================
Report to printer
=================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:3d37f5e02c22560d293e60d6fb565eea3a6657926defd87d4a6ca71cc229ab60
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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/18.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-18-0/report-print-send-18-0-base_report_to_printer
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/report-print-send&target_branch=18.0
:alt: Try me on Runboat

|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:

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

.. code:: 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:

1. 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 "none" (or some other list of
values which does not include "job-name") , and reload the server. See
cupsd.conf(5)
<`https://www.cups.org/doc/man-cupsd.conf.html\\> <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.

Known issues / Roadmap
======================

- With threaded printing there's no download fallback when the issue
isn't detected by the CUPS Odoo backend. To able to do it, we would
need to notify the bus or use web_notify for it.

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 to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/report-print-send/issues/new?body=module:%20base_report_to_printer%0Aversion:%2018.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>
- Hughes Damry <hughes.damry@acsone.eu>
- Akim Juillerat <akim.juillerat@camptocamp.com>
- Jacques-Etienne Baudoux (BCIM) <je@bcim.be>
- Tris Doan <tridm@trobz.com>

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

The migration of this module from 17.0 to 18.0 was financially supported
by Camptocamp.

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/18.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
39 changes: 39 additions & 0 deletions base_report_to_printer/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# 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": "18.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",
"security/ir.model.access.csv",
"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/print_attachment_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"]},
}
2 changes: 2 additions & 0 deletions base_report_to_printer/data/neutralize.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
update printing_server set active=false;
update printing_printer set active=false;
27 changes: 27 additions & 0 deletions base_report_to_printer/data/printing_data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?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>
<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="model_id" ref="base_report_to_printer.model_printing_server" />
<field name="state">code</field>
<field name="code">model.action_update_jobs()</field>
</record>
<function
model="ir.default"
name="set"
eval="('ir.actions.report', 'property_printing_action_id', obj().env.ref('base_report_to_printer.printing_action_2').id)"
/>
</odoo>
Loading
Loading