I am trying to learn coding in Openerp and decided to start customizing the simple "Ideas" module. I just tried adding a new text field in the model, as below (between '*'):
class idea_idea(osv.osv):
""" Idea """
_name = 'idea.idea'
_inherit = ['mail.thread']
_columns = {
'create_uid': fields.many2one('res.users', 'Creator', required=True, readonly=True),
'name': fields.char('Idea Summary', size=64, required=True, readonly=True, oldname='title', states={'draft': [('readonly', False)]}),
'description': fields.text('Description', help='Content of the idea', readonly=True, states={'draft': [('readonly', False)]}),
'category_ids': fields.many2many('idea.category', string='Tags', readonly=True, states={'draft': [('readonly', False)]}),
***'mother_id': fields.text('Testing mother id'), #fields.many2one('idea.idea'),***
'state': fields.selection([('draft', 'New'),
('open', 'Accepted'),
('cancel', 'Refused'),
('close', 'Done')],
'Status', readonly=True, track_visibility='onchange',
)
}
...
And in the idea_view.xml added a label and a field, just like for 'description':
...<sheet>
<label for="name" class="oe_edit_only"/>
<h1><field name="name"/></h1>
<label for="category_ids" class="oe_edit_only"/>
<field name="category_ids" widget="many2many_tags"/>
<label for="description"/><newline/>
<field name="description"/>
***<label for="mother_id"/><newline/>
<field name="mother_id"/>***
</sheet>
...
But when I try to upgrade the module, it returns the error: ValidateError
Error occurred while validating the field(s) arch: Invalid XML for View Architecture!
What am I doing wrong? I originally wanted to create a many2one field refering to a "mother idea", but not managing to get even a simple text field right :P