I would like to know what is the max length for an external identifier of a model in odoo? It is possible that a id too long could cause an error?
The external identifier is stored in complete_name char field which has no size limit.
A char field is represented with a character varying in Postgresql.
From Odoo source code documentation:
If no size (or an empty or negative size is provided) return an 'infinite' VARCHAR
Referring to Postgresql documentation:
If character varying is used without length specifier, the type accepts strings of any size.
Using ref
with an external identifier up to 2500 characters in length works fine.