It is a matter of correctness to *not* use "not context", because the user may
provide a context he might want to see modified. I think we all agree we don't
want to modify the context, but let's do things the right way.
A Dijous, 11 de març de 2010, Jay (Open ERP) va escriure:
> Hello,
>
> It is possible that context may get no value(so context=None) or some
> value(context={} or dictionary with keyfrom called function.
>
> At that time, if context is None won't help us.
>
> Better we do like, 'if context is None or (not context):'.
>
> Let me know your views.
>
> Thanks.
>
> ** Changed in: openobject-addons
> Status: New => Confirmed
>
As I already said, everything related to this issue can be found in this bug
report and "if context is None:" is the correct expression:
https:/ /bugs.launchpad .net/openobject -addons/ +bug/525808
It is a matter of correctness to *not* use "not context", because the user may
provide a context he might want to see modified. I think we all agree we don't
want to modify the context, but let's do things the right way.
A Dijous, 11 de març de 2010, Jay (Open ERP) va escriure:
> Hello,
>
> It is possible that context may get no value(so context=None) or some
> value(context={} or dictionary with keyfrom called function.
>
> At that time, if context is None won't help us.
>
> Better we do like, 'if context is None or (not context):'.
>
> Let me know your views.
>
> Thanks.
>
> ** Changed in: openobject-addons
> Status: New => Confirmed
>
-- www.NaN- tic.com
Albert Cervera i Areny
http://
Mòbil: +34 669 40 40 18