diff options
| author | Mqdd <ahmadmiqdad27@gmail.com> | 2025-12-15 13:42:30 +0700 |
|---|---|---|
| committer | Mqdd <ahmadmiqdad27@gmail.com> | 2025-12-15 13:42:30 +0700 |
| commit | 0a81a44ccfdfc7219ee29b2b6f79fa73143e095d (patch) | |
| tree | 84aa4a901c6b2f910f83ed478cedf9e299b048f8 | |
| parent | 18d1a2c15b6cf198b275d80596f52cc44da00e3e (diff) | |
<Miqdad> add button generate product manually
| -rw-r--r-- | indoteknik_custom/models/keywords.py | 5 | ||||
| -rw-r--r-- | indoteknik_custom/views/keywords.xml | 3 |
2 files changed, 7 insertions, 1 deletions
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 @@ <field name="model">keywords</field> <field name="arch" type="xml"> <form> + <header> + <button name="generate_products" string="Generate Product Manual" type="object" class="oe_highlight"/> + </header> <sheet> <div class="oe_title"> <h1> |
