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
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.
This commit adds required groups on website application menu items
like blog and slides. It also move Website Admin menu definition from
res config views to website views, because it is where it should
always have been defined.
This commit also update some sequences to reorder Apps.
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'
Template "sitemap_index_xml":
<loc><t t-esc="url_root"/>sitemap-<t t-esc="page"/>.xml</loc>
should be:
<loc><t t-esc="url_root"/>sitemap-<t t-esc="website_id"/>-<t t-esc="page"/>.xml</loc>
The fix in python is not elegant but allow to fix without -u of website.
Commit 3c9e6c89e7 made big changes to the
link editor dialog... but also broke many features with it.
Commit 9a1ea6dc08 already fixed some of
them but this commit fixes a bigger one. Indeed, the menu edition
feature was totally broken since the changes. Also, the DOM was messy
which broke form navigation, etc.
This commit also simplifies the LESS which was uselessly big.
The old "HTML" editor now handles LESS edition. The editor has now a
button to switch between XML and LESS edition. By default, it only
displays the odoo files which only appear in the assets_frontend bundle
and in debug mode, it allows to see all the files that influenced the
page design.
The new editor has a new set of options which allows to use it as a
xml editor only or a less editor only if needed.
Also: make the "include bundles" option appear only in debug mode.
Technical details:
- When saving a modified LESS file, an attachment is created with the
full modified content and an extension view xpaths the bundle where
the original file was added to link this attachment instead. This
relies on the fact that qweb, when generating assets bundle,
replaces missing files by the "datas" contents of the ir.attachment's
which have an "url" field equal to the urls it is searching.
- If a LESS error is introduced, the recent changes in assets bundle
generation (see c248674a5c) will not break
the design but only open a dialog on page loading, with the LESS error.
The user can then go to the LESS editor and reset its changes.
This feature code has been started with original work of @pga-odoo
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.
Commit d1a8d54aca broke the feature without mercy.
The mentioned commit introduces a nice improvement to allow the edition
of the company logo directly from frontend. However it also breaks the
option for non-logo parts (example: clicking on the address on the
contact us page). It also leaves most of the option code behind, which
makes useless code being executed for nothing.
This commit restores the company option the way it was and simply
deactivates it for the logo edition, which was the desired behavior.
Purpose
=======
Clicking the company logo takes to the backend's company settings. Users get lost and don't know how to go back to the website.
Specs
=====
It should be a picture selection wizard. If possible the default picture should be the company logo if already set.
Purpose
=======
External links in the data sometimes open in the same tab, the users loses times as he has to come back (and looses the context).
Specification
=============
Any external links in data (planners, settings) should open in new tabs.
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
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.
Since saas-10, you can customize the background size and position
of snippets. The "contain" option was not working for the s_banner
components as overridden to "cover" by the snippet specific style.