Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
5 Ответы
9743 Представления

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


Аватар
Отменить

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?

Автор

@subbarao I am using external API

Автор Лучший ответ

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

Аватар
Отменить
Лучший ответ

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

Аватар
Отменить
Лучший ответ

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

Аватар
Отменить
Related Posts Ответы Просмотры Активность
0
окт. 20
3955
3
июл. 23
2413
1
нояб. 20
10584
2
июн. 18
3646
0
мая 15
3821