Skip to main content
iVentureTeam

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.

Siddharth JambukiyaSiddharth JambukiyaOdoo Techno-Functional Consultant
August 21, 2026Updated August 21, 20266 min read
Technical nameproject_is_favorite
Field typesboolean
Viewsform, list, kanban
Moduleproject
Used in core4 occurrences across 1 module: the project form title, the project list, and the project kanban card
VersionsOdoo 20.0, Odoo 19.0, Odoo 18.0
No-code setupNo. Applied via the widget attribute in view XML
Alternativesboolean_favorite, boolean_toggle, boolean, priority_switch

What the Project favorite star does

On project cards, lists, and the project form, Odoo shows a star that toggles the is_favorite boolean. Starred projects float into the user's favorites. The widget behind it is a fourteen-line wrapper around the standard boolean_favorite field: same star icons, same click handling, same options.

The entire reason it exists is one line in extractProps. The base favorite widget takes its readonly state from the record's dynamic readonly info, meaning that if the user cannot edit the project, the star goes dead. project_is_favorite overrides that: readonly is true only when the view literally writes a readonly attribute on the field. A project you can see but not edit still has a live star, because favoriting is a personal preference, not an edit of the project.

What this means for your team

Favorites look like a cosmetic feature until you watch how teams actually navigate Odoo. The projects a person stars become their default filter, their kanban home, and effectively their working set. If starring silently fails for everyone without project edit rights, which is most of the company on most projects, adoption of the favorites workflow quietly dies and everyone scrolls the full project list forever.

That is the scenario this widget prevents, and it is a pattern worth copying in custom development: any per-user preference stored on a shared record, subscribed flags, watch lists, personal pins, should not inherit the record's edit permissions in the UI. If you have built a custom "follow" boolean and users report the control is greyed out, this widget is the reference implementation of the fix.

Note that the widget only fixes the client side. The server still has to allow writing is_favorite for non-editors, which the project model handles by routing the flag into a separate many2many of favorited users rather than a plain column.

Supported options in Odoo 19

Verified against project_is_favorite_field.js in the Odoo 19.0 project module. The widget declares no options of its own; it inherits the option surface of boolean_favorite, which is the single option below.

OptionTypeWhat it does
autosavebooleanInherited 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

Kanban card star, as core uses it

<field name="is_favorite" widget="project_is_favorite" nolabel="1"/>

Form title star that does not autosave

<field name="is_favorite" widget="project_is_favorite"
       options="{'autosave': False}" nolabel="1"/>

This is the exact configuration on Odoo's project form: the star toggles with the form's other edits and is committed by the normal save.

Forcing the star dead

<field name="is_favorite" widget="project_is_favorite" readonly="1"/>

Because the widget reads only the literal attribute, this is the one way to disable it. Record rules and form-level readonly will not.

How the readonly override actually works

The override is worth reading precisely because of what it throws away:

extractProps: (fieldsInfo, dynamicInfo) => {
    return {
        ...booleanFavoriteField.extractProps(fieldsInfo, dynamicInfo),
        readonly: Boolean(fieldsInfo.attrs.readonly),
    };
}

The spread first computes the base props, including readonly: dynamicInfo.readonly, then the next line overwrites it. dynamicInfo.readonly is where record rules, form states, and readonly expressions arrive, so all of them are discarded. Only a hard-coded readonly="1" (or any truthy attribute value) in the view XML survives.

Two consequences catch developers. First, a readonly expression like readonly="stage_id == 4" compiles into dynamic info, not into a literal attribute, so it is ignored: the star stays clickable in every stage. Second, the attribute check is a bare Boolean() on the raw attribute string, so even readonly="0"... renders the star dead, because the string "0" is truthy in JavaScript. If you need a conditionally dead star, wrap the field in two conditionally visible variants instead.

Version compatibility

VersionStatusNotes
Odoo 20.0Partial / changedNot released. The widget file is unchanged, but the inherited autosave option is deleted upstream; details below.
Odoo 19.0VerifiedVerified against the shipped source; file identical to 18.0.
Odoo 18.0VerifiedWidget introduced in this version, byte-identical to 19.0.
Odoo 17.0Not availableWidget does not exist; project views use the plain boolean_favorite star.
Odoo 16.0Not availableWidget 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

Odoo 20 is expected at Odoo Experience in Brussels, 24 to 26 September 2026. The notes below are read from the public development branch, which is unstable until feature freeze; we re-verify this page against the shipped release.

The widget's own file is unchanged on master. The action is in what it inherits: the base boolean_favorite descriptor on the development branch deletes the autosave option, and its update call no longer passes a save flag. If that lands, options="{'autosave': False}" becomes a no-op, and Odoo's own project form usage will presumably be adapted. Any custom view relying on the star not saving mid-edit should be retested on 20.

The star icon set also changes upstream, with the base widget moving from Font Awesome stars to Odoo's new icon glyphs, a purely visual shift.

Common problems and fixes

SymptomCause and fix
The star is clickable on projects the user cannot editBy 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 ignoredConditional 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 editsThe 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 deadThe 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 errorAutosave 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

WidgetBest forKey difference
project_is_favoritePer-user favorite flags on shared project recordsIgnores record readonly so non-editors can still star
boolean_favoriteFavorite stars on records the user can editGoes dead whenever the record is readonly
boolean_toggleOn/off switches like ActiveSwitch styling, saves immediately, honors readonly
booleanOrdinary boolean data entryPlain checkbox, no self-save, no star
priority_switchMulti-level starring on tasksSelection-based star row rather than a single boolean

Choose by intent: this widget for per-user preference flags on records others own, the base favorite for star flags on records the user edits anyway, and the plain checkbox when the boolean is ordinary data.

Frequently asked questions

What is the difference between project_is_favorite and boolean_favorite?+
Rendering and options are identical, since one extends the other. The only difference is readonly handling: project_is_favorite honors just the literal readonly attribute in the XML and ignores record-level readonly, so users without edit rights on a project can still star it.
Can I use project_is_favorite outside the project app?+
Yes, on any boolean field, as long as the project module is installed. It behaves like boolean_favorite with the relaxed readonly rule. Remember the server side must also permit the write for non-editors, which usually means routing the flag through a computed field with inverse, as project does.
Does clicking the star save the record?+
By default yes: the inherited autosave option is true, and it saves the entire record. Odoo's own project form disables it with options="{'autosave': False}" so the star toggles as a normal pending edit.
Why can users still star archived or locked projects?+
Record rules and readonly states never reach the widget, because its extractProps overwrites dynamic readonly with the literal view attribute. If a view must disable the star, it has to write readonly="1" explicitly.
Is project_is_favorite available in Odoo 17?+
No. It first appears in Odoo 18. Project views in 16 and 17 use the plain boolean_favorite, so the star goes dead on readonly records there.
Does anything change for this widget in Odoo 20?+
Its own file is untouched on the development branch, but the base favorite widget deletes the autosave option there, which would make {'autosave': False} a no-op. Unreleased and subject to change; we re-verify after the September 2026 release.

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

How this page was produced

This page was verified by reading project_is_favorite_field.js on the Odoo 19.0 branch, together with the base boolean_favorite_field.js it extends, and diffing both against the 16.0, 17.0, 18.0, and master branches. The readonly behavior described was confirmed against the extractProps source and the project module's own view XML. The screenshot was captured on a clean Odoo 19 database. Corrections are welcome via our contact page.