コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
2609 ビュー

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


アバター
破棄
関連投稿 返信 ビュー 活動
2
2月 25
5986
1
12月 24
1510
1
11月 22
16083
3
8月 22
13153
2
8月 22
4582