|
@ -92,9 +92,14 @@ class Publish(Document): |
|
|
frappe.db.sql( |
|
|
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: |
|
|
else: |
|
|
frappe.db.sql( |
|
|
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): |
|
|
def on_cancel(self): |
|
|
# Published document should not allow to cancel |
|
|
# Published document should not allow to cancel |
|
|