[FIX] base_report_to_printer: related field not readonly provokes unneeded writes

This commit is contained in:
Pedro M. Baeza
2018-05-30 20:18:04 +02:00
parent f7f3f4a64e
commit 51e80f08af
2 changed files with 2 additions and 2 deletions

View File

@@ -8,7 +8,7 @@
{ {
'name': "Report to printer", 'name': "Report to printer",
'version': '10.0.2.0.1', 'version': '10.0.2.0.2',
'category': 'Generic Modules/Base', 'category': 'Generic Modules/Base',
'author': "Agile Business Group & Domsense, Pegueroles SCP, NaN, " 'author': "Agile Business Group & Domsense, Pegueroles SCP, NaN, "
"LasLabs, Tecnativa, Odoo Community Association (OCA)", "LasLabs, Tecnativa, Odoo Community Association (OCA)",

View File

@@ -21,7 +21,7 @@ class PrintingJob(models.Model):
help='CUPS id for this job.') help='CUPS id for this job.')
server_id = fields.Many2one( server_id = fields.Many2one(
comodel_name='printing.server', string='Server', comodel_name='printing.server', string='Server',
related='printer_id.server_id', store=True, related='printer_id.server_id', store=True, readonly=True,
help='Server which hosts this job.') help='Server which hosts this job.')
printer_id = fields.Many2one( printer_id = fields.Many2one(
comodel_name='printing.printer', string='Printer', required=True, comodel_name='printing.printer', string='Printer', required=True,