Import Metadata
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.
Odoo posts a created message in the chatter of every new record, with the date of the import and the importing user as author. For historical data, suppress it with one of these context keys of Odoo, next to write_metadata:
"mail_create_nolog": True: no created message.
"tracking_disable": True: no created message, no tracking of field changes, and no automatic followers.
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
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.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| odoo_addon_import_metadata-19.0.1.0.1-py3-none-any.whl | Python 3 | none | any | Details for odoo_addon_import_metadata-19.0.1.0.1-py3-none-any.whl |
Release files / odoo_addon_import_metadata-19.0.1.0.1-py3-none-any.whl
| Download URL | odoo_addon_import_metadata-19.0.1.0.1-py3-none-any.whl |
|---|---|
| Size | 118.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e5fe8a5dd3d7a7ef4ecf72de7c4e1a81e176352b5b0550549b436d05432e1898
|
|
BLAKE2b-256 checksum How to use checksums |
e223885835b94e908b71aac26d68a4df6dbb79c7191b6a1a593901e5abda1807
|
| 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 logSecurity for odoo-addon-import-metadata 19.0.1.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.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 logA 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.