コンテンツへスキップ
メニュー
この質問にフラグが付けられました
2 返信
3847 ビュー

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!     

アバター
破棄

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

最善の回答

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


アバター
破棄
関連投稿 返信 ビュー 活動
1
5月 16
5022
4
7月 20
8387
1
12月 19
6445
1
2月 18
5346
3
1月 18
6374