From 50e5a3b7bebebb4fbab17a38b1e8fcfb666fb8a4 Mon Sep 17 00:00:00 2001 From: venkataakhil Date: Wed, 8 Nov 2023 19:15:17 +0530 Subject: [PATCH] Publish to update custom language doctype --- smart_service/transactions/doctype/publish/publish.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/smart_service/transactions/doctype/publish/publish.py b/smart_service/transactions/doctype/publish/publish.py index e0bf6df..fb40d54 100644 --- a/smart_service/transactions/doctype/publish/publish.py +++ b/smart_service/transactions/doctype/publish/publish.py @@ -91,10 +91,15 @@ class Publish(Document): if self.publish_type == 'Internal': frappe.db.sql( '''update tabVehicle set internal_publish = 1 where vehicle= '{0}'; '''.format(self.vehicle)) + + frappe.db.sql( + '''update `tabCustom Languages` set internal_publish = 1 where lang_code= '{0}'; '''.format(self.language)) else: frappe.db.sql( '''update tabVehicle set global_publish = 1 where vehicle= '{0}'; '''.format(self.vehicle)) + frappe.db.sql( + '''update `tabCustom Languages` set global_publish = 1 where lang_code= '{0}'; '''.format(self.language)) def on_cancel(self): # Published document should not allow to cancel