web icon indicating copy to clipboard operation
web copied to clipboard

[16.0] web_timeline: Create record: Cannot SAVE & CLOSE

Open norlinhenrik opened this issue 2 years ago • 1 comments

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

image

Both project_timeline and resource_booking_timeline give this bug. I have tested with python 3.11.3.

Steps to reproduce::

  1. Install project_timeline from https://github.com/OCA/project/tree/16.0.
  2. Create a project.
  3. Create a stage.
  4. Create a task with a start date and an ending date, e.g. one day period.
  5. Go to timeline view.
  6. Click on Week.
  7. Ctrl+Click in the timeline (not on your existing task) and drag the mouse to select a period of the timeline.
  8. Fill in values for your new task.
  9. Click SAVE & CLOSE.
  10. 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.

norlinhenrik avatar Sep 25 '23 05:09 norlinhenrik

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

unique4 avatar Dec 14 '23 10:12 unique4