Odoo Help

0

How to refresh form view automatic

By
Mostafa Mohamed Abdel Monaem
on 2/18/15, 5:31 AM 1,700 views

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 ?

 

1
Zbik
On 2/18/15, 7:42 AM

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 ?

Versão Integral, Anabela Damas
on 5/9/16, 12:03 PM
0
tolstoj
On 3/1/15, 5:31 AM

You need onchange method for your form fileds.

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

0

can i have Example ? @zbik ?

answer updated

Zbik
on 3/2/15, 8:05 AM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

2 follower(s)

Stats

Asked: 2/18/15, 5:31 AM
Seen: 1700 times
Last updated: 4/4/15, 7:06 PM