Skip to main content
iVentureTeam

versions_timeline

A document's earlier versions, shown as a timeline rather than a table, with each entry restorable or downloadable.

Siddharth JambukiyaSiddharth JambukiyaOdoo Techno-Functional Consultant
August 27, 2026Updated August 28, 20264 min read
Technical nameversions_timeline
Field typesone2many
Viewsform
Moduledocuments, the Documents app
Used in coreThe version history on a document form in documents
VersionsOdoo 20.0, Odoo 19.0
No-code setupNo. It is set in view XML and depends on module-specific data
Alternativesone2many, many2many_binary, pdf_viewer, attach_document

What the version timeline does

When someone uploads a replacement for a document, the previous file does not disappear: it becomes a version. Those versions are child records, and rendered as a table they read like data rather than like history.

This widget renders them as a timeline instead. Each entry shows who created that version and when, with actions to restore it or download it.

Restoring swaps the version back into the current slot rather than deleting anything, and downloading fetches only that file, so neither action loses history.

What this means for your team

Version history is one of those features whose value is entirely in the moment someone needs it, which is usually a moment of stress. Making it legible at a glance, rather than a table someone has to parse, is the difference between a useful safety net and a feature nobody trusts.

For document-heavy processes, contracts, drawings, policies, this is worth configuring properly. The default Documents setup covers most of it; what usually needs thought is who is allowed to restore.

Supported options in Odoo 19

The widget declares no supported options. Its behavior is in the three actions described below, all of which are server calls. Read from the versions timeline source, Odoo 19.0.

OptionTypeWhat it does
restoreserver call per entryPromotes the chosen version back to current, demoting the current file to a version.(since Odoo 19.0)
downloadlink per entryFetches that version's stored file alone, leaving the current version untouched.(since Odoo 19.0)
deleteserver call per entryRemoves the version record and its stored file together, then refreshes the record.(since Odoo 19.0)

All three actions go to the server. Restoring, downloading and deleting each call a method rather than manipulating the relation in the browser, because each one has to move or remove a stored file.

Working examples

The usual usage

<field name="previous_attachment_ids"
       widget="versions_timeline"/>

No options. The timeline draws itself from the relation.

What each entry offers

restore   # promotes this version to current
download  # fetches this version's file only
delete    # removes the version and its file

Each is a server call.

A plain list instead

<field name="previous_attachment_ids">
  <list> ... </list>
</field>

The same records as a table, without the actions.

Three actions, all server side

The three actions are the widget. Everything else is layout.

Restoring calls a server method on the chosen version. It is a promotion rather than a copy: the current file becomes a version and the chosen version becomes current, so nothing is lost either way and the timeline simply reorders.

Downloading builds a link to the stored file for that version alone, which is what makes it possible to compare an old version against the current one without restoring first.

Deleting is the one that has to be a server call for a reason beyond convention. Removing the child record would leave the stored file behind, so the server removes both together. That is also why the action refreshes the record afterwards rather than trusting the browser's copy of the relation.

Version compatibility

VersionStatusNotes
Odoo 20.0In developmentNot released. Byte-identical to Odoo 19 on the development branch.
Odoo 19.0VerifiedFirst version. Verified against the shipped source.
Odoo 18.0Not availableWidget does not exist.
Odoo 17.0Not availableWidget does not exist.
Odoo 16.0Not availableWidget does not exist.

Upgrade note. The widget is new in Odoo 19. On earlier versions the same records were shown as a plain list, so an upgrade improves the presentation with the standard views and nothing needs migrating.

What is changing in Odoo 20

Odoo 20 is expected at Odoo Experience in Brussels, 24 to 26 September 2026. The development branch is unstable and this may still change; we re-verify this page after the release.

Byte-identical. The file on the development branch matches Odoo 19 exactly, including all three action handlers.

Common problems and fixes

SymptomCause and fix
The timeline is emptyThe document has only ever had one file, so there are no earlier versions. Expected. Versions appear once a replacement is uploaded.
Restoring seems to lose the current fileIt does not; the current file becomes a version. Look further down the timeline for it.
Deleting leaves the entry visibleThe record was not refreshed after the call. Reload the form; the deletion happened server side.
Users can restore who should notThe widget offers the action to anyone who can edit the record. Control it through access rights on the document.
Missing widget errorThe Documents module is not installed in that database. Install Documents, or use a plain child list.
Options are ignoredThe widget declares none. Nothing to configure; the timeline draws from the relation.

Version timeline vs the alternatives

WidgetBest forKey difference
versions_timelineA document's earlier versions, with restore and download per entryA timeline with three server-side actions rather than a table of records
one2manyThe same records as a tableNo restore, download or delete actions
many2many_binaryA set of attachmentsFiles without version semantics
pdf_viewerReading the current fileA preview rather than a history
attach_documentAttaching a document to a recordAn upload action rather than a version history

A plain child list shows the same records without the actions, which is enough if versions are only ever inspected. The chatter is the alternative worth knowing about for history in general, though it records events rather than files.

Frequently asked questions

What does restoring do to the current file?+
It becomes a version. Restoring is a promotion rather than a copy, so nothing is lost in either direction and the timeline simply reorders.
Can I download an old version without restoring it?+
Yes. The download action fetches that version's stored file alone, which is how you compare an old version against the current one.
Why is deleting a server call?+
Because removing the child record alone would leave the stored file behind. The server removes both together and the widget refreshes the record afterwards.
Does it have options?+
None. The timeline draws itself from the relation and the three actions are fixed.
Which versions have it?+
Odoo 19 onwards, and byte-identical on the Odoo 20 development branch.

Document control that survives an audit

Versions, approvals and retention are easy to promise and hard to prove. We implement Odoo Documents with the trail your auditors will ask for, on versions 16 through 19.

Book a free consultation

How this page was produced

The restore, download and delete handlers, and the record refresh after deletion, were read from the versions timeline source on the Odoo 19.0 branch. Version coverage comes from the absence of the file on 16.0, 17.0 and 18.0, and a byte comparison against the public development branch. Spotted an error? Tell us and we will correct the page.