From 773648e3e7d6464a96ef6dac10405926be0d0ad7 Mon Sep 17 00:00:00 2001 From: Azka Nathan Date: Mon, 1 Jul 2024 15:49:10 +0700 Subject: fix bug pj --- indoteknik_custom/models/purchasing_job.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/indoteknik_custom/models/purchasing_job.py b/indoteknik_custom/models/purchasing_job.py index 230c171a..4eaf700d 100644 --- a/indoteknik_custom/models/purchasing_job.py +++ b/indoteknik_custom/models/purchasing_job.py @@ -41,7 +41,7 @@ class PurchasingJob(models.Model): } def init(self): - self.env.cr.execute(""" + query = """ CREATE OR REPLACE VIEW %s AS ( WITH latest_purchase_orders AS ( SELECT @@ -150,7 +150,9 @@ class PurchasingJob(models.Model): pmp.item_code, pmp.product, pmp.action - )""" % self._table) + )""" % self._table + + self.env.cr.execute(query) def open_form_multi_generate_request_po(self): -- cgit v1.2.3