Browse Source

Publish to update custom language doctype

master
venkataakhil 11 months ago
parent
commit
50e5a3b7be
  1. 5
      smart_service/transactions/doctype/publish/publish.py

5
smart_service/transactions/doctype/publish/publish.py

@ -92,9 +92,14 @@ class Publish(Document):
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

Loading…
Cancel
Save