Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
1487 มุมมอง

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);

คำตอบที่ดีที่สุด

Hi, please check this: https://youtu.be/Cmbo2iGuTBY 
Hope it helps.

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
3
มิ.ย. 20
4652
2
ส.ค. 17
14166
0
ม.ค. 17
2664
How to access ODOO 8 using Java xmlrpc? แก้ไขแล้ว
2
เม.ย. 15
15949
1
พ.ค. 22
3362