Commit Graph
3301 Commits
Author SHA1 Message Date
Odoo Translation Bot 4e4d431eba [I18N] Update translation terms from Transifex 2016-12-04 00:32:08 +01:00
Jeremy Kersten 8f48baeda6 [FIX] website: fix sitemap for multi website 2016-12-02 15:31:06 +01:00
Christophe Simonis 5bed95fbd5 [MERGE] forward port branch saas-6 up to 97af232 2016-12-01 14:47:17 +01:00
Christophe Simonis 97af2325cd [MERGE] forward port branch 8.0 up to 0105cbb 2016-12-01 14:39:25 +01:00
Denis Ledoux 0105cbbcf9 [FIX] website: make website default language required
The website `default_lang_id` was not required,
while the algorithm choosing the website language
expects it to be required.

This solves the below issue, when your browser language is en_US:
 - add a second language to the website (e.g. fr_BE or es_VE),
 - in the website settings, remove English from the languages
 - in the website settings, unset the default language
 - try to go on the website

You will have a crash:
```
  File "/home/odoo/src/odoo/saas-11/addons/website/models/ir_http.py", line 193, in _dispatch
    resp.set_cookie('website_lang', request.lang)
  File "/usr/lib/python2.7/dist-packages/werkzeug/wrappers.py", line 992, in set_cookie
    self.charset))
  File "/usr/lib/python2.7/dist-packages/werkzeug/http.py", line 905, in dump_cookie
    value = to_bytes(value, charset)
  File "/usr/lib/python2.7/dist-packages/werkzeug/_compat.py", line 106, in to_bytes
    raise TypeError('Expected bytes')
TypeError: Expected bytes
```

This is because the `request.lang` is set to `False`
because of the below algorithm in `ir_http.py`:
```
    nearest_lang = not func and self.get_nearest_lang(path[1])
    url_lang = nearest_lang and path[1]
    preferred_lang = ((cook_lang if cook_lang in langs else False)
                      or self.get_nearest_lang(request.lang)
                      or request.website.default_lang_code)

    is_a_bot = self.is_a_bot()

    request.lang = request.context['lang'] = nearest_lang or preferred_lang
```
`nearest_lang` is `False`, because there is no nearest language
available for the browser lang (`en_US`)
`cook_lang` is `False` for users who never went on the website
`request.website.default_lang_code`, which is the last feedback,
is also `False` because you removed the default language
in the website settings.

opw-695621
2016-12-01 11:37:03 +01:00
Odoo Translation Bot 8d724924f7 [I18N] Update translation terms from Transifex 2016-11-27 02:57:09 +01:00
Odoo Translation Bot d2b4f0e786 [I18N] Update translation terms from Transifex 2016-11-27 00:32:17 +01:00
Christophe Simonis c7b1712592 [MERGE] forward port branch saas-6 up to 9780551 2016-11-22 17:33:38 +01:00
Christophe Simonis 9780551bb7 [MERGE] forward port branch 8.0 up to fbdac9c 2016-11-22 17:23:24 +01:00
Jairo Llopis fbdac9c853 [FIX] website: fix search in existing pages
Previous implementation did not allow the user to search for pages 'name'
but only on the slugified name.

Now we slugify the needles before to find a match.

1. Create a new page: 'The new'
2. add a link on your website and try to find this page...
    - Before this commit, the only ways was to type 'the-new'
    - After this commit 'the new', 'The new', 'The-new', ... will match

This commit closes #10771
2016-11-22 13:47:17 +01:00
Odoo Translation Bot f9f562339f [I18N] Update translation terms from Transifex 2016-11-20 02:58:43 +01:00
Odoo Translation Bot 6b55032e1a [I18N] Update translation terms from Transifex 2016-11-20 00:39:36 +01:00
Odoo Translation Bot eed11c57bb [I18N] fetch es_AR terms
The translations have been removed but was not fetch due to --minimum-perc argument
2016-11-18 12:54:21 +01:00
Christophe Simonis b5914e9ea8 [MERGE] forward port branch 8.0 up to 51561d3 2016-11-14 14:02:41 +01:00
Odoo Translation Bot fa544c9da0 [I18N] Update translation terms from Transifex 2016-11-13 02:57:18 +01:00
Odoo Translation Bot ac1c9b6cb4 [I18N] Update translation terms from Transifex 2016-11-06 00:36:01 +01:00
qsm-odoo a545eb3919 [FIX] website: update gallery snippet thumbnails once an image is changed 2016-11-03 09:57:22 +01:00
Christophe Simonis ab8d07cf1f [MERGE] forward port branch 8.0 up to 86a9b78 2016-11-02 16:50:10 +01:00
Nicolas Lempereur d05136a0b2 [IMP] website: use default language for some bots
Currently when using a language on the website, the following is done in
this order to choose which one will be used:

1) use a language code if present in the url (eg. /fr_BE/),
2) use a language similar to the one in the url,
3) use a previously choosed language (saved in cookie),
4) use the browser language if available on website,
5) use a language similar to the browser language,
6) use the default website language

When a bot is requesting a page, he could either not specify a browser
language (en_US is set as default) or sometimes specify english
erroneously.

In these instance, we will then never use the default website language
if an english language is installed.

This fix changes this behaviour so if a bot is visiting a page, the 4th
and 5th steps are skipped and the default website language is used
instead of using the browser language.

closes #14033
opw-690910
2016-10-31 13:43:01 +01:00
Odoo Translation Bot c340284a60 [I18N] Update translation terms from Transifex 2016-10-30 02:56:40 +02:00
Odoo Translation Bot 27413feac8 [I18N] Update translation terms from Transifex 2016-10-30 00:34:38 +02:00
Christophe Simonis 477e69d850 [MERGE] forward port branch saas-6 up to 3c3ce75 2016-10-27 14:42:57 +02:00
qsm-odoo 389574e550 [FIX] website: make the 'include assets bundle' option of ace editor work
Commit which added summernote broke the ace editor with a strange
change: https://github.com/odoo/odoo/commit/9069d0127c176317436b67b23ae5677dd9d53de7#diff-e9d66a1b466f404be082fa00519eafa5L140.

With this change instead of not including the assets bundles in the ace
editor and allowing to see them by checking the option, the assets
bundles were included when NOT in debug mode and not included when in
debug mode.
2016-10-24 17:22:05 +02:00
Christophe Simonis 1d00e3221d [MERGE] forward port branch 8.0 up to 8f484fd 2016-10-24 11:48:45 +02:00
Odoo Translation Bot 8f484fd137 [I18N] Update translation terms from Transifex 2016-10-23 02:57:47 +02:00
Odoo Translation Bot f74ea276cd [I18N] Update translation terms from Transifex 2016-10-23 00:35:59 +02:00
Christophe Simonis fa50349d7e [MERGE] forward port branch 8.0 up to 001610e 2016-10-17 13:01:20 +02:00
Odoo Translation Bot d1c81f136c [I18N] Update translation terms from Transifex 2016-10-16 02:57:56 +02:00
Odoo Translation Bot 2ce7679032 [I18N] Update translation terms from Transifex 2016-10-16 00:34:35 +02:00
qsm-odoo f242721eb0 [FIX] website: fix FAQ Roller opening on old apple devices
On old apple devices (IPad 2, IPhone 4, ...), the FAQ Roller could not
be opened on click. This is because the snippet does not use standard
bootstrap correctly and put the toggle on a <div/> element instead of
a <a/> element.

This fix forces an empty click handler on these <div/>, which allows
standard bootstrap to work.
2016-10-10 12:08:27 +02:00
Christophe Simonis 67d285b9bc [MERGE] forward port branch 8.0 up to d3c4ab2 2016-10-10 11:22:55 +02:00
Odoo Translation Bot d3c4ab23e4 [I18N] Update translation terms from Transifex 2016-10-09 02:56:21 +02:00
Odoo Translation Bot 7185ae4f67 [I18N] Update translation terms from Transifex 2016-10-09 00:34:56 +02:00
Odoo Translation Bot b33415f3bd [I18N] Update translation terms from Transifex 2016-10-02 00:35:04 +02:00
qsm-odoo c952e1fc55 [FIX] website_sale: fix shop list view publish buttons
Publish buttons appeared in list view item in /shop with commit
5a5dd1e100.

They however never worked for some reasons:
* The publish buttons were unclickable as the around style was badly
implemented: the section title was over the publish button
* Even if it was clickable, the publish button handler had no prevent
default, thus it submitted the form it is in -> crash when no cart
button or added to cart on click on publish button if there was a cart
button...

Note: the style should be reviewed in next versions, this commit, as
a 9.0 fix, fixes the style with the minimum code and so that it does
not break any theme.
2016-09-27 13:47:07 +02:00
Christophe Simonis 858a8b9ef1 [MERGE] forward port branch 8.0 up to 4ab34d4 2016-09-26 13:32:09 +02:00
Christophe Matthieu 7b2e857c2f [FIX] website: promote: very slow title edition when use keywords 2016-09-26 10:20:55 +02:00
Odoo Translation Bot 6baef31c8f [I18N] Update translation terms from Transifex 2016-09-25 02:59:19 +02:00
Odoo Translation Bot 2a893606ae [I18N] Update translation terms from Transifex 2016-09-25 00:40:39 +02:00
Christophe Simonis 6a67e5cf42 [MERGE] forward port branch 8.0 up to e083d72 2016-09-22 12:46:30 +02:00
Odoo Translation Bot 6a1ecef775 [I18N] Update translation terms from Transifex 2016-09-18 03:05:57 +02:00
Odoo Translation Bot 9413bafdd3 [I18N] Update translation terms from Transifex 2016-09-18 00:34:39 +02:00
Christophe Simonis a5dfe2f0d4 [MERGE] forward port branch 8.0 up to 3e4206b 2016-09-14 11:52:24 +02:00
Odoo Translation Bot 40691d31f3 [I18N] Update translation terms from Transifex 2016-09-11 03:04:01 +02:00
Odoo Translation Bot 043144ce42 [I18N] Update translation terms from Transifex 2016-09-11 00:35:15 +02:00
Christophe Simonis f98665f9b6 [MERGE] forward port branch 8.0 up to b17b2a2 2016-09-09 10:52:34 +02:00
qsm-odoo e696def3c5 [FIX] website: properly allow to remove slide from banner snippet
Removing a slide was buggy :
* Removing the last slide left the slide handles (and the user had to
click on remove slide again)
* There was an ugly delay before the removal
* Changing the bg image of a slide was not possible anymore once one
slide was removed
* ...
2016-09-07 12:30:40 +02:00
Odoo Translation Bot 75a196972e [I18N] Update translation terms from Transifex 2016-09-04 03:06:55 +02:00
Odoo Translation Bot 9f0d3800cc [I18N] Update translation terms from Transifex 2016-09-04 00:36:28 +02:00
Christophe Simonis 9dc5ee4007 [MERGE] forward port branch 8.0 up to 7b93e1d 2016-09-01 15:46:03 +02:00