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

Hi. I am trying to autosave a record after saving a previous record. Here is my scenario:

I have a tournament with an integer value of rounds. (e.g. I input a value of 4 in the rounds_field). Now after saving/creating the tournament, I should save data in my 'rounds' table/model depending on the value of rounds from the 'tournament'. In this case, I want to save values in my rounds class:

round_1 tour_id (FK)

round_2 tour_id (FK)

round_3 tour_id (FK)

round_4 tour_id (FK)

Basically I have 2 classes - 'tournament', 'rounds'. Due to the syntax of odoo, I don't know how to achieve this so any help would be much appreciated. Thanks!     

Avatar
Abbandona

To achieve your scenario use should override create method, hope this will resolve your issue. https://goo.gl/4BkizH

Risposta migliore

I suggest you use the base_automation module.  Create base.action.rule with "When to Run" set as "On Update". 


Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
1
mag 16
5014
4
lug 20
8372
1
dic 19
6439
1
feb 18
5343
3
gen 18
6369