mirror of
https://github.com/erpnext/foundation.git
synced 2026-10-16 18:00:47 +02:00
add email of the owner to email field
This commit is contained in:
@@ -12,3 +12,7 @@ class DeveloperSprint(Document):
|
||||
autoname = 'DEV-SPRINT-.YYYY.-.###'
|
||||
self.name = make_autoname(autoname)
|
||||
|
||||
def validate(self):
|
||||
self.year = '2018'
|
||||
if self.owner not in ["Guest", "Administrator"] and not self.get("email"):
|
||||
self.email = frappe.db.get_value('User', self.owner, "email")
|
||||
Reference in New Issue
Block a user