fix: override values on save now

This commit is contained in:
Abhishek Balam 2020-09-22 19:12:35 +05:30
parent 94e7f23d0a
commit 76422328b5
2 changed files with 4 additions and 4 deletions

View file

@ -99,6 +99,10 @@ class DocType(Document):
if self.default_print_format and not self.custom:
frappe.throw(_('Standard DocType cannot have default print format, use Customize Form'))
if frappe.conf.get('developer_mode'):
self.owner = 'Administrator'
self.modified_by = 'Administrator'
def set_default_in_list_view(self):
'''Set default in-list-view for first 4 mandatory fields'''
if not [d.fieldname for d in self.fields if d.in_list_view]:

View file

@ -41,10 +41,6 @@ def write_document_file(doc, record_module=None, create_init=True, folder_name=N
else:
folder = create_folder(module, doc.doctype, doc.name, create_init)
# override modified_by in json file
if not newdoc.custom:
newdoc.modified_by = 'Administrator'
# write the data file
fname = scrub(doc.name)
with open(os.path.join(folder, fname + ".json"), 'w+') as txtfile: