Browse Source

Publish py update custom language internal/global flag

version2
venkataakhil 11 months ago
parent
commit
f39f9526da
  1. 9
      smart_service/transactions/doctype/publish/publish.py

9
smart_service/transactions/doctype/publish/publish.py

@ -131,11 +131,16 @@ class Publish(Document):
if self.publish_type == 'Internal':
frappe.db.sql(
'''update tabVehicle set internal_publish = 1 where vehicle= '{0}'; '''.format(self.vehicle))
'''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))
'''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