project_is_favorite
The star on every Odoo project card is not the plain favorite widget. project_is_favorite exists for one reason: letting users star projects they are not allowed to edit.
| Technical name | project_is_favorite |
|---|---|
| Field types | boolean |
| Views | form, list, kanban |
| Module | project |
| Used in core | 4 occurrences across 1 module: the project form title, the project list, and the project kanban card |
| Versions | Odoo 20.0, Odoo 19.0, Odoo 18.0 |
| No-code setup | No. Applied via the widget attribute in view XML |
| Alternatives | boolean_favorite, boolean_toggle, boolean, priority_switch |
What the Project favorite star does
What this means for your team
Supported options in Odoo 19
| Option | Type | What it does |
|---|---|---|
autosave | boolean | Inherited from boolean_favorite. When true, clicking the star saves the entire record immediately, including unrelated pending edits. Odoo's own project form sets it to False. Deleted on the Odoo 20 development branch.(default: true) |
Autosave defaults to true and saves the whole record. A click on the star commits every pending edit on the form, which is why Odoo's own project form turns it off with options="{'autosave': False}". If you reuse this widget on a custom form, decide deliberately: on cards and lists autosave on is right, inside an edit form it usually is not.
Working examples
How the readonly override actually works
Version compatibility
| Version | Status | Notes |
|---|---|---|
| Odoo 20.0 | Partial / changed | Not released. The widget file is unchanged, but the inherited autosave option is deleted upstream; details below. |
| Odoo 19.0 | Verified | Verified against the shipped source; file identical to 18.0. |
| Odoo 18.0 | Verified | Widget introduced in this version, byte-identical to 19.0. |
| Odoo 17.0 | Not available | Widget does not exist; project views use the plain boolean_favorite star. |
| Odoo 16.0 | Not available | Widget does not exist; project views use the plain boolean_favorite star. |
Upgrade note. The widget appeared in Odoo 18; on 16 and 17 the project views used the plain boolean_favorite. If you carry a customized project view from 17 into 18 or 19, swap the widget name to keep the always-clickable behavior; the field and data need no migration.
What is changing in Odoo 20
Common problems and fixes
| Symptom | Cause and fix |
|---|---|
| The star is clickable on projects the user cannot edit | By design. The widget discards record-level readonly so favoriting works without edit rights. No fix needed. To disable it, write a literal readonly attribute on the field. |
| readonly="some_condition" on the field is ignored | Conditional readonly arrives through dynamic info, which this widget's extractProps overwrites. Use two conditionally visible field declarations, one with a literal readonly="1". |
| Starring a project saved half-finished form edits | The inherited autosave option defaults to true and saves the whole record. Add options="{'autosave': False}" on form views, as Odoo core does. |
| readonly="0" still renders the star dead | The attribute check is Boolean() on the raw string, and "0" is truthy in JavaScript. Remove the attribute entirely instead of setting it to 0. |
| Clicking the star throws a validation error | Autosave triggers a full record save, so required fields that are empty block it. Disable autosave on that view or fill the required fields first. |
Project favorite star vs the alternatives
| Widget | Best for | Key difference |
|---|---|---|
project_is_favorite | Per-user favorite flags on shared project records | Ignores record readonly so non-editors can still star |
| boolean_favorite | Favorite stars on records the user can edit | Goes dead whenever the record is readonly |
| boolean_toggle | On/off switches like Active | Switch styling, saves immediately, honors readonly |
| boolean | Ordinary boolean data entry | Plain checkbox, no self-save, no star |
| priority_switch | Multi-level starring on tasks | Selection-based star row rather than a single boolean |
Frequently asked questions
What is the difference between project_is_favorite and boolean_favorite?+
Can I use project_is_favorite outside the project app?+
Does clicking the star save the record?+
Why can users still star archived or locked projects?+
Is project_is_favorite available in Odoo 17?+
Does anything change for this widget in Odoo 20?+
Building per-user flags on shared records?
Follow lists, watch flags, and personal pins all hit the same two walls this widget solves: readonly UIs and access rights on the write. We design that pattern properly in Odoo, client widget and server model together, for versions 16 through 19.
Book a free consultation