Hi,
I'm using odoo 12,
I want to upload a single file .pdf through the API. Can you please explain to me how to do this in the most simple way without having any module attachments, if that's possible? If it's not possible then let me know a way that's possible to do that. I have the following code:
this.getBase64(this.state.selectedFile).then((data) => {
const param = [
[
{
res_model: "account_invoice",
res_name : this.state.selectedFile.name,
res_id: 95,
name: this.state.selectedFile.name,
datas: data,
type: "binary",
res_field : "pdf"
},
],
];
odoo.execute_kw("ir.attachment", "create", param);
});
});
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- ลูกค้าสัมพันธ์
- e-Commerce
- ระบบบัญชี
- สินค้าคงคลัง
- PoS
- โปรเจกต์
- MRP
คำถามนี้ถูกตั้งค่าสถานะ
3585
มุมมอง
สนุกกับการพูดคุยนี้ใช่ไหม? เข้าร่วมเลย!
สร้างบัญชีวันนี้เพื่อเพลิดเพลินไปกับฟีเจอร์พิเศษและมีส่วนร่วมกับคอมมูนิตี้ที่ยอดเยี่ยมของเรา!
ลงชื่อ