before this commit, on clicking button in the forum main
page the url is not updated correctly with the dynamic
variable, as href is used instead of t-attf-href
* open form
* click meet our community members link
* see the url
after this commit, on redirection url will be properly
updated.
closesodoo/odoo#132536
X-original-commit: 944b47346d3d5452a57bbe1ed6a666b17dfcbdc1
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
- Improve last activity column
Allow the columns to resize to fit the date line without wrapping
and set the actual date to the title to appear on hover.
- Header fixes
To avoid the searchbar shrinking too much when there are multiple
elements in the header (long title, tag or search filter, ...), we've
set a `min-width` to it , and the `max-width` has been moved
from the second section of the header to the searchbar instead.
The alignment of the title and the rest of the bar is now aligned on the
breadcrumb's baseline instead of vertically centered.
- Fix dropdown title disappearing on selecting a tag
The dropdown's title disappeared when a tag was selected as a filter.
- Height of container and aside
We've removed the `h-100` on the aside to place it on the parent under
the condition that the `forum_welcome_message` has been dismissed.
Because `<main>` has a `flex-grow` is applied to it,
the `#wrap` has a gap under the content where it doesn't meet the full
height of the main.
This blank space is made visible by the grey background of the aside.
This could be solved by a simple `h-100` on the wrap, but it overflows
onto the footer when the `forum_welcome_message` displayed.
- Add missing pages names
Some titles weren't appearing in the breadcrumb due to misplacement of
the `_page_name` t-set or absence of it.
- Switch static image for animation
The empty moderation pages now have an animated svg instead of a static
one. Fun.
- Hide filter tool on empty mod pages
The moderation pages don't need the filter tool to appear when there
are no results.
- Switch conditionals `and/or` to `if`
Although it works, in python we don't use `X and A or B`
but `A if X else B`
- Other visual fixes
In JS : put back removed classes on voteCount element
Tags: fix the overflowing text when tag is long and switch position with
icon for more readability
Remove useless `not inDropdown` condition on form
Fix inverted plural/singular of `Views`
Other minor alignment fixes
task-3083657
part of task-3316555
closesodoo/odoo#132226
X-original-commit: c2ed6257f8a2fe74a7f4fa2977b44aac1c0bb0c5
Signed-off-by: Florian Charlier (flch) <flch@odoo.com>
before this commit, if the user profile is opened
from a particular forum, the votes tab is displaying
the votes from all the forums for this user.
where us, the questions and answers tab is filtering
the data based on the selected forum.
after this commit, the data displayed in the votes
tab will also be filtered based on selected forum,
similar to questions and answers tab.
closesodoo/odoo#131487
X-original-commit: ae33d2e3832cc2ce5597a6727fd44c9d745d36c5
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
The goal of this commit is to convert a bunch of legacy dialogs into owl dialogs.
closesodoo/odoo#131278
Task-id: 3453920
Related: odoo/enterprise#45484
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
This commit removes the qweb.render method, instead it will use the owl
render engine (renderToString or renderToElement).
Part of task~3443861
Part-of: odoo/odoo#130467
As all the templates are now imported in the owl app, the templates must
comply to owl.
t-key is mandatory when using a t-foreach
Part of task~3443861
Part-of: odoo/odoo#130467
Improve gettext to directly handle value injection within translations,
removing the need for sprintf.
closesodoo/odoo#123932
Related: odoo/enterprise#45370
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
before this commit, in the forum post form view, the
closing related fields, is visible even if the post
is not closed and question field should not be shown
in the parent post.
after this commit, closing fields will be shown only
once post is closed and parent_id and is_correct
field will be shown only in child post(answer)
closesodoo/odoo#129299
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
before this commit, in the forum validation queue filter,
along with the text filter instead of icon some hard coded
value(圾) is shown as text.
* create a user with very minimum XP
* create a post from new user login
* from admin login, click validation queue in the
forum
* click on filter in the validation queue
after this commit, the text will be replaced with fa-font
icon, so that all filters will look similar.
closesodoo/odoo#123636
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
before this commit, on deleting a question from
forum is redirecting to the same question
page with deleted tag.
after this commit, user will be redirected to
forum home page after deleting a question
closesodoo/odoo#118686
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
In this commit, _t import from import { _t } from
"@web/legacy/js/services/core" and from
web/static/src/legacy/js/core/translation.js are replaced by
@web/core/l10n/translation.js.
task-3292454
closesodoo/odoo#130865
Related: odoo/enterprise#45270
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
This commit removes legacy patch/unpatch functions and adapts their use
by using the modern patch. There was also a custom patch function used
in tests which has been replaced too.
closesodoo/odoo#130867
Related: odoo/design-themes#685
Related: odoo/enterprise#45271
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
How to reproduce the bug:
------------------------
- Create a new user
- Log in as that user
- Go to a forum that don't require karma to ask a question.
- Create a new post
- On validation, you'll end up on a 404 page.
If we use the portal user instead, we see the post with a banner explaining
it has to be validated. This should be the result here too.
Specifications:
--------------
- When new users (karma = 0) create a post, redirect them to the page
relating to their question.
task-3372016
closesodoo/odoo#130857
X-original-commit: 9f624795c68d69ddf212657fe43cc45fc32747a0
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
before this commit, even it the user profile is not public,
or if the user karma is less than karma_profile_min set
in the website, on hovering the move on the user image
in the post, the user details is shown in the pop over
after this commit, the pop over information is shown only
if the user's profile is public profile and user karma is
greater than karma_profile_min in website
closesodoo/odoo#126628
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
As steps are encapsuled in an arrow function from
69a5d8e3ce47238 for steps tour definition to avoid
direct Markup(_t()) interpretation, the same is done
for registerWebsitePreviewTour() of
"odoo/addons/website/static/src/js/tours/tour_utils.js"
in this commit.
This is done in anticipation of the use of
_t() (import from @web/core/l10n/translation) with
registerWebsitePreviewTour().
task-3292454
closesodoo/odoo#130248
Related: odoo/design-themes#678
Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com>
This commit fixes a really old grammar error in the help message of the
message_needaction_counter field.
Before this commit: “Number of messages which requires an action”
After: “Number of messages requiring action”
The subject of “require” is “messages”, which is third-person plural, so
it can't take the -s suffix.
closesodoo/odoo#129468
X-original-commit: 0d10cfeaa56d5df23df05f436d353978043f4a71
Related: odoo/enterprise#44509
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
This commit adapts the code in addons w.r.t. the introduction of
the RelationalModel.
Main changes that were requested are:
- record datapoints no longer always have an "id" key in their
data (they still do if the id field is in the view), so we use
record.resId instead
- the new model is based on fined-grained reactivity, so several
components that previously relied on onWillUpdateProps to update
their internal state no longer worked. Typically, using the hook
"observeRecord" is the way to go now.
- specialdata are no longer handled in the model, so the components
needing specialData can use the hook "useSpecialData"
- more generally, all overrides of models (RelationalModel or
KanbanModel) needed to be reworked.
Part of task~3179751
Part-of: odoo/odoo#114024
Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: FrancoisGe <fge@odoo.com>
Co-authored-by: Jorge Pinna Puissant <jpp@odoo.com>
Co-authored-by: Pierre Rousseau <pro@odoo.com>
A typo in forum templates leads to a 404 page instead of redirecting to
the page allowing to delete a closed post.
Follow-up of #123709
task-3316555
closesodoo/odoo#129161
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Fixed a typo in forum templates that prevents users from atlerning
between ascending and descending order when sorting forum posts.
follow-up of #123709
task-3316555
closesodoo/odoo#129116
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
The _xmlid_lookup cache contains the id of the ir.model.data with is
unused, making cache pupulation and usage more complex than needed.
Removing this id in prevision of the next commit
Part-of: odoo/odoo#129029
The goal of this commit is to prepare ground to remove
lazytranslate function _lt() and keep only _t()
for a better understanding of the use of the translation function.
In this commit,
the translate function _t() has been updated to return the translation
if they are loaded. If not, it throws an error.
the lazytranslate function _lt() returns _t() function.
Corollaries :
Steps in test tours are now a function that returns an array of steps
to avoid any interpolation of _t in this ones before translations has
been loaded.
Example :
registry.category("web_tour.tours").add("example", {
test: true,
steps: () => [
{...},
{...},
],
});
task-3292454
closesodoo/odoo#124157
Related: odoo/enterprise#43153
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
The goal of this commit is to remove all dependency to legacy in the
wysiwyg because the wysiwyg has to be loaded on a lot of form view
(through the html_field).
To remove the dependencies, all the legacy widget that the wysiwyg
uses had to be converted to owl. In order to finish the PR faster,
only a partial conversion of the widgets is done, changing only the
part of the code that was necessary for it to work instead of
rewriting the whole widget from scratch. Another pass should be done
to convert all those widgets to fully embrace the owl paradigm.
task-3175256
Part-of: odoo/odoo#118966
# forum.post
search_can_view: improve readability
convert_answer_to_comment: remove unused parameter
unlink_comment: extract operations from loop; early return
# forum.post.vote
write: simplification upvote computation
_check_karma_rights: upvote is a flag
# ir_attachment
_can_bypass_rights_on_media_dialog: grammar
# website_forum controller
questions: simplifications
_prepare_open_forum_user: 'my_profile' isn't used since c8c8eb3d
question_edit_answer: avoid failure on unmatched `answer`
Usage of f-strings when multiple string concatenation or type cast
removing ask_hide which seems really dead
Also, various changes to follow PEP8 for imports and indentations.
Task-3271492
Part-of: odoo/odoo#123709
Purpose
=======
1. The post "activity" date shown on a forum's list of posts is not a
great user experience as it is seems to be updated for writes on the
original post and not, e.g., when a reply is added.
2. Remove bumping on social sharing.
As we are not in 2015 anymore, sharing is not a relevant "activity"
for the post. This is illustrated by the fact that `allow_bump`
could not be updated with the client, and the "default" "target_type"
is not found in the codebase anymore. We clean that here.
Specifications
==============
- Drop bump_date and use last_activity_date instead of write date
to log activity
- Update post last_activity_date whenever a reply or a comment is
added to the original post or one of its replies
- Sort posts lists by `last_activity_date desc` by default
- Use luxon.js library to render the bump_date field as a
`relative datetime`(e.g.: 2 days ago, 1 hour ago...)
Task-3349374
Task-3316555
Part-of: odoo/odoo#123709
Co-authored-by: Florian Charlier <flch@odoo.com>
This commit enables user to
* Track, show, and use the forum's
* Most commonly used tags
* Unused tags (for the moderators)
* Search tags
* Get an improved "no results" experience with tags
Task-3349375
Part-of: odoo/odoo#123709
* = website_slides_forum, website_mail, website_profile
In `website_(slides)_forum`:
All forums page:
Course forums are displayed on the same level as regular forums (with
a tag "Course" to differentiate them).
We don't see this page if there is only one forum.
This new design resembles that of Discourse with a table for the list
of questions and a sidebar on the left.
Other pages such as the Tags, FAQ, and Moderation pages have also been
revamped. Some of the functionality comes in the following commits.
Notes: The table rows have been made fully clickable, but by doing so
other clickable or hoverable elements lose their function.
In order to counteract this, a `position-relative` and
`z-index-1` classes are added to them.
The image_url definition wasn't working properly: When a user didn't have
and avatar, a placeholder with their initial is generated. But it did
not take the size option defined in the widget. This has been
corrected by changing it to `request.website.image_url(...)`
In the posts' page, the answer box now comes up from the bottom of the
screen.
In the FAQ pages, the accordion has been replaced by BS accordion
component using `accordion-item` instead of cards. The web editor
however is still using the old system.
In `website_mail`:
A new template for the follow button has been created in order to
redesign it for the forum without disrupting this element in other
modules (ie: website_mail, blog).
Task-3083657
Part of Task-3316555
Part-of: odoo/odoo#123709
Co-authored-by: Florian Charlier <flch@odoo.com>
before this commit, on clicking the publish/unpublish
buttons from the tree view of the forum post, is showing
traceback due to missing is_published field in the
forum.post model.
publish/unpublish buttons in the action menu is added
by the js class website_pages_list.
after this commit, the js class is removed from the
tree and thus no publish/unpublish button is shown
in the action menu.
closesodoo/odoo#128540
X-original-commit: ada177c9a840347330942a8e1db2204bf0c280e0
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Specify explicit route for each ,, line
This is part of task 3230280 where global ir.model.access will be
forbidden.
The goal is to make access to public/portal explicit. Too often,
global access was granted with only employees in mind.
Remove ,,0,0,0,0 lines
mail:
employee already had read access to mail.group
still needed to subtypes as in ir.rule domain
mail_group: employee already had read access
pos_mercury: only needed for employees
membership:
move public access for website_membership as needed in the controllers
website_customer: employee already had read access
website_event_booth: no need for category
website_event_exhibitor: retrieved in sudo
website_event_track: not needed for location
Part-of: odoo/odoo#125216
This change introduces ability for users (who don't have enough karma)
to create one pending post per forum.
Previously users could only do it in all of forums.
ticket-3354435
closesodoo/odoo#124112
Related: odoo/upgrade#4841
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
Post counts were not updated when a post was created or deleted
because of missing dependencies in the _compute.
Note that while "active_test" is included when counting without
specifying it, the field must be explicitly added to the `_compute`'s
dependency list to trigger it.
Task-3358143
closesodoo/odoo#125968
X-original-commit: 6e1d976131dccecec35d12b8a03328ce9882d055
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
Signed-off-by: Florian Charlier (flch) <flch@odoo.com>
*: account, crm, crm_iap_mine, event, hr_expense, hr_holidays,
hr_recruitment, lunch, mail, mass_mailing, point_of_sale, project,
purchase, purchase_stock, sale, survey, web, website, website_blog,
website_event, website_forum, website_sale, website_slides,
test_main_flows
In odoo/odoo#111103 the tour system was rewritten. The previous tour
system used to depend on the `root.widget` js module, and this module
was an async module that indirectly depended on `session_bind` which
would load the translations, meaning that the js module definition code
of the tours would only run after the translations were loaded. This is
no longer the case with the new tour system, this means that the module
definition code is executed as soon as the dependencies of that module
are fulfilled, which is generally befoe the translations are loaded,
causing most tour tips to not be translated.
This commit adds a hacky workaround for this problem: it creates a new
module that has a default export which is a promise, and has a legacy
alias, this creates an async module that waits for the translations to
be loaded. This module is then imported for its side-effect in all
onboarding tours, causing them to be translated correctly once again.
This commit also needs to convert the steps key in the tours internal
registry to a getter. In previous versions, the steps were directly
added as is to the internal state of the tour service, but since
odoo/odoo#122834 the steps are now mapped, and without a getter, any
edits to the steps occurring after registration will not be taken into
account. This causes issues in some modules that change original
behaviour of other modules (eg accounting makes invoices into a menu in
the accounting app instead of a top-level app in the home menu) as they
need to edit the steps of existing tours to make them work.
In a separate PR, we will implement a more proper fix by changing the
API of the tour manager so that we no longer need this workaround.
closesodoo/odoo#125284
X-original-commit: d130699ba82dc9919c9116f4b64a5e461ebb6319
Related: odoo/enterprise#42655
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
before this commit, karma_user_bio was not added in the
forum forum view and the default value set for the field
was 750, this field decide whether the pop over has to
show or not when user places the mouse hover the author
box in the frontend forum post.
after this commit, as the field is added to the view
end user will be able to adjust the value as per the
need.
closesodoo/odoo#123638
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit permits to enlarge the answer textarea in the forum.
Steps to reproduce the "issue" resolved by this commit:
- Go to /forum
- Click on a thread
- Click on "Answer"
=> The textarea is too small to write a long answer.
task-2865782
closesodoo/odoo#124740
X-original-commit: faaf76c0043d72da7cec587c327d6b508b2ca0fd
Signed-off-by: Dieleman Guillaume (gdi) <gdi@odoo.com>
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
In the website forum, we checked that the post content is not empty
before posting a post or an answer. Before this commit, it was just a
verification that the content is not an empty string.
Users are also able to post an image and we want to allow them to create
a post or an answer with only an image. This commit changes the
verification to check if the content is empty or if it only contains
images.
Steps to reproduce the issue resolved by this commit:
- Go to the website forum
- Create a new post
- Set a title
- Add an image as description
- Click on "Post Your Question"
=> The post is not created because the content is considered as empty.
task-2865782
X-original-commit: 048c6b779423ff34dd80f51e2a9202e16553a3ae
Part-of: odoo/odoo#124740
Jquery find return an object instead of an array of element.
When you map on this object, the first callback element is
so the index and not the element. This commit fix wrong usages of
.map() used with Jquery.
closesodoo/odoo#124359
X-original-commit: b87dac213dcc8a197dc7c00245a392d1e4d86925
Signed-off-by: Géry Debongnie <ged@odoo.com>
When a portal user asks a question (e.g. on the Help demo forum) and
go back to the forum's home page while their post is to be validated
before they can post again, they're hit with a traceback (because the
offset argument type is incorrect).
Probably coming from switching bootstrap version.
Task-3347773
closesodoo/odoo#123831
X-original-commit: b14edd74d00c0b0054827563f032f2c384503360
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This method was supposed to work in multi (see history) but that
behavior was lost somewhere.
Voting for several posts at the same time doesn't mean much in the end
and the function wouldn't work anyway because:
1. Return values wouldn't work in multi
2. It would try to vote n times for each of the n posts in self and
violate unique constraint.
3. If the last existing vote had opposed value to the new vote,
the method would create only '0'-valued votes for all the new
records.
We here then clean it make sure it is not called on several posts.
A test is extended to check votes and records counts.
Task-3267872
closesodoo/odoo#123725
X-original-commit: dc049ce98292e08f5ecf2f20005dc227375dde75
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Florian Charlier (flch) <flch@odoo.com>
before this commit, on clicking on Go To Website
smart button in forum is not redirecting to the
corresponding forum due to missing parenthesis
to the function.
after this commit, on clicking the Go To Website
smart button, user is redirected to the forum.
introduced in: https://github.com/odoo/odoo/commit/36c734ab37fdf1d6a245e0e29cfefe3cc46c6d92closesodoo/odoo#122108
X-original-commit: 6ab323a0eeafe7511db8dd893d8f398544ee08c2
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Currently, only stable releases see their translations updated. This has
resulted in master accumulating outdated stuff for years, which can be
confusing for users testing master on runbot.
This one-shot commit resynchronizes master translations based on the
content from 16.0 and removes empty PO files (i.e. no longer containing
translations).
closesodoo/odoo#121629
Related: odoo/enterprise#41171
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
The introduction of Milk has brought new app icons.
Using the svg format creates a lack of anti-aliasing on the edges of the
shapes, which makes the icons look bad.
Since the png size has been reduced, we can afford to use the png format
to have the best possible quality without having a lack of performance.
task-3326633
Part of task-3326263
X-original-commit: e07cb722f2b11407a3ad093bd688b7d37afd5a88
Part-of: odoo/odoo#121886
Before this commit : The library underscore.js and
underscore.string.js were used in the ODOO solution.
After this commit : Every usages of a function from
underscore.js lib has been replaced with native javascript.
The goal is to remove all usages of underscore.js and to
not use anymore this library in ODOO.
---
TaskId : 3246238
closesodoo/odoo#120437
Signed-off-by: Géry Debongnie <ged@odoo.com>
before this commit, on editing a forum post
window title is shown as edit_post(id) as the
name is not set on the template.
after this commit, window title will be shown
as Edit Post.
closesodoo/odoo#114624
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit adapts the directional icons to improve the usability and
maintain consistency with the ui icons library.
task-2818586
Part-of: odoo/odoo#116641