Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
3 Odpovědi
10200 Zobrazení

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 ?

 

Avatar
Zrušit
Nejlepší odpověď

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'))

 

Avatar
Zrušit

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

Autor Nejlepší odpověď

can i have Example ? @zbik ?

Avatar
Zrušit

answer updated

Nejlepší odpověď

You need onchange method for your form fileds.

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

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
8
zář 21
18663
2
zář 16
6661
0
bře 15
3997
1
bře 15
4348
0
pro 18
5339