I have an object student.student,
in this object, i have defined a field
'applied_coursed': fields.function(_get_allcourses, method=True, string='Taken Classes',store=True, type="integer"),
which will simply counts a student courses (from table student.courses). Now i wan,t if a new course for the student is added to student.courses, this function should be automatically called to update field value in student.student. Same process should be innitated on deletion of a student course from student.courses.
Only method = True will not work here,
How i can i achieve this? shoud store value will be a dictionary with key =student.courses?
Any idea?