Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
2 Ответы
7437 Представления

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)

Аватар
Отменить
Лучший ответ

did u find any solution??

Аватар
Отменить
Related Posts Ответы Просмотры Активность
1
июл. 18
3362
0
янв. 16
3378
1
июн. 15
13542
0
мар. 15
7210
1
мар. 15
4588