Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
2629 Представления

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
6016
1
дек. 24
1535
1
нояб. 22
16090
3
авг. 22
13179
2
авг. 22
4595