|
|
@ -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 |
|
|
|