I'm integrating to Odoo 17 using Java and XMLRPC. When i create invoices and quotations, i want to be able to send emails by invoking the actions from my code. So normally in the UI, when i send emails you press the "send email" button and it shows a pop up where u specify the Contact which has an email address. I want to know if it's possible to invoke the same actions from the code. All my integration, i have done using this Odoo external API reference and i turned on developer mode, inspected the object the send mail button belongs to and the method it runs and i tried doing it using the code below and somehow i just get this object logged and no email is sent.
{view_mode=form, res_model=mail.compose.message, view_id=false, context={force_email=true, mark_so_as_sent=true, default_res_ids=[Ljava.lang.Object;@25f723b0, default_email_layout_xmlid=mail.mail_notification_layout_with_responsible_signature, proforma=false, model_description=Sales Order, default_model=sale.order, default_template_id=11, default_composition_mode=comment}, type=ir.actions.act_window, views=[Ljava.lang.Object;@4aa11206, target=new}
List
This is the code i'm using, somehow it's being cut out of the text when i tried pasting it above
List<Object> params = new ArrayList<>();
params.add(db);
params.add(uid);
params.add(password);
params.add("sale.order");
params.add("action_quotation_send");
params.add(Collections.singletonList(invoiceId)); // List containing invoice ID
Object result = models.execute("execute_kw", params);
System.out.println(invoiceId);
System.out.println(result);