web
web copied to clipboard
[16.0] web_timeline: Create record: Cannot SAVE & CLOSE
When I mark an area of a timeline, I can create a new record in a popup window. But when I click SAVE & CLOSE, I get this error: Uncaught Promise > Cannot convert object of type Boolean to type Date
Both project_timeline and resource_booking_timeline give this bug. I have tested with python 3.11.3.
Steps to reproduce::
- Install project_timeline from https://github.com/OCA/project/tree/16.0.
- Create a project.
- Create a stage.
- Create a task with a start date and an ending date, e.g. one day period.
- Go to timeline view.
- Click on Week.
- Ctrl+Click in the timeline (not on your existing task) and drag the mouse to select a period of the timeline.
- Fill in values for your new task.
- Click SAVE & CLOSE.
- The error occurs.
As a workaround, I have created a SAVE button:
<button
name="action_save"
class="oe_highlight"
string="SAVE"
type="object"
/>
def action_save(self):
pass
When I SAVE, close the popup window, select another view, and then timeline view again, the task shows in the timeline.
I believe this is syntax error "res_id" / "resId" https://github.com/OCA/web/blob/e39a1201cc1f29382713aa6e8d5e18214606a689/web_timeline/static/src/js/timeline_controller.esm.js#L299