Odoo Help

1

Military states module -- help :D

By
Mostafa Mohamed Abdel Monaem
on 2/10/15, 12:17 PM 892 views

Hi there hope you are fine
I need some help please,i have table called students that hold all students in the system and it have all students data .I create a module called military states that when a student in the system gets 19 years old he should be added automatically to  a table called (students military cards requests) and when the student get the card and enter it's number to the system it should be deleted from that table automatically. and change his states in the  (students) table to 'delayed'

I need help to figure out how can the system search students birthdate evey day and check if a student gets 19 years old and add him to another table :D

And what help are you looking for?

Stephen Mack
on 2/10/15, 12:22 PM

Thanks for quick replay Mr. Stephen Mack [1] :) . I go for the link you provided but i still confused.Are there any documentation that could be more clarification ? [1] https://www.odoo.com/forum/help-1/user/298649

Mostafa Mohamed Abdel Monaem
on 2/10/15, 1:05 PM

well development documentation is pretty light. I always search in github.com/odoo/odoo for development examples. When I get some more time I will see what I can find.

Stephen Mack
on 2/10/15, 1:25 PM

i will search too :) thanks for help :D

Mostafa Mohamed Abdel Monaem
on 2/10/15, 1:28 PM

Updated my answer with odoo module examples for Daily, Hourly or Minute cron jobs.

Stephen Mack
on 2/10/15, 4:55 PM

thanks for help Mr. Stephen Mack i appreciate that :) i understand cron funct but could you help me here :D https://www.odoo.com/forum/help-1/question/automated-action-birthday-19-75996 i will be thankful :D

Mostafa Mohamed Abdel Monaem
on 2/10/15, 5:04 PM
1
Stephen Mack
On 2/10/15, 12:41 PM

Odoo has a built in CRON function that you can use to run a command/function every xx minutes or hours or days or weeks or months or years.... I think you get the idea.

Here is a forum post to get you started.

Also you can look at cron examples in Odoo modules such as: Gamification (1 per Day), Survey (1 per Hour), or Calendar (1 per 30 Minutes).

And you can peruse the Cron Job source code to see how it works.  For example, defined in the source code are the valid intervals.  They include: minutes, hours, days, work_days, weeks and months.  I was wrong that there was an idea of years. 

It also lists the column names that you can use in your .xml file when creating the cron job.

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 2/10/15, 12:17 PM
Seen: 892 times
Last updated: 3/16/15, 8:10 AM