79159701

Date: 2024-11-05 15:21:02
Score: 0.5
Natty:
Report link

I found that Odoo loads the core module, consider the field as required, it detect some records has no value then fill with the default value. This happens before my custom module is loaded, so nothing I can do, except monkeypatching.

I put this code on my custom module,

from odoo.addons.project.models.project import Project
Project.company_id.required = False

it gets loaded on python code compilation, so it does take effect when loading the core module

Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Alesis Joan