Invalidate the cache when the table is created so the table_exists()

method returns a fresh value after creation of the table
This commit is contained in:
Guewen Baconnier
2014-11-18 11:54:37 +01:00
committed by Sylvain GARANCHER
parent 262a5db1e8
commit b015085e63

View File

@@ -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()