Commit Graph
519 Commits
Author SHA1 Message Date
Martin Trigaux bb56e484b7 [FIX] all: construction of translations lookup
When evaluated, the translation function never finds a match if a variable is
integrated into the untranslated text.

SHAME! 🔔 🙋
2016-01-13 14:46:30 +01:00
Christophe Simonis 33299fd689 [MERGE] forward port of branch saas-6 up to 5eee559 2016-01-12 18:46:23 +01:00
Christophe Simonis 5eee5591ab [MERGE] forward port of branch 8.0 up to 37ed5ce 2016-01-12 18:24:27 +01:00
Jeremy Kersten 33e84a6622 [FIX] website: fix sitemap to avoid to get post route inside
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.
2016-01-11 12:49:34 +01:00
Jeremy Kersten ce3f797068 [FIX] website_event: avoid traceback when page doesn't exists
The controller /event/<event_id>/page/<page> raise exception if page is not existing.

Allow to pass the template reference when user are creating a new page.
Without it, it is impossible for the end user to create a website_event page without
change manually the xml id because the xml id is based on the module from the template.

This fix is retro compatible, because from_template will be ignored until next update
of website. And during update from website, website_event will be updated because it's a
dependance and so the default_page template created.
2016-01-08 23:19:29 +01:00
Denis Ledoux aef8a4d618 [MERGE] forward port of branch 8.0 up to f9f7669 2015-12-21 18:24:22 +01:00
Denis Ledoux 5cf29dcff2 [FIX] web, website: overrideable images controller
The `binay_image` and `content_disposition` are moved
from the web controller to the `ir.http` model,
to be able to override these methods.

This makes possible to browse the records images as sudo
when the record is published on the website.
e.g. to see the partner images on the website `/partners` page
from the `website_crm_partner_assign` module.

opw-659244
2015-12-11 13:58:49 +01:00
Christophe Matthieu 8a0b4ca39f [FIX] website: display website_published image without access to the model
Issue: if the user don't have any access to the model, _image method raise an exception instead of display the website_published images.
2015-12-10 10:02:37 +01:00
Christophe Simonis 56a442e205 [MERGE] forward port of branch saas-6 up to dade7e3 2015-11-25 13:26:02 +01:00
Denis Ledoux 32fd520d97 [MERGE] forward port of branch 8.0 up to 6f29cbe 2015-11-23 17:40:15 +01:00
Denis Ledoux 6f29cbe3ac [FIX] website,ir_qweb: prevent inherit_branding for assets
The attribute `data-oe-*` (`data-oe-id`, `data-oe-model`, ...)
must not be added when rendering the assets, to avoid
having different assets content,
e.g. a different content for the assets_common,
according if the user is signed in or not,
if the user can edit the website or not.

A different content for an assets according to the
users rights or the user being signed in or not means
that the assets are permanently re-written in the filestore,
which is against the point of the assets.

The content of the assets (assets_common) must not be
different from time to time, it must always be the same
(except when installing a new module, obviously).
Adding the `data-oe` attributes was pointless for the assets
anyway, and prevented having an identical content all
the time, therefore rewritting the assets all the time
in the filestore.

opw-657046
2015-11-23 17:01:03 +01:00
Denis Ledoux d47ee18fef [MERGE] forward port of branch 8.0 up to c9fce1a 2015-11-17 13:19:14 +01:00
Christophe Simonis 5b77f9d39f [FIX] website: pass context as keyword argument when calling method. 2015-11-12 12:09:53 +01:00
Raphael Collet 69db2f537b [FIX] website: avoid looking up key in context=None 2015-11-17 16:18:05 +01:00
Denis Ledoux d5d8140f3a [MERGE] forward port of branch saas-6 up to 7158eaf 2015-11-02 18:06:25 +01:00
Goffin Simon 46266ee11e [FIX] website: _view_obj in multi websites
First 'key' and 'website_id' fields must be checked to retrieve
the right view.
Then if no view is found, it falls back on xml_id.

To choose the right ir_ui_view, _view_obj must take into account
the 'website_id' set in the context.

Inspired from function "get_view_id" in addons/website/models/ir_ui_view.py
2015-10-29 15:19:10 +01:00
Christophe Simonis d7b0a56f34 [FIX] website: add /website/image compatibility routes 2015-10-29 12:39:10 +01:00
Christophe Matthieu d7b5eeabeb [IMP] web_editor: move picture options from snippet to summernote bar
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.
2015-10-26 11:43:36 +01:00
Denis Ledoux 56ef99d050 [MERGE] forward port of branch saas-6 up to 105b1c0014 2015-10-23 18:31:55 +02:00
Fabien Pinckaers 1a58579540 [FIX] fix and improve res.config views and typos 2015-10-08 05:42:48 -07:00
Denis Ledoux 105b1c0014 [MERGE] forward port of branch 8.0 up to 25634df 2015-10-05 16:20:13 +02:00
Antonio Espinosa 91d54a0d7d [FIX] website: google_map_link zoom was forced to '10'
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
2015-10-05 10:24:30 +02:00
Olivier Dony 0c35468806 [FIX] * settings: cosmetic changes for boolean options
Remove some duplicate config settings and improve
the layout of boolean options in various
config screens
2015-10-05 09:56:00 +02:00
xmo-odoo 249d0215c6 [FIX] website: saving new menu items
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
2015-10-02 15:36:13 +02:00
Christophe Simonis d750206c49 [MERGE] forward port of branch saas-6 up to e9f1ee4 2015-10-01 15:16:59 +02:00
Antony Lesuisse ed1bbbb8d0 [IMP] enterprise settings 2015-10-01 09:06:33 +02:00
Raphael Collet aa772825de [FIX] website: remove lang from context for modifying view arch 2015-09-30 13:36:21 +02:00
Denis Ledoux bcc2f620db [FIX] website: geoip not defined in session for invalid session
The method that set `geoip` in the session, `_geoip_resolve`,
is called just before `self._authenticate`, which logout the user
when the session is invalid, and therefore reset the session.

Therefore, `geoip` could not be in the session in that place.
This isn't that bad, as, at the next request, the `geoip` will be
correctly set in the session.

During the analysis of this issue, we observed that the reset
of the session is actually not saved, because the save
of this session is done in `Root.get_response`, through the call
`self.session_store.save(httprequest.session)`,
but `Root.get_response` is not called in `Root.dispatch` in case
of HTTPException (500 internal server error in this case).

This might need to be changed, to do the session save with a finally
in this `Root.dispatch` method, so the above bug could have been
resolved with a simple refresh (which would have re-defined the
`geoip` in the session).

opw-650416
2015-09-29 14:56:22 +02:00
Christophe Simonis 57168a9e90 [MERGE] forward port of branch saas-6 up to a669433 2015-09-23 14:34:26 +02:00
Goffin Simon 5b554499e8 [IMP] website_version: cache enable
The visitors who have the same sequence of versions for their running experiments must
share the same cache.
2015-09-18 10:31:21 +02:00
Olivier Dony 5ec9079e50 [FIX] website: use CDN only for public requests
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).
2015-09-17 19:39:23 +02:00
Olivier Dony a4d19312c5 [FIX] ir.qweb: context may be an immutable frozendict 2015-09-17 16:40:51 +02:00
Antonio Espinosa 74711efa0a [FIX] website: Default company of website model
Default website.company_id to base.main_company instead of base.public_user

base.public_user being a `res.users` and not a `res.company`

Closes #8236
2015-09-09 17:23:54 +02:00
Christophe Simonis 6d85a9a4b9 [MERGE] forward port of branch 8.0 up to d744923 2015-08-27 18:30:46 +02:00
Nicolas Lempereur 8c77c711ee [FIX] website: escaping saved html content
Escape text nodes changed via the web editor before sending the content
it to the server controller.

It is done since the content is unescaped one time when being displayed,
and it is not done for inline style and script tags (which may be
injected by dropping a snippet) since that would break them.

replacing the solution in cdb900044.
2015-08-27 17:27:39 +02:00
Denis Ledoux ed214a6681 [FIX] website, website_sale: alternative for images
Images should have an alternative
(the "alt" attribute") in order
to be W3C compliant (accessibility).

opw-648135
2015-08-27 15:46:14 +02:00
Christophe Matthieu d4bae06d08 [IMP] web: use css to display attachment mimetype
Widgets and website display images or display the type with icon like pdf, doc...
2015-08-21 22:06:52 +02:00
Christophe Matthieu 6baf611df1 [IMP] web: create generic controller '/web/content' and '/web/image'
Replace deprecate controllers like /web/binary/image, /web/binary/saveas...
Use ETag for all content with 'unique' option to cache the content if the content is never changed.
2015-08-21 22:06:52 +02:00
Antony Lesuisse 4feb82dd49 [REM] website: kanban helper
website_project has been removed and this helper is now useless.
2015-08-14 13:33:31 +02:00
Christophe Simonis 2922f70de3 [MERGE] forward port of branch 8.0 up to 09ceb9c 2015-08-13 15:24:57 +02:00
Nicolas Lempereur cdb9000449 [FIX] website, base: escaping and unescaping html
When saving a template in version 8.0, html would be saved as it should
be displayed once on the site. In particular, if some text should be
escaped once send to the browser, it will be saved as such.

But when rendering, a text node content is unescaped two times:

* for translation which seems wrong since we already use .text of a node
  which already escaped it, doing it one more time is bad,

* when rendering the template, since the html template is stored in xml,

This commit remove superfluous unescaping for translation, and add an
escaping when saving the changed template content.

closes #7967
opw-646889
2015-08-13 15:15:24 +02:00
Yannick Tivisse ed4137495c [FIX] website: website_publish_button toggle when no url can be found 2015-08-05 21:40:57 +02:00
Gaurav Panchal 0cbf2e596f [IMP] website: Inherit website.seo.metadata model and remove metadata related field 2015-07-31 12:57:24 +02:00
Christophe Matthieu b183817218 [FIX] website: infinite loop in website add page method 2015-07-10 17:00:16 +02:00
Christophe Matthieu 9665882fba [IMP] web_editor: adapt css, js and xml to use web_editor 2015-07-10 17:00:12 +02:00
Christophe Matthieu 8c559044a5 [IMP] web_editor: split website into web_editor (to use editor in backend for html field) and website 2015-07-10 17:00:11 +02:00
Thibault Delavallée c128ddf827 [FIX] website: remove unnecessary dependency from website
to mail. The only use was to update a method of publisher_warranty.contract
model that is defined in mail.

This code has been moved to the bridge module between website and mail
aka website_mail.

Dependency to share has also been removed.
2015-07-01 10:58:20 +02:00
Christophe Matthieu 3e0d7e6664 [FIX] website: can't create twice the same page because there are a infinity loop 2015-06-30 15:13:52 +02:00
Christophe Simonis a304194936 [MERGE] forward port of branch saas-6 up to 81b5c60 2015-06-25 00:26:31 +02:00
Julien Legros b4d66099ca [IMP] website_*: website publish button
When clicking on the publish/unpublish button in a form view, if the
user does not belong to the `base.group_website_publisher` group,
fallback to a simple toggling behavior.
2015-06-19 12:22:46 +02:00