I managed to popup a calendar wizard on a form after pressing a button.
However the wizard cant close after it is popup.
I keep clicking the Close button but it is not working then I pressed F12 on chrome and saw this error.
Uncaught TypeError: Cannot read property ‘validate’ of null
May I know if anyone solved this error before? Thank you
Normally only form views are allowed in wizard.
But the error is strange, it will help to understand if you were not running the minified version of sao.
Thank you, managed to solve this after debug in non-minified version of sao.
wizard.js
// added below code to bypass the validate when the view is calendar
if (this.screen.current_view.view_type === 'calendar') {
this.state = state;
this.process();
return;
}
//end bypass
//error occurred at below line
return this.screen.current_record.validate().then(function(validate) {
That’s why wizard can only work with form view because it requires a current record.
Indeed you should use a Model that contains a One2Many field which is displayed using a calendar view.