Commit Graph

241 Commits

Author SHA1 Message Date
Jeremy Kersten 9ecd80eaeb [FIX] website: sitemap fix length
Iterator was consuming the first 45k records.
So don't need to specify an offset, because that will ignore the next 45k.

Eg: if step of 5, and range(1,13),
it will only use [1, 2, 3, 4, 5, 11, 12, 13]

Cherry-pick/backport of de8296c3a86da5e4ae35edcdb563d317dac32e76
2016-02-25 09:26:56 +01:00
Denis Ledoux b459c4dc03 [FIX] website: possibility to set no url for the home menu
Unsetting the URL of the menu `Home`,
in Settings > Configuration > Website Settings > Configure Website,
leaded to the unavailability of the website.

opw-657572
2015-11-26 10:02:41 +01:00
Paul Catinean 40c35fb48a [FIX] website: set multilang to `False`on `website_image`
Add multilang=False to website_image controller to prevent redirects

Because website_image is decorated with website=True
Requests made for the product image at
`/website/image/product.template/xx_xx/..`
triggered redirections to add the language code to the
requests URLs. This redirection was useless, as setting
the language code for images is non-sense.

Adding `websitelang=False` prevents this redirection.

In addition, the redirection could lead to
SSL security concerns, as the redirection
could use the http:// scheme.

Closes #8515
2015-09-16 14:12:44 +02:00
Mathias Neef c9d41679fb [FIX] website*: `active` class in menu
In the top menu bar, the `active` class is set when the
menu url matches the page url (the url in the browser url bar)

A while ago, we made so all urls
`/page/website.***'
were automatically redirected to
`/page/****`

Therefore, if the menu url still contains this `website.` prefix,
the active class wasn't set on it, while it should.

Fixes #3059
Closes #3070
2015-08-14 17:10:46 +02:00
Denis Ledoux d08facdcb5 [FIX] website: the sitemap must be build with the public user
Otherwise, when accessing `/sitemap.xml` as SUPERUSER for instance,
pages not published were displayed in the sitemap.

opw-640673
2015-07-08 14:16:30 +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
Antony Lesuisse 7dbd495985 [IMP] website: server actions allow trailing paths 2015-03-18 13:10:58 +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 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
Raphael Collet f2e4a10e1a [IMP] use model._fields instead of model._all_columns to cover all fields
The old-api model._all_columns contains information about model._columns and
inherited columns.  This dictionary is missing new-api computed non-stored
fields, and the new field objects provide a more readable api...

This commit contains the following changes:

 - adapt several methods of BaseModel to use fields instead of columns and
   _all_columns

 - copy all semantic-free attributes of related fields from their source

 - add attribute 'group_operator' on integer and float fields

 - base, base_action_rule, crm, edi, hr, mail, mass_mailing, pad,
   payment_acquirer, share, website, website_crm, website_mail: simply use
   _fields instead of _all_columns

 - base, decimal_precision, website: adapt qweb rendering methods to use fields
   instead of columns
2014-11-04 13:47:57 +01:00
Fabien Meghazi 51477fb4f6 [IMP] Brought back /website/image route w/filename hinted in headers
Also added support for this route in widget Image#from_html()
2014-09-17 16:54:08 +02:00
Fabien Meghazi 0d890ab76e [ADD] Compress uploaded image by default
Added an opt-out option available from the button's dropdown
2014-09-16 19:55:00 +02:00
Fabien Meghazi bc5e6fa2cb [ADD] Helper for /website/image (allows to use aggressive cache) 2014-09-16 19:54:59 +02:00
Antony Lesuisse 2d296cb779 [MERGE] ir-ui-view split active and show_customize
Split the ternary field application in active and show_customize, all four
possible value are now needed for the customize theme popup.
2014-08-31 16:56:44 +02:00
Fabien Meghazi 5e6e1303e3 [IMP] pretty urls for /website/image 2014-08-28 16:37:38 +02:00
Fabien Pinckaers 8aca457e34 [IMP] Updated website urls on modules and info page 2014-08-26 21:40:18 +02:00
Fabien Meghazi 709dc659b2 [IMP] Allow to specify http code for request.redirect() 2014-08-26 11:50:13 +02:00
Fabien Pinckaers b0d99b0ff0 [FIX] redirect /page/website.xyz --> /page/xyz. Currently 302 but fme will convert to 301 2014-08-26 10:29:18 +02:00
Denis Ledoux ae65be2b2a [MERGE] forward port of branch saas-5 up to 0739bc4 2014-08-11 15:58:02 +02:00
Denis Ledoux 0739bc4eda [MERGE] forward port of branch saas-4 up to 7ecaab9 2014-08-11 15:31:04 +02:00
Denis Ledoux 7ecaab9fe2 [MERGE] forward port of branch saas-3 up to 2f4be42 2014-08-11 15:30:37 +02:00
Denis Ledoux c7fb787c70 [FIX] website: seo, url encode params, + handle connection breaks 2014-08-11 10:32:08 +02:00
Jeremy Kersten e4c2da59f8 [FIX] website: use internal route for SEO suggest keyword, old server is down 2014-08-11 10:19:22 +02:00
Christophe Simonis f2cb8702b2 [FIX] website: correct image resizing 2014-08-06 16:20:22 +02:00
Denis Ledoux 1bb219907f [MERGE] forward port of branch saas-5 up to 655a5b9 2014-08-04 16:56:10 +02:00
Denis Ledoux 655a5b948d [MERGE] forward port of branch saas-4 up to 8c0c743 2014-08-04 16:14:31 +02:00
Jeremy Kersten 19a6e879f0 [FIX] website: encode param for seo search, else multi words will not work. 2014-08-04 14:41:55 +02:00
Jeremy Kersten 28e62e46b5 [FIX] website: use internal route for SEO suggest keyword, old server is down 2014-08-04 12:25:59 +02:00
Christophe Simonis fd4fd35e32 [MERGE] forward port of branch saas-5 up to e4cb520 2014-07-30 20:52:14 +02:00
Christophe Simonis e4cb5202a0 [MERGE] forward port of branch saas-4 up to fa07bc8 2014-07-30 20:30:14 +02:00
Christophe Simonis fa07bc8532 [MERGE] forward port of branch saas-3 up to 310d3fe 2014-07-30 19:09:33 +02:00
Christophe Simonis c6f91facbb [FIX] website: do not restore page views 2014-07-30 15:10:22 +02:00
Christophe Simonis f654a7719b [MERGE] forward port of branch saas-5 up to 73d39a0 2014-07-10 22:49:53 +02:00
Christophe Matthieu e0ed658044 [FIX] website: if the first menu refered to a website page and the route for this path is overwrited, the route is not used, the template has not the values of the route. (e.g. contact-us menu in first position if website_crm is installed) 2014-07-09 10:39:00 +02:00
Jeremy Kersten 1a4bfa28c4 [FIX] Sitemap - Back forward from saas-5 5cc1317a5f to have the url_root in sitemap 2014-06-25 13:38:56 +02:00
Christophe Simonis 1eaa69d342 [MERGE] forward port of branch saas-5 up to 9e8e365 2014-06-25 12:44:13 +02:00
Christophe Simonis 9e8e3653f2 [MERGE] forward port of branch saas-4 up to f68c835 2014-06-25 12:43:41 +02:00
FalcoBolger 97174a2a9d [FIX] Accept http responses as server action response 2014-06-18 13:39:30 +02:00
Fabien Meghazi c4b1b58ffa [FIX] sitemap does not show pages
the /page/ controller was not using the ``page`` converter
2014-06-17 13:43:57 +02:00
Christophe Simonis c19bb8ce48 [FIX] website: correct "/" redirect to first menu 2014-06-01 14:30:15 +02:00
Richard Mathot 8d822419e7 [FIX] website: fix incomplete refactoring 2014-05-30 15:35:59 +02:00
Olivier Dony 04211015fc [MERGE] Forward-port of latest saas-4 fixes, up to 0452851 2014-05-27 20:49:49 +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 80c7b6defc [IMP] dict(int: True) -> set(int) 2014-05-27 11:57:06 +02:00
Xavier Morel b5cce44dd2 [IMP] use sets to check for groups/ACL
rco notes that group tests are generally intersections, if the user has *any*
group set on the object he can see/use it. This change is a literal
translation of the original semantics, which may be wrong.
2014-05-27 11:57:05 +02:00
Fabien Meghazi 5cc1317a5f [FIX] sitemap.xml urls 2014-05-26 14:58:30 +02:00
Christophe Simonis 93238cd1cb [FIX] website: respect max_{width,height} for /website/image route 2014-05-20 20:23:25 +02:00