Skip to content

Title: hr_org_chart AttributeError during 18→19 migration when employee write_date is NULL OpenUpgrade version: 19.0 #5621

@tate11

Description

@tate11

Description:

After migrating an Odoo database from 18.0 to 19.0 using OpenUpgrade, clicking on an employee triggers the org chart endpoint and produces:
AttributeError: 'bool' object has no attribute 'timestamp'

The error is in odoo/addons/hr_org_chart/controllers/hr_org_chart.py:35:
python
write_date=int(employee.write_date.timestamp()) * 1000,

When employee.write_date is False (NULL in DB), .timestamp() fails. This is likely to affect migrated databases where some employee records may have empty write_date.
Workaround applied during migration: patch the controller to check for falsy write_date:
python
write_date=int(employee.write_date.timestamp() * 1000) if employee.write_date else 0,

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions