Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
3 Ответы
10254 Представления

Hi there
I have module with many standards 1, 2 and 3  every standard have some students and i want to create attendance sheets for every standard
i want that when i choose standard 1 ,2 or 3  in form view the students in this standard loaded automatically n the form.
Can odoo do that or i should add students to the form view every time ?

 

Аватар
Отменить
Лучший ответ

If it is possible you use onchange and RedirectWarning

UPDATE:

     @api.onchange('my_field')
     def do_my_field(self):
            if self.my_field == "FOO":
               model, action_id = self.pool['ir.model.data'].get_object_reference(cr, uid, 'my_module', 'my_action')
               msg = _("FOO FOO FOO.")
               raise openerp.exceptions.RedirectWarning(msg, action_id, _('Go to MY ACTION'))

 

Аватар
Отменить

If you want to send to a specific record id, how do you do ?

Автор Лучший ответ

can i have Example ? @zbik ?

Аватар
Отменить

answer updated

Лучший ответ

You need onchange method for your form fileds.

For examples just search odoo sourcecode with "onchange" keyword. 

Аватар
Отменить
Related Posts Ответы Просмотры Активность
8
сент. 21
18695
2
сент. 16
6724
0
мар. 15
4032
1
мар. 15
4382
0
дек. 18
5373