Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
3296 Lượt xem

I would like to create a template for importing information into odoo. 14.0 

The doubt is on the Payload part, where there is a sub-array containing the message information.

For odoo is it recommended to insert everything in a single record, or is it better to create a link to the table by calling the corresponding payload?

this is json Payload:


{
"id": null,
"uuid": "343a6ec2-89c5-498a-9b88-55669d71f6",
"sender": "20956319",
"recipient": "9eeb731d-f5ce-4690-87b6-48cb92bd22",
"messenger": "TG",
"messenger_id": "32_883148230",
"payload": {
"type": "text",
"text": "test",
"user": {
"id": "2096156319",
"name": "Roberto",
"image": null
},
"timestamp": "2021-12-03T12:19:33+0000"
},
"outgoing": false,
"statuscode": null,
"result": null,
"processed": null,
"sent": null,
"received": null,
"read": null,
"created": null
}

this the model on odoo:

....
sender = fields.Char('Sender', required=False, help='Sender of this message. Only required if present.')
recipient = fields.Char('Recipient', help='Recipient of this message. Only required if no identifier present.')
identifier = fields.Char('Identifier', help='Sender and recipient as a colon-separated string, as in :.')
uuid = fields.Char('uuid', help='Unique message identifier that can be used to reference the message later on.')
....




Thanks for answer

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
3
thg 3 15
13924
3
thg 2 25
2580
3
thg 9 23
4231
1
thg 11 18
4242
1
thg 3 15
4580