On 2016-07-17 10:57, Oscar Alvarez wrote:
> I am creating a new module that require widget calendar view, when
> goocalendar dependence is missing, and we click on next/previous button on
> toolbar, it get this traceback:
> 
> Traceback (most recent call last):
>   File 
> "/home/psk/.virtualenvs/tryton40c/local/lib/python2.7/site-packages/tryton/gui/window/form.py",
> line 408, in sig_next
>     self.screen.display_next()
>   File 
> "/home/psk/.virtualenvs/tryton40c/local/lib/python2.7/site-packages/tryton/gui/window/view_form/screen/screen.py",
> line 876, in display_next
>     goocalendar = view.widgets['goocalendar']
> KeyError: 'goocalendar'
> 
> Would be better to raise user error when dependence is missing?

Indeed this is new code that does not consider that goocalendar could be
missing. I think it should use '.get' and stop if there is no
goocalendar.

-- 
Cédric Krier - B2CK SPRL
Email/Jabber: cedric.kr...@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/

-- 
You received this message because you are subscribed to the Google Groups 
"tryton-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20160717160723.GB27997%40tetsuo.

Reply via email to