[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 <pimodoo@users.noreply.github.com>
This commit is contained in:
Pierre Masereel
2020-04-02 08:28:24 +00:00
parent a7e09fb05b
commit c121a22756
2 changed files with 0 additions and 5 deletions
@@ -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)
@@ -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):