Employee and product relation.

Asked by Jonathan Liuti

My use case is as follow:

Let's say we have an employee whose function is "bodyguard".
Depending on his working time (late hours, week-end,...) his cost and sale price may vary.

I created different product for different working time.

eg:
Bodyguard Week day
Bodyguard Week night
Bodyguard Week-end Day
Bodyguard Week-end Night
...

I create a sale order that automatically creates task for the corresponding order lines.

Then I assign a project to the tasks and an employee to each task.

The employee can now put time in the task work field.

When I go and try to invoice tasks work, the product used for each tasks work line is the product related to the employee, not the product I used initially in the sale order.

I know its possible to force a product at the time you generate the invoice but I don't want to generate separated invoices by product !

What I want to do is having the task know the product it's related to base on the sale order and not on the employee executing the task.

I hope I make sense and someone can help me with this.

bests,
John.

Question information

Language:
English Edit question
Status:
Solved
For:
Odoo Server (MOVED TO GITHUB) Edit question
Assignee:
No assignee Edit question
Solved by:
Jonathan Liuti
Solved:
Last query:
Last reply:
Revision history for this message
Husen Daudi (husendaudi) said :
#1

Hello John,

This scenario doesn't exist for now. this need new module development and customization.
By default invoicing from task work will take product defined in employee form only,

Revision history for this message
Jonathan Liuti (liuti-john) said :
#2

I achieved to get this working (keeping the time spent on one task linked with the initial sale order product and not the user's product).

Dunno exactly why it wasn't working before, need to dig and make some more testing to find out.

I will report here when I find time to test.

Thx.

Revision history for this message
m.karrer (m-karrer) said :
#3

Any news on this one? I do have the exact same needs!

Revision history for this message
F2BOOT (f2boot) said :
#4

Hi,

@Jonathan Liuti or anyone having clarified the process
Can you confirm this is working and clarify each step you must take in the process for this to work
(ie: do you need to start with sale order or can you start a project task definition, where+how do you set the "product" etc)

Many Thanks