소스 검색

Merge pull request #4508 from saurabh6790/domain_fixes

[fix] do not translate domain records
version-14
Saurabh 7 년 전
committed by GitHub
부모
커밋
33ef610430
No known key found for this signature in database GPG 키 ID: 4AEE18F83AFDEB23
2개의 변경된 파일7개의 추가작업 그리고 6개의 파일을 삭제
  1. +7
    -5
      frappe/core/doctype/domain/domain.py
  2. +0
    -1
      frappe/core/doctype/domain_settings/domain_settings.py

+ 7
- 5
frappe/core/doctype/domain/domain.py 파일 보기

@@ -34,11 +34,13 @@ class Domain(Document):
def remove_domain(self):
'''Unset domain settings'''
self.setup_data()
for role_name in self.data.restricted_roles:
if frappe.db.exists('Role', role_name):
role = frappe.get_doc('Role', role_name)
role.disabled = 1
role.save()

if self.data.restricted_roles:
for role_name in self.data.restricted_roles:
if frappe.db.exists('Role', role_name):
role = frappe.get_doc('Role', role_name)
role.disabled = 1
role.save()

if self.data.custom_fields:
for doctype in self.data.custom_fields:


+ 0
- 1
frappe/core/doctype/domain_settings/domain_settings.py 파일 보기

@@ -32,7 +32,6 @@ class DomainSettings(Document):
frappe.set_value('Role', role, 'disabled', 1)

for domain in all_domains:
domain = _(domain)
data = frappe.get_domain_data(domain)
if not frappe.db.get_value('Domain', domain):
frappe.get_doc(dict(doctype='Domain', domain=domain)).insert()


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