|
|
@ -51,9 +51,13 @@ class PublishTest(Document): |
|
|
|
def on_submit(self): |
|
|
|
if self.docstatus == 1 and self.publish_status == 'To Publish' and self.publish_module == 'Others' and self.publish_type == 'Internal': |
|
|
|
if len(self.repair_checksheet_publish)>0: |
|
|
|
repair_checksheet_publish(self.vehicle, self.vehicle_id, self.language, self.publish_type, |
|
|
|
self.release_description, self.variant, self.repair_checksheet_publish) |
|
|
|
feature_finder_publish(self.vehicle, self.vehicle_id, self.language, self.publish_type, |
|
|
|
repair_checksheet_publish(self.vehicle, self.vehicle_id, |
|
|
|
self.language, self.publish_type, |
|
|
|
self.release_description, self.variant, |
|
|
|
self.repair_checksheet_publish) |
|
|
|
|
|
|
|
feature_finder_publish(self.vehicle, self.vehicle_id, |
|
|
|
self.language, self.publish_type, |
|
|
|
self.release_description,self.feature_finder_publish) |
|
|
|
update_publish_status = frappe.db.sql( |
|
|
|
"""update `tabPublish Test` set publish_status='Published' where name='{0}'""".format(self.name)) |
|
|
@ -591,7 +595,7 @@ def feature_finder_publish(vehicle=None,vehicle_id=None, |
|
|
|
|
|
|
|
for i in parent: |
|
|
|
feature_finder = feature_finder_data( |
|
|
|
vehicle, language, publish_type, i.parent) |
|
|
|
vehicle, language, publish_type, i.parent1) |
|
|
|
|
|
|
|
|
|
|
|
if feature_finder['status'] == 1: |
|
|
@ -600,14 +604,14 @@ def feature_finder_publish(vehicle=None,vehicle_id=None, |
|
|
|
if len(feature_finder['data']): |
|
|
|
feature_finder_tmp.append( |
|
|
|
feature_finder['data'][0]) |
|
|
|
|
|
|
|
frappe.msgprint(str(feature_finder_tmp)) |
|
|
|
|
|
|
|
feature_finder_tmp=get_latest_data({'data':feature_finder_tmp},{'data':[]}) |
|
|
|
|
|
|
|
# if publish_feature_finder == 1: |
|
|
|
""" Save publish file """ |
|
|
|
vehicle_data['data'] = feature_finder_tmp |
|
|
|
frappe.msgprint(str(file_path)) |
|
|
|
|
|
|
|
|
|
|
|
with open(file_path, 'w') as outfile: |
|
|
|
outfile.write(json.dumps(vehicle_data, indent=4, default=str)) |
|
|
@ -725,7 +729,7 @@ def repair_checksheet_data(vehicle=None, language=None, |
|
|
|
def feature_finder_data(vehicle=None, language=None, |
|
|
|
publish_type=None, parent=None): |
|
|
|
try: |
|
|
|
frappe.msgprint(str(parent)) |
|
|
|
|
|
|
|
logger_file = f'{vehicle} - {language} - {publish_type} - {module_name} - fetch data' |
|
|
|
logger = frappe.logger(logger_file, |
|
|
|
allow_site=True, file_count=100) |
|
|
|