Help

1

How can I get ID of New record?

Avatar
Nikul Chaudhary

Hello odooers
when I use compute method and onchange mehtod that time I did not get ID.
but I got self =  sale.order(<NewId 0x7f5dec30b2b0>,)  & self.id = <NewId 0x7f5dec30b2b0>.
I used _origin but got sale.order().

So, How can I get ID??


1 Opmerking
Avatar
Negeren

You cannot have ID of the record until it is saved.

1 Antwoord
1
Avatar
Brian Wynne
Beste antwoord

Try

self._origin.id
Avatar
Negeren