From b015085e6335ac78b5ac34d8ffa7b95cd4b80a6f Mon Sep 17 00:00:00 2001 From: Guewen Baconnier Date: Tue, 18 Nov 2014 11:54:37 +0100 Subject: [PATCH] Invalidate the cache when the table is created so the table_exists() method returns a fresh value after creation of the table --- base_report_to_printer/printing.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/base_report_to_printer/printing.py b/base_report_to_printer/printing.py index 9270578..daff378 100644 --- a/base_report_to_printer/printing.py +++ b/base_report_to_printer/printing.py @@ -64,6 +64,10 @@ class PrintingPrinterPolling(models.Model): def table_exists(self): return self._model._table_exist(self.env.cr) + def _create_table(self, cr): + super(PrintingPrinterPolling, self)._create_table(cr) + self.clear_caches() + @api.model def find_or_create_unique_record(self): polling = self.find_unique_record()