Skip to content

[18.0] bi_sql_editor bloated logging for "disabling automatic schema management"Β #1120

@simahawk

Description

@simahawk

This kind of log entry

x_bi_sql_view.custom_model_name' is backed by table 'x_bi_sql_view_custom_model_name' which is not a regular table (<TableKind.View: 'v'>), disabling automatic schema management

is repeated N times for each an every table and is quite annoying.

This comes from ir_model init of manual models here https://github.com/odoo/odoo/blob/18.0/odoo/addons/base/models/ir_model.py#L512

AFAIR we miss 2 things:

  1. such custom models should be initialized already w/ _auto = False -> easy fix on OCA module side
  2. bypass that check in case the flag is set already

To bypass that we would need something like if table_kind not in (sql.TableKind.Regular, None) and model_class._auto: and w/ the fix on pt 1 the _auto flag will be already set.

However, it's unlikely that Odoo will accept such change in a stable version.

@legalsylvain I'd love to have your feedback πŸ™

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions