Contributors mailing list archives

contributors@odoo-community.org

Browse archives

Avatar

db not yet committed when overriding create/update.

by
Ygol InternetWork, Yves Goldberg
- 21/06/2024 11:45:27
Hello,
I send a webhook when an event occurs in Odoo.
The problem I have is that when overriding create/update; and triggering my webhook, the data is not yet committed in the db.
(the external system is sending in it's response that the record is not found in the case of create and get the old field value -before changes- for an update).

I tried to use env.cr.flush() and/or env.cr.commit() both in my automated action and in my code before the webhook but nothing seems to work.
Any other way I could check?
Thank you
 --
Yves Goldberg
--

Follow-Ups