seitime-frappe/webnotes/widgets/calendar.py
2013-11-20 12:58:35 +05:30

18 lines
507 B
Python

# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import webnotes
from webnotes import _
import json
@webnotes.whitelist()
def update_event(args, field_map):
args = webnotes._dict(json.loads(args))
field_map = webnotes._dict(json.loads(field_map))
w = webnotes.bean(args.doctype, args.name)
w.doc.fields[field_map.start] = args[field_map.start]
w.doc.fields[field_map.end] = args[field_map.end]
w.save()