Manifest Academy

Home › Curriculum › Odoo Developer › Wizards, scheduled actions, server actions and automation in code

Business logic and automation · 16 min · 17–20

Wizards, scheduled actions, server actions and automation in code

TransientModel wizards, ir.cron jobs, server actions declared in modules, and writing robust batch jobs.

In this lesson

Key points

Real-world example

A nightly cron synchronised 20,000 products from a supplier API and timed out at limit_time_real, restarting from zero every night. Rewriting it to process 500 at a time, store the last synced ID, commit per batch and re-trigger itself finished the sync in 40 minutes.

Questions and answers

How do you close a wizard after its action?

Return {'type': 'ir.actions.act_window_close'}.

Why avoid cr.commit() in normal methods?

It breaks transaction atomicity and tests; reserve it for long batch jobs like crons.

Read the full lesson, worked example and quiz