I’m currently looking to develop a Gantt Chart in Tryton. Is this possible?
I couldn’t find any documentation on how to customize the SAO client or add a new view type like Gantt. Is there a recommended way to implement a custom view in SAO, or has anyone successfully integrated a Gantt chart component (e.g., Frappe Gantt, fullcalendar, etc.)?
Any guidance or examples would be greatly appreciated.
We do not have any documentation about that.
tryton neither sao were designed to have view plugins but as Python and JavaScript can be introspected it is probably doable.
For sao it is mainly about implementing a Sao.View and probably Sao.View.Calendar is the closest to what a Gantt view would look like.
I’m still stuck on how to add or edit a view inside the sao folder and integrate it with my own module or XML file. I want to create a page that will be recognized as a custom view, which I placed inside the sao folder.
sao is not page oriented. It is pure JavaScript that manipulate the DOM.
You will need to learn the architecture of sao by reading the code and understand how it works. Then you will be able to create a sao/src/view/gantt.js but it will also require to declare such view in trytond and make tryton ignore it if you do not implement it for it.
Just to give you an idea about the task. If I had to do it, I would estimate to a week of work to implement such new view only for sao (I have no idea for tryton because I could not find any existing widegt for Gantt). And this is from someone with more than 10 years of developing in the web client. So it is really not a trivial task especially if it is the first time you develop for the web client.
Oh I see, I thought it was similar to React or Vue.
Alright, let me try to finish it myself first. I won’t close this forum thread yet.
Once I have completed the task, I’ll share my solution here.
For projects, I had the idea to create an xml document model compatible with XML planning projects files. So you can export a tryton project to an gantt-project for example.
The result of discussion was that it would be export only. Indeed it would be limited.