Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
3 Risposte
5126 Visualizzazioni

I have a computed field that depends on a relation. Somewhere in my code I update this relation by accessing directly the database (self.env.cr.execute). My question is how can I force the recomputation afterwards ?

In v7 I used the _store_set_values function which worked like a charm. But now this method seems broken. Any other way of doing this in v8 ?

Avatar
Abbandona

You can use the on_change function which will call automatically the function you need at the moment you click on a specific field. I can give you an example if you need.

Autore

I'm afraid the on_change function is not called after a database query. My question is not related to views and clicks.

Autore Risposta migliore

The solution is trivial : just call the compute method of the fields needed to be refreshed. Sorry for this one.

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
0
ago 15
3473
7
set 20
7315
2
giu 18
16581
1
nov 17
3983
0
nov 16
3983