Hi guys
I want to call a wizard by clicking on a button I done this:
class conf_recinto(osv.osv):
_name = 'conf.recinto'
_description = 'Configurar Recinto'
_columns = {
'name': fields.many2many('gs.recintos', 'wizard_recintos_rel', 'wizard_id', 'recinto_id',"")
}
def teste(self, cr, uid, ids, context=None):
return {
'name': 'cria.edita.recinto.form',
'type': 'ir.actions.act_window',
'res_model': 'cria.edita.recinto',
'view_mode': 'form',
'view_type': 'form',
'target': 'new',
'context': context,
}
conf_recinto()
on the xml
<button name="%(gs_bilhetica.action_test_seq)d" type="action" string="Button" class="oe_highlight"/>
the button is working, with a char field but when I put a many2many field appears an error:
raise NotImplementedError('Many2Many columns should not be used as record name (_rec_name)') NotImplementedError: Many2Many columns should not be used as record name (_rec_name)