openerp-dev-web team mailing list archive
-
openerp-dev-web team
-
Mailing list archive
-
Message #00701
Re: [Merge] lp:~openerp-dev/openobject-client-web/export into lp:openobject-client-web
> > Conclusion what I understood: If xlwt is not installed then only CSV option
> will be there and as boolean option "Excel" option will be available. When
> user will click for Excel then error message will raise "Please Install xlwt
> Library ......". RIGHT ??
>
> I don't think so, I'd rather have no option at all if only CSV export is
> available, an option for which you can't make any choice is useless cognitive
> burden for the user.
That is also true. Actually in GTK there is not Excel option available.
>
> I will ask Aline about it though, just to be sure.
>
> > If we import xlwt to the top level, then how will we check that it is
> installed or not ?
>
> try:
> import xlwt
> xls_export_available = True
> except ImportError:
> xls_export_available = False
>
> > How can we raise error ?
> We don't raise error, that's the point.
>
> > We have to keep in try/catch somewhere.
> Sure, but that can be at the toplevel.
--
https://code.launchpad.net/~openerp-dev/openobject-client-web/export/+merge/41588
Your team OpenERP R&D Team is subscribed to branch lp:~openerp-dev/openobject-client-web/export.
References