Commit Graph
687 Commits
Author SHA1 Message Date
Christophe Simonis d5f2a38b50 [MERGE] forward port branch saas-14 up to 6956ad54de 2017-08-22 17:20:15 +02:00
Christophe Simonis 6956ad54de [MERGE] forward port branch 10.0 up to 6dc0f31415 2017-08-22 16:45:43 +02:00
Jairo Llopis 7c6714d7fe [FIX] website: check website_id on view when applying inheritances.
Before this patch, if some view had both `inherit_id` and `website_id`,
its inheritances were being applied even in different websites.

After this patch, if a view inherits from another, inheritances will only apply
 when both views belong to the same (or none) website.

Refactoring based on the pr #17635
This closes odoo/odoo#17635
2017-08-22 13:18:05 +02:00
Christophe Simonis 10cb34bcac [MERGE] forward port branch saas-14 up to 97258040d8 2017-07-04 14:40:20 +02:00
Christophe Simonis 97258040d8 [MERGE] forward port branch 10.0 up to 657e328903 2017-07-04 13:17:16 +02:00
Christophe Simonis 657e328903 [MERGE] forward port branch saas-11 up to 7b0a1e4031 2017-07-04 12:28:38 +02:00
Christophe Simonis 7b0a1e4031 [MERGE] forward port branch 9.0 up to b9131adb48 2017-07-04 11:51:23 +02:00
Nicolas Lempereur b3e7753d1b [FIX] web{site,_editor}: allow edit en_US field
If the website default language is not en_US, qweb fields are not
translatable in en_US (and thus can't be translated) because:

- the code expected en_US to be the default language.
- there was a error in website _dispatch

opw-746776
closes #17939
2017-06-30 14:14:27 +02:00
Christophe Simonis e1c74e374c [MERGE] forward port branch saas-14 up to 3bac72ba74 2017-06-26 14:04:04 +02:00
Christophe Simonis 3bac72ba74 [MERGE] forward port branch 10.0 up to aaadb232b2 2017-06-26 13:00:18 +02:00
Goffin Simon 036ccbeff1 [FIX] web_editor: Translating a product in the website
Steps to reproduce the bug:
-Change the default lang on the website to be different than en_US
-Edit the name of a product in the website

Bug:
The name of the product is changed in en_US and not in the language
set on the website. The lang is in fact removed from the context in
function saveElement(in addons/web_editor/static/rte.js).

opw:747084
2017-06-21 12:02:06 +02:00
Christophe Simonis 9713dc2e1f [MERGE] forward port branch saas-14 up to 96595772e0 2017-06-15 18:39:59 +02:00
Christophe Simonis 96595772e0 [MERGE] forward port branch 10.0 up to dc8b473a03 2017-06-15 18:35:46 +02:00
Nicolas Lempereur b79b27c2b2 [FIX] website: browser lang > default lang revert 174d7e8
This reverts commit 174d7e8e49.

The default language is the language if no lang corresponding to
the current language is found. Thus the browser language if available in
languages has priority over the default language.

opw-746776
closes #17637
2017-06-15 13:39:05 +02:00
Christophe Simonis 49f819a7a7 [MERGE] forward port branch saas-14 up to b6c7d71899 2017-06-09 16:21:15 +02:00
Christophe Simonis b6c7d71899 [MERGE] forward port branch 10.0 up to cd1a8f6252 2017-06-09 13:28:06 +02:00
Denis Ledoux b4863378ef [FIX] website, website_sale: product website price and pricelist without request
Attempting to read the field `website_price` directly
with the XMLRPC API failed because, in such a case,
the request is unbound, and attempting to read
anything from it (`request.session` whatever)
resulted to the raise of an exception.

e.g.
This prevented to perform a `search_read`
with all fields on the `product.product` model

Closes #14939
opw-745733
2017-06-08 10:29:16 +02:00
Olivier Dony 5dd2cc8e63 [MERGE] Forward-port saas-14 up to b9e2207267 2017-06-01 00:37:30 +02:00
Olivier Dony b9e2207267 [MERGE] Forward-port 10.0 up to 7e44444878 2017-06-01 00:15:27 +02:00
Christophe Matthieu 174d7e8e49 [FIX] website: The default language does not use the configuration
The request language must be a fallback if the current website does not
have a default language
2017-05-22 11:57:41 +02:00
Christophe Simonis b0992d082d [MERGE] forward port branch saas-14 up to 8f30e707e5 2017-04-13 15:31:27 +02:00
Nicolas Martinelli 86730ad6de [FIX] website: config
- Set a google analytic key with the admin user (in the settings for
  module website admin)
- Give the right to demo user for website as 'Editor and designer'
- Give the right to demo user for administration as 'settings'
- Login as demo user
- Modify the google analytic key in the settings.

Security restrictions error on (Document type: ir.values, Operation: unlink)

This is a complement of commit 6c89b2bdd2

opw-727807
2017-04-11 11:39:42 +02:00
Nicolas Lempereur f95dd6a0d8 Revert "[FIX] website: use public user for sitemap making (up to s14)"
This reverts commit 2d10c5eb43.

The fix was only needed up to saas-14. In saas-15 and over there is
another fix which adds the `uid` parameter back: 65ac6b8ae
2017-03-21 13:04:10 +01:00
Christophe Simonis 65a5ced979 [MERGE] forward port branch saas-14 up to 777a87cde8 2017-03-13 17:37:20 +01:00
Christophe Simonis 777a87cde8 [MERGE] forward port branch 10.0 up to 2ef43281c2 2017-03-13 16:22:57 +01:00
Christophe Simonis c9e3d93ad0 [FIX] website: correct redirect with correct lang
When forcing another language that the current one (the cookie one) in an
url, the requested lang wasn't set correctly in redirect url, but the
cookie was, resulting in multiple redirect which ends with initial lang.

A side effect of this error was the inability to edit website page when
default lang is not en_US and user not in default lang.

The request context must be reset before being used by
`request.redirect` (in `url_for` method).
2017-03-10 18:31:21 +01:00
Nicolas Lempereur 65ac6b8ae3 [FIX] website: use public user for sitemap making
The current user was used to generate the sitemap. So if a user with
more permissions than `public user` goes on the sitemap, he could
generate it (if he is the first to see it or the last generation was
more than 12 hours ago (by default)) and have pages unavailables for
a user with lower permission in the sitemap (until the sitemap is
generated again).

The issue was solved in 8.0 with d08facdcb but was introduced back in
10.0 with fd09ddb6f because the `uid` argument was dropped from
`generate` method on `ModelConverter`.

Ths fix add the `uid` parameter back.

opw-708456
2017-03-06 16:52:45 +01:00
Nicolas Lempereur 2d10c5eb43 [FIX] website: use public user for sitemap making (up to s14)
The current user was used to generate the sitemap. So if a user with
more permissions than `public user` goes on the sitemap, he could
generate it (if he is the first to see it or the last generation was
more than 12 hours ago (by default)) and have pages unavailables for
a user with lower permission in the sitemap (until the sitemap is
generated again).

The issue was solved in 8.0 with d08facdcb but was introduced back in
10.0 with fd09ddb6f because the `uid` argument was dropped from
`generate` method on `ModelConverter`.

From 10.0 up to saas-14 the fix introduced is to use a `use_public_user`
key in `request.context` but in master we will keep the fd09ddb6f fix
by adding uid to the `generate` method.

opw-708456

note: to forward-port only up to saas-14
2017-03-06 16:11:19 +01:00
Rohan Patel 79597a2b84 [REF] website: merge Website and Website Admin menu items
This commit merge the two website menu items in order to ease user flow
inside Odoo. When clicking on the Website item a server action is called
that decides to redirect the user either to the dashboard if the user is
an admin or a website publisher, either to the website for other people.
Overriding this method allows to define a specific behavior. Future commit
will also redirect sales people to the website dashboard.

Dashboard itself is customized to add a header used to display a website
button. It will be used in future commits to add other new stuff to the
dashboard.
2017-03-03 16:57:06 +01:00
fwi-odoo eb56b9bebc [IMP] website: allow defining the module used for the xml_id
When a new page is created, we want to allow the definition of the xml_id
as 'website.XXX' in order to have clean url in the frontend and not always
take the same module name than the template module name. Since the page
with url 'page/website.XXX' are parsed by the website controller to be
displayed as 'page/XXX'.
e.g. in studio we create page on the fly and don't want url as:
'www.odoo.com/page/website_studio.XXX'
2017-03-03 15:44:44 +01:00
Christophe Simonis 68176d80ad [MERGE] forward port branch saas-14 up to eddefc9948 2017-03-01 16:49:15 +01:00
Christophe Simonis eddefc9948 [MERGE] forward port branch 10.0 up to 8c55e57c7f 2017-03-01 16:14:41 +01:00
Christophe Simonis 8efd51acd3 [FIX] website: check request existence before use 2017-03-01 13:07:57 +01:00
Christophe Simonis 42de3f8e26 [FIX] website: use CDN for assets 2017-02-28 19:20:53 +01:00
Christophe Simonis 6c89b2bdd2 [FIX] website: correct access to Website Config 2017-02-21 15:37:07 +01:00
qsm-odoo 7751c1bfb9 [REF] web_editor, website: split customize_template_get
Commit a2ae219d4e fixed the customize_template_get
function(s) which had been modified for the 10.0 web_studio release.
While the fix also reorganized the structure to make it more efficient
and understandable, it promised that the function would be refactored
in master. This is what this commit does.

The customize_template_get route of the website module was also removed
with commit 5a030db3eb as it was an useless
duplicate of the web_editor customize_template_get route.

The old route handled two totally different features of odoo: getting
all the page-related views to allow their edition with the HTML editor
and getting the "toggable views" which appear in the "Customize"
website menu. The parameter "full" allowed to determine which one the
route was supposed to do and was useless until website was installed to
add its feature (by extending the route behavior). In both cases, views
informations are returned, only the number of views differs. The
above-mentionned fix already did part of the refactoring by returning
the same info structure for each view in both cases.

Now, the function has been split. The web_editor customize_template_get
route is renamed as get_assets_editor_resources and returns the info the
HTML editor needs to work (the "assets" term is in prevision of the
new LESS editor).
A new website route "get_switchable_related_views" has been created to
return the info the "Customize" website menu needs.
Both use the renamed ir.ui.view function "get_related_views" (old
ir.ui.view customize_template_get function) which now returns a
recordset and not a list of dictionnaries.
2017-02-14 16:32:15 +01:00
Christophe Simonis a282d4ae7f [MERGE] forward port branch saas-14 up to be9dfb331f 2017-02-10 18:41:06 +01:00
Parth Gajjar 3c9e6c89e7 [IMP] web_editor: improve LinkDialog widget design and usability
Specification
=============

- no boxes around fields
- use regular form style for input fields
- don't split page/URL into two fields, just do one URL field, with autocomplete
- Add alpha, beta, gamma, delta and epsilon color in color selection because they are used in mass mailing and themes also.
- Add a selection option with label "L" inside circle for link.
- Add Color selector for choosing button color
- Remov select2 page selector and used jquery autocomplete on same input
- Fix issue of page search in ir.http
2017-02-10 14:11:38 +01:00
Christophe Simonis 6a942a9e96 [MERGE] forward port branch 10.0 up to 8a0151b4bc 2017-02-02 12:42:51 +01:00
Olivier Dony 76c36079a5 [FIX] website: make GeoIP resolver shared
The GeoIP resolver keeps a permanent open file descriptor on the
GeoIP database file, for example /usr/share/GeoIP/GeoIPCity.dat

Because we initialize a resolver for each registry, servers with
many databases may easily blow up the open file descriptor limit
of multi-threaded workers (gevent or no workers multithread mode).

The Maxmind GeoIP API appears to be thread-safe since v1.1.4, so
it is much less wasteful to use a shared resolver for each process.

This patch keeps the _geoip_resolver class attribute on `ir.http`
for compatibility, but it will be removed for the next version.
2017-01-31 19:21:56 +01:00
Christophe Simonis 6c4389df41 [MERGE] forward port branch 10.0 up to 6804085b8c 2017-01-23 14:33:53 +01:00
Laurent Mignon 273a15ea7d [FIX] website: port of rev a98d60c
The forward-port of the above revision missed
the conversion to the new api

Closes #15064
2017-01-13 14:03:52 +01:00
Denis Ledoux b228f548ca [FIX] website: port of rev a98d60cb11
The forward-port of the above revision missed
the conversion to the new api and that
`context` had to be replaced by `self.env.context`

Fixes #14922
Closes #14923
2017-01-11 11:03:49 +01:00
Raphael Collet d0ca2d115e [REF] ir_config_parameter: remove group_ids and simplify
Add `sudo()` to call `get_param` where necessary, and make the web client use a
controller instead of directly accessing parameters.
2017-01-03 16:52:49 +01:00
Christophe Simonis b3a1109372 [MERGE] forward port branch 10.0 up to c08a590bb1 2017-01-02 15:31:58 +01:00
Christophe Simonis 81f59cee2c [MERGE] forward port branch saas-11 up to b844d93889 2017-01-02 14:38:59 +01:00
Christophe Simonis b844d93889 [MERGE] forward port branch 9.0 up to 3805eb620a 2017-01-02 12:49:55 +01:00
Jeremy Kersten d4b2e16fd6 [FIX] website: compress_html is obsolete
This option is no more implemented since the refactoring of ir.qweb
Gzip (in nginx) do the same and better...
2016-12-28 12:56:06 +01:00
kujiu (@angua.kujiu.org) 65a7531c8b [IMP] website*: Improve the settings form view 2016-12-27 17:09:33 +01:00
Denis Ledoux a98d60cb11 [FIX] website: search pages in the menu creation dialog
The revision
8f48baeda6

broke the ability to search pages in the dialog
allowing to add a menu to the website from the website
(From the website, Content > Edit menu)
as `request.website` was not defined in this case

opw-702020
2016-12-21 14:59:29 +01:00