Hi everyone,
I'm automating a WhatsApp message in Odoo SaaS 19.1. My template has 4 variables:
{{1}}: Client Name
{{2}}: Property Name
{{3}}: Availability Status
{{4}}: List of 5 similar properties (Dynamic Text)
I am using a Server Action to create the whatsapp.composer. I can trigger the send, but I'm struggling to map my Python strings to these 4 variables.
My current attempt:
Python
# Template and logic for the 4 strings are ready...
sugerencias_txt = "...my list of 5 houses..."
composer = env['whatsapp.composer'].create({
'res_model': 'crm.lead',
'res_ids': str(record.ids),
'wa_template_id': template.id,
# HOW DO I ADD THE 4 VARIABLES HERE?
# I tried 'variable_ids' and 'wa_variable_ids' but got "Invalid Field"
})
composer.action_send_whatsapp_template()
Question: In SaaS 19.1, what is the exact field name or sub-model used to pass these 4 values? Do I need to use a specific command like wa_variable_ids or a dictionary of values?
Muchas gracias!!
Hello Eliana,
I am glad to hear your issue is solved.
Thanks.