소스 검색

Merge pull request #4656 from manassolanki/fix-12

fix the key error and add the default date-format in template
version-14
Saurabh 7 년 전
committed by GitHub
부모
커밋
3ea9f02de2
No known key found for this signature in database GPG 키 ID: 4AEE18F83AFDEB23
2개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. +2
    -0
      frappe/core/doctype/data_import/exporter.py
  2. +1
    -1
      frappe/core/doctype/data_import/importer.py

+ 2
- 0
frappe/core/doctype/data_import/exporter.py 파일 보기

@@ -165,6 +165,8 @@ def get_template(doctype=None, parent_doctype=None, all_doctypes="No", with_data
return 'Integer' return 'Integer'
elif docfield.fieldtype == "Check": elif docfield.fieldtype == "Check":
return "0 or 1" return "0 or 1"
elif docfield.fieldtype in ["Date", "Datetime"]:
return cstr(frappe.defaults.get_defaults().date_format)
elif hasattr(docfield, "info"): elif hasattr(docfield, "info"):
return docfield.info return docfield.info
else: else:


+ 1
- 1
frappe/core/doctype/data_import/importer.py 파일 보기

@@ -210,7 +210,7 @@ def upload(rows = None, submit_after_import=None, ignore_encoding_errors=False,
else: else:
return True return True


if autoname and not doc[autoname]:
if (autoname and autoname not in doc) or (autoname and not doc[autoname]):
frappe.throw(_("{0} is a mandatory field".format(autoname))) frappe.throw(_("{0} is a mandatory field".format(autoname)))
return True return True




불러오는 중...
취소
저장