I am developing a new model called implementation.project; it inherits from project.project. This is the class declaration:
class implementation_project(osv.Model):
_name = 'implementation.project'
_inherit = 'project.project'
Some fields (columns) are added to this class (model or whatever). Original model (project.project) has a one2many field called tasks
. When I try to create new implementation.project
record, the enigmatic Odoo raises this error:
IntegrityError: insert or update on table "project_task_type_rel" violates foreign key constraint "project_task_type_rel_project_id_fkey"
DETAIL: Key (project_id)=(6) is not present in table "project_project".
Obviously!!!! It has to exist project.project
record to create anything that inherits from him!!! I guess Odoo (according to some, a good platform to develop) has the ability to know how to proceed in this case... or not?
So, how to create new record from implementation.project
?
Thanks in advance.
implementation.project
? Also, please show your full class – César