school_test.yml.svn-base 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. -
  2. I check '_check_academic_year' and '_check_duration' constraint
  3. -
  4. !record {model: academic.year, id: academic_year_0}:
  5. name: Academic Year 2011
  6. code: 2011
  7. date_start: 2012-01-01
  8. date_stop: 2012-12-31
  9. -
  10. I check '_check_year_limit' and '_check_duration' constraint
  11. -
  12. !record {model: academic.month, id: academic_month_0}:
  13. name: January
  14. code: 1
  15. date_start: 2012-01-01
  16. date_stop: 2012-01-31
  17. year_id: academic_year_0
  18. -
  19. I Create School
  20. -
  21. !record {model: school.school, id: school_demo_1}:
  22. name: Swaminarayan Gurukul
  23. code: GRL
  24. -
  25. I called '_calc_age' function
  26. -
  27. !record {model: student.student, id: student_student_0}:
  28. year: demo_academic_year_1
  29. class_id: demo_standard_standard_1
  30. medium_id: demo_standard_medium_1
  31. division_id: demo_standard_division_1
  32. roll_no: 2
  33. name: Divyesh
  34. middle: J
  35. last: Makwana
  36. gender: male
  37. date_of_birth: 1988-08-29
  38. admission_date: 2011-08-09
  39. school_id: school_demo_1
  40. state: done
  41. -
  42. I compute the age of a student
  43. -
  44. !python {model: student.student}: |
  45. self._calc_age(cr, uid, [ref("student_student_0")], 'age', None, {"lang": "en_US",
  46. "tz": False, "active_model": "ir.ui.menu", "section_id":
  47. False, "active_ids": ['active_ids'],
  48. "active_id": ['active_id'], })
  49. -
  50. I confirm 'admission' using Confirm button
  51. -
  52. !python {model: student.student}: |
  53. self.admission_confirm(cr, uid, [ref("student_student_0")], None)
  54. -
  55. I done 'admission' using Done button
  56. -
  57. !python {model: student.student}: |
  58. self.admission_done(cr, uid, [ref("student_student_0")], None)
  59. -
  60. I cancel 'admission' using Cancel button
  61. -
  62. !python {model: student.student}: |
  63. self.admission_cancel(cr, uid, [ref("student_student_0")], None)
  64. -
  65. I Reset the 'admission' using Reset To Draft button
  66. -
  67. !python {model: student.student}: |
  68. self.admission_draft(cr, uid, [ref("student_student_0")], None)
  69. -
  70. I computes the subjects related to particular teacher
  71. -
  72. !python {model: hr.employee}: |
  73. self._compute_subject(cr, uid, [ref("school.demo_student_student_6")], 'subject_ids', None, {"lang": "en_US",
  74. "tz": False, "active_model": "ir.ui.menu", "section_id":
  75. False, "active_ids": ['active_ids'],
  76. "active_id": ['active_id'], })
  77. -
  78. I computes the subjects related to particular standard
  79. -
  80. !python {model: school.standard}: |
  81. self._compute_subject(cr, uid, [ref("school.demo_school_standard_1")], 'subject_ids', None, {"lang": "en_US",
  82. "tz": False, "active_model": "ir.ui.menu", "section_id":
  83. False, "active_ids": ['active_ids'],
  84. "active_id": ['active_id'], })
  85. -
  86. I computes the student related to particular standard
  87. -
  88. !python {model: school.standard}: |
  89. self._compute_student(cr, uid, [ref("school.demo_student_student_1")], 'student_ids', None, {"lang": "en_US",
  90. "tz": False, "active_model": "ir.ui.menu", "section_id":
  91. False, "active_ids": ['active_ids'],
  92. "active_id": ['active_id'], })