Merge branch 'master' of github.com:webnotes/erpnext

This commit is contained in:
Anand Doshi 2013-02-19 15:09:52 +05:30
commit 04ae7b86ff
3 changed files with 0 additions and 20 deletions

View File

View File

@ -1,19 +0,0 @@
# ERPNext - web based ERP (http://erpnext.com)
# For license information, please see license.txt
from __future__ import unicode_literals
import webnotes
from webnotes.model.doc import copy_common_fields
def update_employee_details(controller, method=None):
"""update employee details in linked doctypes"""
if method == "on_update" and controller.doc.doctype == "Employee":
# update salary structure
active_salary_structure = webnotes.conn.get_value("Salary Structure",
{"is_active": "Yes", "employee": controller.doc.name})
if not active_salary_structure:
return
ss = webnotes.model_wrapper("Salary Structure", active_salary_structure)
copy_common_fields(controller.doc, ss.doc)
ss.save()

View File

@ -17,6 +17,5 @@
observer_map = {
"*:on_update": "home.update_feed",
"*:on_submit": "home.update_feed",
"Employee:on_update": "hr.helpers.employee.update_employee_details"
# "*:on_update": "webnotes.widgets.moduleview.update_count"
}