Skip to Content
Menu
This question has been flagged
2690 Views

I'm using tours as a test of UI functionality and have encountered this problem: During my step to populate the value for a datetime field "start_date", the datepicker calendar popup appears, but the expected text is not written into the input. I'd like to be able to write a date string to the datepicker during a trigger step as part of filling in the form. Documentation on Tours right now is pretty slim; I was hoping this community might help. I'm using V11.0 Enterprise. Thanks!


odoo.define('datetime_pattern.tour', function(require) {
  'use strict';
  var core = require('web.core');
  var tour = require('web_tour.tour');
  var _t = core._t;
  tour.register(
    'datetime_pattern',{
      url: '/web',
      test: true
    },
    [tour.STEPS.MENU_MORE,
    {
      content: 'Navigate to model dashboard',
      trigger: '.o_app[data-menu-xmlid="my_module.main_menu_model_model"]',
    },
    {
      content: 'Create a new record form view',
      trigger: '.o_list_button_add',
    },
    {
      content: 'Set start_date to 2018-01-01 13:00:00',
      trigger: 'input[name="start_date"]',
      run: 'text 2018-01-01 13:00:00',
    },
    ]);
});

Avatar
Discard
Related Posts Replies Views Activity
3
Sep 22
5769
1
Aug 22
3493
3
Mar 21
1165
5
Feb 20
10623
2
Feb 19
2115