Commit Graph
124195 Commits
Author SHA1 Message Date
David Beguin f95f8cc696 [FIX] gamification: fix rank computation 2019-02-12 11:24:23 +00:00
David Beguin b0aa6f654b [MOV] gamification, website_forum : move karma data and demo in gamification
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.
2019-02-12 11:23:34 +00:00
Robot Odoo 77b5673a0d [MERGE][REF] website_slides: allow / improve channel and slide creation
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 #29876

closes odoo/odoo#30991
2019-02-12 14:03:26 +01:00
qmo-odoo 1b1732beb5 [IMP] website_slides: new modal to upload a document
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
2019-02-12 11:23:13 +00:00
qmo-odoo 0f22f95289 [IMP] website_slides: webpage slide type
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
2019-02-12 11:22:59 +00:00
qmo-odoo b8a24751c2 [IMP] website_slides: remove unique slide name constraint within channel
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
2019-02-12 11:22:59 +00:00
qmo-odoo 5aa645c89f [IMP] website_slides: add external links on slide
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
2019-02-12 11:22:59 +00:00
qmo-odoo c2a38e4602 [IMP] website_slides: create channel in frontend
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
2019-02-12 11:22:55 +00:00
Arnold Moyaux 333b3caa19 [FIX] stock: Perf, move order by picking_id
It will force a JOIN between stock_move and stock_picking
table. That could cost a lot on huge databases.
2019-02-11 14:58:34 +00:00
jbm-odoo 4960453db9 [IMP] web Add widget signature on binary field
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

closes odoo/odoo#30222
2019-02-14 12:59:10 +00:00
Pierre Masereel 7410de111f [ADD] reveal_service : allow user to generate leads based on filters
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

closes odoo/odoo#30189
2019-02-14 14:10:35 +00:00
Pierre Masereel 6703840062 [REF] crm_iap_lead: split crm_iap_lead into two modules 2019-02-12 11:00:18 +00:00
Pierre Masereel f597916963 [MOV] crm_reveal: rename crm_reveal in crm_iap_lead_website 2019-02-12 11:00:18 +00:00
Louis Baudoux da4cb0acb5 [FIX] web: pass buttons_template as parameter of KanbanController
Before buttons_template couldn't be passed as parameter, which prevented
from changing the button template used when rendering the button
2019-02-12 11:00:18 +00:00
Robot Odoo 5fa651cb01 [MERGE][ADD] website{_profile,_slides,_forum,*} : new profile page yayy
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;

closes odoo/odoo#30988
2019-02-14 16:34:36 +01:00
Romain Estievenart 873ea984a5 [FIX] board: dashboard app mobile layout
Follow-up of task 1904747

closes odoo/odoo#30853
2019-02-14 10:32:12 +00:00
Romeo Fragomeli 183ff490d6 [IMP] *: add mobile (native) barcode scanner for product field
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

closes odoo/odoo#31018
2019-02-14 09:41:33 +00:00
jem-odoo ec212de5c7 [IMP] gamification,forum: remove deprecated alert when sending badge
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
2019-02-14 09:24:10 +00:00
David Beguin a4a0436ddd [ADD] website_slides_forum : Allow to create forum on a course
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
2019-02-14 09:24:10 +00:00
David Beguin d8f156ae73 [IMP] website_slides : use website_profile page template and adds website_slides specific information
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
2019-02-14 09:24:10 +00:00
David Beguin 336a90e530 [REF] website_forum : use website_profile templates and adds forum specific information
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
2019-02-14 08:30:29 +00:00
David Beguin ff870099c5 [ADD] website_profile : add profile page template for website modules
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
2019-02-14 08:30:29 +00:00
David Beguin cfbd8d1ada [IMP] gamification, website_forum : apply various improvements
- 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
2019-02-14 08:30:29 +00:00
Pierre Masereel 4a857060e1 [IMP] delivery: print return label
We want to allow to print return labels on picking that contains retrun
moves and having a carrier that support return labels.

closes odoo/odoo#30886
2019-02-12 09:29:51 +00:00
David Beguin b8a8c28554 [IMP] im_livechat : review channel history layout
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
2019-02-14 08:57:57 +00:00
Priyanka Kakadiya 624fdc77d4 [IMP] google_drive : better google drive configuration
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

closes odoo/odoo#29562
2019-02-14 11:40:57 +00:00
Robot Odoo af199c4ced [IMP] web: mobile kanban tabs UX
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

closes odoo/odoo#29024
2019-02-14 16:33:38 +01:00
Romain Estievenart 6ac1ce8579 [IMP] web: mobile kanban tabs UX
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
2019-02-14 09:51:04 +00:00
Romain Estievenart 1fca14bfa1 [REF] web: cleanup the layout update for the mobile kanban view
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
2019-02-14 09:42:11 +00:00
Romain Estievenart 848ea507ec [FIX] web: column data not loaded on mobile kanban view
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
2019-02-14 09:33:57 +00:00
Romain Estievenart 829003178e [FIX] web: error on mobile when kanban groupedBy change
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
2019-02-14 09:25:21 +00:00
Romain Estievenart 9b65b50dfd [FIX] sale_timesheet: responsive table
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

closes odoo/odoo#31092
2019-02-14 08:06:01 +00:00
Aurélien Warnon 8e2c67005e [IMP] website_slides: add is_preview management in backend/frontend
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).

closes odoo/odoo#31073
2019-02-13 14:32:41 +00:00
Thibault Delavallée 752a3a5169 [FIX] website_slides: improve can upload / publish computation
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).

closes odoo/odoo#31082
2019-02-13 18:20:05 +00:00
Thibault Delavallée 370c525d77 [FIX] website_slides: fix computation of members
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).
2019-02-13 18:20:05 +00:00
Aurélien Warnon 82ce815a8c [REF] website_slides: rework slide's public and embedded views
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).
2019-02-13 18:20:05 +00:00
Romain Derie 74a98ea0be [FIX] website: adapt tests to new editor and new html editor
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)

closes odoo/odoo#31067
2019-02-13 18:02:00 +00:00
qsm-odoo 63e64c5420 [REF] website: restore skipped test
This reverts commit ba0fe3437f, as this
should be ok with recent forward-port.
2019-02-13 12:57:12 +00:00
Priyanka Kakadiya bd0e0605cc [IMP] web: add 'Last 5 Years' as a period option
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

closes odoo/odoo#29423
2019-02-13 15:47:20 +00:00
Jorge Pinna Puissant d132870cab [FIX] sale_margin: product margin round error
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.

closes odoo/odoo#30675
2019-02-13 08:24:41 +00:00
Jorge Pinna Puissant 30961d5616 [FIX] account: validation error not raising
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.
2019-02-13 08:24:35 +00:00
Jorge Pinna Puissant e270e9e0cc [IMP] tools: float_utils, precision rounding must be positive
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
2019-02-13 07:05:13 +00:00
Aaron BohyandMathieu Duckerts-Antoine 73fa0748da [IMP] hr: use searchPanel in Employee kanban view
Part of task 1892462

Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>

closes odoo/odoo#30517
2019-02-13 12:23:28 +00:00
Aaron BohyandMathieu Duckerts-Antoine d6fa1a65f0 [IMP] lunch: use searchPanel in New Order kanban view
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>
2019-02-13 12:23:28 +00:00
Aaron Bohy a2350c77c3 [REF] lunch: linting pass on lunch_kanban widgets 2019-02-13 12:23:28 +00:00
3a5f6bfa9f [IMP] web: add kanban searchPanel
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>
2019-02-13 12:23:28 +00:00
Aaron Bohy 33207ed452 [REF] web: linting pass on kanban tests 2019-02-13 12:23:28 +00:00
Aaron Bohy 0eaee45659 [IMP] web: force activeActions to be boolean
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.
2019-02-13 12:23:28 +00:00
Pratima Gupta ba5a2b47ac [IMP] base: Allow to sum fields on partner merge wizard
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.

closes odoo/odoo#30141
2019-02-13 10:35:42 +00:00
Robot Odoo 2d3dbff965 [IMP] web, *: remove explicit references to session_id
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

closes odoo/odoo#30098
2019-02-13 14:16:25 +01:00