Post by manou »

Can you please share a full configuration with those options ?


Post by manou »

Can you please provide a full configuration example with those options? (I posted this message before, but I don't see it the chat)


Post by manou »

Hello arcady,
Can you please share example of configuration ?


Post by arcady »

I'm not much of an expert how code should looks in Odoo but generally speaking.

new Gantt({
    project : {
        project : 'some 8 hrs/day calendar',
        // specify that "1 day" unit value is "8 hours"
        hoursPerDay : 8
    },
    // tell the gantt to stretch task bars to take whole tick width
    fillTicks : true,

Post by manou »

Thank you for your replay,
We have two configuration parts, where exactly should I put this ? and should I change the existing config ?

1 - Gantt configuration object

 {
                columns:
                [
                    {type: "wbs", id: 'br_column_1'},
                    {type: "name", width: 250, id: 'br_column_2'},
                    {type: "startdate", id: 'br_column_3', format: 'DD/MM/YY'},
                    {type: "enddate", id: 'br_column_3_1', format: 'DD/MM/YYYY'},
                    {type: "duration", id: 'br_column_4_1'},
                    {type: "resourceassignment", width: 120, showAvatars: false, id: 'br_column_5'},
                    {type: "percentdone", showCircle: true, width: 70, id: 'br_column_6'},
                    {type: "predecessor", width: 112, id: 'br_column_7'},
                    {type: "successor", width: 112, id: 'br_column_8'},
                    {type: "schedulingmodecolumn", id: 'br_column_9'},
                    {type: "calendar", id: 'br_column_10'},
                    {type: "constrainttype", id: 'br_column_11'},
                    {type: "constraintdate", id: 'br_column_12'},
                    {type: "addnew", id: 'br_column_13'}
                ],
                weekStartDay: 1,
            tbar: {
                onPaint: ({source}) => {
                source.widgetMap.startDateField.disabled = false;
                }
            }
}

2- Calendar configuration object:

            {
                columns:
                [
                    {type: "wbs", id: 'br_column_1'},
                    {type: "name", width: 250, id: 'br_column_2'},
                    {type: "startdate", id: 'br_column_3', format: 'DD/MM/YY'},
                    {type: "enddate", id: 'br_column_3_1', format: 'DD/MM/YYYY'},
                    {type: "duration", id: 'br_column_4_1'},
                    {type: "resourceassignment", width: 120, showAvatars: false, id: 'br_column_5'},
                    {type: "percentdone", showCircle: true, width: 70, id: 'br_column_6'},
                    {type: "predecessor", width: 112, id: 'br_column_7'},
                    {type: "successor", width: 112, id: 'br_column_8'},
                    {type: "schedulingmodecolumn", id: 'br_column_9'},
                    {type: "calendar", id: 'br_column_10'},
                    {type: "constrainttype", id: 'br_column_11'},
                    {type: "constraintdate", id: 'br_column_12'},
                    {type: "addnew", id: 'br_column_13'}
                ],
                weekStartDay: 1,
            tbar: {
                onPaint: ({source}) => {
                source.widgetMap.startDateField.disabled = false;
                }
            }
}
Attachments
Gantt.png
Gantt.png (82.27 KiB) Viewed 631 times

Post by arcady »

The hoursPerDay is a property of the project loaded into the Gantt. So this must be a part of the loaded data... not sure how it's meant to be done in Odoo.

And fillTicks can be put to Gantt configuration object (but that's not that important ..the key thing is setting hoursPerDay on the project):

 {
                fillTicks : true,
                columns:
                [

Post by nivl »

Hi Manou,
It's been a while, but were you able to figure this out and have it work correctly?

Niels


Post by manou »

Hello Nivl,
No, we're still waiting,
In your last answer, arcady didn't know how to make it work in Odoo.
Can you help us with it.
Thanks


Post by nivl »

Hi Manou,
Alright, let me see what we can do. You're on Odoo 15 community version, if I'm correct?
Thanks,
Niels

Niels


Post by manou »

Hi Nivl,
Yes, Odoo 15 community and we are using bryntum_gantt : version 15.0.2.0.7


Post Reply