summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAzka Nathan <darizkyfaz@gmail.com>2024-07-01 15:49:10 +0700
committerAzka Nathan <darizkyfaz@gmail.com>2024-07-01 15:49:10 +0700
commit773648e3e7d6464a96ef6dac10405926be0d0ad7 (patch)
tree4c7a813bb9af5b2ec0a1cccb65a267adacc59cf4
parentff8bd2b9da7abbd407d0a83b925aedd1134904a5 (diff)
fix bug pj
-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):