Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
3 Răspunsuri
10230 Vizualizări

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 ?

 

Imagine profil
Abandonează
Cel mai bun răspuns

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

 

Imagine profil
Abandonează

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

Autor Cel mai bun răspuns

can i have Example ? @zbik ?

Imagine profil
Abandonează

answer updated

Cel mai bun răspuns

You need onchange method for your form fileds.

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

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
8
sept. 21
18681
2
sept. 16
6682
0
mar. 15
4007
1
mar. 15
4362
0
dec. 18
5350