From 68a8447ddd6e8742abb00aec969083fba6d4328e Mon Sep 17 00:00:00 2001 From: Yannick Vaucher Date: Wed, 2 Oct 2013 17:36:14 +0200 Subject: [PATCH 1/5] [ADD] module printer_tray --- printer_tray/__init__.py | 24 +++++++ printer_tray/__openerp__.py | 55 ++++++++++++++++ printer_tray/ir_report.py | 61 ++++++++++++++++++ printer_tray/ir_report_view.xml | 18 ++++++ printer_tray/printer.py | 100 ++++++++++++++++++++++++++++++ printer_tray/printer_tray.py | 32 ++++++++++ printer_tray/report_xml_action.py | 39 ++++++++++++ printer_tray/users.py | 30 +++++++++ printer_tray/users_view.xml | 18 ++++++ 9 files changed, 377 insertions(+) create mode 100644 printer_tray/__init__.py create mode 100644 printer_tray/__openerp__.py create mode 100644 printer_tray/ir_report.py create mode 100644 printer_tray/ir_report_view.xml create mode 100644 printer_tray/printer.py create mode 100644 printer_tray/printer_tray.py create mode 100644 printer_tray/report_xml_action.py create mode 100644 printer_tray/users.py create mode 100644 printer_tray/users_view.xml diff --git a/printer_tray/__init__.py b/printer_tray/__init__.py new file mode 100644 index 0000000..db2e915 --- /dev/null +++ b/printer_tray/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Author: Yannick Vaucher +# Copyright 2013 Camptocamp SA +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## +from . import ir_report +from . import printer_tray +from . import printer +from . import users diff --git a/printer_tray/__openerp__.py b/printer_tray/__openerp__.py new file mode 100644 index 0000000..1f180c5 --- /dev/null +++ b/printer_tray/__openerp__.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Author: Yannick Vaucher +# Copyright 2013 Camptocamp SA +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## +{'name' : 'Report to printer - Paper tray selection', + 'version' : '1.0', + 'category': 'Printer', + 'description': """ +Report to printer - Paper tray selection +======================================== + + **Author:** Camptocamp SA + + *This module extends `Report to printer` module.* + + It detects trays on printer installation plus permits to select + the paper source on which you want to print directly. + + 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 exemple for prepinted + paper such as payment slip. + """, + 'author' : 'Camptocamp', + 'maintainer': 'Camptocamp', + 'website': 'http://www.camptocamp.com/', + 'depends' : ['base_report_assembler', + 'base_report_to_printer', + ], + 'data': [ + 'users_view.xml', + 'ir_report_view.xml', + ], + 'test': [], + 'installable': True, + 'auto_install': False, + 'application': True, + } diff --git a/printer_tray/ir_report.py b/printer_tray/ir_report.py new file mode 100644 index 0000000..4429f46 --- /dev/null +++ b/printer_tray/ir_report.py @@ -0,0 +1,61 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Author: Yannick Vaucher +# Copyright 2013 Camptocamp SA +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## +from openerp.osv import orm, fields + +class ReportXML(orm.Model): + + _inherit = 'ir.actions.report.xml' + + _columns = { + 'printer_tray_id': fields.many2one('printing.tray', 'Paper Source', + domain="[('printer_id', '=', printing_printer_id)]"), + } + + def set_print_options(self, cr, uid, report_id, format, context=None): + """ + Hook to define Tray + """ + printing_act_obj = self.pool.get('printing.report.xml.action') + options = super(ReportXML, self).set_print_options(cr, uid, report_id, format, context=context) + + # Retrieve user default values + user = self.pool.get('res.users').browse(cr, uid, context) + tray = user.printer_tray_id + report = self.browse(cr, uid, report_id, context=context) + + # Retrieve report default values + if report.printer_tray_id: + tray = report.printer_tray_id + + # Retrieve report-user specific values + act_ids = printing_act_obj.search(cr, uid, + [('report_id', '=', report.id), + ('user_id', '=', uid), + ('action', '!=', 'user_default')], context=context) + if act_ids: + user_action = printing_act_obj.browse(cr, uid, act_ids[0], context=context) + if user_action.tray_id: + tray = user_action.tray_id + + if tray: + options['InputSlot'] = str(tray.system_name) + return options + diff --git a/printer_tray/ir_report_view.xml b/printer_tray/ir_report_view.xml new file mode 100644 index 0000000..4a912e2 --- /dev/null +++ b/printer_tray/ir_report_view.xml @@ -0,0 +1,18 @@ + + + + + + + ir.actions.report.xml.add.printer.tray + ir.actions.report.xml + + + + + + + + + + diff --git a/printer_tray/printer.py b/printer_tray/printer.py new file mode 100644 index 0000000..830c844 --- /dev/null +++ b/printer_tray/printer.py @@ -0,0 +1,100 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Author: Yannick Vaucher +# Copyright 2013 Camptocamp SA +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## +import cups +from cups import PPD + +from openerp import pooler +from openerp.osv import orm, fields + +class Printer(orm.Model): + + _inherit = 'printing.printer' + + _columns = { + 'tray_ids': fields.one2many('printing.tray', 'printer_id', 'Paper Sources'), + } + + def _update_tray_option(self, db_name, uid, printer, context=None): + """ + Create missing tray for a printer + """ + db, pool = pooler.get_db_and_pool(db_name) + cr = db.cursor() + tray_obj = pool.get('printing.tray') + # get printers options from a PPD file + try: + connection = cups.Connection() + ppd_file_path = connection.getPPD3(printer.system_name) + except: + return + + if not ppd_file_path[2]: + return + ppd = PPD(ppd_file_path[2]) + option = ppd.findOption('InputSlot') + if not option: + return + + try: + for tray_opt in option.choices: + if tray_opt['choice'] not in [t.system_name for t in printer.tray_ids]: + tray_vals = { + 'name': tray_opt['text'], + 'system_name': tray_opt['choice'], + 'printer_id': printer.id, + } + + tray_obj.create(cr, uid, tray_vals, context=context) + + cr.commit() + except: + cr.rollback() + raise + finally: + cr.close() + return True + + + def update_printers_status(self, db_name, uid, context=None): + """ + Add creation of tray if no tray are defined + """ + db, pool = pooler.get_db_and_pool(db_name) + cr = db.cursor() + res = super(Printer, self).update_printers_status(db_name, uid, context=context) + + try: + connection = cups.Connection() + printers = connection.getPrinters() + server_error = False + except: + server_error = True + + printer_ids = self.search(cr, uid, [('system_name', 'in', printers.keys())], context=context) + printer_list = self.browse(cr, uid, printer_ids, context=context) + + for printer in printer_list: + # XXX we consider config of printer won't change + if not printer.tray_ids: + self._update_tray_option(db_name, uid, printer, context=context) + + return res + diff --git a/printer_tray/printer_tray.py b/printer_tray/printer_tray.py new file mode 100644 index 0000000..15506a0 --- /dev/null +++ b/printer_tray/printer_tray.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Author: Yannick Vaucher +# Copyright 2013 Camptocamp SA +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## +from openerp.osv import orm, fields + +class PrinterTray(orm.Model): + + _name = 'printing.tray' + _description = 'Printer Tray' + + _columns = { + 'name': fields.char('Name', size=64, required=True), + 'system_name': fields.char('System Name', size=64, required=True), + 'printer_id': fields.many2one('printing.printer', 'Printer', required=True), + } diff --git a/printer_tray/report_xml_action.py b/printer_tray/report_xml_action.py new file mode 100644 index 0000000..85f0176 --- /dev/null +++ b/printer_tray/report_xml_action.py @@ -0,0 +1,39 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Author: Yannick Vaucher +# Copyright 2013 Camptocamp SA +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +from openerp.osv import orm, fields + +class ReportXMLAction(orm.Model): + _inherit = 'printing.report.xml.action' + + _columns = { + 'printer_tray_id': fields.many2one('printing.tray', 'Paper Source', + domain="[('printer_id', '=', printer_id)]"), + } + + def behaviour(self, cr, uid, act_id, context=None): + res = super(ReportXMLAction, self).behaviour(cr, uid, act_id, context=context) + action = self.browse(cr, uid, act_id, context=context) + res['tray'] = action.printer_tray_id.system_name + return res + + + diff --git a/printer_tray/users.py b/printer_tray/users.py new file mode 100644 index 0000000..dc38379 --- /dev/null +++ b/printer_tray/users.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Author: Yannick Vaucher +# Copyright 2013 Camptocamp SA +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## +from openerp.osv import orm, fields + +class ResUsers(orm.Model): + + _inherit = "res.users" + + _columns = { + 'printer_tray_id': fields.many2one('printing.tray', 'Default Printer Paper Source', + domain="[('printer_id', '=', printing_printer_id)]"), + } diff --git a/printer_tray/users_view.xml b/printer_tray/users_view.xml new file mode 100644 index 0000000..ba3bbbb --- /dev/null +++ b/printer_tray/users_view.xml @@ -0,0 +1,18 @@ + + + + + + + res.users.form.add.printer.tray + res.users + + + + + + + + + + From 1fd3e459844959ec95dfff6a2c08ac2705ffe0c7 Mon Sep 17 00:00:00 2001 From: Yannick Vaucher Date: Thu, 24 Oct 2013 15:36:01 +0200 Subject: [PATCH 2/5] [PEP8] --- printer_tray/__openerp__.py | 12 ++++++------ printer_tray/ir_report.py | 8 +++++--- printer_tray/printer.py | 19 +++++++------------ printer_tray/printer_tray.py | 1 + printer_tray/report_xml_action.py | 7 +++---- printer_tray/users.py | 4 +++- 6 files changed, 25 insertions(+), 26 deletions(-) diff --git a/printer_tray/__openerp__.py b/printer_tray/__openerp__.py index 1f180c5..e193ea2 100644 --- a/printer_tray/__openerp__.py +++ b/printer_tray/__openerp__.py @@ -18,8 +18,8 @@ # along with this program. If not, see . # ############################################################################## -{'name' : 'Report to printer - Paper tray selection', - 'version' : '1.0', +{'name': 'Report to printer - Paper tray selection', + 'version': '1.0', 'category': 'Printer', 'description': """ Report to printer - Paper tray selection @@ -38,12 +38,12 @@ Report to printer - Paper tray selection This allows you to dedicate a specific paper source for exemple for prepinted paper such as payment slip. """, - 'author' : 'Camptocamp', + 'author': 'Camptocamp', 'maintainer': 'Camptocamp', 'website': 'http://www.camptocamp.com/', - 'depends' : ['base_report_assembler', - 'base_report_to_printer', - ], + 'depends': ['base_report_assembler', + 'base_report_to_printer', + ], 'data': [ 'users_view.xml', 'ir_report_view.xml', diff --git a/printer_tray/ir_report.py b/printer_tray/ir_report.py index 4429f46..4230d57 100644 --- a/printer_tray/ir_report.py +++ b/printer_tray/ir_report.py @@ -20,12 +20,14 @@ ############################################################################## from openerp.osv import orm, fields + class ReportXML(orm.Model): _inherit = 'ir.actions.report.xml' _columns = { - 'printer_tray_id': fields.many2one('printing.tray', 'Paper Source', + 'printer_tray_id': fields.many2one( + 'printing.tray', 'Paper Source', domain="[('printer_id', '=', printing_printer_id)]"), } @@ -46,7 +48,8 @@ class ReportXML(orm.Model): tray = report.printer_tray_id # Retrieve report-user specific values - act_ids = printing_act_obj.search(cr, uid, + act_ids = printing_act_obj.search( + cr, uid, [('report_id', '=', report.id), ('user_id', '=', uid), ('action', '!=', 'user_default')], context=context) @@ -58,4 +61,3 @@ class ReportXML(orm.Model): if tray: options['InputSlot'] = str(tray.system_name) return options - diff --git a/printer_tray/printer.py b/printer_tray/printer.py index 830c844..edbd472 100644 --- a/printer_tray/printer.py +++ b/printer_tray/printer.py @@ -24,13 +24,14 @@ from cups import PPD from openerp import pooler from openerp.osv import orm, fields + class Printer(orm.Model): _inherit = 'printing.printer' _columns = { - 'tray_ids': fields.one2many('printing.tray', 'printer_id', 'Paper Sources'), - } + 'tray_ids': fields.one2many('printing.tray', 'printer_id', 'Paper Sources'), + } def _update_tray_option(self, db_name, uid, printer, context=None): """ @@ -45,25 +46,22 @@ class Printer(orm.Model): ppd_file_path = connection.getPPD3(printer.system_name) except: return - if not ppd_file_path[2]: return ppd = PPD(ppd_file_path[2]) option = ppd.findOption('InputSlot') if not option: return - try: for tray_opt in option.choices: if tray_opt['choice'] not in [t.system_name for t in printer.tray_ids]: tray_vals = { - 'name': tray_opt['text'], - 'system_name': tray_opt['choice'], - 'printer_id': printer.id, - } + 'name': tray_opt['text'], + 'system_name': tray_opt['choice'], + 'printer_id': printer.id, + } tray_obj.create(cr, uid, tray_vals, context=context) - cr.commit() except: cr.rollback() @@ -72,7 +70,6 @@ class Printer(orm.Model): cr.close() return True - def update_printers_status(self, db_name, uid, context=None): """ Add creation of tray if no tray are defined @@ -95,6 +92,4 @@ class Printer(orm.Model): # XXX we consider config of printer won't change if not printer.tray_ids: self._update_tray_option(db_name, uid, printer, context=context) - return res - diff --git a/printer_tray/printer_tray.py b/printer_tray/printer_tray.py index 15506a0..90a90ab 100644 --- a/printer_tray/printer_tray.py +++ b/printer_tray/printer_tray.py @@ -20,6 +20,7 @@ ############################################################################## from openerp.osv import orm, fields + class PrinterTray(orm.Model): _name = 'printing.tray' diff --git a/printer_tray/report_xml_action.py b/printer_tray/report_xml_action.py index 85f0176..603e21b 100644 --- a/printer_tray/report_xml_action.py +++ b/printer_tray/report_xml_action.py @@ -21,11 +21,13 @@ from openerp.osv import orm, fields + class ReportXMLAction(orm.Model): _inherit = 'printing.report.xml.action' _columns = { - 'printer_tray_id': fields.many2one('printing.tray', 'Paper Source', + 'printer_tray_id': fields.many2one( + 'printing.tray', 'Paper Source', domain="[('printer_id', '=', printer_id)]"), } @@ -34,6 +36,3 @@ class ReportXMLAction(orm.Model): action = self.browse(cr, uid, act_id, context=context) res['tray'] = action.printer_tray_id.system_name return res - - - diff --git a/printer_tray/users.py b/printer_tray/users.py index dc38379..7f46f76 100644 --- a/printer_tray/users.py +++ b/printer_tray/users.py @@ -20,11 +20,13 @@ ############################################################################## from openerp.osv import orm, fields + class ResUsers(orm.Model): _inherit = "res.users" _columns = { - 'printer_tray_id': fields.many2one('printing.tray', 'Default Printer Paper Source', + 'printer_tray_id': fields.many2one( + 'printing.tray', 'Default Printer Paper Source', domain="[('printer_id', '=', printing_printer_id)]"), } From bf165a3864d4af8bf7c8abf8f83d66f672c8c3aa Mon Sep 17 00:00:00 2001 From: Yannick Vaucher Date: Thu, 24 Oct 2013 15:56:02 +0200 Subject: [PATCH 3/5] [FIX] use server_error variable to update printer status --- printer_tray/printer.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/printer_tray/printer.py b/printer_tray/printer.py index edbd472..9c18f64 100644 --- a/printer_tray/printer.py +++ b/printer_tray/printer.py @@ -77,7 +77,6 @@ class Printer(orm.Model): db, pool = pooler.get_db_and_pool(db_name) cr = db.cursor() res = super(Printer, self).update_printers_status(db_name, uid, context=context) - try: connection = cups.Connection() printers = connection.getPrinters() @@ -86,6 +85,11 @@ class Printer(orm.Model): server_error = True printer_ids = self.search(cr, uid, [('system_name', 'in', printers.keys())], context=context) + if server_error: + vals = {'status': 'server_error'} + self.write(cr, uid, printer_ids, vals, context=context) + return res + printer_list = self.browse(cr, uid, printer_ids, context=context) for printer in printer_list: From 4b1a6707aba232eca0a4e36bc4ec9f1ad0fac01d Mon Sep 17 00:00:00 2001 From: Yannick Vaucher Date: Fri, 31 Jan 2014 16:49:33 +0100 Subject: [PATCH 4/5] [ADD] translation files --- printer_tray/i18n/fr.po | 63 +++++++++++++++++++++++++++++++ printer_tray/i18n/printer_tray.po | 63 +++++++++++++++++++++++++++++++ 2 files changed, 126 insertions(+) create mode 100644 printer_tray/i18n/fr.po create mode 100644 printer_tray/i18n/printer_tray.po diff --git a/printer_tray/i18n/fr.po b/printer_tray/i18n/fr.po new file mode 100644 index 0000000..649c87a --- /dev/null +++ b/printer_tray/i18n/fr.po @@ -0,0 +1,63 @@ +# Translation of OpenERP Server. +# This file contains the translation of the following modules: +# * printer_tray +# +msgid "" +msgstr "" +"Project-Id-Version: OpenERP Server 7.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-01-31 15:44+0000\n" +"PO-Revision-Date: 2014-01-31 16:48+0100\n" +"Last-Translator: Yannick Vaucher \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: \n" + +#. module: printer_tray +#: model:ir.model,name:printer_tray.model_printing_tray +msgid "Printer Tray" +msgstr "Bac d'impression" + +#. module: printer_tray +#: model:ir.model,name:printer_tray.model_printing_printer +#: field:printing.tray,printer_id:0 +msgid "Printer" +msgstr "Imprimante" + +#. module: printer_tray +#: field:res.users,printer_tray_id:0 +msgid "Default Printer Paper Source" +msgstr "Source de papier par défaut" + +#. module: printer_tray +#: field:printing.tray,name:0 +msgid "Name" +msgstr "Nom" + +#. module: printer_tray +#: field:printing.tray,system_name:0 +msgid "System Name" +msgstr "Nom système" + +#. module: printer_tray +#: field:printing.printer,tray_ids:0 +msgid "Paper Sources" +msgstr "Sources de papier" + +#. module: printer_tray +#: model:ir.model,name:printer_tray.model_res_users +msgid "Users" +msgstr "Utilisateur" + +#. module: printer_tray +#: model:ir.model,name:printer_tray.model_ir_actions_report_xml +msgid "ir.actions.report.xml" +msgstr "" + +#. module: printer_tray +#: field:ir.actions.report.xml,printer_tray_id:0 +msgid "Paper Source" +msgstr "Source de papier" + diff --git a/printer_tray/i18n/printer_tray.po b/printer_tray/i18n/printer_tray.po new file mode 100644 index 0000000..f1cec9e --- /dev/null +++ b/printer_tray/i18n/printer_tray.po @@ -0,0 +1,63 @@ +# Translation of OpenERP Server. +# This file contains the translation of the following modules: +# * printer_tray +# +msgid "" +msgstr "" +"Project-Id-Version: OpenERP Server 7.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-01-31 15:44+0000\n" +"PO-Revision-Date: 2014-01-31 16:48+0100\n" +"Last-Translator: Yannick Vaucher \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: \n" + +#. module: printer_tray +#: model:ir.model,name:printer_tray.model_printing_tray +msgid "Printer Tray" +msgstr "" + +#. module: printer_tray +#: model:ir.model,name:printer_tray.model_printing_printer +#: field:printing.tray,printer_id:0 +msgid "Printer" +msgstr "" + +#. module: printer_tray +#: field:res.users,printer_tray_id:0 +msgid "Default Printer Paper Source" +msgstr "" + +#. module: printer_tray +#: field:printing.tray,name:0 +msgid "Name" +msgstr "" + +#. module: printer_tray +#: field:printing.tray,system_name:0 +msgid "System Name" +msgstr "" + +#. module: printer_tray +#: field:printing.printer,tray_ids:0 +msgid "Paper Sources" +msgstr "" + +#. module: printer_tray +#: model:ir.model,name:printer_tray.model_res_users +msgid "Users" +msgstr "" + +#. module: printer_tray +#: model:ir.model,name:printer_tray.model_ir_actions_report_xml +msgid "ir.actions.report.xml" +msgstr "" + +#. module: printer_tray +#: field:ir.actions.report.xml,printer_tray_id:0 +msgid "Paper Source" +msgstr "" + From 1a458f2a30b1dc2aef748c07de2ebf6aeb85ffd0 Mon Sep 17 00:00:00 2001 From: Yannick Vaucher Date: Fri, 31 Jan 2014 18:01:52 +0100 Subject: [PATCH 5/5] [ADD] security file ir.model.access.csv --- printer_tray/security/ir.model.access.csv | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 printer_tray/security/ir.model.access.csv diff --git a/printer_tray/security/ir.model.access.csv b/printer_tray/security/ir.model.access.csv new file mode 100644 index 0000000..90e6ac2 --- /dev/null +++ b/printer_tray/security/ir.model.access.csv @@ -0,0 +1,3 @@ +"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" +access_printing_tray_all,printing_tray all,model_printing_tray,,1,0,0,0 +access_printing_tray_operator,printing_tray operator,model_printing_tray,base_report_to_printer.res_groups_printingprintoperator0,1,1,1,1