Calendar View Using Custom Date Field

I’m trying to change the calendar view in Sales Orders. I have setup a custom date field called “booking_date” that I would like to use in the calendar view mapping instead of the delivery date.

What’s the simplest way of doing this?

I’ve looked at a lot of threads, but I feel like most of them are talking about adding calendar view to a custom app and surely what I’m doing should be easier.

Any clues?

I’ve manage to do this by altering sales_order_calendar.js and adding the desired field to the SELECT query in sales_order.py.


Works like a charm.

Now how do I do it the right way with a hook?

I don’t know if I’m loosing my mind, but this seems to have stopped working.

OK, it works, but only if I set the delivery date to a date within the same month.

In customize forms I set the default delivery date to 12-12-2099 and hide. This way users can only see the custom date field “booking_date”.

That’s when it broke. I discovered that if the delivery date is set to the same month as the booking date the above code works fine and you can see the job in the calendar view under that booking date. But if you set the delivery date to another month the entire job disappears.

any progress