Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mcb30/odoo-print
Odoo module for direct printing
https://github.com/mcb30/odoo-print
odoo print
Last synced: about 1 month ago
JSON representation
Odoo module for direct printing
- Host: GitHub
- URL: https://github.com/mcb30/odoo-print
- Owner: mcb30
- Created: 2018-05-18T07:56:21.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-11-11T01:43:50.000Z (about 3 years ago)
- Last Synced: 2024-05-02T04:29:39.665Z (8 months ago)
- Topics: odoo, print
- Language: Python
- Size: 73.2 KB
- Stars: 8
- Watchers: 10
- Forks: 16
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Print directly to backend printers
==================================[![Build Status](https://travis-ci.org/unipartdigital/odoo-print.svg?branch=master)](https://travis-ci.org/unipartdigital/odoo-print)
This module provides a ```print.printer``` model to represent printers
connected to the Odoo server. This allows for backend code to send
reports directly to a printer, rather than requiring the user to
download a PDF to be printed manually.The primary use case is for printing reports: this can be triggered in
the Python code via e.g.Printer = self.env['print.printer']
Picking = self.env['stock.picking']
pick = Picking.search([('name', '=', 'PICK00009')])
Printer.spool_report(pick.ids, 'stock.report_deliveryslip')Note that ```spool_report()``` may be called on a specific printer or
directly on the model. If called directly on the model, the user's
default printer (or system default printer) will be used.Another common use case is to identify a printer by barcode and
associate it as the current user's default printer:Printer = self.env['print.printer']
printer = Printer.search([('barcode', '=', 'PRNLAB02')])
printer.set_user_default()