Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
5 Replies
9607 Tampilan

Hi everyone, 

I am new here and working on the task which I am adding customer data to Odoo res.partner model through python using API. 

My question is: Is there any ways or tip that I can use to get the last update date, max_id or something like this? 

My data will be continuously added and I do not want duplicate records. So, I want to have one parameter which I can use to get the last added customer and start to create/update customers from that time on.

So if the same customer is existing: update the data

If not: create a new one


Avatar
Buang

Odoo have create_date, write_date

create_date --> while create the record the date time will update

write_date --> While any change happened it will update that date time

Are you using xmlrpc call or Rest API?

Penulis

@subbarao I am using external API

Penulis Jawaban Terbai

@shalin wilson what is the difference between last_updated and write_date?

Avatar
Buang
Jawaban Terbai

__last_update field is there in res.partner and its automatically  updates 
is it enough for you to check the DateTime??

Avatar
Buang
Jawaban Terbai

If Odoo create record with external API with success, returns its ID. See External API documentation.

Avatar
Buang
Post Terkait Replies Tampilan Aktivitas
0
Okt 20
3849
3
Jul 23
2293
1
Nov 20
10510
2
Jun 18
3592
0
Mei 15
3746