Odoo Help

0

In HR employee, there is an active. Can i replace the active field with my field?

By
rosey
on 1/3/15, 6:44 AM 829 views

I remove active field from hr.employee.

Then i added active & inactive fields in hr.employee. But when i click incative field the employee is not hiding from the employee list/kaban view.

How can i hide a employee from the main list, when i tick inactive checkbox?

1

With the help of onchange you can achieve this. (http://openerp-server.readthedocs.org/en/latest/06_misc_on_change_tips.html)

In XML,
                    <field name="inactive" on_change="on_change_inactive(inactive)" />

In PY file,

    def on_change_inactive(self, cr, uid, ids, inactive, context=None):

        return {'value': {'active' : not inactive}}

0
Ahmed M.Elmubarak
On 1/3/15, 7:02 AM

Hello,

the 'active' field is a multi usage field like "state" ,

I think you've to make on_change method that when the user tick the inactive one, set the 'active' field to False ...

Regards..

From where can i know the details?

rosey
on 1/3/15, 7:24 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

1 follower(s)

Stats

Asked: 1/3/15, 6:44 AM
Seen: 829 times
Last updated: 3/16/15, 8:10 AM