inverse is very interesting and also the troubleshooting! Thanks for sharing
@burnaviour6 ай бұрын
Is it necessary to add depends on the inverse function as its defined in the age field already
@luthfinizar27712 жыл бұрын
I want change the compute value when i change the field value, not trigerred when it saved but by onchange. it is possibly?
@OdooMates2 жыл бұрын
not clear with scenario, manually triggering the compute function by calling the self.function_name from onchange function will solve the problem ? or copy the depends of the onchange function to the compute functon will solve ?
@publicparadise5156 Жыл бұрын
Great video! Thanks for the help!
@OdooMates Жыл бұрын
glad it helped
@hectorherrera41932 жыл бұрын
very interesting!. Thanks. By the way, I have many issues using datetiime values with our timezone. Do you have a video about this? Thanks !!
@subashv97692 жыл бұрын
What is the issue with datetime method
@OdooMates2 жыл бұрын
kzbin.info/www/bejne/kKnVdXqKerpqeJo
@hectorherrera41932 жыл бұрын
@@subashv9769 Hello!. I am making a wizard for creating all the attendances of a person for a month. It asks for the arrival and leave time to be used for the entire month (integer values) and the month to be processed. When the records are created, the time at the datetime field does not match with the requested time because it is calculated as UTC, and we are MST (UTC + 6:00). So, after checking I just added 6 hours to the datetime field and it worked fine. BUT I do not like that soluction
@wildbeauty92572 жыл бұрын
Thank you 👍👍👍
@OdooMates2 жыл бұрын
Welcome 👍
@ShadHastam8 ай бұрын
Thanks
@OdooMates7 ай бұрын
Welcome
@rintoach2 жыл бұрын
If there is any possibility to refresh the value of the date of Bith while entering the age before saving. Currently, inverse updating field updating while saving only.
@OdooMates2 жыл бұрын
can you try by adding dependency to inverse ?
@rintoach2 жыл бұрын
@@OdooMates @api.depends was not working. But @api.onchange is working. Thanks for the reply 👍
@sage.swagat Жыл бұрын
exactly followed but inverse function is not working. tried with api depends as well as print statement. age field changes is not reflected
@mohammadharb6135 ай бұрын
Why here the inverse function is not calculated every time we change the age?? Why we need to save in order to see the result
@abidpatel5552 Жыл бұрын
def _inverse_compute_age(self): today = date.today() for rec in self: rec.date_of_birth = today - relativedelta(years=rec.age)