[FIX] Runbot error, try new cron code, plus @yajo review cleanup

This commit is contained in:
Graeme Gellatly
2017-12-06 22:21:51 +13:00
parent cc8e61d558
commit 506debb541
4 changed files with 6 additions and 29 deletions

View File

@@ -40,8 +40,8 @@ Installation
sudo apt-get install cups
sudo apt-get install libcups2-dev
sudo apt-get install python-dev OR sudo apt-get install python3-dev
sudo easy_install pycups OR sudo pip install pycups
sudo apt-get install python3-dev
sudo pip install pycups
Configuration
@@ -77,11 +77,6 @@ displayed for the deprecated report types (RML, Webkit, ...).
:target: https://runbot.odoo-community.org/runbot/144/11.0
Known issues / Roadmap
======================
Bug Tracker
===========

View File

@@ -30,8 +30,8 @@
<field name="numbercall">-1</field>
<field eval="False" name="doall"/>
<field name="model_id" ref="base_report_to_printer.model_printing_server"/>
<field eval="'action_update_jobs'" name="function"/>
<field eval="'()'" name="args"/>
<field name="state">code</field>
<field name="code">model.action_update_jobs()</field>
</record>
</odoo>

View File

@@ -1,18 +0,0 @@
# Copyright (C) 2016 SYLEAM (<http://www.syleam.fr>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from openerp import SUPERUSER_ID, api
from openerp.tools.config import config
__name__ = 'Create a printing.server record from previous configuration'
def migrate(cr, v):
with api.Environment.manage():
uid = SUPERUSER_ID
env = api.Environment(cr, uid, {})
env['printing.server'].create({
'name': config.get('cups_host', 'localhost'),
'address': config.get('cups_host', 'localhost'),
'port': config.get('cups_port', 631),
})

View File

@@ -31,10 +31,10 @@ odoo.define('base_report_to_printer.print', function (require) {
context: action_val.context || {}
}).then(function () {
self.do_notify(_t('Report'),
_t('Document sent to the printer ') + print_action.printer_name);
_.str.sprintf(_t('Document sent to the printer %s'), print_action.printer_name));
}).fail(function () {
self.do_notify(_t('Report'),
_t('Error when sending the document to the printer ') + print_action.printer_name);
_.str.sprintf(_t('Error when sending the document to the printer '), print_action.printer_name));
});
} else {