跳至內容
選單
此問題已被標幟
3 回覆
10248 瀏覽次數

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. 

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
8
9月 21
18686
2
9月 16
6703
0
3月 15
4018
1
3月 15
4370
0
12月 18
5362