Odoo Help

Welcome!

This community 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.

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 557 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

Atchuthan - Technical Consultant, Sodexis Inc

--Atchuthan - Technical Consultant, Sodexis Inc--
3918
| 5 3 8
Puducherry, India
--Atchuthan - Technical Consultant, Sodexis Inc--
Passionate coder in Python/Odoo(formerly known as OpenERP).

Contact me via GMail: atchuthantu@gmail.com via Skype: atchuthan_skype
via Linkedin: http://in.linkedin.com/in/atchuthantu
Atchuthan - Technical Consultant, Sodexis Inc
On 1/3/15, 8:09 AM

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

--Ahmed M.Elmubarak--
2988
| 5 3 5
Sudan
--Ahmed M.Elmubarak--


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

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

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