Commit Graph
136296 Commits
Author SHA1 Message Date
Mohammed Shekha 030d8ec6f0 [FIX] web: hide list selection box after multi record save
Before this commit, list selection box was not hidden after multi
record edition.

task-2266999

closes odoo/odoo#52590

X-original-commit: ac46e9f82b7cbfc55f395b66b2011399b9f972f1
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-06-08 11:29:59 +00:00
fja-odoo 9ffd3cda87 [FIX] base: fix the burmese translation iso
The burmese ISO 639-1 code is "my" which conflicts with the page /my
We will now use the ISO 639-3 code "mya" for the url_code.
https://iso639-3.sil.org/code/mya

closes odoo/odoo#52571

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-06-08 10:15:24 +00:00
Odoo's Mergebot 12a860b61c [MERGE] website_slides: allow to contact responsible and request access to course
PURPOSE

Before this merge, a user could not contact a course responsible to ask him
to join. With this merge he is be able to do it.

SPECIFICATIONS: ACTIVITY

Add activity_search method in mail.activity.mixin to ease searching on
automated activities (code refactoring mainly).

Add possibility to choose a source / request partner on an activity. It allows
to know if an activity is linked to a customer or a requesting partner.
Com
SPECIFICATIONS: SLIDES

Change the message 'Contact website administrator' to 'Contact Responsible'.

Add the name of the course responsible in the course description panel. When
clicking on its name it opens a modal to request access to the course. It
creates an activity linked to the customer and assigned to the responsible.

When hovering the 'You're enrolled' button the fa-check icon changes to a
fa-times icon to show that you can unsubscribe when clicking.

LINKS

Task ID : 2127364
Community PR odoo/odoo#40708
Upgrade PR odoo/upgrade#1101

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-06-08 13:32:15 +02:00
Patrick Hoste 786374399e [IMP] website_slides: add possibility to request access to private course
PURPOSE

Before this commit, a user could not contact a course responsible to ask him
to join. With this commit he is be able to do it.

SPECIFICATIONS

Change the message 'Contact website administrator' to 'Contact Responsible'.

Add the name of the course responsible in the course description panel. When
clicking on its name it opens a modal to request access to the course. It
creates an activity linked to the customer and assigned to the responsible.

When hovering the 'You're enrolled' button the fa-check icon changes to a
fa-times icon to show that you can unsubscribe when clicking.

LINKS

Task ID : 2127364
PR : #40708
2020-06-08 10:43:53 +00:00
Jeremy Kersten 2c85c1cb6e [FIX] website: create page link on 404 in post
closes odoo/odoo#52576

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-06-08 10:16:51 +00:00
Andrea Grazioso (agr-odoo) 4e8501c4c9 [FIX] account: avoid hiding 'Amount Matching'
Go to Reconciliation Models > Invoices Matching Rule
Set the parameter 'Amount Matching'
Set 'Partner Is Set & Matches'
Save
Edit
Unset 'Partner Is Set & Matches'

'Amount Matching' will switch to invisible but is not disabled.
Removing the invisibility check so that the field is always
editable

This also reverts commit 61f1ca63e5dc27e06c855bb09b18bf4897e8ab1f.
Due to a misunderstanding this solution was chosen while the real
intention was to always show the field

opw-2261134

closes odoo/odoo#52264

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-06-08 08:02:46 +00:00
Nidhi Patel 91029b2b32 [FIX] mail: channel #general with default messages
Before this commit, when starting a new database with demo data,
the default channel `#general` had no messages initially.

The demo data defines default messages in this channel, but were
incorrectly linked to this channel, resulting in this channel
containing no messages initially.

The messages did not define `channel_ids`, so it was considered
empty. This field is essential for displaying the message in
channel, so by being omitted these messages are not properly linked
to channels.

This commit fixes the issue by correctly linked this demo messages
to this demo channel, so that `#general` now contains some messages
initially. This commit also removes unused context
`mail_notify_noemail`.

Task-Id 2186300

closes odoo/odoo#49539

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-06-08 09:36:25 +00:00
Martin Trigaux c9f93eb639 [FIX] tools: remove max language length constraint
There is no reason for this constraint to be. Languages with a code
longer than 5 do exists in standard, (e.g. ar_001, sr@latin)

Introduced at 004a0b996f

Fixes odoo/odoo#52558

closes odoo/odoo#52569

X-original-commit: 54340487adaed962750c9719fb50fc7e000da476
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-06-08 09:00:02 +00:00
Katherine Zaoral 308b1d9b09 [FIX] l10n_ar: fix misspelling error in translations
closes odoo/odoo#52346

X-original-commit: fe6330ade22efec61b18792b3a930afd7c473328
Related: odoo/enterprise#10911
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-06-08 08:48:49 +00:00
Patrick Hoste ad8c53ac2c [FIX] website_slides: changes enroll_msg default value
SPECIFICATION

Changes enroll_msg default value to 'Contact Responsible' instead
of testing if it was empty or not. Since the FieldHtml widget sets
the default value to '<p><br></p>' it was never empty.

LINKS

Task ID : 2127364
PR : #40708
2020-06-08 07:14:14 +00:00
Patrick Hoste 2aa150e195 [IMP] mail: add possibility to choose a source / request partner on activity
PURPOSE

Allow to know if an activity is linked to a customer or a requesting partner.

SPECIFCIATIONS

Add a partner_id field on mail.activity model. It will be used notably in
website slides to know who triggered an "request access" activity. It
can also be used in various business flows when assigned user is different
from the "source" or "requesting" partner.

LINKS

Task ID : 2127364
Community PR odoo/odoo#40708
Upgrade PR odoo/upgrade#1101
2020-06-08 07:14:06 +00:00
Patrick Hoste 7e61793ad7 [IMP] mail: add activity_search method in mail.activity.mixin
PURPOSE

After this commit it will be easier to find all the corresponding automated
activities in a model.

SPECIFICATIONS

Add an activity_search method in the mail.activity.mixin model to ease
the searching on mail.activity corresponding to the model. It is already
inlined in activity_reschedule and activity_feedback.

LINKS

Task ID : 2127364
PR : #40708
2020-06-08 07:09:30 +00:00
jvm-odoo 17e409181e [FIX] web_editor: fix duplicated pasted image summernote
Issue

        - Windows > Chrome or Firefox
        - Any chatter > Open full screen
        - Paste any image

        The image is pasted twice

Cause

        Summernote adds the image but
        the browser event adds it too

Solution

	I applied the fix that summernote did
	summernote/summernote/commit/6e432941af17c5fee0877d9ff54b6ace65fbdb4b

OPW-2267712

closes odoo/odoo#52532

X-original-commit: 2b4b2ce8660326b1cb53b5624690718b89aaceda
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
2020-06-05 15:24:05 +00:00
Samuel Degueldre aa8d2a8be2 [IMP] web_editor, *: move image optimization feature to left-panel
*: website, mass_mailing

In continuity with the nline crop, in an effort to make the image
workflow as seamless as possible in the website editor, the image
optimization feature has been moved out of the modal which could be
opened through the media-dialog and into the left panel.

This commit adds a quality slider and a width selector, as well as a
preview of the image's weight to the left panel, and removes the
image_optimize dialog.

This commit also introduces the possibility to add a color filter on
images.

Part of https://github.com/odoo/odoo/pull/51517
task-2192755

closes odoo/odoo#51517

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-06-05 18:11:53 +00:00
Samuel Degueldre c2de755bc6 [IMP] web_editor, *: change image cropping from modal to inline widget
*: base

Previously, cropping an image was done inside of a modal window, turning
it into an inline widget makes the editor feel more integrated and
allows you to better see the result of cropping directly in the page,
it's also less intrusive to the user's edition workflow.

At the same time, the way cropped images are saved was refactored to use
the new original_id field on ir_attachment, as the old system was
creating problems.

Part of https://github.com/odoo/odoo/pull/51517
task-2192755
2020-06-05 18:11:42 +00:00
Samuel Degueldre 59cd23a4df [MOV] web_editor: rename crop_dialog.js in preparation for inlining
In the next commit the crop functionality will be made into an inline
widget instead of a modal dialog, as such, the name no longer makes
sense.

Part of https://github.com/odoo/odoo/pull/51517
task-2192755
2020-06-05 18:11:34 +00:00
Samuel Degueldre 629a93274e [REF] web_editor: remove relics of filter feature
Previously, the media-dialog had a "filter" feature, where when changing
a background image for example, all backgrounds would show first in the
media-dialog. However, because this required to load all public
attachments in the database it was causing issues and was removed. The
backend code for this feature however was unfortunately forgotten, this
commit removes that code.

Part of https://github.com/odoo/odoo/pull/51517
2020-06-05 18:11:25 +00:00
Samuel Degueldre a904a63833 [FIX] web_editor: fix layoutInfo is null traceback
When attempting to update its UI in reaction to events, summernote tries
to make layout info for the event target, this relies on finding this
information on one of the target's ancestors. In some cases, elements
can be removed from the DOM between the moment the event was triggered,
and the moment summernote attempts to create the layoutInfo, resulting
in layoutInfo being null.

This commit prevents tracebacks from happening in such cases by checking
that a layoutInfo was actually returned, and if not, aborting the UI
update that relies on it.

closes odoo/odoo#52541

X-original-commit: 3e999db0c114d51102ae51f870f98a4cc276c4b4
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-06-05 16:33:21 +00:00
qsm-odoo 4f64fa3e78 [FIX] website: prevent saving multiple times in a row
While waiting for a better and more robust fix in the editor itself,
this prevents to hit the save button of the website editor while a save
is in progress.

closes odoo/odoo#52540

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-06-05 16:34:23 +00:00
Akim Juillerat 1c5771a412 [FIX] account: Fix UPDATE in _toggle_reconcile_to_false
As _toggle_reconcile_to_true updates the amount_residual on unreconciled
move lines linked to the account, _toggle_reconcile_to_false must
set the amount_residual to 0.
However as the SQL query is broken the update fails and move lines
supposed to have 0 as amount_residual still have the value.

closes odoo/odoo#52533

X-original-commit: 8e32134cedce688c0fa33d1c51c5570d63f14efa
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-06-05 16:41:59 +00:00
qsm-odoo 6e2ec9c7d4 [FIX] web_editor: ensure a crash during save does not lock the editor
An error has been introduced by [1]. Indeed `response.data` does not
exist, but `response.message.data` does. However, the whole `if` clause
there seems now useless so this commit removes it. The whole file is
being refactored anyway with the new editor.

[1]: https://github.com/odoo/odoo/commit/ab4000fb3cf8fa54ba714ceceec391b78d73755e#diff-b1b550326b2d36a24e94e52c3901d1fbL513

closes odoo/odoo#52534

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-06-05 15:41:10 +00:00
Laurent Stukkens (LTU) 94bb547afe [FIX] website_form: prevent error on drop thumbnail in editor in Safari
Issue

	When using the website editor in Safari browser, an error occurs
	when dropping the form builder thumbnail into the editor.

Step to Reproduce

	- Install website and web_editor applications
	- Use Safari browser
	- Got to Website
	- Click on Edit
	- Drag and drop the From Builder thumbnail from the left panel
	  into the editor

Cause

	The javascript function Node.insertBefore(newNode, referenceNode) needs to
	be called on referenceNode's immediate parent.
	Using DocumentFragment.querySelector(':first-child')
	returns the first child of the first element in the fragment which triggers
	this issue. The reason why Chrome accepts and handles this correctly
	remains a mistery to me ;o)

Solution

	Call Node.insertBefore() method on the immediate parent of the
	node the insertion has to be performed before.
	So use .childNodes[0] instead of .querySelector(':first-child').

task-2271745

closes odoo/odoo#52520

X-original-commit: dd9ce45c09f8f2181eb48639c0e3ea6617260510
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-06-05 13:33:35 +00:00
DramixDw f0420013e0 [IMP] website: make pager post compatible
As we introduced postlinks, some routes are no longer compatible with
GET requests anymore. Some of those routes were using the pager which
only send GET request. In order to make the pager comptabile, we're
addding a way to use postlinks in the pager.

task-2250385

closes odoo/odoo#52475

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-06-05 15:47:06 +00:00
fja-odoo 5411486134 [IMP] google_recaptcha, *: integrate recaptchaV3
* = base_setup, website_form, website_sale, website_crm,
crm_iap_lead_website, website_hr_recruitment, website_mass_mailing

Integrate reCaptchaV3 on website_form submit and website_mass_mailing
subscription.
You can now use ReCaptchaV3 to add reCaptcha verification in any module
using google_recaptcha.

Also added a better error management on the form with custom messages.

task-2217980

closes odoo/odoo#48466

Related: odoo/enterprise#9649
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-06-05 10:58:50 +00:00
Martin Trigaux fea1706f27 [FIX] google_spreadsheet: avoid pollution of default view
The view had no priority set and could be used as the default view on
ir.attachment (same priority as base). The view has less information
than the generic base.view_attachment_tree that are not relevant
ouside of the context of google_spreadsheet

Same reasons for the form view

closes odoo/odoo#52522

X-original-commit: 36bf73a8a5415e98431ccd411be7687415b2429b
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-06-05 13:51:45 +00:00
lejeune quentin 9553871312 [FIX] hw_drivers: Restart Odoo after IoT has connected
When the route '/hw_drivers/box/connect' is called to connect an IoT Box to a DB,
the checkout on the branch of the DB is not performed and incompatibility can occur.

With this fix we relaunch Odoo via a parallel thread in order to be able to respond to the request...

closes odoo/odoo#52513

X-original-commit: 9aca7c464cef492c495a0c72d870b7075187dc63
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2020-06-05 14:00:06 +00:00
Nicolas Martinelli 82afffac89 [FIX] stock: sort traceability report
Commit 324db18dc9d5774d714 introduced the date formatting on the
traceability report. A side effect is that the line sorting is done on
the formatted value, leading to lines not appearing in chronological
order.

We format the line after sorting.

opw-2243432

closes odoo/odoo#52497

X-original-commit: 52e04dc3362830874a9f868d8e35a3da441320d7
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-06-05 11:02:07 +00:00
Nasreddin (bon) feb07b02e4 [FIX] base: Fix condition on selection field always evaluating to True
Part/Fix of commit #e579642

Issue

	The condition `default_type not in self._fields['type'].selection`
	always evaluate to True as the selection is list of (key, value)
	tuples.

Solution

	Replace the tuples by a list of possible values.

opw-2256905

closes odoo/odoo#52501

X-original-commit: 1b21c674c6de3ef96d7938c3e99b36d7cb2f2b6e
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
2020-06-05 11:28:30 +00:00
william 95b74f40e3 [IMP] l10n_be: review the CoA based on the BNB xbrl files
Task 2213348

There where missing accounts and the CoA was not consistent (like some
income accounts but not the expense counterpart).
We chose to take the accounts from the National Bank of Belgium, and
took the opportunity to translate all the accounts in the 3 official
languages of Belgium + english.

closes odoo/odoo#47815

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2020-05-26 11:09:32 +00:00
DramixDw 3ea7d6520c [FIX] web_editor: ease input selection in the left panel
If a mousedown event was fired over the left panel in edit mode while
the mouse up was fired over the current page in edit, the focus would
suddenly go at the top of the page due to pointer events. This made
input selection not easy on some browser.

task-2210712

closes odoo/odoo#52495

X-original-commit: 667ea8d586e8e8fdb7d0509e9ffc87fa5c76af56
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-06-05 10:51:38 +00:00
Nasreddin (bon) e6df7bb718 [FIX] hr: Empty required name on quick create department
Issue

	- Open console in debugger of the browser.
	- Install "Employees" app
	- Go to "Employees" and edit or create any employee
	- In 'Department' field, quick create one

	Error is raised in console and the modal department form view is opened.

Cause

	'name' field is required but empty since 'complete_name'
	is the one set as _rec_name in 'Department' python model.

Solution

	Cherry-pick of 7c0fed48a1

opw-2267356

closes odoo/odoo#52489

X-original-commit: 056618914e9f1f437f8855459c302fc0ac6663c5
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
2020-06-05 10:19:01 +00:00
Anh Thao Pham (pta) 16351e4879 [FIX] mail: fix context when assigning an activity
- Create a new company in Settings
- Check the created company in systray but keep the default one as selected
- Activate Leads in CRM
- Create a Lead and select an user (User A) who belongs to the default company
  but not the new one as Salesperson
- Save the Lead
- In the chatter, schedule an activity with:
  * Activity Type: Make Quote
  * Assigned to: User A (the user assigned as Salesperson)
The following error will prompt:
"Assigned user User A has no access to the document and is not able to handle this activity."

During the rule check, the context is evaluated
(see commit: https://github.com/odoo/odoo/commit/a5b6f31cf28e5381e1c85f66730bcdb55998e643#diff-15c3e76db5d676523f482df45cf00446R54)
which raises an AccessError for "allowed_company_ids"
(see commit: https://github.com/odoo/odoo/commit/7bfcb53db37f385a99e16b47311b7c09c8da294d#diff-2c418cb78b7c562a79e7032645a537d2R599)
as the context that is used is the context of the current user and not the context of User A.

opw-2264224

closes odoo/odoo#52476

X-original-commit: b28470f2fdbe84f2444533e3936d0af98e051e90
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-06-05 08:58:09 +00:00
Antoine Prieels ec9759a6c0 [FIX] hw_drivers: Failed checkout and drivers loading
- The checkout to switch to the branch of the connected DB was not
processed correctly because the command used to clear the drivers
failed, raising an exception:

rm: cannot remove '/home/pi/odoo/addons/hw_drivers/drivers/__pycache__': Is a directory

- The location of the drivers has been changed in master. So, even if we
perform a checkout, the addons/hw_drivers/drivers directory doesn't
exist. The get_resource_path('hw_drivers', 'drivers') then returned
False instead of the correct path and the extraction of the zip file
failed.

closes odoo/odoo#52448

Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2020-06-05 06:32:18 +00:00
Laurent Stukkens (LTU) bad8e5a420 [IMP] web_editor: ease drag and drop understanding
Ease the understanding of the drag'n drop of a snippet. Users test have
demonstrated that one doesn't understand how to add a snippet on the page.

* Rotate the snippet once clicked, as it is for tasks in project application.
* Keep the position of the mouse.

task-2261817

closes odoo/odoo#51905

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-06-04 13:58:24 +00:00
fja-odoo d2efb09608 [IMP] website, *: deactivate unused views
* = website_blog, website_form

These views are part of the new snippet compatibility system and should
be deactivated. They only remain for compatibility.

active is a noupdate field so all deactivated views will remain active
when updating to this version. Only new install will have the views
deactivated.

task-2250388

closes odoo/odoo#52438

X-original-commit: 4c844697cd1aa3a461b576363d25af54a3b650cc
Related: odoo/design-themes#294
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-06-04 13:58:17 +00:00
Odoo's Mergebot 4f4deefdb9 [MERGE][IMP] digest, various: improve digest content and tips
PURPOSE

Make digest email and tips more appealing. The goals of these tips are

  * to encourage the adoption of other apps (Did you know ?);
  * to make Odoo look more fun (Fun tips and tricks, young and dynamic style);
  * to show social proof and increase trust (emphasis on already existing
    projects / customers to);

SPECIFICATIONS: DIGEST TEMPLATE

Improve template according to FP specifications, aka

    Header
    Up to 2 tips
    KPIs
    Want to customize?
    Mobile Tip
    Footer

SPECIFICATIONS: QWEB TEMPLATE

Digest now uses qweb views instead of a standard mail.template record for
rendering as

  * template is very custom;
  * probability of breaking it while edition the mail template is high;
    it is easier to maintain and extend in qweb;
  * only body was really used, other mail-related fields were not used;

We therefore remove the mail template data and the field used for it on
the digest model. Template is now forced to a Qweb view.

We can also remove the template_id field. Indeed we think that having
different templates for digests is a really advanced use case we do not
want to support.

SPECIFICATIONS: DELAY BEFORE SENDING

In this commit we introduce a way to set a delay before sending a tip.
Using a new field, a tip can be send a few days after its module installation.
This require to store the source module on the tip itself. When installed
from data it will be automatically filled using its xml_id if not set

SPECIFICATIONS: TIPS

Improve tips content and display according to FP specifications.

LINKS

Task ID 2197417
Community PR odoo/odoo#51619
Enterprise PR odoo/enterprise#10697
Upgrade PR odoo/upgrade#1256

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-06-05 09:24:16 +02:00
Elisabeth DickinsonandThibault Delavallée 50b9798074 [IMP] website: make tips bioutifoul, and add moar tips
PURPOSE

Make digest email and tips more appealing. The goals of these tips are

  * to encourage the adoption of other apps (Did you know ?);
  * to make Odoo look more fun (Fun tips and tricks, young and dynamic style);
  * to show social proof and increase trust (emphasis on already existing
    projects / customers to);

SPECIFICATIONS

Add a tip about SEO.

LINKS

Task ID 2197417
PR odoo/odoo#51619

Co-Authored-By: Elisabeth Dickinson <edi@odoo.com>
Co-Authored-By: Thibault Delavallée <tde@odoo.com>
2020-06-04 15:20:14 +00:00
Elisabeth DickinsonandThibault Delavallée a61ac2da69 [IMP] hr_recruitment, project, sale_expense: make tips bioutifoul
PURPOSE

Make digest email and tips more appealing. The goals of these tips are

  * to encourage the adoption of other apps (Did you know ?);
  * to make Odoo look more fun (Fun tips and tricks, young and dynamic style);
  * to show social proof and increase trust (emphasis on already existing
    projects / customers to);

SPECIFICATIONS

Improve existing tips to be more inlined with new digest styling.

LINKS

Task ID 2197417
PR odoo/odoo#51619

Co-Authored-By: Elisabeth Dickinson <edi@odoo.com>
Co-Authored-By: Thibault Delavallée <tde@odoo.com>
2020-06-04 15:20:14 +00:00
Elisabeth DickinsonandThibault Delavallée 2503a66c42 [IMP] crm: make tips bioutifoul, and add moar tips
PURPOSE

Make digest email and tips more appealing. The goals of these tips are

  * to encourage the adoption of other apps (Did you know ?);
  * to make Odoo look more fun (Fun tips and tricks, young and dynamic style);
  * to show social proof and increase trust (emphasis on already existing
    projects / customers to);

SPECIFICATIONS

Improve existing tips to be more inlined with new digest styling.

Add new tips, notably

  * use lead enrichment;
  * use lead mining;

LINKS

Task ID 2197417
PR odoo/odoo#51619

Co-Authored-By: Elisabeth Dickinson <edi@odoo.com>
Co-Authored-By: Thibault Delavallée <tde@odoo.com>
2020-06-04 15:20:14 +00:00
Thibault DelavalléeandElisabeth Dickinson 2fa9805196 [IMP] digest: make tips bioutifoul, and add moar tips
PURPOSE

Make digest email and tips more appealing. The goals of these tips are

  * to encourage the adoption of other apps (Did you know ?);
  * to make Odoo look more fun (Fun tips and tricks, young and dynamic style);
  * to show social proof and increase trust (emphasis on already existing
    projects / customers to);

SPECIFICATIONS

Improve existing tips to be more inlined with new digest styling.

Add new tips, notably

  * Invite team members;
  * Learn about Odoo (eLearning platform);
  * allow push notifications;

LINKS

Task ID 2197417
PR odoo/odoo#51619

Co-Authored-By: Elisabeth Dickinson <edi@odoo.com>
Co-Authored-By: Thibault Delavallée <tde@odoo.com>
2020-06-04 15:20:14 +00:00
Thibault Delavallée 99c2c2ee1e [REF] digest: move template to QWeb
PURPOSE

Make digest email and tips more appealing. The goals of these tips are

  * to encourage the adoption of other apps (Did you know ?);
  * to make Odoo look more fun (Fun tips and tricks, young and dynamic style);
  * to show social proof and increase trust (emphasis on already existing
    projects / customers to);

SPECIFICATIONS

Digest now use qweb views instead of a standard mail.template record for
rendering as

  * template is very custom;
  * probability of breaking it while edition the mail template is high;
    it is easier to maintain and extend in qweb;
  * only body was really used, other mail-related fields were not used;

We therefore remove the mail template data and the field used for it on
the digest model. Template is now forced to a Qweb view.

We can also remove the template_id field. Indeed we think that having
different templates for digests is a really advanced use case we do not
want to support.

Finally kpis and action computation is rewritten. It now returns an unique
structure containing all information in a more neutral way, holding values
for 3 columns. Purpose is to be less date-oriented in data construct and
allow people to use digest qweb template to display a 3-columns KPIs content
even if not related to yesterday / last 7 days / last 30 days.

LINKS

Task ID 2197417
Community PR odoo/odoo#51619
Upgrade PR odoo/upgrade#1256
2020-06-04 15:20:08 +00:00
Thibault Delavallée 14abd4fdf7 [IMP] digest: improve digest by adding daily sending and preferences
PURPOSE

Make digest email and tips more appealing. The goals of these tips are

  * to encourage the adoption of other apps (Did you know ?);
  * to make Odoo look more fun (Fun tips and tricks, young and dynamic style);
  * to show social proof and increase trust (emphasis on already existing
    projects / customers to);

SPECIFICATIONS

Add a daily digest option, allowing to send digests on a daily basis. It
will be the default settings to help users coming back to odoo.

Add a slowdown heuristics. If not any user targeted by a daily digest logs
himself within 3 days, digest is slowed down to a weekly setting to avoid
spam.

Add a preference section in template, to hold notably links to some
configuration steps sent mainly for admin / CEOs.

Improve access on models.

LINKS

Task ID 2197417
PR odoo/odoo#51619
2020-06-04 15:19:29 +00:00
Thibault DelavalléeandElisabeth Dickinson add1a04a94 [REF] digest: make digest template bioutifoul
PURPOSE

Make digest email and tips more appealing. The goals of these tips are

  * to encourage the adoption of other apps (Did you know ?);
  * to make Odoo look more fun (Fun tips and tricks, young and dynamic style);
  * to show social proof and increase trust (emphasis on already existing
    projects / customers to);

SPECIFICATIONS

Improve template according to FP specifications, aka
    Header
    Tip
    KPIs
    Preference text
    Want to customize?
    Mobile Tip
    Footer

LINKS

Task ID 2197417
PR odoo/odoo#51619
Upgrade PR odoo/upgrade#1256

Co-Authored-By: Elisabeth Dickinson <edi@odoo.com>
Co-Authored-By: Thibault Delavallée <tde@odoo.com>
2020-06-04 15:19:29 +00:00
Thibault Delavallée c329c618cf [REF] digest: reorganize code to ease future changes
PURPOSE

Make digest email and tips more appealing. The goals of these tips are

  * to encourage the adoption of other apps (Did you know ?);
  * to make Odoo look more fun (Fun tips and tricks, young and dynamic style);
  * to show social proof and increase trust (emphasis on already existing
    projects / customers to);

SPECIFICATIONS

Slightly reorganize code to ease future changes, notably in KPIs computation
that will be made a bit more generic.

LINKS

Task ID 2197417
PR #51619
2020-06-04 15:19:29 +00:00
Thibault Delavallée 48e94a6eba [FIX] digest: ensure cron sends all ready digests
Currently only digest planned "today" are sent. Which means that digest that
missed a cron tick are not sent anymore. We fix that by making the cron run
on all digest whose scheduled date is in the past or today.

LINKS

Task ID 2197417
PR odoo/odoo#51619
2020-06-04 15:19:29 +00:00
Thibault Delavallée e1432afd9c [IMP] mail: add first lightweight support of qweb in rendering mixin
PURPOSE

Make digest email and tips more appealing. The goals of these tips are

  * to encourage the adoption of other apps (Did you know ?);
  * to make Odoo look more fun (Fun tips and tricks, young and dynamic style);
  * to show social proof and increase trust (emphasis on already existing
    projects / customers to);

SPECIFICATIONS

In this commit we simply add a first support of tools to render qweb templates
like rendering jinja. Instead of giving the template to render the xml id of
the view is passed.

This code is meant to be improved in a near future with new use cases that
will soon arise.

LINKS

Task ID 2197417
PR odoo/odoo#51619
2020-06-04 15:19:25 +00:00
simon 159a6038a0 [FIX] hr_attendance: Display Check In / Check Out menu first
Purpose
=======

As the first displayed menuitem is the kiosk mode (if enabled)
We can't easily navigate through the menuitems.

Specification
=============

Set the check in / check out menu first (as default).

closes odoo/odoo#52148

Taskid: 2237996
X-original-commit: f74042ae3934d014f57a3de1edd54bd1834312af
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-05-29 09:23:55 +00:00
Adrian Torres 0ab6b20717 [FIX] base: return super().unlink() for ir.ui.view.unlink()
Commit bca2926b01 introduced a fix for
ir.ui.view unlinks during uninstall but forgot to return the result of
the super() call to unlink which broke behaviour downstream.

This commit restores the proper behavior of returning the result of the
call to super.

Closes #52364

closes odoo/odoo#52435

X-original-commit: a3d91cc8691794d8f93ef416830b09fabcf08b66
Signed-off-by: Adrian Torres (adt) <adt@odoo.com>
2020-06-04 13:33:24 +00:00
f8ab827b82 [MERGE] web: comparison menu
The present PR aims to replace the "time range menu" component in the control panel by a new
component called "comparison menu".
The new component purpose is roughly the same: compare a period of data in a reporting
view with the previous period or the previous year.
Its implementation is a bit simpler: it will only appear if at least one
date filter is selected in the search view, and will suggest to compare
each selected date option with the previous period or the previous year.

Remarks:
1) The date filter options are now ordered a bit differently: the chronological order has been chosen.
For example, we would get May 2019/June 2019/Q1 2019/May 2020/June 2020/Q1 2020 instead of
June 2020/May 2020/Q1 2020/June 2019/May 2019/Q1 2019 (for simplicity no comparison is done
between quarters and months).
2) The key 'timeRanges' in the ir.filters contexts is no more used. We now use the key 'comparison'.

Task ID: 2245719

closes odoo/odoo#51379

Related: odoo/enterprise#10658
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
2020-06-04 21:56:57 +02:00
Mathieu Duckerts-AntoineandJulien Mougenot 087724fa9e [IMP] *: adapt tests to comparison menu
Tests have been adapted accross all affected modules to support the new
"comparison" menu component.

Task ID: 2245719

Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
2020-06-04 19:32:52 +00:00