Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
2612 มุมมอง

how to get last id for many2one in automated action

or whats the expression python write in value in this cas 

  

อวตาร
ละทิ้ง
ผู้เขียน
How to write this code like picture to get last id 

Le mer. 30 juin 2021 à 05:09, Sudhir Arya (ERP Harbor Consulting Services) <sudhir22.arya@gmail.com> a écrit :

A new answer on get last id for many2one in automated action has been posted. Click here to access the post :

See post

Sent by Odoo S.A. using Odoo.

คำตอบที่ดีที่สุด

You can use order='id desc' parameter in the search method to get the last record.

Ex:

self.env['res.partner'].search([], limit=1, order='id desc')


อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
2
ก.พ. 25
5988
1
ธ.ค. 24
1510
1
พ.ย. 22
16083
3
ส.ค. 22
13153
2
ส.ค. 22
4582