Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
2607 Lượt xem

how to get last id for many2one in automated action

or whats the expression python write in value in this cas 

  

Ảnh đại diện
Huỷ bỏ
Tác giả
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.

Câu trả lời hay nhất

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')


Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 2 25
5986
1
thg 12 24
1510
1
thg 11 22
16083
3
thg 8 22
13153
2
thg 8 22
4582