Post by shatha »

Dears,

we are facing a problem regarding Odoo Gantt Chart working hours, since when we try to manage our projects according to our fixed working hours from (8Am- 4 PM) with out any break,,

Gantt Chart is calculating working hours from (8-5) as from 12-1 calculating it as a break which is not good for us.

could you please provide us a solution on how to change it according to our working hours from (8Am- 4 PM) with out any break


Post by Terence »

You can set a specific calendar config in the settings page like

[
  {
    "id": "general",
    "name": "General",
    "intervals": [
      {
        "recurrentStartDate": "every weekday at 12:00",
        "recurrentEndDate": "every weekday at 13:00",
        "isWorking": false
      },
      {
        "recurrentStartDate": "every weekday at 16:00",
        "recurrentEndDate": "every weekday at 08:00",
        "isWorking": false
      }
    ],
    "expanded": true,
    "children": [
      {
        "id": "business",
        "name": "Business",
        "hoursPerDay": 8,
        "daysPerWeek": 5,
        "daysPerMonth": 20,
        "intervals": [
          {
            "recurrentStartDate": "every weekday at 12:00",
            "recurrentEndDate": "every weekday at 13:00",
            "isWorking": false
          },
          {
            "recurrentStartDate": "every weekday at 17:00",
            "recurrentEndDate": "every weekday at 08:00",
            "isWorking": false
          }
        ]
      },
      {
        "id": "night",
        "name": "Night shift",
        "hoursPerDay": 8,
        "daysPerWeek": 5,
        "daysPerMonth": 20,
        "intervals": [
          {
            "recurrentStartDate": "every weekday at 6:00",
            "recurrentEndDate": "every weekday at 22:00",
            "isWorking": false
          }
        ]
      }
    ]
  }
]

Complete guide to the calendar config

https://www.bryntum.com/docs/gantt/guide/Gantt/basics/calendars


Post by shatha »

Mr.Terence,

Regarding the the problem mentioned above, we update or odoo gantt chart and we run the code mentioned above by you to our calendar config in the settings page to fit our fixed working hours from (8 AM - 4 PM) with out any break, and still did not work.

I have attached a picture of the code in the setting page as a reference.

could you please help us in this matter or just tell us exactly what we have to change.

Attachments
Screenshot 2022-02-28 093109.png
Screenshot 2022-02-28 093109.png (265.43 KiB) Viewed 1564 times

Post by Terence »

You will have to adjust the calendar config regarding to your needs. Like for example,

[
  {
    "id": "general",
    "name": "General",
    "intervals": [
      {
        "recurrentStartDate": "every weekday at 16:00",
        "recurrentEndDate": "every weekday at 08:00",
        "isWorking": false
      }
    ]
]

Post by shatha »

Dear,
We put the same code and change it based on our needs and requirement and still did not work.
do you think that we might have missed any step or we got it wrong?

Attachments
Screenshot 2022-02-28 093109.png
Screenshot 2022-02-28 093109.png (265.43 KiB) Viewed 1543 times

Post by Terence »

I do not see the json code in the calendar config - screenshot. Did it not get saved?


Post by shatha »

i did not understand, can you please give me the exact steps so i can follow up with you?


Post by Terence »

Replace the current calendar config with

[
  {
    "id": "general",
    "name": "General",
    "intervals": [
      {
        "recurrentStartDate": "every weekday at 16:00",
        "recurrentEndDate": "every weekday at 08:00",
        "isWorking": false
      }
    ]
]
Screenshot 2022-03-03 at 13.06.23.png
Screenshot 2022-03-03 at 13.06.23.png (378.39 KiB) Viewed 1530 times

and press save


Post by shatha »

Still not working unfortunately


Post by Terence »

I changed the config here: https://odoo-gantt.bryntum.com

demo/demo or admin/admin

Can you elaborate on what is not working?


Post Reply