Commit Graph

2502 Commits

Author SHA1 Message Date
Olivier Dony 8d745f9f50 [FIX] account, mail, etc.: uniformize evaluated expressions
opw-626694
2015-05-21 15:26:35 +02:00
Olivier Dony ebb5ddcd65 [I18N] Sync latest translations from Launchpad (not the final one) 2015-05-21 14:42:20 +02:00
Samuel Lefever f57f8c87ab [FIX] website : reset lang variable in template
In website template,
it was not possible to use the variable "lang",
containing the current language,
as the variable was overwrote in website.layout,
in a loop context.

Changing the variable name used by the loop
solves the issue.

opw-639488
closes #6320
2015-05-21 11:44:45 +02:00
Olivier Dony d5aa22ea5f [FIX] website, website_report: backwards compatibility with outdated templates
* Complements commits a696913364 and
21d4b3fda9 by adding the missing `data-lang`
attribute also in the report layout (in saas-6 a single QWeb
template is used for language links in both reports and website
layouts).

* Fix the "Edit Master" link to work also for outdated templates
where the data-lang attribute is dynamically set to 'default',
and thus cannot be used as URL prefix -> use /website/lang
controller to switch lang instead.
2015-05-18 19:34:11 +02:00
Jeremy Kersten 30013c57ba [TYPO] website: add semicolon
Thanks @sle-odoo
2015-05-18 16:18:28 +02:00
Jeremy Kersten 21d4b3fda9 [FIX] website: force default lang for edit master option
Since user is redirected automatically in his preferred language, the button edit_master redirect always to
the current lang and so not the master.
2015-05-18 15:53:34 +02:00
Nicolas Lempereur 02fb59fffa [FIX] website: widget share doesn't always work
Depending on the area (in this case a html field), the editor can escape
the url which wasn't taken into account by this widget.

closes #6726
opw-639852
2015-05-15 17:00:26 +02:00
Jeremy Kersten 9f93a9ae1c [IMP] ir_http: add facebookinternalhit in the list of bot.
Avoid redirect in en_US if lang is installed  when a link is added via Facebook
2015-05-05 10:55:00 +02:00
Olivier Dony c667eb06b8 [FIX] website: only consider valid languages in URL path
Improves aea358ca67 and avoid spurious
redirects for URLs that do not match a controller but do not
have a valid language.

When the URL does not match any controller, the language
matcher tried to strip the leading path component, treating
it as a language code. For example:
    /fr_BE/page/homepage
would not match any route, so it would be rerouted internally
as  /page/homepage, after setting `request.lang` to fr_BE.

This breaks the magical 404 handler that allows ir.attachment
entries to be mapped to static URLs. Due to the internal rerouting,
the mapping of e.g. /website_mycompany/static/src/image/logo.png
would be rerouted to /static/src/image/logo.png and not match
the mapped URL anymore.

Now the stripping of the path component will only occur if
that path component matches an installed language code.

The consequence is that URLs containing uninstalled language codes
will now lead to 404 errors - an acceptable trade-off (e.g.
when an older version of the website is still indexed by a search
engine)
2015-05-05 10:12:22 +02:00
Jeremy Kersten aea358ca67 [FIX] website: ir_http - auto redirect for lang, use cookies to save pref language
Save in cookie the last lang selected to allow to stay consistent at the next visit from visitor
2015-04-29 14:19:52 +02:00
Goffin Simon ec47493f46 [FIX] website: edit menu
when closing a modal, the class 'modal-open' was removed from the
'body' tag and all the existing modals became not scrollable.
The class 'modal-open' must be kept in the 'body' tag if there is
still a visible modal in the dom.
Inspired from commit: dee000be14

opw:633801
2015-04-29 11:09:51 +02:00
Christophe Matthieu e9c3336003 [IMP] website: improved tours error message and race conditions 2015-04-29 10:25:20 +02:00
Olivier Dony 622e00baa5 [I18N] Sync 8.0 translations from Launchpad 2015-04-28 09:45:53 +02:00
David Monjoie 675fd554f1 [FIX] website: removed the deers picture
The new image comes from www.gratisography.com by Bells Design and is
licensed under Creative Commons Zero.
2015-04-27 11:26:02 +02:00
Goffin Simon 3760b1f0f4 [FIX] website: customize logo
The company logo can't be customized because it's a t-field from the db.
This fix don't have to be forward ported because the problem is
already fixed in saas-6.

opw:632702
2015-04-24 13:30:47 +02:00
Ravi Gohil 40982f5ace [FIX] website: Published/Not Published button now dynamically updates
Prior to this fix, when you clicked on Publish or Not Published, the
effect was immediate, but the button disappeared instead of just
updating itself to the new value.

Fixes opw 614561.
2015-04-21 15:34:35 +02:00
Christophe Simonis 2a88020c10 [FIX] website: language change selector
Correct lang cookie setting when the main layout has not updated.
2015-04-08 20:14:25 +02:00
Christophe Simonis db23690db3 [FIX] website: json are not multilang by default.
This avoid useless redirection.
2015-04-08 18:31:43 +02:00
Jeremy Kersten a696913364 [FIX] website: ir_http - no redirect for bot and save lang in cookie
Detect most of bots/crawlers to avoid auto redirect. Most bots fetch
with lang en_US, so even if default website lang was not in en_US,
googlebot was redirected to en_US page.

Now we keep also the language selected by user into a cookie.
If cookie exists but lang not in url, we redirect the user into
his preferred language.

Manage special case to allow to change the lang in url to set the
default lang at fly in url and set the cookie...

Many routes are not specified as multilang=False but should be.
With the auto redirection, we need to update these routes to avoid
useless redirects !
2015-04-08 15:39:57 +02:00
Jeremy Kersten 2c865db504 [FIX] website: check that menu has an url.
Check that url is setted before to use it (avoid traceback with startwith).
Field is not required because website.menu are using to create tree/sub menu

Change the behavior of new_window.
Use _blank and not blank... for links.
Blank has no sense in this context.
2015-04-08 14:02:06 +02:00
Martin Trigaux f025d3e17c [ADD] website: add option to hide website.info page
The page has a note saying this page can be disabled but has no option to do so.
Adding one in the customize menu.
Hide the technical informations to the non-technical users, keeping only
the list of applications (not modules) for public users.
Fixes #3546
2015-04-08 13:43:19 +02:00
FalcoBolger 95b921d0f7 [FIX] website: move support for ir.attachment resources to web module
Commit 540b753bf8 introduced
support for resources stored as ir.attachment records in
asset bundles too.
This is specifically useful for customizations.

However the HTTP route for reaching those resources
when they are *not* in a bundle was originally created
in the `website` module (as a special handling for
404 requests)

This means that these dynamic resources would only
be partially supported when `website` is not installed,
causing various problems:
 - missing resources in debug mode where bundles are skipped
 - errors when trying to define new client-side Qweb templates
   via XML resources - which are loaded with a direct request
 - ...

This commit moves back the supporting code to the web module.

The `mimetype` column is not present in ir.attachment without
the `website` module, but sniffing it based on the attachment
name works fine at serving time too.

Closes #6002
2015-03-26 17:33:19 +01:00
Raphael Collet 0beb14f0d2 [FIX] ormcache: fix calls to `ormcache` with unexpected context parameter
The implementation of `ormcache` does not work on methods that take a `context`
parameter.  Because of the decorator `decorator`, the arguments of the call are
passed positionally to the method `ormcache.lookup`, and positional arguments
are used in the cache key.

The fix consists in removing the `context` parameter from the faulty methods,
either directly, or by caching a private method called by the public method.
2015-03-26 16:42:10 +01:00
Antony Lesuisse 7dbd495985 [IMP] website: server actions allow trailing paths 2015-03-18 13:10:58 +01:00
Goffin Simon 01c983919c [FIX] website: to keep the spaces around the translations
We keep the original spaces around the translations to avoid
missing spaces between words.
2015-03-16 17:03:50 +01:00
Goffin Simon 5733ee865e [FIX] website: no interpretation for "\2060" on mac with google chrome
On mac with google chrome, the character "\2060" has no interpretation
and a small square is displayed instead.

opw: 630276
2015-03-16 12:37:40 +01:00
Goffin Simon 092c64b76f [FIX] website: translations for qweb templates not applied.
-Website.tours must be loaded after the translation data:
"website.ready" before the tour ensure that the translations are loaded.

-Translations for qweb templates not applied:
Translate all text nodes in qweb templates when translation data
are loaded.

-Add some translations in website tours.

opw:619786
2015-03-03 16:05:34 +01:00
Goffin Simon fc481c5e3a [FIX] website: quote slider not editable.
Quote slider must be editable when the snippet is dropped
in a page.

opw:628510
2015-03-02 16:25:58 +01:00
Goffin Simon cbb51610ee [FIX] ir.ui.view: qweb translations: allow looking up translation in parent template
- Translations lookup normally uses the namespace of the current
QWeb template, after merging all inherited views.
But when a QWeb template is "cloned" by a child view using
inheritance with `primary` mode, the translations are more
likely to exist for the original (parent) template, and would not
be found when using only the "child" namespace.
This patch adds support for looking up each translation
also in the parent namespace in this case, if none was found
for the child template in the first place.

- ir.translation's _get_source() now supports a list of res_id
to search for, in addition to a single res_id

- Also moved the logic of routes /website/customize_template_get
and /website/get_view_translations to the ir.ui.view model where
it belongs.

opw: 615241

Closes #5325
2015-02-24 14:01:34 +01:00
Olivier Dony 91d4b947f6 [I18N] Update translations from Launchpad 8.0 branches 2015-02-18 11:51:07 +01:00
Christophe Matthieu a7e0b73930 [FIX] website: need to add an attribute on html to apply css selector in function of the browser. Fix the media video display for ie 2015-02-16 10:49:28 +01:00
Jeremy Kersten 7638fe51a9 [FIX] website*: SEO optimizely 2015-02-13 13:51:01 +01:00
Christophe Matthieu 9fbdd2d83d [IMP] website: improve speed of test crawl and load only one slug by route
If they are this routes:
/partner/p-1
/partner/p-2
...
/partner/grade-1/p-1
/partner/grade-1/p-2
...
/partner/grade-2/p-1
/partner/grade-2/p-2
...
We want test only one time the routes:
/partner/p-1
/partner/grade-1/p-1
2015-02-12 12:26:23 +01:00
Goffin Simon c6e2d97c04 [FIX] Website: Image editing not possible with safari.
opw-626209
2015-01-30 08:53:33 +01:00
Olivier Dony 8e03852fd4 [I18N] Update translations from Launchpad 8.0 branches 2015-01-26 16:36:51 +01:00
Aaron Bohy 3cae676619 [FIX] Use local copies of png instead of fetching them from websites
Debian does not allow fetching data from external website at runtime.
This fixes the privacy-breach-generic lintian warnings for Debian packaging.
The removed youtube url was a dead link...
2015-01-23 11:23:04 +01:00
Olivier Dony 495ec92251 [I18N] Update translations from Launchpad 8.0 branches 2015-01-21 15:36:54 +01:00
Olivier Dony 39f00b3637 [I18N] Update translation templates with latest terms
Total new terms: 270
Total deleted terms: 82
Total identical terms: 19653
Old total number of terms: 19735
New total number of terms: 19923
2015-01-21 15:31:22 +01:00
Jeremy Kersten 9d89b179c4 [FIX] website: search a matching route with http method POST
When url_for was looking for a route which match, it was only looking for GET route.
So routes which were restricted to be used only with a POST method, were never found.

The result was that urls in website for route post (form in most cases) was never prefixed with the lang.
So the request.lang was always the default lang from website...

If you was creating a sale order (in ecommerce), the lang used in sale order was wrong and the description not in the current lang.
2015-01-15 23:16:33 +01:00
Christophe Matthieu 255f50d0b9 [FIX] website: layout of the snippet list for large screen 2015-01-08 11:00:14 +01:00
Jos De Graeve 544eefdd32 [FIX] website: add missing decorator for better guess type
The definition of the render method was guessed as cr_uid_context instead of
cr_uid_ids_context, making calls in the new api breaks
Fixes #4401
2014-12-23 14:29:59 +01:00
Christophe Matthieu 177a08832c [FIX] website_mass_mailing: snippet animation does not toggleClass for subrscribe button. When the user click on edit snippet editor does not start animation with editable_mode true 2014-12-17 12:43:33 +01:00
Denis Ledoux 2bebba76d0 [FIX] website: image_url fallback when no write_date 2014-12-12 13:09:07 +01:00
Denis Ledoux 6f21306dba [FIX] website: responsive images in table for Firefox only
It looks there is a bug in Firefox concerning responsive images in table. See bugzilla https://bugzilla.mozilla.org/show_bug.cgi?id=975632
Bootstrap advises to use width: 100% for .img-responsive as workaround were needed.
The @moz-document is to apply this for Mozilla only.

opw-617582
opw-618659
2014-12-01 18:28:18 +01:00
Martin Trigaux b3060f2771 [FIX] website: can not change website name
The website name is by default "localhost" (used in the page title in the format
"Current Page | Website Name") but there were no way to change it.
Fixes #3493
2014-12-01 16:50:51 +01:00
Denis Ledoux b499eac2ed [FIX] website: the attachment creation improvment of a3e578068e must be done on res_model
instead of type
2014-11-25 19:26:13 +01:00
Denis Ledoux a3e578068e [FIX] website: improve performance for attachment creation
website introduces two new stored function fields, which depend on the attachment data
The thing is, these two fields are pertinent for website attachments only
Therefore, we avoid to read the datas field when the attachment is not a website attachment(when not needed), as this is the most costly field to read
2014-11-25 14:39:54 +01:00
Jeremy Kersten 4617f665b9 [FIX] website_editor: smallest pictogram was unselectable. 2014-11-21 18:23:22 +01:00
Olivier Dony a6d24db305 [I18N] Update translations from Launchpad 8.0 branches 2014-11-19 17:49:12 +01:00
Jeremy Kersten eb2e53276a [FIX] layout - use company name for attribut alt of company logo 2014-11-14 16:19:33 +01:00