Olivier Dony
d9cda97cf4
[MERGE] Forward-port saas-4 up to 5ceded9
2014-07-05 01:28:19 +02:00
Jeremy Kersten
e77594c3c3
[IMP] website: backport 5112421a (unslug)
...
Update the regexp to be not case sensitive
2014-06-30 18:29:20 +02:00
Jeremy Kersten
f4733aa895
[FIX] website - force to test isdigit on a string else a tb "'int' object has no attribute 'isdigit'" can exist if the page var was right and so already and int
2014-06-30 12:27:49 +02:00
Jeremy Kersten
7ba41e75e2
[FIX] Website pager - Be sure that page in get param is a digit else use page 1.
...
Need to find which controller add ?page= instead of &page= because google find some url with '?page=1?page=2' --> page = '1?page=2'. According to google, the referrer is the old website.
2014-06-30 12:10:49 +02:00
Christophe Simonis
8dfd5eab01
[MERGE] forward port of branch saas-4 up to a4bc65c
2014-06-27 16:08:09 +02:00
Christophe Simonis
a4bc65cdba
[MERGE] forward port of branch saas-3 up to bdc4dd4
2014-06-27 16:06:37 +02:00
Olivier Dony
a7aa853737
[FIX] website: exception handling: let redirects pass untouched
...
The website module normally tries to render user-friendly
error pages for any error occurring during the processing
of a website-enabled request.
This happens even for werkzeug's HTTPExceptions that have
their own response, because we want the website layout to
be applied on top of the error page.
One special sort of HTTPException should be preserved
without rewriting: the manually-crafted ones generated
with abort(), and usually wrapping a redirect response,
which bears no alteration.
2014-06-27 13:04:31 +02:00
Olivier Dony
0d330ca25c
[MERGE] Forward-port of saas-4 up to fa739ac
2014-06-25 18:44:51 +02:00
Olivier Dony
fa739ac8de
[FIX] website: default mimetype for web-published attachments, avoids crash
2014-06-25 18:37:03 +02:00
Olivier Dony
4d488408b2
[MERGE] Forward-port of saas-3 up to 141e1b2
2014-06-25 18:34:03 +02:00
Fabien Meghazi
f988d75035
[FIX] check after openerp's AccessErrors in website's _handle_exception
2014-06-25 12:20:40 +02:00
Fabien Meghazi
4e0799e163
[FIX] _handle_exception() logic amongst requests and ir_http objects
...
Changes in website's ir_http#_handle_exception():
- exception is mandatory, can't be None anymore
- we don't touch non website_enabled requests
- we don't touch explicits plain responses from parent
- logic flow is now easier to read (I hope so)
Change in website's ir_http#_dispatch():
- In case of real 404, instead of returning self._handle_exception(),
just let parent do the job (so we call super())
2014-06-25 11:47:44 +02:00
Olivier Dony
f15cbd6520
[MERGE] Forward-port saas-4 bugfixes up to ad4c6ca
2014-06-12 18:54:36 +02:00
Olivier Dony
6b85d80f23
[FIX] Wrap werkzeug.utils.escape() to accomodate signature change in 0.9
...
We always want to escape quotes (") as part of the process of
generating HTML output. This option (quote=True) turned into
an implicit flag with a DeprecationWarning in werkzeug 0.9.0
It is likely to disappear in a future release of werkzeug too.
A wrapper avoids this warning without loss of compatibility
2014-06-10 18:46:40 +02:00
Xavier Morel
46712acaec
[FIX] bunch of changes lost in incorrect merge f4d78ae738
2014-05-30 17:00:52 +02:00
Xavier Morel
d325c0caef
[REV] attempt to revert incorrect removals in f4d78ae738
2014-05-30 16:00:28 +02:00
Olivier Dony
04211015fc
[MERGE] Forward-port of latest saas-4 fixes, up to 0452851
2014-05-27 20:49:49 +02:00
Christophe Simonis
045285123f
[FIX] website: correct bad code indentation introduced during previous commit
2014-05-27 18:46:18 +02:00
Olivier Dony
fd21abd847
[MERGE] Forward-port latest saas-3 bugfixes, up to 30f43da
2014-05-27 17:18:43 +02:00
Xavier Morel
e06f5b414b
[IMP] inherit_option_id -> application
2014-05-27 12:13:51 +02:00
Xavier Morel
d67161b649
[IMP] renamed some stuff for clarity
2014-05-27 11:57:06 +02:00
Xavier Morel
da4441246e
[IMP] use set to collect inherit_id and inherit_option_id
...
Also add a few comments to note understanding of code
2014-05-27 11:57:05 +02:00
Xavier Morel
4e3864c1fb
[IMP] no need to ensure an actual context if the method does not use it
...
just forwarding the context object does not count as using it, if callees want
a context they can ensure they've got one on their own
2014-05-27 11:57:04 +02:00
Xavier Morel
85c466611a
[IMP] don't pointlessly recreate view_obj every time _views_get is called, better use of pool & data APIs
2014-05-27 11:57:04 +02:00
Xavier Morel
ad33728043
[IMP] use sorted + key instead of sort + cmp
2014-05-27 11:57:03 +02:00
Xavier Morel
3d91b2dfa2
[REM] unused stack_result parameter
2014-05-27 11:57:03 +02:00
Xavier Morel
327dda0bde
[FIX] correctly handle invalid max_width/max_height passed to website._image
2014-05-23 15:11:13 +02:00
Xavier Morel
4362c6127f
[IMP] use url_encode when building url query string
...
I have no idea why I originall implemented that crap via string munging.
2014-05-23 15:03:23 +02:00
Denis Ledoux
51c7b55da0
[FIX] request.handle_exception: cleanup override logic, fixed chain broken by commit a096ae0
...
handle_exception() is supposed to try handling an exception and if it cannot,
re-raise it. Overridden methods must therefore call super() within a try/except
block, and only attempt to handle the exception if super() raised.
2014-05-23 13:15:52 +02:00
Richard Mathot
1d70ecd80d
[IMP] website: add max_height and max_width options to image Qweb widget
2014-05-23 11:55:48 +02:00
--global
62c0f6bf11
[FIX] website: ir_http: when rerouting url containing default language -> url without language, the ? was missing, leading to wrong urls.
2014-05-23 10:39:26 +02:00
Denis Ledoux
c0e9a15960
[MERGE] Forward-port of latest saas-3 bugfixes, up to rev. a096ae0080
2014-05-22 09:35:26 +02:00
Martin Trigaux
a096ae0080
[FIX] http: force rolleback for failed http request
...
1st issue:
When an exception was raised, it was badly handled by the website in case of
website_enabled key. The response page was generated without calling super.
The WebRequest object being responsible to rollback the transaction in case
of errors.
2sd issue:
The _failed attribute is required to rollback the transaction in an WebRequest
object. Previously it was only set in the JsonRequest object (which inherit
from WebRequest), replace by call to super. The attribute _failed is now set
in the WebRequest object.
2014-05-21 19:12:37 +02:00
Christophe Simonis
a756b82372
[MERGE] forward port of branch saas-4 up to revid bb26dea
2014-05-20 20:19:55 +02:00
Christophe Simonis
040c93026a
[MERGE] merge bzr trunk addons branch
2014-05-20 18:10:36 +02:00
Fabien Meghazi
59bfda8efd
Slug redirects loses query_string
2014-05-20 10:25:39 +02:00
Fabien Meghazi
2df2da6514
[FIX] properly set website_multilang attribute
2014-05-19 12:33:47 +02:00
Olivier Dony
6130ed3ce0
[IMP] website: refactor website_image controller (and placeholder), move to model to make it reusable
...
It is "almost" reusable because it still depends on the global `request` variable,
this could be solved by making it an explicit parameter.
2014-05-14 16:32:36 +02:00
Xavier Morel
f4d78ae738
Merge branch 'server-trunk'
...
Conflicts:
addons/mass_mailing/controllers/main.py
2014-05-14 15:13:04 +02:00
Fabien Meghazi
c3cfc4bc32
[MERGE] sitemap backport, merge trunk from 9438 til 9440
...
merge from 9438 revid:fp@tinyerp.com-20140511115231-g8ke14r9iepyypv4 til 9440 revid:fp@tinyerp.com-20140511143314-nzn1239l00arbxjq
2014-05-13 16:38:31 +02:00
Fabien Meghazi
119823ab84
[IMP] Redirect to language-less url on default language
2014-05-13 12:07:29 +02:00
Fabien Meghazi
c73a2f1c57
[FIX] restore request.website_multilang for templates
2014-05-13 12:07:20 +02:00
Fabien Meghazi
8eed143112
[IMP] Invert multilang logic in route decorator. True by default, can be set to False explicitlty
2014-05-13 11:35:45 +02:00
Fabien Meghazi
1d08697bc1
[FIX] Do not display language choice if multilang=False
2014-05-12 17:42:01 +02:00
Martin Trigaux
555d4879c8
Forward-port of latest saas-4, up to revision 9416 (rev-id fme@openerp.com-20140509164338-gnz7p3qxt8etrh5w)
...
bzr revid: mat@openerp.com-20140512072331-0lidgqb6x7fregdj
2014-05-12 09:23:31 +02:00
Fabien Pinckaers
105618443f
[IMP] Sitemap
...
bzr revid: fp@tinyerp.com-20140511134037-84vnn1b4zfzk8som
2014-05-11 15:40:37 +02:00
Fabien Pinckaers
54d30d5194
[IMP] clean sitemap, enumerate pages + fixes
...
bzr revid: fp@tinyerp.com-20140511115231-g8ke14r9iepyypv4
2014-05-11 13:52:31 +02:00
Fabien Meghazi
501ad7abeb
[IMP] dumb code
...
bzr revid: fme@openerp.com-20140509151855-7v4hp08qvmac1u2d
2014-05-09 17:18:55 +02:00
Fabien Meghazi
69a93b07c7
[MOV] ir.ui.view#write() forced noupdate moved in website (RTE only)
...
bzr revid: fme@openerp.com-20140509141024-xa9mawoye3o8e6c1
2014-05-09 16:10:24 +02:00
Fabien Meghazi
f652660cb6
[FIX] is_multilang_url by checking against werkzeug's routing map using query string too
...
bzr revid: fme@openerp.com-20140509122323-2ext0livjgr5njb0
2014-05-09 14:23:23 +02:00