summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indoteknik_custom/models/purchasing_job.py6
1 files 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):