Tryton - Issues

 

Issue6456

Title Calendar View: selected_date is undefined when new record button is clicked
Priority bug Status chatting
Superseder Nosy List ced, fmorato, reviewbot
Type crash Components sao
Assigned To Keywords review
Reviews 41281002
View: 41281002

Created on 2017-04-20.19:40:16 by fmorato, last changed by fmorato.

Messages
msg33322 (view) Author: [hidden] (fmorato) Date: 2017-04-21.13:46:41
I'll look into it but my knowledge on JS is very limited.
msg33314 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2017-04-20.22:51:49
I think the right way to fix that is by using getDate[1] instead of storing our own version. But it may require to set it in dayClick[2] callback as maybe FullCalendar will not yet set it.

[1] https://fullcalendar.io/docs/current_date/getDate/
[2] https://fullcalendar.io/docs/mouse/dayClick/
New review41281002 at https://codereview.tryton.org/41281002/#ps1
msg33312 (view) Author: [hidden] (fmorato) Date: 2017-04-20.19:40:15
In a Calendar View for a Model with fields name, dtstart and dtend, when I click the new record button there is an error in the browser console, the processing balloon stays on and the view freezes.

When creating the a new record from the form or tree view there are no errors.

It seems that the variable selected_date is undefined.

The console error in Firefox 54a2:

TypeError: selected_date is undefined[Learn More]  tryton-sao.js:13858:17
	set_default_date http://0.0.0.0:8000/dist/tryton-sao.js:13858:17
	new_/</< http://0.0.0.0:8000/dist/tryton-sao.js:6477:24
	bound  self-hosted:913:17
	then/</</< http://0.0.0.0:8000/bower_components/jquery/dist/jquery.min.js:2:28467
	i http://0.0.0.0:8000/bower_components/jquery/dist/jquery.min.js:2:27146
	fireWith http://0.0.0.0:8000/bower_components/jquery/dist/jquery.min.js:2:27914
	Deferred/</e[f[0]] http://0.0.0.0:8000/bower_components/jquery/dist/jquery.min.js:2:28879
	i http://0.0.0.0:8000/bower_components/jquery/dist/jquery.min.js:2:27146
	add http://0.0.0.0:8000/bower_components/jquery/dist/jquery.min.js:2:27450
	then/</</< http://0.0.0.0:8000/bower_components/jquery/dist/jquery.min.js:2:28518
	i http://0.0.0.0:8000/bower_components/jquery/dist/jquery.min.js:2:27146
	fireWith http://0.0.0.0:8000/bower_components/jquery/dist/jquery.min.js:2:27914
	Deferred/</e[f[0]] http://0.0.0.0:8000/bower_components/jquery/dist/jquery.min.js:2:28879
	ajax_success http://0.0.0.0:8000/dist/tryton-sao.js:695:17
	i http://0.0.0.0:8000/bower_components/jquery/dist/jquery.min.js:2:27146
	fireWith http://0.0.0.0:8000/bower_components/jquery/dist/jquery.min.js:2:27914
	z http://0.0.0.0:8000/bower_components/jquery/dist/jquery.min.js:4:12057
	c/< http://0.0.0.0:8000/bower_components/jquery/dist/jquery.min.js:4:15619

In chromium 57:

tryton-sao.js:13858 Uncaught TypeError: Cannot read property 'format' of undefined
    at ClassConstructor.set_default_date (http://0.0.0.0:8000/dist/tryton-sao.js:13858:59)
    at ClassConstructor.<anonymous> (http://0.0.0.0:8000/dist/tryton-sao.js:6477:38)
    at http://0.0.0.0:8000/bower_components/jquery/dist/jquery.min.js:2:28469
    at i (http://0.0.0.0:8000/bower_components/jquery/dist/jquery.min.js:2:27151)
    at Object.fireWith [as resolveWith] (http://0.0.0.0:8000/bower_components/jquery/dist/jquery.min.js:2:27914)
    at e.(anonymous function) (http://0.0.0.0:8000/bower_components/jquery/dist/jquery.min.js:2:28893)
    at i (http://0.0.0.0:8000/bower_components/jquery/dist/jquery.min.js:2:27151)
    at Object.add [as done] (http://0.0.0.0:8000/bower_components/jquery/dist/jquery.min.js:2:27450)
    at Object.<anonymous> (http://0.0.0.0:8000/bower_components/jquery/dist/jquery.min.js:2:28549)
    at i (http://0.0.0.0:8000/bower_components/jquery/dist/jquery.min.js:2:27151)
History
Date User Action Args
2017-04-21 13:46:41fmoratosetmessages: + msg33322
2017-04-20 22:51:49cedsetnosy: + ced
messages: + msg33314
2017-04-20 22:08:49reviewbotsetstatus: unread -> chatting
nosy: + reviewbot
messages: + msg33313
2017-04-20 22:08:48reviewbotsetreviews: 41281002
keyword: + review
2017-04-20 19:40:16fmoratocreate

Showing 10 items. Show all history (warning: this could be VERY long)