İçereği Atla
Menü
Bu soru işaretlendi
5 Cevaplar
9636 Görünümler

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
Vazgeç

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?

Üretici

@subbarao I am using external API

Üretici En İyi Yanıt

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

Avatar
Vazgeç
En İyi Yanıt

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

Avatar
Vazgeç
En İyi Yanıt

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

Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
0
Eki 20
3858
3
Tem 23
2325
1
Kas 20
10528
2
Haz 18
3601
0
May 15
3787