Odoo Help

0
2
Anil R. Kesariya (AKE)
On 1/23/15, 2:27 AM

Hello Rosey,

Here you go!

There are two ways to get display location in wizard.

1) If you are adding all the location via location menu it self not from Employee form than and you have the many2one field of employee model inside employee.location. than no need of one2many field you can directly display all the employee location of that employee from the employee form.

i) create new action for emloyee.location and pass domain.

    Add this domain and target in your action :

<field name="domain">[('employee_id','=','active_id')]</field>

<field name="target">new</field>

ii)  Add button with type="action" in employee form and pass the action id in button.

It will only pop the related location for that employee in new window.

 

2) If you already added one2many field in your hr.employee model and you also want to get display those location in your new window than,

i) Create One Transient Model and add one2many field inside. (for wizard)

ii) Define the view for Transient Model (for wizard)

iii) Add button in Employee form and Call the action of wizard)

iv) pass default value etiher from context or from your method for one2many field.

  Hope this idea will work for you.

Regards,

Anil.

 

 

Thanks for the reply. Can you please update my code? I'm newbie in python, so please help me to solve the issue

rosey
on 1/23/15, 3:49 AM

This is not about python code. You should take proper odoo technical training.

Anil R. Kesariya (AKE)
on 1/23/15, 3:51 AM

In the second step, can you please explain? i have some doubts in that

rosey
on 1/23/15, 5:11 AM

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/23/15, 12:29 AM
Seen: 2657 times
Last updated: 3/16/15, 8:10 AM