summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIndoteknik . <it@fixcomart.co.id>2025-05-13 13:19:34 +0700
committerIndoteknik . <it@fixcomart.co.id>2025-05-13 13:19:34 +0700
commit2c565f289de7d5827a7d9e09b4919ecffcf0437c (patch)
tree6ab778196cf6771fb47fd67579b32f1a1e902717
parent360c47384d876d17725be8ff3ca6b83a9078615b (diff)
(andri) add log note muncul di variant ketika ada perubahan di template
-rwxr-xr-xindoteknik_custom/models/product_template.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/indoteknik_custom/models/product_template.py b/indoteknik_custom/models/product_template.py
index 19de8bb7..1d4723a6 100755
--- a/indoteknik_custom/models/product_template.py
+++ b/indoteknik_custom/models/product_template.py
@@ -869,6 +869,11 @@ class ProductTemplate(models.Model):
if changes:
record.message_post(body=f"<b>Updated:</b><ul>{''.join(changes)}</ul>")
+ # log changes to product variants
+ variant_message = f"<b>Updated:</b><ul>{''.join(changes)}</ul>"
+ for variant in record.product_variant_ids:
+ variant.message_post(body=variant_message)
+
# simpan data lama dan log perubahan field
def write(self, vals):
context = self._get_context_with_all_info(vals)