Skip to main content

Import Metadata

Beta License: LGPL-3 GetFluvo/addons

Import the original creation and last update user and date of records, the create_uid, create_date, write_uid and write_date fields.

Odoo always sets these fields itself, and drops any value given for them. When data is migrated from another system, the original author and dates are lost. With this module, an administrator can keep them by importing with the write_metadata key in the context.

Table of contents

Use Cases / Context

Migrations often have to keep who created a record and when: the date a customer was created, the author of a note, the history of a document. Odoo does not allow setting these fields, even through an import.

Usage

Import with write_metadata in the context, as a user of the Administration / Settings group, and add any of the create_uid, create_date, write_uid and write_date columns. For example with load() through JSON-RPC or XML-RPC:

models.execute_kw(
    db, uid, password, "res.partner", "load",
    [["name", "create_uid", "create_date"],
     [["Azure Interior", "Marc Demo", "2016-01-02 03:04:05"]]],
    {"context": {"write_metadata": True, "tz": "UTC"}},
)

The user columns accept what any many2one column of an import accepts:

  • create_uid: the name of the user

  • create_uid/id: the XML ID of the user

  • create_uid/.id: the database id of the user

The dates are in the YYYY-MM-DD HH:MM:SS format. Like any date of an import, load() reads them in the timezone of the context, or else of the importing user, and stores them in UTC. Pass "tz": "UTC" in the context to import UTC dates unchanged. Empty cells keep the value Odoo sets.

The context key also works for create() and write() called directly, with user ids or records and datetimes or strings.

Without the context key, or for other users, the columns are ignored as without this module, and the import does not fail.

Known issues / Roadmap

  • write_uid and write_date are set again by any later write to the record, including writes done by Odoo itself later in the same transaction, for instance a recomputation of a stored field. Import them last, or in a separate import of the same records.

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed feedback.

Do not contact contributors directly about support or help with technical issues.

Credits

Authors

  • Fluvo

Contributors

  • bosd

Other credits

Based on the idea and the write_metadata context key of the import_metadata module of easier_import by Thibault Francois. This is a new implementation.

Maintainers

This module is part of the GetFluvo/addons project on GitHub.

You are welcome to contribute.

Metadata

Release files for odoo-addon-import-metadata 19.0.1.0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for odoo-addon-import-metadata 19.0.1.0.0.1
File Interpreter ABI Platform Actions
odoo_addon_import_metadata-19.0.1.0.0.1-py3-none-any.whl Python 3 none any Details for odoo_addon_import_metadata-19.0.1.0.0.1-py3-none-any.whl

Release files / odoo_addon_import_metadata-19.0.1.0.0.1-py3-none-any.whl

Download URL odoo_addon_import_metadata-19.0.1.0.0.1-py3-none-any.whl
Size 25.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
549af74b4b84fbd3c63c89635a362aafc983f5b50a3526f47a83286be86c9b3a
BLAKE2b-256 checksum
How to use checksums
3c44c928a6aa30ae9446fab344178dbf07f0a8067b90b79177607a56f9716635
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.

Transparency log

Security for odoo-addon-import-metadata 19.0.1.0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

1 file in this release has been uploaded with provenance metadata.

Attestation for odoo_addon_import_metadata-19.0.1.0.0.1-py3-none-any.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page