Commit Graph
140385 Commits
Author SHA1 Message Date
Adrian Torres 9fefa08745 [FIX] core: mapped() does not prefetch as expected
Before this commit, calling `mapped()` on a relational field of a single
record inside a for loop does not correctly propagate the prefetch ids
from the bigger recordset down to the record inside the loop:

    [rec.line_ids.mapped('name') for rec in recs]

To be more precise, `recs` correctly propagates prefetching information
down to `rec.line_ids`, but method `mapped()` does not pass it along to
the record that triggers the prefetching.

This resulted in one query per record in `recs`, so if `recs` were a
1000 records recordset, at least 1000 queries would be necessary.

With this commit, the `mapped()` function correctly propagates the
`_prefetch_ids` of the larger recordset (`rec.line_ids`) so that the
prefetching works properly and the 1000 queries are brought down to 1.

This commit is a followup on #42611.

closes odoo/odoo#54565

X-original-commit: 0e97053fee36c0c76b70cb94be5340c3144b178b
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Signed-off-by: Adrian Torres (adt) <adt@odoo.com>
2020-07-16 11:09:05 +00:00
Xavier Morel 65b8751e32 [FIX] core: mis-updated SQL queries
odoo/odoo#53938 improved the SQL linter and used psycopg2.sql to
silence the linter where that still made sense. However I forgot to
mark table names (pretty much exclusively) as `sql.Identifier` in a
few somewhat rare callsites, which consequently break when invoked as
a simple string is not a Composable and psycopg2 therefore rejects it
when composing the query.

closes odoo/odoo#54556

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2020-07-16 09:10:03 +00:00
Jorge Pinna Puissant 11784de327 [REF] mail: extract the compute of date deadline to be used in hr
opw-2265631

closes odoo/odoo#54548

X-original-commit: c029bfeb3e04b5b314663db34db0a56b6165a6b7
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2020-07-16 08:55:11 +00:00
Jorge Pinna Puissant 793edf3293 [FIX] hr: activity type configuration on hr plans
revert of 0f4ec36 and bf8a9af

- Employees > Configuration > Planning Types and ensure the activity
    type "To Do" is set to scheduled date several days after previous
    activity (default should be 5 days);
- Check that onboarding Plan has at least 2 activities with activity
    type "To Do";
- Click launch plan.

The activity type configuration is ignored and all activities are due
tomorrow. The previous commit uses the function
_onchange_activity_type_id to fix this issue.

The problem with this commit, is that the _onchange_activity_type_id
function will also change the responsible, the notes and the summary to
set them to their default value.

Now, the activities are due taking into account the activity type
configuration without modifying the already set responsible, notes and
summary.

opw-2265631

X-original-commit: 81e4745a31567af7b58064bd8b4e9bae0756354f
2020-07-16 08:55:09 +00:00
Jorge Pinna Puissant e0baa3be18 [FIX] hr_timesheet: timesheet button in employees view
Before this commit, only the users with timesheet 'Administrator' rights
can see the Timesheet button in the employees view.

Now, the users with timesheet 'See all Timesheet' rights can see the
Timesheet button in the employees view.

This is the behaviour in version 12.

opw-2285695

closes odoo/odoo#54543

X-original-commit: c839ecda6c696ac54ceaf24b2ee1816cb358052a
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2020-07-16 07:40:35 +00:00
Xavier Dubuc 978f8ca4ef [FIX] mail: fix moderation accept multiple messages button
Once global "Accept" button is clicked, the accepted messages were not
unchecked causing the button to stay hidden until next page reload.

task-2285430

closes odoo/odoo#54549

X-original-commit: 5594de16f463507498e852c2d49d1cbe74ed7381
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-07-16 08:56:31 +00:00
Raphael Collet a21e8afda4 [FIX] core: update of one2many field on new record with origin
An onchange method can remove an existing line from a one2many field of
a new record with command 2, such as:

    move.line_ids = [(2, <NewId origin=42>), ...]

The processing of the command 2 above incorrectly tries to remove the
new line from the origin record, instead of the new record.

closes odoo/odoo#54545

X-original-commit: 7d138a445acbd9f2e122d9c30ca81877bae6a245
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-07-16 08:16:16 +00:00
Joseph Caburnay 800fa0812a [FIX] pos_restaurant: split bill screen responsive
The layout of the split bill screen is broken after the responsive pos ui.
This fixes the split bill screen and make it also responsive.

New classes are introduced because reusing proved to be very difficult.
One benefit of declaring a new classes (then styling them) is that we can
target the particular elements that we wanted to change without the concerns
that another elements are changed.

closes odoo/odoo#54529

X-original-commit: 51f0c6a1be912192d910d47b79ac2cb3c5b42784
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-07-15 15:29:11 +00:00
Florent de Labarre 99fc25448c [FIX] purchase: allow manual ref when selecting purchases
closes odoo/odoo#54349

X-original-commit: 769a0120a61323e2be500879a8687a0b272d0b6a
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2020-07-10 16:11:25 +00:00
Odoo's Mergebot 9fe0874df2 [FW][MERGE] event(_*): improve demo and frontend menus management
RATIONALE

Even will soon gain a major update called Event Online, allowing to better
support full-online events. In order to prepare its merge, preparatory merge
are done to lessen the final diff.

PURPOSE

Prepare Event Online support by providing fixes in event track views, adding
demo data and easing event menu page management and inheritance.

SPECIFICATIONS

Improve track views in website_event_track: add missing informations for
event users daily use of tracks.

Ease override / inheritance of registration page rendering values to be able
to tweak those pages in inheriting modules.

Improve demo data, especially track-related demo data: more tracks, better
datetimes, titles, tags, ... in order to have at least one event that looks
like a real event..

Refactor and improve code about event menu management. Purpose is to
ease inheritance and be able to add menus and pages with less custom code
in sub modules.

See sub commits for more details.

LINKS

PR #55260
Task ID-2310491 (Event Online Preparation 5)
Part of Task ID-2252655 (Main Online Event task)
Part of Task ID-2283796 (Event B2Basics / Registration Flow)

closes odoo/odoo#55279

Forward-port-of: odoo/odoo#55273
Forward-port-of: odoo/odoo#55260
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-07-31 20:28:50 +02:00
917ad9a9a9 [REF] website_event(_track): better support menu management from frontend
RATIONALE

Events are sometimes held online, gathering a community. In this merge we
improve Event application to better support full-online events with improved
tracks, wishlists, chat rooms, ...

PURPOSE

New and improved pages are about to land for online event. However current
menus and pages management is hard to tweak, especially when dealing with
the stable policy of 13.3 .

SPECIFICATIONS

Refactor and improve code about event menu management. Purpose is to
ease inheritance and be able to add menus and pages with less custom code
in sub modules.

Refactor some code, notably

  * code dealing with menus to activate and de-activate that is duplicated
    for each kind of menu;
  * allow to give a menu_type through inheritance in create_menu notably to
    support website.event.menu model available in Track app and unfortunately
    not in website_event;
  * make a somehow generic way of getting fields dealing with menu items
    through simple inheritance;
  * support sequence to allow ordering of menu entries by propagating the
    sequence to website menus;

Behavior in website_event and website_event_track should be the same. Behavior
will be tweaked in other modules through inheritance..

Improve behavior when removing frontend menus

  * correctly fetch views (for Introduction / Location) and try to unlink them
    to avoid bloating the db;
  * update boolean menu fields according to website menu management. Removing
    a menu from frontend should be reflected on boolean fields of event;

LINKS

PR #55260
Task ID-2310491 (Event Online Preparation 5)
Part of Task ID-2252655 (Main Online Event task)
Part of Task ID-2283796 (Event B2Basics / Registration Flow)

Co-Authored-By: Aurélien Warnon <awa@odoo.com>
Co-Authored-By: David Beguin <dbe@odoo.com>
Co-Authored-By: Thibault Delavallée <tde@odoo.com>
2020-07-31 18:05:12 +00:00
d5840a9093 [IMP] website_event(_track): improve demo data
RATIONALE

Even will soon gain a major update called Event Online, allowing to better
support full-online events. In order to prepare its merge, preparatory merge
are done to lessen the final diff.

PURPOSE

As new "Online Event" support is about to land, new and improved demo data
is necessary to showcase it. Improve online event demo data: have more tracks,
tags, colors, speakers, partners, descriptions, ... Make it WOW and AMAZING.

Improve demo data, especially track-related demo data: more tracks, better
datetimes, titles, tags, ... in order to have at least one event that looks
like a real event.

LINKS

PR #55260
Task ID-2310491 (Event Online Preparation 5)
Part of Task ID-2252655 (Main Online Event task)
Part of Task ID-2283796 (Event B2Basics / Registration Flow)

Co-Authored-By: Aurélien Warnon <awa@odoo.com>
Co-Authored-By: David Beguin <dbe@odoo.com>
Co-Authored-By: Thibault Delavallée <tde@odoo.com>
2020-07-31 18:05:03 +00:00
std-odoo 39325e9ce7 [IMP] website_event: allow to add values before rendering the registration template
Sub-modules will need to add new values before rendering the registration
template. This will be used to be able to display more information in those
modules, e.g. a toast message when being redirected to register.

For that purpose we create a method to prepare those values and separate
value creation from template rendering itself.

LINKS

PR #55260
Task ID-2310491 (Event Online Preparation 5)
Part of Task ID-2252655 (Main Online Event task)
Part of Task ID-2283796 (Event B2Basics / Registration Flow)
2020-07-31 18:04:56 +00:00
Thibault DelavalléeandDavid Beguin 0816bc90d4 [REF] website_event_track: improve track views
RATIONALE

Even will soon gain a major update called Event Online, allowing to better
support full-online events. In order to prepare its merge, preparatory merge
are done to lessen the final diff.

PURPOSE

Update some views in website event track to ease integration of new features
and also improve user experience when dealing with tracks.

MIGRATION / UPDATE

Views
  * website_event_track.view_event_track_form
  * website_event_track.view_event_track_tree

LINKS

PR #55260
Task ID-2310491 (Event Online Preparation 5)
Part of Task ID-2252655 (Main Online Event task)
Part of Task ID-2283796 (Event B2Basics / Registration Flow)

Co-Authored-By: David Beguin <dbe@odoo.com>
Co-Authored-By: Thibault Delavallée <tde@odoo.com>
2020-07-31 18:04:49 +00:00
Xavier Dubuc 874ce0846c [FIX] mail: fix dialogs titles
task-2282380

closes odoo/odoo#55276

X-original-commit: 1ce481baa2267ce912b5ec8c178af860c663d971
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-07-31 15:51:32 +00:00
Toufik Ben Jaa e7dcf6ac30 [FIX] hr_timesheet: allow leaves to be modified
- The HR staff may not be able to accept/refuse/cancel leaves if the
  module `project_timesheet_holidays` is installed.

  This is due to the commit c9da157149
  introducing a manual check on the current user's group without
  checking if the current environment is in superuser mode.

- Also fix the test verifying the access restriction, which meant to use
  a different user, but did that with sudo(), obviously defeating
  the fix. sudo is not used to switch user anymore, that `with_user`.

closes odoo/odoo#55274

X-original-commit: 75a166f1d115cc712bb39e7711d0fcb173732650
Related: odoo/enterprise#12149
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2020-07-31 15:36:02 +00:00
Odoo's Mergebot 62f20bcad6 [FW][MERGE] (website_)event(_track): prepares views and frontend flows for Online
RATIONALE

Even will soon gain a major update called Event Online, allowing to better
support full-online events. In order to prepare its merge, preparatory merge
are done to lessen the final diff.

PURPOSE

Prepare Event Online support by providing fixes in registration and event
frontend flows. Also provide a quick back2basic in backend views to prepare
addition of Online sub modules.

SPECIFICATIONS

Event flow
  * improve (and fix) default email templates. Notably fix broken jinja code
    and reorganize email content;
  * tweak some views to help sub modules inheritance;
  * improve backend views of event / registration / tickets to ease daily use
    of event application;

Website
  * support add_direction in duration qweb widget

Website Event
  * allow to give a placeholder to website search box;
  * improve frontend page to ease registration flow: better introduction page,
    fix mobile issues when taking registrations, slightly improve 'all events'
    page;

See sub commits for more details.

MIGRATION / UPDATE

Records (mail templates)
  * event.event_subscription
  * event.event_reminder

Views
  * event.event_tag_view_form
  * event.view_event_form
  * event.view_event_registration_tree
  * event.event_event_ticket_view_tree_from_event
  * event.view_event_type_form
  * event_sale.view_event_registration_ticket_tree
  * website_event.event_type_view_form_inherit_website
  * website_event_track.event_sponsor_view_search
  * website_event_track.event_sponsor_view_form
  * website_event_track.event_sponsor_view_tree
  * website_event_track.event_type_view_form_inherit_track
  * website_event_track.view_event_form

Actions
  * website_event_track.event_sponsor_action_from_event

Templates
  * website_event.index_topbar
  * website_event.events_list
  * website_event.event_description_full
  * website_event.registration_template
  * website_event.registration_complete
  * website_event.template_intro
  * website_event_track.agenda
  * website_event_track.event_track_proposal

LINKS

Community PR #55197
Enterprise PR odoo/enterprise#12113

Task ID-2287372 (Fix Twitter Wall)
Task ID-2309702 (Event Preparatory Merge 4)
Prepares Task ID-2252655 (Main Online Event task)
Prepares Task ID-2283796 (Event B2Basics / Registration Flow)
Prepares Task ID-2299857 (Event Design Review)
Prepares Task ID-2291344 (Integrate Twitter Wall)

closes odoo/odoo#55269

Forward-port-of: odoo/odoo#55219
Forward-port-of: odoo/odoo#55197
Related: odoo/enterprise#12147
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-07-31 19:01:26 +02:00
Thibault Delavallée c2627e1615 [REF] event(_sale): improve backend views to ease daily use of events
RATIONALE

Even will soon gain a major update called Event Online, allowing to better
support full-online events. In order to prepare its merge, preparatory merge
are done to lessen the final diff.

PURPOSE

Prepare Event Online support by providing fixes in registration and event
frontend flows. Also provide a quick back2basic in backend views to prepare
addition of Online sub modules.

SPECIFICATIONS: IMPROVE BACKEND VIEWS

Registrations
  * list view: show by default creation date which is Registration Date;
  * list view: by default show email and phone, still optional;
  * list view: by default, hide partner as other information is present;
  * list view: hide event when being in context of a specific event to lessen
    number of displayed columns;
  * rename Source Sales Order to Sales Order, better for users. Make it
    optional;

Tickets
  * list view: description and start / end sales date are now optional to
    lessen number of columns;
  * list view: rename Reserved to Confirmed to match registration state naming;

Event
  * form view: move organizer, responsible and company information on the right
    with address. That way all address-related information are on the right
    while timing information are on the left;
  * kanban view: display 'confirmed' only if no auto confirm on event.
    Otherwise both numbers are the same;

LINKS

Community PR odoo/odoo#55197
Enterprise PR odoo/enterprise#12113

Task ID-2309702 (Event Preparatory Merge 4)
Prepares Task ID-2252655 (Main Online Event task)
Prepares Task ID-2283796 (Event B2Basics / Registration Flow)
2020-07-31 15:38:48 +00:00
Thibault Delavallée cd162f522b [REF] website_event_track: improve 'talk proposal' page
RATIONALE

Even will soon gain a major update called Event Online, allowing to better
support full-online events. In order to prepare its merge, preparatory merge
are done to lessen the final diff.

PURPOSE

Prepare Event Online support by providing fixes in registration and event
frontend flows. Also provide a quick back2basic in backend views to prepare
addition of Online sub modules.

SPECIFICATIONS: INTRODUCTION PAGE

Add "a lot of margin". As per original and unique spec. Pupose is to separate
a bit better sponsors and talk proposal.

LINKS

Community PR odoo/odoo#55197
Enterprise PR odoo/enterprise#12113

Task ID-2287372 (Fix Twitter Wall)
Task ID-2309702 (Event Preparatory Merge 4)
Prepares Task ID-2252655 (Main Online Event task)
Prepares Task ID-2283796 (Event B2Basics / Registration Flow)
Prepares Task ID-2299857 (Event Design Review)
2020-07-31 15:38:40 +00:00
Thibault Delavallée d30cbf6423 [REF] website_event: improve registration pages
RATIONALE

Even will soon gain a major update called Event Online, allowing to better
support full-online events. In order to prepare its merge, preparatory merge
are done to lessen the final diff.

PURPOSE

Prepare Event Online support by providing fixes in registration and event
frontend flows. Also provide a quick back2basic in backend views to prepare
addition of Online sub modules.

SPECIFICATIONS: REGISTRATION PAGE

Register: display number of remaining registrations only if < 20% of max
capacity. Purpose is to display this text only if remaining count is low.
Otherwise it clutters display without much added information.

Rephrase to "only XX available" as all events do not use seats specifically.

Fix some alignment issues, with tickets title / tickets themselves / event
description.

Improve display of ticket selection, especially with event_sale installed and
in mobile as we may not see content of select box.

SPECIFICATIONS: REGISTRATION CONFIRMATION PAGE

Change table by simply putting registration information in a card-like display.
Display each information (name, email, phone, ...) on a separate line. Purpose
is to be mobile-friendly as tables display badly on mobile

LINKS

Community PR odoo/odoo#55197
Enterprise PR odoo/enterprise#12113

Task ID-2287372 (Fix Twitter Wall)
Task ID-2309702 (Event Preparatory Merge 4)
Prepares Task ID-2252655 (Main Online Event task)
Prepares Task ID-2283796 (Event B2Basics / Registration Flow)
Prepares Task ID-2299857 (Event Design Review)
2020-07-31 15:38:28 +00:00
Thibault Delavallée 91b02aa924 [REF] website_event: improve main 'all events' page
RATIONALE

Even will soon gain a major update called Event Online, allowing to better
support full-online events. In order to prepare its merge, preparatory merge
are done to lessen the final diff.

PURPOSE

Prepare Event Online support by providing fixes in registration and event
frontend flows. Also provide a quick back2basic in backend views to prepare
addition of Online sub modules.

SPECIFICATIONS: ALL EVENTS PAGE

Improve event cards layout

  * remove footer when having nothing to show;
  * remove organizer: odoo standard use case for PME show that it is uncommon
    to have multi-organizers on an event page. It can be set back easily with
    a simple customization if necessary;
  * fix horizontal border crossing the screen in "no cards" layout;

Improve events search bar

  * put move filters on same line as search, to have everything taking one line
    in desktop mode;
  * remove "clear filters" big button because we feel it is not necessary;

LINKS

Community PR odoo/odoo#55197
Enterprise PR odoo/enterprise#12113

Task ID-2287372 (Fix Twitter Wall)
Task ID-2309702 (Event Preparatory Merge 4)
Prepares Task ID-2252655 (Main Online Event task)
Prepares Task ID-2283796 (Event B2Basics / Registration Flow)
Prepares Task ID-2299857 (Event Design Review)
2020-07-31 15:35:58 +00:00
Thibault Delavallée 9cf03ebd82 [REF] website_event: improve frontend 'introduction' page
RATIONALE

Even will soon gain a major update called Event Online, allowing to better
support full-online events. In order to prepare its merge, preparatory merge
are done to lessen the final diff.

PURPOSE

Prepare Event Online support by providing fixes in registration and event
frontend flows. Also provide a quick back2basic in backend views to prepare
addition of Online sub modules.

SPECIFICATIONS: INTRODUCTION PAGE

Ease introduction page edition, notably by adding missing snippets information
on introduction page template.

By the way, move those side templates in a specific file in order to cleanup a
bit the main template file that is a bit messy.

LINKS

Community PR odoo/odoo#55197
Enterprise PR odoo/enterprise#12113

Task ID-2287372 (Fix Twitter Wall)
Task ID-2309702 (Event Preparatory Merge 4)
Prepares Task ID-2252655 (Main Online Event task)
Prepares Task ID-2283796 (Event B2Basics / Registration Flow)
Prepares Task ID-2299857 (Event Design Review)
2020-07-31 15:35:52 +00:00
e8dd796b7a [REF] event_*: tweak some views to help sub modules inheritance
RATIONALE

Even will soon gain a major update called Event Online, allowing to better
support full-online events. In order to prepare its merge, preparatory merge
are done to lessen the final diff.

PURPOSE

Prepare Event Online support by providing fixes in registration and event
frontend flows. Also provide a quick back2basic in backend views to prepare
addition of Online sub modules.

SPECIFICATIONS

Extract menus entries in separate menus.xml file to ease understanding.
Minimal move is done to avoid too large diff. Complete guidelines compliance
will be done in master.

Sequence configuration menu entries to ease their ordering. Indeed when having
all event sub-apps installed configuration is messy, with event menus mixed
with track menus, ...

Improve event tag view (remove title, have a simple form view)

Improve event sponsor views (add group-by, improve form view, add no content
helpers). Those will become exhibitors and having usable views is necessary.

Add some anchors in existing views to ease inheritance.

LINKS

Community PR odoo/odoo#55197
Enterprise PR odoo/enterprise#12113

Task ID-2309702 (Event Preparatory Merge 4)
Prepares Task ID-2252655 (Main Online Event task)
Prepares Task ID-2283796 (Event B2Basics / Registration Flow)
Prepares Task ID-2299857 (Event Design Review)

Co-Authored-By: Aurélien Warnon <awa@odoo.com>
Co-Authored-By: David Beguin <dbe@odoo.com>
Co-Authored-By: Thibault Delavallée <tde@odoo.com>
2020-07-31 15:35:46 +00:00
567bd4d9d9 [REF] website(_event): allow to give a placeholder to website search box
RATIONALE

Even will soon gain a major update called Event Online, allowing to better
support full-online events. In order to prepare its merge, preparatory merge
are done to lessen the final diff.

PURPOSE

Prepare Event Online support by providing fixes in registration and event
frontend flows. Also provide a quick back2basic in backend views to prepare
addition of Online sub modules.

SPECIFICATIONS

Be more explicit in search boxes: allow to set a placeholder. It helps users
understanding purpose of the search tool.

Set it to "Search an event ..." in website_event.

LINKS

Community PR odoo/odoo#55197
Enterprise PR odoo/enterprise#12113

Task ID-2309702 (Event Preparatory Merge 4)
Prepares Task ID-2252655 (Main Online Event task)
Prepares Task ID-2283796 (Event B2Basics / Registration Flow)
Prepares Task ID-2299857 (Event Design Review)

Co-Authored-By: Aurélien Warnon <awa@odoo.com>
Co-Authored-By: David Beguin <dbe@odoo.com>
Co-Authored-By: Thibault Delavallée <tde@odoo.com>
2020-07-31 15:35:32 +00:00
Thibault Delavallée 45dcd18647 [IMP] website: support add_direction in duration qweb widget
RATIONALE

Events are sometimes held online, gathering a community. In this merge we
improve Event application to better support full-online events with improved
tracks, wishlists, chat rooms, ...

PURPOSE

Prepare Event Online support by providing fixes in registration and event
frontend flows. Also provide a quick back2basic in backend views to prepare
addition of Online sub modules.

SPECIFICATIONS

Allow to give add_direction to duration widget, propagated to babel formatting.
See babel for any information about its use.

LINKS

Community PR odoo/odoo#55197
Enterprise PR odoo/enterprise#12113

Task ID-2309702 (Event Preparatory Merge 4)
Prepares Task ID-2252655 (Main Online Event task)
2020-07-31 15:34:37 +00:00
Thibault Delavallée 4ac288b944 [REF] event: improve (and fix) default email templates
RATIONALE

Events are sometimes held online, gathering a community. In this merge we
improve Event application to better support full-online events with improved
tracks, wishlists, chat rooms, ...

PURPOSE

Prepare Event Online support by providing fixes in registration and event
frontend flows. Also provide a quick back2basic in backend views to prepare
addition of Online sub modules.

SPECIFICATIONS: CONFIRMATION / REMINDER EMAIL

Reorder a bit content: add links to add to calendar directly in header
text, between confirmation and signature.

Add a section holding a link to PWA in order to showcase it to customers.

Apply fixes :

  * correctly use 50% width only for date / location display when location
    is not set;
  * correctly put jinja tags to make valid html, otherwise edit / save template
    breaks it when browse move jinja tags a bit randomly (e.g. %if between
    tr tag is not valid html and broken by design);
  * correctly compute horizontal separation lines, display them only when there
    is actually some content to separate;
  * correctly support organizer / no organizer, address / no address and
    online / not online in all template;

Notes: this require to re-generate the whole translations templates of both
templates but this seems a required pain. Indeed current template are broken
beyong redemption.

Fixes notably cfca2bb0ff

LINKS

Community PR odoo/odoo#55197
Enterprise PR odoo/enterprise#12113

Task ID-2309702 (Event Preparatory Merge 4)
Prepares Task ID-2252655 (Main Online Event task)
Prepares Task ID-2283796 (Event B2Basics / Registration Flow)
Prepares Task ID-2299857 (Event Design Review)
2020-07-31 15:34:30 +00:00
Sébastien Theys 0d4cb52b9d [FIX] mail: batch create/insert of JS model for performance
PR: #55261
Part of task-2308312

closes odoo/odoo#55266

X-original-commit: eded5f6372d4f1cffd1a361bd8fa7fd8f1f8ae9e
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-07-31 14:43:15 +00:00
Sébastien Theys 7a1bfa793a [FIX] mail: fix performance of JS models update cycle
- wrap all JS model operations in update cycle
- properly delay execution of compute during `_updateAfter`

This allows to delay the execution of computes as long as possible, which
significantly improves performance, especially during init_messaging with plenty
of chat windows (due to compute of "visual").

PR: #55261
Part of task-2308312

X-original-commit: 79f85523ebef6b7ac4c198eec8b1e55e243f49d1
2020-07-31 14:43:15 +00:00
Sébastien Theys 64f7186843 [IMP] iap, mail_bot, snailmail: introduce tests_assets
Necessary to merge in saas-13.4: https://github.com/odoo/odoo/pull/53826

closes odoo/odoo#55056

Related: odoo/enterprise#12074
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-07-28 14:12:15 +00:00
Odoo's Mergebot ef6ad444d1 [IMP] stock: forecast report and widget
Add useful metrics bellow the forecast graph view.
A list of incoming and outgoing moves for the current products.
A link between outgoing and incoming documents. (base on the delivery and receipt date)
Quantity on hand, the value in stock.

Also add a new forecast widget on moves, sale order lines.
The widget display the reserved quantity or an expected date for the receipt.

More details in each commits.

task-2058495

closes odoo/odoo#54528

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2020-07-31 17:49:49 +02:00
svs-odoo 75e8f0e5b1 [IMP] stock: products availability
Add two compute fields for picking model:
  - `products_availability` will indicate the products' availability for
delivery (outgoing picking).
  - `products_availability_state` is used to decorate the field in the
    list view.

task-2058495
2020-07-31 12:36:55 +00:00
svs-odoo 97ae59ce82 [IMP] mrp: component availability 2020-07-31 12:36:55 +00:00
svs-odoo 372b900fe3 [IMP] mrp: forecast widget
Add the forecast widget for the manufacture orders' components.

task-2058495
2020-07-31 12:36:55 +00:00
svs-odoo 89625df828 [IMP] sale_stock: forecast widget
Add the forecast widget for the sale order line's delivered quantity.

task-2058495
2020-07-31 12:36:55 +00:00
Simon Lejeune f44da631f4 [ADD] stock: forecast widget 2020-07-31 12:36:54 +00:00
svs-odoo ea48c5e756 [IMP] stock_account: extend replenishment report
Adds the value on hand in the replenishment report.

task-2058495
2020-07-31 12:36:54 +00:00
svs-odoo 56eb3f3599 [FIX] stock: default warehouse in replenish wizard
Before this commit, passing the `default_warehouse_id` in the context
has no effect with the product replenish wizard because the warehouse id
was overrided in the `default_get`.
2020-07-31 12:36:54 +00:00
svs-odoo 61300f6817 [IMP] sale_stock: extend replenishment report
Adds Sale Order as consuming document for the report.
Also, make the SO line `warehouse_id` field related to SO warehouse.

task-2058495
2020-07-31 12:36:54 +00:00
svs-odoo 38018469a7 [IMP] purchase_stock: extend replenishment report
Adds Purchase Orders as replenishment/consuming document for the
replenishment report.

task-2058495
2020-07-31 12:36:54 +00:00
svs-odoo 832af92115 [IMP] mrp: extend replenishment report for mrp
Adds the Manufacturing Order as replenishment/consuming document for the
replenishment report.

task-2058495
2020-07-31 12:36:54 +00:00
svs-odooandsle-odoo 288fdacaf7 [IMP] stock: forecasted report
Adds the Replenishment Report, a printable report on product variants
and product templates. This report displays all draft and planned moves.
It has also the purpose to be overridden to handle purchase and sale
lines, and product's consumptions/productions of manufacturing orders.
Documents listed in the report can be accessed by clicking on their name.

task-2058495

Co-authored-by: sle-odoo <sle@odoo.com>
2020-07-31 12:36:54 +00:00
Katherine Zaoral c8b2434d61 [FIX] l10n_ar: properly compute l10n_ar_vat field
Only compute l10n_ar_vat when this one is defined, if not then the field
should not be computed.

closes odoo/odoo#55246

X-original-commit: 4e2de8c858c2d55b227b8a2fd3f8226f9da91a9d
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-07-31 09:10:06 +00:00
Antoine Prieels d24e3e780f [FIX] point_of_sale: Fix small layout issues
Fix small layout issues:
 - On the scale screen, the product and computed prices were too large
   and not displayed correctly, hiding part of the Order button.
 - The icon in the proxy status was not displayed next to the text but
   on the next line, partly hidden.
 - The proxy status takes too much space on small devices, we hide the
   text and show only the icon on mobile.

closes odoo/odoo#55259

X-original-commit: 9d81e9d376751bf971733475ce241821f38352f8
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Signed-off-by: Antoine Prieëls <aprieels@users.noreply.github.com>
2020-07-31 11:58:08 +00:00
Odoo's Mergebot e77a871672 Remove AccountTestCommon to fix l10n builds
l10n runbot builds are all failing when running at least one test depending of AccountTestCommon because it:
    - doesn't create a sandboxed testing environnement to manage the multi-currency, multi-company, the default company's currency, the exchange rates...
    - doesn't setup a testing user then all tests are done using the superuser.
    - doesn't provide a fully setup chart of accounts: exchange difference journal is not set, accounts have bad types, etc...
    - is run sometimes at-install.

--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

closes odoo/odoo#54906

Related: odoo/enterprise#12002
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2020-07-31 14:34:29 +02:00
DramixDwandqsm-odoo bdcc1ea9e7 [IMP] website_blog: add tag from frontend (editor left panel)
Previously, you could only add a tag on a blog post from the backend.
Here we're adding a way to add them from the left-panel so that it's
easier for the user to add them.

The long term goal will not be to reimplement complex view of the
backend. This is actually already past the limit: we will need a way
to instantiate views from the backend in the frontend in the future.

Part of https://github.com/odoo/odoo/pull/52759
task-2267693

closes odoo/odoo#52759

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-07-31 10:32:22 +00:00
Laurent Smet 972ab11029 [IMP] account: Remove AccountTestCommon
l10n runbot builds are all failing when running at least one test depending of AccountTestCommon because it:
- doesn't create a sandboxed testing environnement to manage the multi-currency, multi-company, the default company's currency, the exchange rates...
- doesn't setup a testing user then all tests are done using the superuser.
- doesn't provide a fully setup chart of accounts: exchange difference journal is not set, accounts have bad types, etc...
- is run sometimes at-install.

--task: 2301180
2020-07-31 08:38:40 +00:00
Laurent Smet 6d1e1e09ea [IMP] sale*: Remove dependency to AccountTestCommon
l10n runbot builds are all failing when running at least one test depending of AccountTestCommon because it:
- doesn't create a sandboxed testing environnement to manage the multi-currency, multi-company, the default company's currency, the exchange rates...
- doesn't setup a testing user then all tests are done using the superuser.
- doesn't provide a fully setup chart of accounts: exchange difference journal is not set, accounts have bad types, etc...
- is run sometimes at-install.

--task: 2301180m
2020-07-31 08:38:30 +00:00
DramixDwandqsm-odoo ea009585e1 [IMP] website_blog, *: add a way to search blog posts
*: website

As there was no way to search a blog post, it could be hard for someone
to find a particular post if there was a lot of blog post for example.

Part of https://github.com/odoo/odoo/pull/52759
task-2267693

Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-07-31 07:40:31 +00:00
Victor FeyensandSteve Van Essche 8acfc6b965 [FIX] stock_picking_batch: wrong sanity check on picking creation.
1) Wrong use of self.batch_id in an api.model method.
2) Fix demo datas which didn't pass the sanity check (after the fix)

Avoid to put draft picking into non-draft batch picking and use batch's
actions instead of picking's actions for confirmation and reservation.

closes odoo/odoo#55254

X-original-commit: 9e9f50169ba4d4698ce64b0865db4cc6b4833b0e
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Co-authored-by: Steve Van Essche <svs@odoo.com>
2020-07-31 10:13:08 +00:00
Sébastien Theys 78bef3e08c [FIX] mail: improve performance of JS write, especially for x2m
- store `x2many` values as `Set`. This is conceptually more correct because
  duplicates were already not allowed, and using a `Set` allows for much faster
  operations such as checking the presence of a record in the relation, which is
  done at every write, for every linked record.

- `stringify` in `write` was slow and unnecessary because we can always assume
  that new non-primitive should be provided to `write`

- remove field values from store, in favor of just storing a counter, which is
  enough to trigger renders. This allows to get rid of one Proxy level around
  data, which was slower, but which also prevented from using `Set`.

- write in store exactly once per update cycle, to trigger one `useStore` call
  on each component. Records keep `__state` but as a local counter, to let
  `useStore` know which records have been updated (easier to compare a counter
  than comparing each and every field value).

Results
=======

The worse case test (using a lot of x2m) that was used to benchmark this PR
`form_renderer_tests.js` of `mail_enterprise` went from taking around 4s before
this commit, to around 2.5s after this commit.
And the worse `_setRelationLinkMany2Many` previously took around 250ms, and it
now takes around 50ms.

The whole `mail` QUnit suite took around 55s before, now around 42s.

Part of task-2308312

closes odoo/odoo#55248

X-original-commit: 4db0a10d85534ef896f6bcbf13bca4983a6e2003
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-07-31 09:43:01 +00:00