تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
2 الردود
7440 أدوات العرض

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??

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
1
يوليو 18
3363
0
يناير 16
3379
1
يونيو 15
13542
0
مارس 15
7213
1
مارس 15
4591