Estoy intentando crear un registro en whatsapp.composer vía código Python en Odoo SaaS 19.1. Al intentar pasar los campos res_id y res_model en el create(), el sistema devuelve un KeyError / Invalid Field. ¿Cuál es la forma correcta de vincular el registro activo (CRM Lead) al composer en esta versión si esos campos ya no existen en el modelo?
لقد تم الإبلاغ عن هذا السؤال
1
الرد
968
أدوات العرض
Hello Eliana Bermudez,
I hope you are doing well
Fix:The fields are res_model and res_ids (plural, not res_id).
composer = env['whatsapp.composer'].create({
I hope you are doing well
Fix:The fields are res_model and res_ids (plural, not res_id).
composer = env['whatsapp.composer'].create({
'res_model': 'crm.lead',
'res_ids': str(record.ids), # must be a string like "[5]"
'wa_template_id': template.id,
})
I hope this information helps you
Thanks & Regards,
Kunjan Patel
I hope this information helps you
Thanks & Regards,
Kunjan Patel
هل أعجبك النقاش؟ لا تكن مستمعاً فقط. شاركنا!
أنشئ حساباً اليوم لتستمتع بالخصائص الحصرية، وتفاعل مع مجتمعنا الرائع!
تسجيل| المنشورات ذات الصلة | الردود | أدوات العرض | النشاط | |
|---|---|---|---|---|
|
|
1
أبريل 26
|
1264 | ||
|
|
2
مارس 26
|
1264 | ||
|
|
1
مارس 26
|
1048 | ||
|
|
1
مارس 26
|
1149 | ||
|
|
0
أبريل 25
|
2273 |
Great, it worked. Muchas gracias!
Hello,
I am glad to hear your issue is solved.
Thanks.