Commit Graph
393 Commits
Author SHA1 Message Date
Christophe Simonis 44b77d3702 [MERGE] forward port branch saas-15 up to 1de78253ff 2018-07-17 17:08:50 +02:00
Christophe Simonis 7f7b705236 [MERGE] forward port branch 10.0 up to 633a65d231 2018-07-17 16:36:29 +02:00
len-odoo d5baec40ab [FIX] web_forum: disallow tag editing of questions if karma is unsufficient
When editing his post, a user can modify the tags even if he doesn't have
sufficient karma to do so.
Since the backend raises an error, it sends the user to a 403 forbidden page.

opw 1866019
2018-07-17 16:02:01 +02:00
Priyanka Kakadiya 7f632f909e [FIX] website_forum : fix karma alert-box position
Currently, if user does not have enough karma to perform specific action on
forum, alert-box with appropriate message is displayed to the user.

There are several issues with these alert-boxes, like :
- Click on same CTA multiple times, creates multiple alerts
- Click on another CTAs keeps previous alerts on the screen, and adds
  further alerts, which sometimes overlaps adjacent CTA and looks ugly.

After this commit :
- Alerts are displayed below their related CTAs
- Only one alert appears at a time on the screen

Fixes : #23071
PR    : #23800
Task# : 1829835

This commit closes #23071
This commit closes #23800
2018-05-08 12:38:13 +02:00
Jeremy Kersten 612cf8acbf [IMP] website_forum: don't index private profile 2018-05-07 09:09:38 +02:00
Christophe Simonis 2dbc1edef9 [MERGE] forward port branch saas-16 up to b503e79722 2018-02-05 13:42:10 +01:00
Christophe Simonis b503e79722 [MERGE] forward port branch saas-15 up to 81003c82e0 2018-02-05 13:08:32 +01:00
Christophe Simonis f22cf5f711 [MERGE] forward port branch 10.0 up to e5f2e6d390 2018-02-05 12:02:02 +01:00
Christophe Simonis e5f2e6d390 [MERGE] forward port branch 9.0 up to b08185fc66 2018-02-05 11:30:42 +01:00
qsm-odoo 76665df0cf [FIX] website_forum: allow portal users to post replies to replies
Before this commit, when connected as a portal user, the user was not
able to post replies to existing replies. This is because the textarea
section was marked to be displayed for connected internal users only.
This commit removes the whole group restriction. Indeed, it makes sense
(as a fix), to show the textarea section for public users too. Indeed,
the "Reply" button is already shown to public users but does not do
anything. With this commit, clicking the "Reply" button shows the
textarea section for everybody and, if the user is not connected,
redirects to the login page when posting the message. This of course
needs usability improvements in master.

Note: the problem had originally been fixed for regular answers with
commit https://github.com/odoo/odoo/commit/b81b03c82d282dc94595a9beb94444041509ef25

Note 2: both mentioned problems were originally introduced by commit
https://github.com/odoo/odoo/commit/9069d0127c176317436b67b23ae5677dd9d53de7

Closes https://github.com/odoo/odoo/issues/22648
2018-02-02 11:04:31 +01:00
Christophe Simonis 6e25eb9b05 [MERGE] forward port branch saas-16 up to 4c410ee6a1 2018-01-09 17:03:07 +01:00
Christophe Simonis 4c410ee6a1 [MERGE] forward port branch saas-15 up to 38b201abce 2018-01-09 16:30:50 +01:00
Christophe Simonis e671cdcc44 [MERGE] forward port branch 10.0 up to 849d8ffd21 2018-01-09 15:12:51 +01:00
Christophe Simonis e3080d8433 [MERGE] forward port branch 9.0 up to 35c829f12b 2018-01-08 11:15:33 +01:00
Jeremy Kersten 7a31bc60fb [FIX] website_forum: fix tooltip user info
Before this commit, all tooltip users was showing website and parent_name from
the Main company and not the current focsed partner.

This commits closes #18430

@kangol: fwd-port company_name
2018-01-03 16:14:42 +01:00
Nicolas Seinlet 6488682cd6 Backport 2d66d9a63e
[FIX] *: do not use groups when extending an asset bundle
Using groups when declaring an extension of an asset bundle leads to a
different generated asset bundle according to the user's group. This
is not something we want because a dynamic asset bundle's content
means that it could (and it does) trigger unwanted cache invalidation.

website_event, website_blog, website_forum and website_sale add
functions to . These functions are bound to
server side qweb nodes protected by groups. We can always add the
functions; if a user tries to use the routes he should receive a
traceback because of lack of access rules

website_blog adds a  module, but is guarded by
the presence of a node in the DOM. We use the same logic to guard the
module added by website_sale with the  node.

website_gengo is working as expected.
2017-11-07 10:57:06 +01:00
Christophe Simonis 10128fa7e8 [MERGE] forward port branch saas-16 up to dc2a6c6cd2 2017-10-20 19:27:04 +02:00
Christophe Simonis 868e718e09 [MERGE] forward port branch saas-15 up to 8d0942380b 2017-10-17 15:14:47 +02:00
Christophe Simonis fbdda5437a [MERGE] forward port branch 10.0 up to cbca27d005 2017-10-17 12:09:58 +02:00
Christophe Simonis cbca27d005 [MERGE] forward port branch 9.0 up to d5c0cae60b 2017-10-17 11:42:05 +02:00
Jeremy Kersten dc5bb0d6b2 [FIX] website_forum: add missing karma_answer field in form view
This commit closes #19672
2017-10-13 11:46:23 +02:00
rde 4ecbacaf59 [ADD] website: add new page management
website.page = old ir.ui.view with page=True
website.redirect is a new mechanism to replace in the futur the ir.attachment
mechanism of redirect.

From now, we don't have a specific /page controller to serve 'page'.

We use a new model website.page which is rendered if none route matches the url
 and that the field 'url' on website.page matches the request.httprequest.path.

The order to serve a path is:
    - Routes defines in controllers (/shop, /blog, ...)
    - ir.attachment with name matching the path
    - website.page with url matching the path
    - website.redirect with url_from matching the path
    - 404

To improve:
    - allow regexp in website.redirect model
    - allow to edit the view_arch from the page.management via redirect backend
      (needed when traceback in the page, or when modifying a js/css/less/...)
2017-09-15 15:29:37 +02:00
qsm-odoo 2972976962 [REF] web_editor, website, *: complete refactoring
* mass_mailing, payment, point_of_sale, portal, survey, web, web_tour,
  website_blog, website_crm_partner_assign, website_event,
  website_event_questions, website_form, website_forum, website_gengo,
  website_hr_recruitment, website_links, website_mail,
  website_mail_channel, website_mass_mailing, website_quote,
  website_sale, website_sale_options, website_slides, website_twitter

This commit reviews the whole "JS side" of the web_editor and website
apps. This is a first step to be able to improve them with new and
better functionnalities; this commit is not supposed to change any
visual behavior.

The main goal was to achieve a structure similar to the backend one.
Now, the frontend side also has a root widget (like the WebClient)
and all other widgets are attached to it one way or another. This allows
the benefits of using the 'trigger_up' functionnality for example.

As RPC are now mainly done with the `this._rpc` functionnality (being
possible thanks to the parent hierarchy), the frontend will also be
possible to test thanks to QUnit in a future update (besides the "text"
editor side which still requires a refactoring to be able to do that).

---

Here are some of the changes:

(-) conventions and documentation

The code has been updated to follow JS conventions and a lot of code has
been commented (around +2000 lines of comment). This also means that
lots of functions have been renamed to use camelCase or simply to make
their name understandable.
See https://github.com/odoo/odoo/wiki/Javascript-coding-guidelines.

(-) deprecated: web_editor.base

The "web_editor.base" module has been split and does not force the
modules which require it to wait for DOM ready anymore. This was indeed
slowing loading times, but also prevented to use some modules in some
contexts (see the LESS editor use in web_studio which is the subject of
another task).
Now the "editor context" can be got thanks to the "web_editor.context"
JS module with its "get" function.
The "web_editor.base" module should probably not be used anymore (see
its code and recent updates).

(-) new: web.dom_ready

If a JS module should wait for the DOM to be ready to be executed, a
new JS module has been created: "web.dom_ready". This should always
be used in a module which only want to instantiate stuff. Do not
extend (or worst, include) classes after DOM ready.

(-) website.website

The "website.website" module has been split. "website.website" does not
return anything useful anymore, it just initialize some miscellaneous
stuff, without waiting for the DOM to be ready. You might want to check
"website.utils", "website.content.compatibility" or `WebsiteRoot`. Also
`website.form` has been deleted (use `this._rpc`), so has been
`website.error`. `website.prompt` will be removed in a future update to
be replaced by `Dialog.prompt`.

(-) widgets are great

Many classes which were not widgets are now widgets. This allows them to
use the 'events', the 'xmlDependencies' and the 'this._rpc' features for
example. Here are some of the main ones:

- Snippet options: these were classes with a `$el` for the menu element
    and `$target` for the customized element. This is still the case
    but following standard `Widget` structure (one exception: using
    `this.$(...)` searches in the `$target` as before this update).

- Snippet animations: instead of class instances with a `$target`
    element which can be `start` and `stop`, these are now standard
    widgets which can be `start` and `destroy`. `this.$target` is
    an alias to `this.$el` for ease of compatibility.

- Snippet editors: instead of class instances in charge of an editor
    overlay, these are now widgets. Each "child" snippet editor is
    properly attached as a "child", which allows editors to communicate
    and to be properly destroyed.

(-) root widgets and website navbar

The frontend is different of the backend. In the backend, the page has
an empty <body/> element and all the components are instantiated from
parent to children (i.e. the `WebClient` is instantiated and is in
charge of instantiating the `ControlPanel`, etc). The frontend cannot
work like that on page loadings as they are way more frequent than in
the backend and we do not want them to flicker. A frontend page is
loaded as a <body/> element which already contains the website navbar
and its menus and the whole content page. JS code has to be "attached"
to these existing elements. This is possible thanks to the `RootWidget`
instances and the specialized `WebsiteRoot`, `IframeRoot` and
`WebsiteNavbar` (see code for details).

(-) lazy loading

No more (or at least a lot less) XML/JS has to be loaded on page
loading, thanks to the use of the `Widget.xmlDependencies` feature.
XML which have to be lazy loaded is loaded only on related Widget
instantiation if necessary, which allows to execute a lot of JS code
before the DOM is ready and to start many widgets on DOM ready (not
later). A visual benefit of this is clicking on the 'edit' button as
soon as it is possible: before this commit, this was sometimes not
doing anything as event handlers were not binded yet.

Still a possible exception: loading the session and locales. This may
be asynchronous stuff which is still required before widget
instantiations but this will be the subject of another task.

(-) deprecated code and code location

More than reviewing code and organizing it, many apparent dead code was
removed. More importantly, mislocated code was put in the right app.
This is the case for snippet animations which is a concept for website
apps but was defined in the web_editor app, or some translation concepts
which were part of website but should have been part of web_editor.

---

There are probably more things to say about this commit but I will let
the comments speak for those.
2017-08-16 11:04:14 +02:00
Martin Geubelle a29f7f671b [FIX] *: explicit color_field attribute for m2m_tags
Since the previous commit, the `color_field` needs to be explicitly stated
in the options for the tags to be colored.

The previous behaviour (always read the field `color`) was leading to server
warnings if the field was not present on the comodel.

Thìs commit set the `color_field´ for every many2many_tags on fields that have
a `color` field on the comodel.
2017-07-07 13:40:50 +02:00
Christophe Simonis 278e478d55 [MERGE] forward port branch saas-15 up to b141b24706 2017-06-27 12:41:47 +02:00
Christophe Simonis b1f738d1ca [MERGE] forward port branch 10.0 up to 89a99407ce 2017-06-27 11:39:43 +02:00
Xavier Morel 89a99407ce [FIX] website_forum: yet more untranslatable terms 2017-06-27 10:36:24 +02:00
Christophe Simonis cc38b93ab2 [MERGE] forward port branch saas-15 up to 49f819a7a7 2017-06-09 16:43:27 +02:00
Christophe Simonis b6c7d71899 [MERGE] forward port branch 10.0 up to cd1a8f6252 2017-06-09 13:28:06 +02:00
xmo-odoo 1612f2cdf7 [FIX] website_forum: untranslatable strings
OPW-746261
2017-06-08 11:42:25 +02:00
Adrien Dieudonne f624e8a575 [FIX] *: unsupported type for graph views
In the new implementation, the type is checked to prevent loading
a view type that does not exist.

In the old implementation, the type was ignored resulting in a graph view.

So, before this commit, some views were no longer loaded.

The 'pivot' type should not be used since there is a dedicated pivot
view.
2017-04-11 19:44:38 +02:00
Christophe Simonis 2f68e9e93a [MERGE] forward port branch 10.0 up to 72fa3e8bda 2017-03-28 17:27:19 +02:00
Nicolas Martinelli ffaa65833d [FIX] website_forum: missing translations
The attribute `data-content` is not part of the translated attributes.

The fix is similar to e8f1c5dbc6

opw-710314
2017-03-22 10:00:38 +01:00
Jérome Maes 7534f627b3 [IMP] base,forum: improve user preference view
Karma is now displayed on preference view. Also,
add a empty group to allow other module to set their
preference parameters on this form view.

Little big details are important !
2016-12-30 17:02:25 +01:00
Christophe Simonis e348330b57 [MERGE] forward port branch 10.0 up to 6a18e31 2016-11-22 17:59:41 +01:00
Jeremy Kersten 2edc4b0234 [IMP] website_forum: add message for moderator
task-29810
2016-11-22 16:44:25 +01:00
fwi-odoo 07e1ad4248 [IMP] website_forum: display 'comment' button under answers correctly
Fix up the commit https://github.com/odoo/odoo/commit/a4b8641e75109ea0251b934a73347e1985186a9b.
When no comment for an answer, the 'comment' button stays aligned with the others.
When there is a comment for an answer, the 'comment' button is under the last comment.
2016-11-09 11:40:06 +01:00
Ankit Joshi b8febebd03 [IMP] website_forum: In Discussion, add a comment 'Post Answer' button should be 'Post Comment', and In Reply 'Post Comment' button should be 'Post Answer'. 2016-11-09 11:40:06 +01:00
Ankit Joshi 4de7f81e8a [IMP] website_forum : In discuss change the label 'Reply' to 'Comment'. 2016-11-09 11:40:06 +01:00
Ankit Joshi f652a9ce34 [IMP] website_forum : if user have not enough 'Karma' then 'Reply' button should be disable, Hide the answer textarea and generate the popup message. 2016-11-09 11:40:05 +01:00
Dhaval Panchal a4b8641e75 [IMP] website_forum: move comment link at bottom of the thread
Usability Issue: comment link in forum
 It’s more intuitive to find a link to comment a thread at the bottom of the thread.
2016-11-07 11:28:20 +01:00
Dhaval Panchal c8d0fd4a50 [IMP] website_forum: Change profile picture for forum users. 2016-11-02 11:11:27 +01:00
Kinjal Mehta b87e6e02a8 [IMP] general: Place (Un)Archive button as last button by default
PURPOSE
=======

Usability Issue of  "Archived" button. People tend to click on it accidentally

+ Also rename `Unarchive` into `Restore`
2016-10-21 09:34:13 +02:00
qsm-odoo fb363b572b [FIX] *: adapt odoo interface violet
Change color #a24689 to #875A7B

Commit https://github.com/odoo/enterprise/commit/8ac1c19fac7615fecd51e670f798d13158a4e53c
changed the odoo interface violet by changing the main LESS variable
but forgot there was many direct occurences in XML/HTML/... (for
example for the mobile browser color).

Even if it's community the odoo interface violet is used at many places
(module description, XML demo data, ...).
2016-10-05 10:29:00 +02:00
Jeremy Kersten 5c11310070 [FIX] website_forum: make moderation queue async
Don't refresh page between each validation.
2016-09-28 17:26:13 +02:00
qsm-odoo d04a42022b [REF] website, *: review website access rights
* event, website_event, website_forum,
* website_hr_recruitment, website_sale

Website access rights were buggy. The editor assets and website editor
assets have to be loaded together to work so the previous behavior
which only loaded one with the restricted access right was not right.
Also, people which had the "Manager" access right for model like event
or job only got access to creation and edition of those objects if they
had the full access to website access rights.

Now the website module creates the two same groups :
* group_website_publisher: load all editor assets, give access to
page creation for model the user has access (event, job, ...) and
edition of those pages
* group_website_designer: implies the first one and give access in
creation and edition of all pages + access of all website menus

The manager access rights for event, product, jobs, etc now implies
the group_website_publisher group for the user (so that the manager
have the editor assets and editor ui).
Note: some python codes use the group_website_publisher for no right
reason, this has to be adapted.
2016-09-28 15:56:04 +02:00
Martin Trigaux 11812b0b9e [FIX] all: remove external ids fakely from base
Several modules defines records with the external ID `base.foo_bar` while it is
created inside this module (typically menus and groups).
While there is no technical reasons to do so but this may introduce issues:

- these records will not be deleted during uninstall
- if a language is loaded before the installation of the module, it won't be
  translated

The uninstallation will only remove the records with an external id linked to
this module (these would only be removed when removing base).

Installing a language before the module will drop the translations not linked
to an existing external id (as it can not be resolved).

This commit correct all the external ids tagged as from base or other incorrect
modules.
2016-09-02 16:14:26 +02:00
Christophe Simonis 235ed4b2c1 [MERGE] forward port branch saas-12 up to 9ad5f26 2016-08-20 18:08:19 +02:00
Thibault Delavallée efd55ab8a5 [REF] various: rename openerp node to odoo in xml files 2016-08-10 15:48:10 +02:00
Christophe Simonis 53015e11a9 [MERGE] forward port branch saas-11 up to eb83ab2 2016-08-03 16:16:30 +02:00