From c121a227569690fc30083a43c500cf83ec2ef95d Mon Sep 17 00:00:00 2001 From: Pierre Masereel Date: Fri, 28 Feb 2020 09:40:58 +0000 Subject: [PATCH] [FIX] product, point_of_sale: remove error when no logo and layout Since the wizard to set a logo and chose a layout has been removed, we don't need anymore to throw an error if they are not set because the report can be generated. closes odoo/odoo#48831 X-original-commit: b7c7039667d9ec816e647a0dd30570a4a690cca2 Signed-off-by: pimodoo --- addons/point_of_sale/wizard/pos_details.py | 4 ---- addons/product/tests/test_product_pricelist.py | 1 - 2 files changed, 5 deletions(-) diff --git a/addons/point_of_sale/wizard/pos_details.py b/addons/point_of_sale/wizard/pos_details.py index 47578d68559..9be4caa05f1 100644 --- a/addons/point_of_sale/wizard/pos_details.py +++ b/addons/point_of_sale/wizard/pos_details.py @@ -43,9 +43,5 @@ class PosDetails(models.TransientModel): self.start_date = self.end_date def generate_report(self): - if (not self.env.company.logo): - raise UserError(_("You have to set a logo or a layout for your company.")) - elif (not self.env.company.external_report_layout_id): - raise UserError(_("You have to set your reports's header and footer layout.")) data = {'date_start': self.start_date, 'date_stop': self.end_date, 'config_ids': self.pos_config_ids.ids} return self.env.ref('point_of_sale.sale_details_report').report_action([], data=data) diff --git a/addons/product/tests/test_product_pricelist.py b/addons/product/tests/test_product_pricelist.py index 6fe59ff8c28..6f0fee6787a 100644 --- a/addons/product/tests/test_product_pricelist.py +++ b/addons/product/tests/test_product_pricelist.py @@ -3,7 +3,6 @@ from odoo.tests.common import TransactionCase from odoo.tools import float_compare, test_reports -from odoo.exceptions import UserError class TestProductPricelist(TransactionCase):