|
|
@ -34,7 +34,7 @@ class Publish(Document): |
|
|
|
|
|
|
|
def onload(self): |
|
|
|
current_db_name = frappe.conf.get("db_name") |
|
|
|
if self.child_table_updated == 1: |
|
|
|
if self.child_table_updated == "1": |
|
|
|
|
|
|
|
# To validate updated procedure status |
|
|
|
procedure_status = frappe.db.sql("""select p.name,p.update_procedure_status,pro.name,p.variant_mapping,p.system,p.sub_system,p.asset_category,p.item_category,p.variant,p.procedure_link,p.procedure_status,pro.name,pro.workflow_state |
|
|
@ -61,7 +61,7 @@ class Publish(Document): |
|
|
|
y.excluded_global = "1" |
|
|
|
if x.procedure_link == y.procedure_link and x.workflow_state != y.procedure_status and x.workflow_state == "Draft" and y.procedure_status != "Publish Ready": |
|
|
|
y.excluded_internal = "1" |
|
|
|
# self.child_table_updated = '0' |
|
|
|
self.child_table_updated = '0' |
|
|
|
y.save() |
|
|
|
frappe.db.commit() |
|
|
|
|
|
|
|