fixed conflict

This commit is contained in:
Nabin Hait
2013-03-05 15:58:04 +05:30
54 changed files with 1183 additions and 1224 deletions

View File

@@ -1,82 +1,80 @@
[
{
"owner": "Administrator",
"docstatus": 0,
"creation": "2012-03-27 14:35:54",
"docstatus": 0,
"modified": "2012-03-27 14:35:54",
"modified_by": "Administrator",
"modified": "2012-03-27 14:35:54"
"owner": "Administrator"
},
{
"section_style": "Simple",
"doctype": "DocType",
"istable": 1,
"name": "__common__",
"colour": "White:FFF",
"module": "HR",
"name": "__common__",
"section_style": "Simple",
"show_in_menu": 0,
"version": 5,
"server_code_error": " ",
"doctype": "DocType"
"version": 5
},
{
"doctype": "DocField",
"name": "__common__",
"parent": "Employee Education",
"doctype": "DocField",
"parentfield": "fields",
"parenttype": "DocType",
"permlevel": 0,
"parentfield": "fields"
"permlevel": 0
},
{
"name": "Employee Education",
"doctype": "DocType"
"doctype": "DocType",
"name": "Employee Education"
},
{
"oldfieldtype": "Small Text",
"doctype": "DocField",
"fieldname": "school_univ",
"fieldtype": "Small Text",
"label": "School/University",
"oldfieldname": "school_univ",
"fieldname": "school_univ",
"fieldtype": "Small Text"
"oldfieldtype": "Small Text"
},
{
"oldfieldtype": "Data",
"doctype": "DocField",
"fieldname": "qualification",
"fieldtype": "Data",
"label": "Qualification",
"oldfieldname": "qualification",
"width": "100px",
"fieldname": "qualification",
"fieldtype": "Data"
"oldfieldtype": "Data",
"width": "100px"
},
{
"oldfieldtype": "Select",
"doctype": "DocField",
"label": "Level",
"oldfieldname": "level",
"fieldname": "level",
"fieldtype": "Select",
"label": "Level",
"oldfieldname": "level",
"oldfieldtype": "Select",
"options": "Graduate\nPost Graduate\nUnder Graduate"
},
{
"oldfieldtype": "Int",
"doctype": "DocField",
"fieldname": "year_of_passing",
"fieldtype": "Int",
"label": "Year of Passing",
"oldfieldname": "year_of_passing",
"fieldname": "year_of_passing",
"fieldtype": "Int"
"oldfieldtype": "Int"
},
{
"oldfieldtype": "Data",
"doctype": "DocField",
"fieldname": "class_per",
"fieldtype": "Data",
"label": "Class / Percentage",
"oldfieldname": "class_per",
"fieldname": "class_per",
"fieldtype": "Data"
"oldfieldtype": "Data"
},
{
"oldfieldtype": "Text",
"doctype": "DocField",
"fieldname": "maj_opt_subj",
"fieldtype": "Text",
"label": "Major/Optional Subjects",
"oldfieldname": "maj_opt_subj",
"fieldname": "maj_opt_subj",
"fieldtype": "Text"
"oldfieldtype": "Text"
}
]

View File

@@ -1,83 +1,82 @@
[
{
"owner": "Administrator",
"docstatus": 0,
"creation": "2012-03-27 14:35:57",
"docstatus": 0,
"modified": "2012-03-27 14:35:57",
"modified_by": "Administrator",
"modified": "2012-03-27 14:35:57"
"owner": "Administrator"
},
{
"section_style": "Simple",
"istable": 1,
"name": "__common__",
"colour": "White:FFF",
"module": "HR",
"doctype": "DocType",
"version": 6,
"show_in_menu": 0
"istable": 1,
"module": "HR",
"name": "__common__",
"section_style": "Simple",
"show_in_menu": 0,
"version": 6
},
{
"doctype": "DocField",
"name": "__common__",
"parent": "Employee Internal Work History",
"doctype": "DocField",
"parentfield": "fields",
"parenttype": "DocType",
"permlevel": 0,
"parentfield": "fields"
"permlevel": 0
},
{
"name": "Employee Internal Work History",
"doctype": "DocType"
"doctype": "DocType",
"name": "Employee Internal Work History"
},
{
"oldfieldtype": "Select",
"doctype": "DocField",
"label": "Branch",
"oldfieldname": "branch",
"fieldname": "branch",
"fieldtype": "Select",
"label": "Branch",
"oldfieldname": "branch",
"oldfieldtype": "Select",
"options": "link:Branch"
},
{
"oldfieldtype": "Select",
"doctype": "DocField",
"label": "Department",
"oldfieldname": "department",
"fieldname": "department",
"fieldtype": "Select",
"label": "Department",
"oldfieldname": "department",
"oldfieldtype": "Select",
"options": "link:Department"
},
{
"oldfieldtype": "Select",
"doctype": "DocField",
"label": "Designation",
"oldfieldname": "designation",
"fieldname": "designation",
"fieldtype": "Select",
"label": "Designation",
"oldfieldname": "designation",
"oldfieldtype": "Select",
"options": "link:Designation"
},
{
"oldfieldtype": "Select",
"doctype": "DocField",
"label": "Grade",
"oldfieldname": "grade",
"fieldname": "grade",
"fieldtype": "Select",
"label": "Grade",
"oldfieldname": "grade",
"oldfieldtype": "Select",
"options": "link:Grade"
},
{
"oldfieldtype": "Date",
"doctype": "DocField",
"fieldname": "from_date",
"fieldtype": "Date",
"label": "From Date",
"oldfieldname": "from_date",
"fieldname": "from_date",
"fieldtype": "Date"
"oldfieldtype": "Date"
},
{
"oldfieldtype": "Date",
"doctype": "DocField",
"fieldname": "to_date",
"fieldtype": "Date",
"label": "To Date",
"oldfieldname": "to_date",
"fieldname": "to_date",
"fieldtype": "Date"
"oldfieldtype": "Date"
}
]

View File

@@ -1,76 +1,74 @@
[
{
"owner": "Administrator",
"docstatus": 0,
"creation": "2012-03-27 14:35:59",
"docstatus": 0,
"modified": "2012-03-27 14:35:59",
"modified_by": "Administrator",
"modified": "2012-03-27 14:35:59"
"owner": "Administrator"
},
{
"section_style": "Simple",
"doctype": "DocType",
"istable": 1,
"name": "__common__",
"colour": "White:FFF",
"module": "HR",
"name": "__common__",
"section_style": "Simple",
"show_in_menu": 0,
"version": 5,
"server_code_error": " ",
"doctype": "DocType"
"version": 5
},
{
"doctype": "DocField",
"name": "__common__",
"parent": "Employee Training",
"doctype": "DocField",
"parentfield": "fields",
"parenttype": "DocType",
"permlevel": 0,
"parentfield": "fields"
"permlevel": 0
},
{
"name": "Employee Training",
"doctype": "DocType"
"doctype": "DocType",
"name": "Employee Training"
},
{
"oldfieldtype": "Small Text",
"doctype": "DocField",
"label": "Institute / Conducted By",
"oldfieldname": "institute",
"fieldname": "institute",
"fieldtype": "Small Text",
"label": "Institute / Conducted By",
"oldfieldname": "institute",
"oldfieldtype": "Small Text",
"reqd": 1
},
{
"oldfieldtype": "Small Text",
"doctype": "DocField",
"label": "Program / Seminar Title",
"oldfieldname": "nature_of_training",
"fieldname": "nature_of_training",
"fieldtype": "Small Text",
"label": "Program / Seminar Title",
"oldfieldname": "nature_of_training",
"oldfieldtype": "Small Text",
"reqd": 1
},
{
"oldfieldtype": "Data",
"doctype": "DocField",
"label": "Duration",
"oldfieldname": "duration",
"fieldname": "duration",
"fieldtype": "Data",
"label": "Duration",
"oldfieldname": "duration",
"oldfieldtype": "Data",
"reqd": 0
},
{
"oldfieldtype": "Data",
"doctype": "DocField",
"label": "Location",
"oldfieldname": "loc",
"fieldname": "loc",
"fieldtype": "Data",
"label": "Location",
"oldfieldname": "loc",
"oldfieldtype": "Data",
"reqd": 0
},
{
"oldfieldtype": "Small Text",
"doctype": "DocField",
"fieldname": "certificate",
"fieldtype": "Small Text",
"label": "Certificate",
"oldfieldname": "certificate",
"fieldname": "certificate",
"fieldtype": "Small Text"
"oldfieldtype": "Small Text"
}
]

View File

@@ -1,76 +1,74 @@
[
{
"owner": "harshada@webnotestech.com",
"docstatus": 0,
"creation": "2012-03-27 14:35:55",
"docstatus": 0,
"modified": "2012-03-27 14:35:55",
"modified_by": "Administrator",
"modified": "2012-03-27 14:35:55"
"owner": "harshada@webnotestech.com"
},
{
"section_style": "Simple",
"name": "__common__",
"autoname": "field:expense_type",
"colour": "White:FFF",
"module": "HR",
"server_code_error": " ",
"version": 5,
"doctype": "DocType",
"document_type": "Master"
"document_type": "Master",
"module": "HR",
"name": "__common__",
"section_style": "Simple",
"version": 5
},
{
"name": "__common__",
"parent": "Expense Claim Type",
"doctype": "DocField",
"parenttype": "DocType",
"permlevel": 0,
"parentfield": "fields"
},
{
"name": "__common__",
"parent": "Expense Claim Type",
"read": 1,
"parentfield": "fields",
"parenttype": "DocType",
"permlevel": 0
},
{
"create": 1,
"doctype": "DocPerm",
"write": 1,
"report": 1,
"name": "__common__",
"parent": "Expense Claim Type",
"parentfield": "permissions",
"parenttype": "DocType",
"permlevel": 0,
"parentfield": "permissions"
"read": 1,
"report": 1,
"write": 1
},
{
"name": "Expense Claim Type",
"doctype": "DocType"
"doctype": "DocType",
"name": "Expense Claim Type"
},
{
"role": "System Manager",
"doctype": "DocPerm"
"doctype": "DocPerm",
"role": "System Manager"
},
{
"role": "HR Manager",
"doctype": "DocPerm"
"doctype": "DocPerm",
"role": "HR Manager"
},
{
"role": "System Manager",
"doctype": "DocPerm"
"doctype": "DocPerm",
"role": "System Manager"
},
{
"search_index": 0,
"doctype": "DocField",
"label": "Expense Claim Type",
"oldfieldname": "expense_type",
"fieldname": "expense_type",
"fieldtype": "Data",
"in_filter": 0,
"label": "Expense Claim Type",
"oldfieldname": "expense_type",
"oldfieldtype": "Data",
"reqd": 1,
"in_filter": 0
"search_index": 0
},
{
"oldfieldtype": "Small Text",
"doctype": "DocField",
"fieldname": "description",
"fieldtype": "Small Text",
"label": "Description",
"oldfieldname": "description",
"width": "300px",
"fieldname": "description",
"fieldtype": "Small Text"
"oldfieldtype": "Small Text",
"width": "300px"
}
]

View File

@@ -1,47 +1,45 @@
[
{
"owner": "Administrator",
"docstatus": 0,
"creation": "2012-03-27 14:35:57",
"docstatus": 0,
"modified": "2012-03-27 14:35:57",
"modified_by": "Administrator",
"modified": "2012-03-27 14:35:57"
"owner": "Administrator"
},
{
"section_style": "Simple",
"doctype": "DocType",
"istable": 1,
"name": "__common__",
"colour": "White:FFF",
"module": "HR",
"name": "__common__",
"section_style": "Simple",
"show_in_menu": 0,
"version": 2,
"server_code_error": " ",
"doctype": "DocType"
"version": 2
},
{
"doctype": "DocField",
"name": "__common__",
"parent": "Holiday",
"doctype": "DocField",
"parentfield": "fields",
"parenttype": "DocType",
"permlevel": 0,
"parentfield": "fields"
"permlevel": 0
},
{
"name": "Holiday",
"doctype": "DocType"
"doctype": "DocType",
"name": "Holiday"
},
{
"doctype": "DocField",
"label": "Description",
"width": "300px",
"fieldname": "description",
"fieldtype": "Small Text"
"fieldtype": "Small Text",
"label": "Description",
"width": "300px"
},
{
"oldfieldtype": "Date",
"doctype": "DocField",
"fieldname": "holiday_date",
"fieldtype": "Date",
"label": "Date",
"oldfieldname": "holiday_date",
"fieldname": "holiday_date",
"fieldtype": "Date"
"oldfieldtype": "Date"
}
]

View File

@@ -124,11 +124,13 @@ class DocType(DocListController):
if not is_lwp(self.doc.leave_type):
self.doc.leave_balance = get_leave_balance(self.doc.employee,
self.doc.leave_type, self.doc.fiscal_year)["leave_balance"]
if self.doc.leave_balance - self.doc.total_leave_days < 0:
msgprint("There is not enough leave balance for Leave Type: %s" % \
(self.doc.leave_type,), raise_exception=1)
if self.doc.leave_balance - self.doc.total_leave_days < 0:
#check if this leave type allow the remaining balance to be in negative. If yes then warn the user and continue to save else warn the user and don't save.
msgprint("There is not enough leave balance for Leave Type: %s" % \
(self.doc.leave_type,),
raise_exception=not(webnotes.conn.get_value("Leave Type", self.doc.leave_type,"allow_negative") or None))
def validate_leave_overlap(self):
if not self.doc.name:
self.doc.name = "New Leave Application"

View File

@@ -1,8 +1,8 @@
[
{
"creation": "2013-01-10 16:34:15",
"creation": "2013-02-21 09:55:58",
"docstatus": 0,
"modified": "2013-01-22 14:47:02",
"modified": "2013-03-05 08:06:43",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -91,6 +91,12 @@
"fieldtype": "Check",
"label": "Is LWP"
},
{
"doctype": "DocField",
"fieldname": "allow_negative",
"fieldtype": "Check",
"label": "Allow Negative Balance"
},
{
"doctype": "DocPerm",
"role": "System Manager"

View File

@@ -1,202 +1,194 @@
[
{
"owner": "Administrator",
"docstatus": 0,
"creation": "2012-03-27 14:35:59",
"docstatus": 0,
"modified": "2012-03-27 14:35:59",
"modified_by": "Administrator",
"modified": "2012-03-27 14:35:59"
"owner": "Administrator"
},
{
"section_style": "Simple",
"_last_update": "1314253977",
"allow_copy": 1,
"allow_email": 1,
"allow_print": 1,
"module": "HR",
"doctype": "DocType",
"document_type": "Other",
"allow_email": 1,
"issingle": 1,
"module": "HR",
"name": "__common__",
"colour": "White:FFF",
"_last_update": "1314253977",
"section_style": "Simple",
"show_in_menu": 1,
"version": 30,
"allow_copy": 1
"version": 30
},
{
"name": "__common__",
"parent": "Salary Manager",
"doctype": "DocField",
"parenttype": "DocType",
"permlevel": 0,
"parentfield": "fields"
},
{
"name": "__common__",
"parent": "Salary Manager",
"read": 1,
"parentfield": "fields",
"parenttype": "DocType",
"permlevel": 0
},
{
"create": 1,
"doctype": "DocPerm",
"write": 1,
"name": "__common__",
"parent": "Salary Manager",
"parentfield": "permissions",
"parenttype": "DocType",
"permlevel": 0,
"parentfield": "permissions"
"read": 1,
"write": 1
},
{
"name": "Salary Manager",
"doctype": "DocType"
"doctype": "DocType",
"name": "Salary Manager"
},
{
"role": "System Manager",
"doctype": "DocPerm"
"doctype": "DocPerm",
"role": "System Manager"
},
{
"role": "HR User",
"doctype": "DocPerm"
"doctype": "DocPerm",
"role": "HR User"
},
{
"role": "HR Manager",
"doctype": "DocPerm"
"doctype": "DocPerm",
"role": "HR Manager"
},
{
"colour": "White:FFF",
"doctype": "DocField",
"label": "Document Description",
"fieldname": "document_description",
"fieldtype": "HTML",
"label": "Document Description",
"options": "<div class=\"field_description\">You can generate multiple salary slips based on the selected criteria, submit and mail those to the employee directly from here</div>"
},
{
"doctype": "DocField",
"fieldname": "section_break0",
"fieldtype": "Section Break",
"doctype": "DocField"
"fieldtype": "Section Break"
},
{
"width": "50%",
"doctype": "DocField",
"fieldname": "column_break0",
"fieldtype": "Column Break",
"doctype": "DocField"
"width": "50%"
},
{
"doctype": "DocField",
"label": "Company",
"fieldname": "company",
"fieldtype": "Select",
"reqd": 1,
"options": "link:Company"
"label": "Company",
"options": "link:Company",
"reqd": 1
},
{
"doctype": "DocField",
"label": "Branch",
"fieldname": "branch",
"fieldtype": "Link",
"label": "Branch",
"options": "Branch"
},
{
"doctype": "DocField",
"label": "Department",
"fieldname": "department",
"fieldtype": "Link",
"label": "Department",
"options": "Department"
},
{
"doctype": "DocField",
"label": "Designation",
"fieldname": "designation",
"fieldtype": "Link",
"label": "Designation",
"options": "Designation"
},
{
"width": "50%",
"doctype": "DocField",
"fieldname": "column_break1",
"fieldtype": "Column Break",
"doctype": "DocField"
"width": "50%"
},
{
"doctype": "DocField",
"label": "Grade",
"fieldname": "grade",
"fieldtype": "Select",
"label": "Grade",
"options": "link:Grade"
},
{
"colour": "White:FFF",
"doctype": "DocField",
"label": "Fiscal Year",
"fieldname": "fiscal_year",
"fieldtype": "Select",
"reqd": 1,
"options": "link:Fiscal Year"
"label": "Fiscal Year",
"options": "link:Fiscal Year",
"reqd": 1
},
{
"colour": "White:FFF",
"doctype": "DocField",
"label": "Month",
"fieldname": "month",
"fieldtype": "Select",
"reqd": 1,
"options": "\n01\n02\n03\n04\n05\n06\n07\n08\n09\n10\n11\n12"
"label": "Month",
"options": "\n01\n02\n03\n04\n05\n06\n07\n08\n09\n10\n11\n12",
"reqd": 1
},
{
"description": "Check if you want to send salary slip in mail to each employee while submitting salary slip",
"colour": "White:FFF",
"doctype": "DocField",
"label": "Send Email",
"fieldname": "send_email",
"fieldtype": "Check"
"fieldtype": "Check",
"label": "Send Email"
},
{
"doctype": "DocField",
"fieldname": "section_break1",
"fieldtype": "Section Break",
"doctype": "DocField"
"fieldtype": "Section Break"
},
{
"width": "50%",
"doctype": "DocField",
"fieldname": "column_break2",
"fieldtype": "Column Break",
"doctype": "DocField"
"width": "50%"
},
{
"description": "Creates salary slip for above mentioned criteria.",
"colour": "White:FFF",
"doctype": "DocField",
"label": "Create Salary Slip",
"trigger": "Client",
"fieldname": "create_salary_slip",
"fieldtype": "Button"
"fieldtype": "Button",
"label": "Create Salary Slip",
"trigger": "Client"
},
{
"width": "25%",
"doctype": "DocField",
"fieldname": "column_break3",
"fieldtype": "Column Break",
"doctype": "DocField"
"width": "25%"
},
{
"description": "Submit all salary slips for the above selected criteria",
"colour": "White:FFF",
"doctype": "DocField",
"label": "Submit Salary Slip",
"trigger": "Client",
"fieldname": "submit_salary_slip",
"fieldtype": "Button"
"fieldtype": "Button",
"label": "Submit Salary Slip",
"trigger": "Client"
},
{
"width": "25%",
"doctype": "DocField",
"fieldname": "column_break4",
"fieldtype": "Column Break",
"doctype": "DocField"
"width": "25%"
},
{
"description": "Create Bank Voucher for the total salary paid for the above selected criteria",
"colour": "White:FFF",
"doctype": "DocField",
"label": "Make Bank Voucher",
"trigger": "Client",
"fieldname": "make_bank_voucher",
"fieldtype": "Button"
"fieldtype": "Button",
"label": "Make Bank Voucher",
"trigger": "Client"
},
{
"doctype": "DocField",
"fieldname": "section_break2",
"fieldtype": "Section Break",
"doctype": "DocField"
"fieldtype": "Section Break"
},
{
"doctype": "DocField",