Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
2619 Widoki

how to get last id for many2one in automated action

or whats the expression python write in value in this cas 

  

Awatar
Odrzuć
Autor
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.

Najlepsza odpowiedź

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


Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
2
lut 25
5989
1
gru 24
1513
1
lis 22
16085
3
sie 22
13155
2
sie 22
4583