From 15f498ebbdec5cdda56dfabb5a189b774fee0fe5 Mon Sep 17 00:00:00 2001 From: eco-odoo Date: Fri, 6 Jul 2018 10:22:10 +0200 Subject: [PATCH] [IMP] sale: disable logo check before printing When the logo was not set and you tried to print a quotation, a modal form opened and offered you to edit the company data. You then had to save, close the modal and retry to print. Now the quotation is printed without the logo. --- addons/sale/models/sale.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/sale/models/sale.py b/addons/sale/models/sale.py index 2bd90b3a86b..c4e39ab3768 100644 --- a/addons/sale/models/sale.py +++ b/addons/sale/models/sale.py @@ -397,7 +397,9 @@ class SaleOrder(models.Model): @api.multi def print_quotation(self): self.filtered(lambda s: s.state == 'draft').write({'state': 'sent'}) - return self.env.ref('sale.action_report_saleorder').report_action(self) + + return self.env.ref('sale.action_report_saleorder')\ + .with_context({'discard_logo_check': True}).report_action(self) @api.multi def action_view_invoice(self):