Nabin Hait | a6f0550 | 2011-10-12 17:04:31 +0530 | [diff] [blame] | 1 | from webnotes.model.doc import Document |
| 2 | |
| 3 | emp = Document( |
| 4 | fielddata = { |
| 5 | 'doctype': 'Employee', |
| 6 | 'name': 'emp1', |
| 7 | 'employee_name': 'Nijil', |
| 8 | 'status': 'Active', |
| 9 | 'date_of_joining': '2011-01-01' |
| 10 | } |
| 11 | ) |
| 12 | |
| 13 | |
| 14 | |
| 15 | l_all = Document( |
| 16 | fielddata = { |
| 17 | 'doctype' : 'Leave Allocation', |
| 18 | 'name': 'l_all', |
| 19 | 'employee' : 'emp1', |
| 20 | 'leave_type' : 'Casual Leave', |
| 21 | 'posting_date': '2011-03-01', |
| 22 | 'fiscal_year': '2011-2012', |
| 23 | 'total_leaves_allocated': 20, |
| 24 | 'docstatus': 1 |
| 25 | } |
| 26 | ) |
| 27 | |
| 28 | l_app1 = Document( |
| 29 | fielddata = { |
| 30 | 'doctype' : 'Leave Application', |
| 31 | 'name': 'l_app1', |
| 32 | 'employee' : 'emp1', |
| 33 | 'leave_type' : 'Casual Leave', |
| 34 | 'posting_date': '2011-03-01', |
| 35 | 'fiscal_year': '2011-2012', |
| 36 | 'from_date': '2011-08-01', |
| 37 | 'to_date': '2011-08-02', |
| 38 | 'total_leave_days': 2 |
| 39 | } |
| 40 | ) |
| 41 | |
| 42 | l_app2 = Document( |
| 43 | fielddata = { |
| 44 | 'doctype' : 'Leave Application', |
| 45 | 'name': 'l_app2', |
| 46 | 'employee' : 'emp1', |
| 47 | 'leave_type' : 'Casual Leave', |
| 48 | 'posting_date': '2011-03-01', |
| 49 | 'fiscal_year': '2011-2012', |
| 50 | 'from_date': '2011-08-15', |
| 51 | 'to_date': '2011-08-17', |
| 52 | 'total_leave_days': 3 |
| 53 | } |
| 54 | ) |