From 0a81a44ccfdfc7219ee29b2b6f79fa73143e095d Mon Sep 17 00:00:00 2001 From: Mqdd Date: Mon, 15 Dec 2025 13:42:30 +0700 Subject: add button generate product manually --- indoteknik_custom/models/keywords.py | 5 ++++- indoteknik_custom/views/keywords.xml | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/indoteknik_custom/models/keywords.py b/indoteknik_custom/models/keywords.py index 5faa94a6..495a42cc 100644 --- a/indoteknik_custom/models/keywords.py +++ b/indoteknik_custom/models/keywords.py @@ -1,4 +1,5 @@ from itertools import product +from multiprocessing import Condition from odoo import fields, models, api, tools, _ import logging import re @@ -68,6 +69,8 @@ class Keywords(models.Model): for record in self: if not record.keywords: continue + if record.skip: + continue keyword = "%" + record.keywords.strip() + "%" @@ -141,7 +144,7 @@ class Keywords(models.Model): @api.model def create(self, vals): record = super().create(vals) - record.generate_products() + # record.generate_products() return record def write(self, vals): diff --git a/indoteknik_custom/views/keywords.xml b/indoteknik_custom/views/keywords.xml index f5374655..878952f8 100644 --- a/indoteknik_custom/views/keywords.xml +++ b/indoteknik_custom/views/keywords.xml @@ -19,6 +19,9 @@ keywords
+
+

-- cgit v1.2.3