As gamification karma-based features can be used outside of forum let us
move demo and data directly in gamification. It will be used notably for
eLearning.
This merge provides new modal to create slide channel from the 'New' website
menu, like blogpost or forum. It also improves the upload slide widget from
channel homepage.
This merge also brings new slide type 'webpage'. This allow user to create
completely customized content as a slide.
This merge is linked to Task-1938643. More generally it is linked to the
eLearning feature [1]. For more details see subcommits.
[1] see task ID 1902304 (main eLearning task) PR #29876closesodoo/odoo#30991
With new slide type, it was required to change the
upload modaL. Now, the use select first the type
of document he wants to upload, then the correct
form appears. When filled, user can sumbit it to
be redirect to the slide he just create.
Task-1938643
The idea is a slide can be a HTML page completely customized by
user. So, you can now easily create custom content and publish
it on your website, like a normal slide.
Task-1938643
Having a unique constraint for a slide name in a channel look strange.
It force an RPC call to check this when uploading a slide, making the
process a little bit slow.
Morevover, name is a translatable field on slide.slide model, so the
constraint can not be fully respected.
To simplify the model, we decided to remove this.
Task-1938643
A slide can now have some external link. For instance, links to
the origin of the document (sources for scientifics papers, ...).
A new model is added to allow the user to provide several link
per slide. Those are display below the channel on website page.
Task-1938643
This commit provides the abilty to create channel from the website
instead of creating a slide. To do so, the user still have the "upload"
button on the channel home page.
The new modal allow user to set title, description, type and channel
tags. We prevent channel tag and group tag creation on the fly, as it
can impact the UI (coming in a future commits).
Task-1938643
Add a new widget for binary fields. It open a dialog box and the user can sign manually,
or an signature can be draw automatically or he can upload a picture of his signature.
Move fonts, controller, scss,templates about signature from portal to web to avoid redundance
closesodoo/odoo#30222
Purpose :
Allow the user to generate a certain number of leads based on certain criteria like localization, technologies used, or size.
Available filters are :
- company size
- localization (country and states)
- industries
- technologies
The user can also ask for a few contacts that can be filtered based on
their role or seniority.
Each company found generates a new lead/opportunity for which the sales
team, salesperson and tags can be preset from the lead mining request.
This commit includes the followings changes :
- New module crm_iap_lead
- New model crm.iap.lead.helpers which contains helper methods used by
both modules crm_iap_lead and crm_iap_lead_website
- New model crm.iap.lead.mining.request that holds the data of a lead
mining request
- An option in the CRM settings to install this feature
- New button 'Generate Leads' in the leads/opportunity ListView and
KanbanView that opens a modal allowing to create a lead mining request
- New section 'Lead Generation' in menuitem 'Configuration' of CRM
TaskID : 1902172
closesodoo/odoo#30189
Purpose of this merge is to provide a completely new and improved user profile
page linked to gamification, slides and forum. Those frontend applications
now heavily rely on website profile and add their own custom content like
channel or forum participation or challenges results. This merge is linked
to the currently under development eLearning feature [1][2].
This merge contains notably
* review website profile page centralized in a new module : website_profile;
* move everything that was linked to the profile from website_forum in
website_profile;
* properly add forum informations in website_forum through inheritance;
* add channel / course informations in website_slides through inheritance;
A new bridge module is added that is website_slide_forum. It makes a link
between those two applications. Publishers can create a forum linked to a
course allowing participants to communicate and ask questions related to a
course.
Profile page is contextualized. When coming from a channel informations about
this channel is displayed. Linked forum information is added. When coming from
a specific forum only information related to this forum is displayed.
Otherwise a profile page with aggregated information is displayed.
Some other improvements are done: ranks, karma, badges from gamification are
included in forum and eLearning, 'new badge notifications' mechanism is removed
as email are send, and various other improvements. See sub commits for more
details.
Merge linked to task ID 1922159.
[1] see task ID 1902304 (main eLearning task) PR #29876;
[2] see task ID 1936153 (new homepage for slides) PR #30770;
closesodoo/odoo#30988
This commit change widget to many2one_barcode in these views:
- sale_order
- purchase
- invoice
- expense
In the fields register 'many2one_barcode' is mapped to many2one as fallback.
many2one_barcode is implemented in odoo enterprise
Task ID: 1924766
closesodoo/odoo#31018
Since 56645335b7, when a user get a badge,
an email is sent. The subtype is not used anymore, so the alert
mecanism in forum to display a message to the user to show him
his new badges can not work.
This commit removes this dead code.
Task-1922159
Adds the mega power to make Super Saiyan fusion between website_slides and website_forum
A slide.channel can now be linked to a forum to allow users to discuss about their courses.
Overrides the slides profile routes to include the potiential linked forum.
The profile page will display now all the information of a specific channel with, also, all the
information of the linked forum. If no channel is specified, the profile page shows
everything (information about all channel and information about all forum).
Task ID : 1922159
PR #30988
Adds slides ands slide.channels specific information (courses) into the website_profile template page.
As there can be more than one slide.channel,the profile page shows everything linked to every slide.channel,
except if the channel_id is given in url arguments.
Adds the 'Go to eLearning' button in the 'new rank reached' mail to encourage the users to continue
to be active on the eLearning platform as well, to gain more karma point and improve there rank.
Task ID : 1922159
PR #30988
Adds forum specific information into the website_profile template page.
Removes everything linked to profile that is already in website_profile module to avoid duplicates.
As there can be more than one forum, the profile page shows everything linked to every forum,
except if the forum id is given in url arguments.
The old route (forum/forum-1/user/user_id) have been kept for backward compatibility reasons.
Adds the 'Go to forum' button in the 'new rank reached' mail to encourage the users to continue
to be active on the forum as well, to gain more karma point and improve there rank.
Image rpc calls have been reviewed for profile page part to use only the standard way to get image
-> web/image/model_name/id/image_size
Task ID : 1922159
PR #30988
Move Profile part from website_forum into this module in order to be usable in other modules
(like website_slides) that will depend of this module.
Applies gamification.ranks on website_profile page. Show the current rank and the next rank
but also the progression until the next rank. Adds also an 'about rank' page to allow users to know
more about available ranks.
The goal here is to make the profile page more modular and to allow other modules to add informations
or modify easily link or part of profile page in order to be specifically contextualised
for the module in question.
Task ID : 1922159
PR #30988
- add menu to configure ranks in gamification tools because was missing
- move admin karma data in gamification : karma linked to gamification
and not forum anymore
- fix rank computation : next_rank_id could never been recomputed correctly
if rank are created in a karma ascending order.
Task ID : 1922159
PR #30988
The Live chat history was taking too much space and was hard to read.
The goal here is to display more information on the screen.
The pictures and padding are then reduced.
Note that kanban view is not a solution in long term.
At it does not allow to squash messages per user (if consecutive
messages from same user at close interval of time).
As the thread widget will be reviewed by discuss team in a
near future, we keep this at the moment and will integrate the
new thread widget later, mainly to be able to squash the messages.
Task ID : 1913869
Closes PR #30343
Improve the configuration setting of google drive to make it more userfriendly
Display a message when google drive is enabled but no token have been generated
Task: 1894961
closesodoo/odoo#29562
This merge change the mobile kanban tabs UX by allowing to scroll
through them and go directly from a column A to B. It also improve the
readability independently of the title's length.
This behavior is heavily inspired by Material Design.
See: https://material.io/design/components/tabs.html
It's also an opportunity to refactor the mobile kanban renderer code to make it
more robust and readable.
Task: 1893168
closesodoo/odoo#29024
The mobile kanban title tabs required to move from column to column
1-by-1 to go from the first to the last column. Focusing everytime to
only the active column has ugly side effects when the titles are long
(eg. text overlapping).
This commit change the mobile kanban tabs UX by allowing to scroll
through them and go directly from a column A to B. It also improve the
readability independently of the title's length.
This behavior is heavily inspired by Material Design.
See: https://material.io/design/components/tabs.html
Task: 1893168
The goal of this refactoring is mainly to improve the code readability
of the layout update in the mobile kanban renderer by focusing on each
parts separetaly:
* mark current column as the active one.
* compute the title tabs' position.
* compute the content column's position.
Task: 1893168
This commit apply those changes:
- Avoid overflow widgets array by checking its boundaries when the user swipes
on the kanban column.
- Extract the success callback update layout to avoid duplicated code.
Task: 1893168
Sometimes when the groupedBy view is changed the index of the current
active column overflow the kanban tabs length.
In this commit this effect is avoided by resetting the active
kanban column to the first one when the groupedBy is changed.
Task: 1893168
On small screens, when we click on the overview of a task
inside the "project" app, the displayed table doesn't fit the screen.
This commit only add missing parent "div.table-responsive" to add
responsive support.
opw-1907877
closesodoo/odoo#31092
Task #1902304
Purpose
=======
The 'is_preview' field implied some functional behavior but it was not
manageable from back-end nor front-end.
It can now be configured on the slide upload form (front-end view) and on
the slide form (back-end view).
closesodoo/odoo#31073
New rules are
* on channel type documentation: can upload like before (employee or upload
groups specified); can publish like before (can upload and publisher)
* on channel type training: can upload like before (employee or upload
groups specified); can publish restricted to channel responsible
Tests are added.
This commit is a sub-part of task ID 1902304 (main eLearning task).
closesodoo/odoo#31082
Members is better computed using a sudo to avoid every access rights issues.
Moreover trigger is updated so that cache is correctly invalidated and
recomputed. Having the trigger on the relational model correctly triggers
the recompute when calling main API methods to add a channel member.
This commit is a sub-part of task ID 1902304 (main eLearning task).
Purpose
=======
A slide's 'Embedded views' are reworked as 'Public views' to simplify
the model and be more compliant with the new 'is_preview' field.
The rule is now the following:
A slide is a preview or the view is done as public user (once per session)
-> increment public_views
A slide is viewed as a logged in user that has access to the content
-> increment slide_views
Technically slide_views is a compute of the slide_slide_partner count.
Tests are also added to ensure it is effectively working.
This commit is a sub-part of task ID 1940360 (eLearning integration with
survey) and task ID 1902304 (main eLearning task).
Scss tour was broken due to recent task that shows only 2 new custom scss
files if not in edit mode. As the tests was trying to read `website.ui.scss`
that is now in debug mode in a filter, it would not be found.
Html tour was broken due to new editor that changed the save process.
For some reason, after the drag & drop of a snippet, clicking fast on save
would not fire RPCs as it would not be considered as dirty.
(Editor would then close, you would still see the modifications even if nothing
was saved on DB)
closesodoo/odoo#31067
This commit adds the option 'Last 5 Years' in
the list of periods available to selection in
the filter menu and the time range menu for
the date/datetime fields.
Task: 1916017
closesodoo/odoo#29423
In a SO without customer:
Before this commit, the _product_margin wasn't working. This because,
as the customer is not defined, the pricelist isn't defined either,
and therefore currency of the pricelist is also undefined.
When you call the round function, in an undefined currency
an error is raised.
Now we take into account if customer is defined.
closesodoo/odoo#30675
In an account_bank_statement, when the type of the journal wasn't bank
and the currency was not defined (the currency in account_bank_statement
is optional) and the amount was zero.
Before this commit, the validation error that raise when the amount is
zero, wasn't working. This because, self.currency_id.is_zero is always
False, when currency is not defined.
Now, we take into account if currency is defined.
Adding a new rule to verify that precision_rounding is positive.
Before this commit:
when a precision_round was 0 or smaller than 0 the float_utils
functions gave as results:
* float_is_zero(0.0, precision_rounding=0.0) -> False
* float_round(1.25, precision_rounding=0.0) -> 0.0
* float_compare(1.0, 1.0, precision_rounding=0.0) -> 1
These results where at least not correct at worst not logic.
Now, the function raises an error when the precision_rounding
is not positive
This rev. updates the 'New order' kanban view to make it use a
searchPanel.
Minor changes on the custom lunch_kanban view were necessary to
- obtain the desired layout,
- correctly combine the lunch widget (top bar) domain with the
searchPanel domain.
Part of task 1892462
Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
This rev. defines a searchPanel widget used in Kanban views to
refine search according to specific dimensions. This wigdet is
displayed as a sidebar to the left of the kanban view.
Part of task 1892462
Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Raphael Collet <rco@odoo.com>
The docstring says they are boolean, but they actually aren't
(e.g. edit="0" in the arch would lead to activeActions.edit=0).
This could cause issue if that value is used to toggle a class
with jQuery, as in this case the flag argument *must* be a boolean.
When merging 2 partners, we could want to sum fields instead of
keeping one of the values. Example: Loyalty Points
This commit adds the necessary support to achieve this.
This commit is related to task #1869488.
closesodoo/odoo#30141
Before this rev. the `session_id` was provided by the server to the webclient (in
session_info, mostly) and was stored and accessible. This made XSS injection more
dangerous than they should be as it was very easy to steal the `session_id`.
As the browser automatically set the `session_id` on every request to the server,
the webclient shouldn't need any explicit reference.
Since rev. odoo/odoo@f4d541e the `session_id` cookie uses the `httponly` flag so
it cannot be accessed through client side script.
Task 1905359
closesodoo/odoo#30098