Browse Source

Publish version update

version2
venkataakhil 1 year ago
parent
commit
dec5ae4127
  1. 2
      smart_service/transactions/doctype/publish/publish.js
  2. 12
      smart_service/transactions/doctype/publish/publish.py

2
smart_service/transactions/doctype/publish/publish.js

@ -314,7 +314,7 @@ frappe.ui.form.on('Publish', {
}
if (frm.doc.docstatus == 1 && frm.doc.publish_status == 'Published' && !frm.is_new() && frm.doc.publish_type != "Global" && frm.doc.publish_module != 'Automotive System') {
if (frm.doc.docstatus == 1 && !frm.is_new() && frm.doc.publish_type != "Global" && frm.doc.publish_module != 'Automotive System') {
debugger
frappe.call({
method: "smart_service.transactions.doctype.publish.publish.max_publish_new_module",

12
smart_service/transactions/doctype/publish/publish.py

@ -54,8 +54,8 @@ class Publish(Document):
self.language, self.publish_type,
self.release_description, self.variant,
self.repair_checksheet_publish)
update_publish_status = frappe.db.sql(
"""update `tabPublish` set publish_status='Published' where name='{0}'""".format(self.name))
# update_publish_status = frappe.db.sql(
# """update `tabPublish` set publish_status='Published' where name='{0}'""".format(self.name))
if self.docstatus == 1 and self.publish_status == 'To Publish' and self.publish_module == 'Feature Finder' and self.publish_type == 'Internal' and self.feature_finder_publish:
feature_finder_publish(self.vehicle, self.vehicle_id,
@ -69,15 +69,15 @@ class Publish(Document):
self.variant)
update_feature_published_docs(self)
update_publish_status = frappe.db.sql(
"""update `tabPublish Test` set publish_status='Published' where name='{0}'""".format(self.name))
if self.docstatus == 1 and self.publish_status == 'To Publish' and self.publish_module == 'Repair service' and self.publish_type == 'Global' and self.feature_finder_publish:
"""update `tabPublish` set publish_status='Published' where name='{0}'""".format(self.name))
if self.docstatus == 1 and self.publish_status == 'To Publish' and self.publish_module == 'Repair service' and self.publish_type == 'Global':
repair_checksheet_publish(self.vehicle, self.vehicle_id,
self.language, self.publish_type,
self.release_description, self.variant,
self.repair_checksheet_publish)
update_repair_published_docs(self)
# update_publish_status = frappe.db.sql(
# """update `tabPublish` set publish_status='Published' where name='{0}'""".format(self.name))
update_publish_status = frappe.db.sql(
"""update `tabPublish` set publish_status='Published' where name='{0}'""".format(self.name))
def onload1(self):
current_db_name = frappe.conf.get("db_name")
# To validate updated procedure status

Loading…
Cancel
Save