# Necesito agregar un empleado a un proyecto

**URL:** https://discuss.tryton.org/t/necesito-agregar-un-empleado-a-un-proyecto/4083
**Category:** User
**Tags:** project
**Created:** [April 20, 2021, 9:36am UTC](https://discuss.tryton.org/t/necesito-agregar-un-empleado-a-un-proyecto/4083 "2021-04-20T09:36:05Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![yunior](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/yunior/32/1172_2.png) [@yunior](https://discuss.tryton.org/u/yunior)
#### Post date: [April 20, 2021, 9:36am UTC](https://discuss.tryton.org/t/necesito-agregar-un-empleado-a-un-proyecto/4083/1 "2021-04-20T09:36:06Z")

</div>

Veo la necesidad de poder asignar un empleado a una tarea o proyecto de trabajo de manera que pueda planificar la asignación de carga de trabajo por empleado de acuerdo a mi capacidad de carga de trabajo por empleado disponible.

Quedo de sus comentarios.

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [April 20, 2021, 10:27am UTC](https://discuss.tryton.org/t/necesito-agregar-un-empleado-a-un-proyecto/4083/2 "2021-04-20T10:27:15Z")

</div>

The [`project_plan` module](https://docs.tryton.org/projects/modules-project-plan/en/latest/) is supposed to provide such information.

---

<div class="post-metadata">

### Author: ![yunior](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/yunior/32/1172_2.png) [@yunior](https://discuss.tryton.org/u/yunior)
#### Post date: [April 20, 2021, 10:28am UTC](https://discuss.tryton.org/t/necesito-agregar-un-empleado-a-un-proyecto/4083/3 "2021-04-20T10:28:25Z")

</div>

Ya ejecutada si a través de los partes de trabajo… pero previamente no

---

<div class="post-metadata">

### Author: ![albert](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/albert/32/21_2.png) [@albert](https://discuss.tryton.org/u/albert)
#### Post date: [April 20, 2021, 12:15pm UTC](https://discuss.tryton.org/t/necesito-agregar-un-empleado-a-un-proyecto/4083/4 "2021-04-20T12:15:51Z")

</div>

No. El módulo project\_plan que comenta @ced permite introducir los empleados _antes_ de realizar el trabajo.

---

<div class="post-metadata">

### Author: ![yunior](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/yunior/32/1172_2.png) [@yunior](https://discuss.tryton.org/u/yunior)
#### Post date: [April 20, 2021, 12:21pm UTC](https://discuss.tryton.org/t/necesito-agregar-un-empleado-a-un-proyecto/4083/5 "2021-04-20T12:21:07Z")

</div>

gracias a ambos… no conocía este modulo… muchas gracias, comentaré cualquier detalle

---

<div class="post-metadata">

### Author: ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)
#### Post date: [April 20, 2021, 12:47pm UTC](https://discuss.tryton.org/t/necesito-agregar-un-empleado-a-un-proyecto/4083/6 "2021-04-20T12:47:49Z")

</div>

I do not see any way to find which tasks are allocated to an employee. Is a missing functionality or am I missing something?

---

<div class="post-metadata">

### Author: ![albert](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/albert/32/21_2.png) [@albert](https://discuss.tryton.org/u/albert)
#### Post date: [April 20, 2021, 3:12pm UTC](https://discuss.tryton.org/t/necesito-agregar-un-empleado-a-un-proyecto/4083/7 "2021-04-20T15:12:19Z")

</div>

I think it is a missing functionality.

That said, in my opinion the module does “too many things”. Or in other words, there are many cases in which you want to have employees allocated but you don’t want to do any planning. We ended up creating a [module](https://github.com/NaN-tic/trytond-project_allocation) that only implements the allocation part.

Maybe it’d make sense that the allocation became part of the main project module. AFAIU most companies that want to manage tasks want to assign them to somebody to execute them.

---

<div class="post-metadata">

### Author: ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)
#### Post date: [April 20, 2021, 3:19pm UTC](https://discuss.tryton.org/t/necesito-agregar-un-empleado-a-un-proyecto/4083/8 "2021-04-20T15:19:31Z")

</div>

> [@albert](#):
>
> Or in other words, there are many cases in which you want to have employees allocated but you don’t want to do any planning.

AFAIU the planning is not required, so if you just want to do the allocation you just enter the values on the allocations and ignore the planning part.

> [@albert](#):
>
> We ended up creating a [module](https://github.com/NaN-tic/trytond-project_allocation) that only implements the allocation part.

It’s a pitty that custom solutions are created instead of improving the existing one’s 😢

> [@albert](#):
>
> AFAIU most companies that want to manage tasks want to assign them to somebody to execute them.

Indeed I’m not sure if assign is the same as allocate. Let me explain:

> I will assing the task to someone if he is the responsible of the completing but I may allocate three employees to it and let the assigned employee manage them.

Which of the two concepts are you refering to?

---

<div class="post-metadata">

### Author: ![albert](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/albert/32/21_2.png) [@albert](https://discuss.tryton.org/u/albert)
#### Post date: [April 20, 2021, 3:59pm UTC](https://discuss.tryton.org/t/necesito-agregar-un-empleado-a-un-proyecto/4083/9 "2021-04-20T15:59:11Z")

</div>

> [@pokoli](#):
>
> AFAIU the planning is not required, so if you just want to do the allocation you just enter the values on the allocations and ignore the planning part.

Sure, but it requires to fill in the percentage. And we wanted to get rid of the planning fields.

> [@pokoli](#):
>
> > I will assing the task to someone if he is the responsible of the completing but I may allocate three employees to it and let the assigned employee manage them.
> 
> Which of the two concepts are you refering to?

It’s probably more on the assignment part than the allocation. At NaN-tic we combine that with project\_role to have several people assigned (responsible of the task) but depending on the status there’s only when person in charge at any given time.

In other customers it’s just the assignment but without a clear leader of who’s responsible to finish it, I guess.

---

<div class="post-metadata">

### Author: ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)
#### Post date: [April 20, 2021, 4:13pm UTC](https://discuss.tryton.org/t/necesito-agregar-un-empleado-a-un-proyecto/4083/10 "2021-04-20T16:13:30Z")

</div>

> [@albert](#):
>
> Sure, but it requires to fill in the percentage.

Indeed it has a default value of 100%, so you can safetly ignore if you prefer to not set them.

> [@albert](#):
>
> It’s probably more on the assignment part than the allocation.

I tought so 😉

> [@albert](#):
>
> At NaN-tic we combine that with project\_role to have several people assigned (responsible of the task) but depending on the status there’s only when person in charge at any given time.

Normally it’s better to explain your needs that refer to what solution you implemented.  
BTW: I’m not sure what project\_role does. Could you please explain the problem that it solves?

---

<div class="post-metadata">

### Author: ![albert](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/albert/32/21_2.png) [@albert](https://discuss.tryton.org/u/albert)
#### Post date: [April 20, 2021, 4:40pm UTC](https://discuss.tryton.org/t/necesito-agregar-un-empleado-a-un-proyecto/4083/11 "2021-04-20T16:40:03Z")

</div>

> [@pokoli](#):
>
> BTW: I’m not sure what project\_role does. Could you please explain the problem that it solves?

Well, basically it solves the problem of the fact that in some cases a task is not owned by a single person but a different person depending on its status.

So one person may be in charge of programming, another of quality control, etc, so the status of the task is the one that “explains” if the current assignee should be the Programmer, The QA Person, etc (those are the roles).

For a given task, you assign each role to a different employee, and thus the different statuses make the current assignee change depending on the current role (indicated by the status) and the employee who is in charge for that role in that task.

---

<div class="post-metadata">

### Author: ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)
#### Post date: [April 20, 2021, 9:39pm UTC](https://discuss.tryton.org/t/necesito-agregar-un-empleado-a-un-proyecto/4083/12 "2021-04-20T21:39:59Z")

</div>

From what you explain it seems there is just a single responsible in the task at any time but each time the status changes the responsible is updated.

Indeed this can be easly achieved by adding the responsible on the project but also on the state model. So when the state is updated the responsible is updated also.

Do you think this may solve your problem?

---

<div class="post-metadata">

### Author: ![albert](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/albert/32/21_2.png) [@albert](https://discuss.tryton.org/u/albert)
#### Post date: [April 21, 2021, 10:08am UTC](https://discuss.tryton.org/t/necesito-agregar-un-empleado-a-un-proyecto/4083/13 "2021-04-21T10:08:31Z")

</div>

No, the responsible is not at the project level and it is not in the state model either. You need a role concept at the state level (ie Developer) and you need to know who is the Developer of a given task.

The project\_role module perfectly suits our needs and I think many other companies too.

---

<div class="post-metadata">

### Author: ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)
#### Post date: [April 21, 2021, 10:25am UTC](https://discuss.tryton.org/t/necesito-agregar-un-empleado-a-un-proyecto/4083/14 "2021-04-21T10:25:33Z")

</div>

> [@albert](#):
>
> the responsible is not at the project level and it is not in the state model either. You need a role concept at the state level (ie Developer) and you need to know who is the Developer of a given task.

So there is a responisble on each task and in your case the domain of this responsible depends on the state.

So we can have the current responisble on the project/task level and then you can customize the domain on your custom module.

---

<div class="post-metadata">

### Author: ![albert](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/albert/32/21_2.png) [@albert](https://discuss.tryton.org/u/albert)
#### Post date: [April 21, 2021, 1:57pm UTC](https://discuss.tryton.org/t/necesito-agregar-un-empleado-a-un-proyecto/4083/15 "2021-04-21T13:57:57Z")

</div>

> [@pokoli](#):
>
> So we can have the current responisble on the project/task level and then you can customize the domain on your custom module.

That would work because we could change the responsible with on\_change\_status(), and make the field readonly.

We currently don’t need that because as we only cover our use case, we simply made the responsible (we name it assignee) a [Function field with searcher](https://github.com/NaN-tic/trytond-project_role/blob/master/role.py#L29), which is cleaner because we avoid having the same information twice.

But it really depends in what other places that “responsible” field is used. If in core it’s just informative we’ll probably use our own implementation (it does not make much sense to make the logic more complex just to reuse a field). If it ends up having more uses, then we could make it compatible with the core “responsible” field.
