Skip to Content
Menu
This question has been flagged
4 Replies
3748 Views

Hi,

In the Planning module, there is a gantt view of resource id.

However, these list only displays the employees that has shift on that date (day, week, month, year).


Solution 1: 

Looking for a solution to display all employees with or without shift on that particular date.  

Solution 2: I need to view all employees that has no shift on that particular date.


Please help.


Thank you in advance

Avatar
Discard
Author

@chantrie,

Hi,

Any idea how to accomplish this?


Thanks

Best Answer

Hi Homer,

Odoo will display an empty line in the Gantt view if:

  1. You create a single Task "Team" and add each Employee on the team as an assignee
  2. The employee has something assgined on that period
  3. The employee has something assigned on the previous period
  4. You search on a skill of that employee

I recommend you to download the Skills module and assign one skill to each employee so that you can filter by skill in the planning app :) Here is a video to see how to do it: https://drive.google.com/file/d/1ZGYxjhmTQKSMcp_sYS9JOncNOjd2yUVs/view?usp=sharing

Good luck!

Avatar
Discard
Best Answer

Solution 1: Display All Employees

To display all employees regardless of whether they have shifts on a particular date, you'll likely need to customize the gantt view. This may require extending the existing views or creating a new view to override the default behavior. This approach might involve some technical development work.

Solution 2: Display Employees Without Shifts

To display only employees who don't have shifts on a particular date, you can follow these steps:

  1. Create a Custom View:

    You can create a custom view for the gantt chart that filters employees based on their shifts. This will require creating a new view definition in XML.

  2. Add Filter Criteria:

    In the custom view definition, you can add a domain to filter the employees displayed in the gantt chart. The domain should be constructed to exclude employees with shifts on the selected date.

    -->example of what the XML code might look like:

record id="view_custom_planning_gantt" model="" rel="ugc">ir.ui.view">

field name="name">Custom Planning Gantt

field name="model">resource.calendar.attendance

field name="inherit_id" ref="planning.planning_gantt_view"/>

field name="arch" type="xml">

xpath expr="//ganttview" position="attributes">

attribute name="default_domain">[('date', '!=', selected_date)]

/xpath>

/field>

/record>


  1. In this example, replace selected_date with the actual date you want to filter by.

  2. Activate the Custom View:

    After defining the custom view, activate it in your module. This will ensure that the view is used when displaying the gantt chart in the Planning module.




Avatar
Discard
Author

Hi, i just want to know why the model is resource.calendar.attendace?
Thanks

Best Answer

I'm sure that it instructed something to each peruser. We esteem your sharing of this data. I really had the opportunity to explore this awesome data.


Avatar
Discard