- add or fix decorators on methods
- fix most compute methods (wrong dependencies)
- revert changes in `eval_context` of `ir.actions`
- various code simplifications and improvements
- migrate methods that were not
- ir_qweb: modify `QWebContext` to take an environment instead of `cr`, `uid`, `context`
- ir_qweb: convert `AssetsBundle` to use new API `env`
- ir_ui_view: use decorator `multi` on method `read_combined`
- ir_ui_view: ensure that method `render` is never called with an xml_id
- ir_ui_view: factor out part of the `ormcache` key of method `_read_template`
The alternate languages links set in the page `<head>`
were not translated in each language, but within the language
the user is browsing the website.
This leaded to SEO referencing issues, as these links leaded
to (30x) redirections if followed, to translate the URL slug
within the new current language.
e.g.
`/fr_FR/shop/product/bose-mini-bluetooth-speaker-7`
automatically redirected to
`/fr_FR/shop/product/mini-haut-parleur-bluetooth-bose-7`
And it was the first link which was displayed as alternate link
when being in another language than French, while it should
be the second (to avoid the useless redirection).
opw-669979
get_template should accept ids or xml ids. However the id or xml_id is given
to IrUiView.get_view_id that waits for an xml_id. get_template crashed if it
received an id.
This commit solves this by setting view_id to the given id, or resolve the xml_id
through get_view_id.
Checking url_list for duplicates is O(n).
Use url_set instead of url_list to improve to O(1).
Otherwise sitemap generation even for a million products will never finish.
Close#11106
To match the current website, we should compare the request http_host to the domain and not
to the website name. That was working luckily because name and domain in demo was the same.
close#10870
Users are tempted to enable all features they
see under the former "Speed" section of the
website settings, even if they have no idea
what they do.
One of them was `CDN Base URL` and had a default
value that was wrong and very likely to break
your website if enabled by mistake.
This commit replaces the default value with
a placeholder that looks more like a `sample`
URL, and makes the fields required when the
CDN option is enabled.
It also moves the whole "Speed" options to
technical features / debug mode.
get_template should accept ids or xml ids. However the id or xml_id is given
to IrUiView.get_view_id that waits for an xml_id. get_template crashed if it
received an id.
This commit solves this by setting view_id to the given id, or resolve the xml_id
through get_view_id.
Route with method="['POST']" should not appear in sitemap
This code had never works.
rule.method is not the list of methods declared on the endpoint but "the HTTP
method for the rule if there are different URLs for different methods on
the same endpoint" (src http://werkzeug.pocoo.org/docs/0.11/routing/)
The new code uses the method declared on endpoint and so will avoid to add
endpoint with method declared and wich doesn't support GET.
- Deduplicate default website definition
- Remove hardcoded english values
- All active languages enabled in the website by default
- Default website language = default database language
Difficulty for the user to understand how to change the images.
Some options summernote being in the bar and the other in the snippets editor.
Need to merge this options.
Use the parameter zoom as in `google_map_img`
Change the default value to 10 to avoid changing the behaviour for existing
links (zoom was not used anyway).
Closes#8318
simplejson and the builtin json module apparently differ in how they
decide to optimise decoding JSON strings to str rather than unicode
python strings, so check for basestring rather than one or the other.
This may also depend on the Python version.
Closes#8726
The CDN domain will typically be different from the main
website domain, so session cookies cannot be shared.
This means that assets that require elevated privileges
(such as the website editor rights) will not be reachable
from the CDN's proxy server.
This could cause random problems with CSS/JS/images not
being accessible.
The benefits of the CDN are mostly meant for the masses
of new visitors (less workload and less bandwidth consumed
for the main domain) anyway.
Authenticated users are also returning users that have most
of the resources in the browser cache anyway (assets bundles
and images, typically).