跳至内容
菜单
此问题已终结
5 回复
9727 查看

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.

形象
丢弃
相关帖文 回复 查看 活动
0
10月 20
3904
3
7月 23
2376
1
11月 20
10576
2
6月 18
3612
0
5月 15
3814