Skip to Content
Menú
This question has been flagged
2 Respostes
7453 Vistes

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)

Avatar
Descartar
Best Answer

did u find any solution??

Avatar
Descartar
Related Posts Respostes Vistes Activitat
1
de jul. 18
3368
0
de gen. 16
3384
1
de juny 15
13550
0
de març 15
7232
1
de març 15
4608