Skip to Content
Menu
This question has been flagged
1 Reply
3154 Views

Recently we needed to delete a custom related field, as it was slowing down Odoo to the point of the system being unusable.  

What do we need to consider when creating related fields via the UI?

Avatar
Discard
Best Answer

Match the data type of the field you create to the field you are relating to.  Don't create a Float related to an Int, for example.

Never create a related field based on (has a dependency of) a field that itself is related or computed. 

If you don't need to store the value, don't. 

Adding a stored related field on table where you already have thousands of records may not be possible, as values for all existing records need to be computed first, and you may get a timeout.

Make sure to avoid circular dependencies.


Review https://www.odoo.com/documentation/12.0/reference/orm.html#related-fields

Avatar
Discard
Related Posts Replies Views Activity
5
Aug 24
307
2
Apr 23
4988
0
Jan 22
1130
1
Sep 21
2660
1
Sep 21
4135