Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
1166 Переглядів

class A:

​_name = 'a'

​state = fields.Char(string='state')

​module = fields.Char(string='module')


data sample: ==============================>

state  ,  module

start  ,  mod1

ongoing  ,  mod1

end  ,  mod1

submit  ,  mod2

review  ,  mod2

approve  ,  mod2


class B:

​_name = 'b'

​current_state = fields.Many2one('', string='current state')

​review_module = fields.Char(related='current_state.module', string='module')

​next_state = fields. Selection(???????, filter model A with )   =>  once select current_state from class A, its review_module confirmed, next_state provide a list by filterring model A where A's model=review_model for selection, for example, when select ongoing, its module then is "mod1", next_state will be in (start, ongoing, end) for selection.

Thanks advanced.


Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
3
трав. 25
580
1
квіт. 25
440
3
вер. 24
12422
2
лют. 24
1574
1
лип. 23
1802