Search code examples
javascriptodoo-10odoo-view

nested calendar view inside a form view


I'm developping for odoo10 plateform

I want to nest a calendar view inside a form view. Is it possible already or do I have to meddle with odoo code?

To be more precise: Inside a form view, I want to display a calendarview with available slots to take an appointment on the fly. I am already working on a way to display available slots with javascript, now I would need to nest the calendar view. (maybe it is not that much more precise ^^)

I am not afraid of going deep inside the javascript code if needed. I'm looking for maybe a hint on where to start. For example: how are nested Kanban and Tree views processed? Where is it in the code?

thanks in advance for the answers!

Zoggy.


Solution

  • You could find how the kanban views are integrated for one2many and many2many fields at:

    https://github.com/odoo/odoo/blob/93d69933acc9454a5741fe6eb39edd9cdae9fbf1/addons/web_kanban/static/src/js/kanban_relational.js

    And you could see the usage of those widgets at:

    https://github.com/odoo/odoo/blob/93d69933acc9454a5741fe6eb39edd9cdae9fbf1/addons/web/static/src/js/views/form_relational_widgets.js#L1280

    https://github.com/odoo/odoo/blob/93d69933acc9454a5741fe6eb39edd9cdae9fbf1/addons/web/static/src/js/views/form_relational_widgets.js#L1380