Skip to content Skip to sidebar Skip to footer

Openerp 7 Adding Field To Existing Module - Xml Validate Error

I'm new to editing/programming OpenERP modules so I'm following this tutorial to simply add a field to the projects module. I've run into a few errors and I've fixed them all, but

Solution 1:

That error is a pretty typical "form has a field that hasn't been added to the model" which is odd as at first glance, your model and module look fine.

The only comments I would make is assuming you are OpenERP 6.1 or greater, you don't need to instantiate your model at the end of mct_projects.py so you can loose the mct_projects().

You should also remove the from openerp.modules... line in your init.py file.

My initial suspicion would be that the field hasn't made it's way into the model. Have a look in the ir_model_fields table or look under Settings -> Database. I would also check your addons path to ensure the code is being found - the addons path is logged as soon as OpenERP starts. As a final idea, run with the debugger and set a break point on your columns to see if the code is being parsed.

Solution 2:

The solution in my case:

  1. Restart the OpenERP server.
  2. Install or upgrade the module.

For some reason, without the restart, OpenERP was not allowing newly created fields to be added to a view, even though the fields in question were defined in the module that was being installed.

Post a Comment for "Openerp 7 Adding Field To Existing Module - Xml Validate Error"