Commit Graph
138052 Commits
Author SHA1 Message Date
Guewen Baconnier 62adaa783c [FIX] Ignore sale order lines without product_id
In some conditions, such as the use case shown on:
https://github.com/guewen/odoo-reproduce-issues/blob/compute-qty-at-date/compute_qty_at_date/models/sale_order_line.py

The order of the computations can make that we have a line without
product_id (we come from an onchange because we removed the product form
the line), but 'display_qty_widget' is not yet recomputed.

Not checking if we have a product_id means we can end up with
'grouped_lines' that contains an entry for the line, but then
'product_qties' does not contain the product the dict comprehension
that builds the dictionary 'qties_per_product' fails with a KeyError.

opw-2273768

closes odoo/odoo#56406

X-original-commit: 9060b347949d11880c554468f551d25e874590d1
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-08-24 12:54:27 +00:00
Damien Bouvy be9ea60d07 [IMP] web: support custom create_name_field in calendar view
Until now, the quick creation dialog of the calendar view assumed that
the underlying model used a 'name' field for quick creation, with a
graceful degradation if it was not the case (redirect to the form view).

This prevented quick creation of models created through customizations
(for example).

This commit adds a `create_name_field` attribute on the view declaration
(similarly to many2one field) that allows to specify the field to use
during quick creation.

Task-2185423

closes odoo/odoo#48122

Related: odoo/enterprise#11242
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2020-08-24 11:50:15 +00:00
qsm-odoo 6bc2364974 [FIX] website: restore default font properties per font family system
Commit [1] made a mistake when creating the new font family system. The
values defined in the palettes took precedence over the overridding
values defined in the fonts configuration map. Obviously only user
values should take precedence over those.

[1]: https://github.com/odoo/odoo/commit/7be1429656af3c96ac30caed28a27f5b9590009f

closes odoo/odoo#56382

X-original-commit: eea7bb3ef0ff7e2304c686bb91e947a754dce03f
Related: odoo/design-themes#345
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-08-24 11:00:02 +00:00
Antoine Prieels 5519a7d04d [FIX] point_of_sale: Fix http.py.iotpatch
`http.py` had been modified so the file could be patched correctly with
the previous version of the `http.py.iotpatch` file

closes odoo/odoo#56383

X-original-commit: 4cc5f5e10125c784a6b930294e5186ae94cb4975
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
Signed-off-by: Antoine Prieëls <aprieels@users.noreply.github.com>
2020-08-24 11:00:44 +00:00
Odoo's Mergebot 217f964a08 [FW][MERGE] event_*: fix demo and various frontend glitches
PURPOSE

Provide fixes after internal deployment of event online modules.

SPECIFICATIONS

Fix glitches in exhibitor menu filters.

Use Favorite name for reminder / wishlist / favorite widget of tracks.

Fix track / agenda menu management.

Fix demo data to have coherent tracks.

See sub commits for more details.

UPDATE

  * website_event_track_exhibitor.exhibitors_topbar_sponsorship
  * website_event_track_online.track_widget_reminder
  * website_event_track_session.session_topbar

LINKS

Task ID-2312007 (demo fix)
Task ID-2314778 (event online fixes)
PR odoo/odoo#56254
PR odoo/enterprise#12558

closes odoo/odoo#56300

Forward-port-of: odoo/odoo#56254
Related: odoo/enterprise#12566
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-08-24 13:03:14 +02:00
Thibault Delavallée 147cf5f328 [FIX] website_event(_exhibitor/track_quiz): display community menu only when used
Community menu field is added in website_event module. It is used in two
inheriting modules, website_event_meet and website_event_track_quiz. There
is no other common ancestor for those two modules.

In website_event, community menu field should be False and not displayed
as it has no real use. Only in those sub-applications it should be
computed like other menu fields, and displayed in event views (both
event and event type for configuration).

PR #56340
2020-08-24 10:20:12 +00:00
Thibault Delavallée 4dcc532282 [IMP] website_event_track_online: rename Reminder to Favorite
SPECIFICATIONS

Button to add a track in wishlist is either mentionned as wishlist, reminder
or event favorite. This is due to its naming evolving during various iterations
of dev and spec.

We set it to Favorite once for all.

UPDATE

  * website_event_track_online.track_widget_reminder
  * website_event_track_session.session_topbar

LINKS

Task ID-2314778 (event online fixes)
PR #56340

X-Original-PR #56254
X-Original-Commit odoo/odoo@73619ab9f6
2020-08-24 10:20:12 +00:00
Thibault Delavallée d544587195 [FIX] website_event_track(_online): fix track menu computation
This commit fixes glitches when switching menus. Indeed agenda is not correctly
taken into account, meaning it could get duplicated. Moreover track was
constantly coming back as True event when not wanted.

Behavior is: when setting website menu, force it to True, otherwise let users
defined its value. Agenda is part of track menu so fix its declaration in
_track and _track_online methods.

Task ID-2314778 (event online fixes)
PR #56340
PR odoo/enterprise#12589

X-Original-PR #56254
X-Original-Commit odoo/odoo@5821758c4d
2020-08-24 10:20:12 +00:00
Thibault Delavallée 9fea714542 [FIX] website_event_track_exhibitor: fix frontend menu glitches
SPECIFICATIONS

Fix ordering of countries: to be displayed by name

Fix 'all sponsorships' top menu entry in sponsorship filter. It is
called 'all countries', probably a copy-and-paste from country menu.

Fix display of modal when exhibitor is not online: if no country flag has
been found, avoid displaying a broken image.

UPDATE

  * website_event_track_exhibitor.exhibitors_topbar_sponsorship

LINKS

Task ID-2314778 (event online fixes)
PR #56340

X-Original-PR #56254
X-Original-Commit odoo/odoo@b2d203e85c
2020-08-24 10:20:12 +00:00
Thibault Delavallée f5aaf47ca8 [IMP] website_event_track_*: slightly improve tracks demo data
Purpose is to improve a bit tracks in Online Reveal demo event. Notably improve
synchronization of demo in website_event_track_live with their content in base
track module. Tweak some hours to make agenda look nicer.

Task ID-2312007 (demo fix)
Task ID-2314778 (event online fixes)
PR #56340

X-Original-PR #56254
X-Original-Commit odoo/odoo@8b46e9ee3b
2020-08-24 10:20:12 +00:00
Lucas Perais (lpe) 59c8c523de [FIX] web: crash_manager uses BrowserDetection
Before this commit, the crash manager used a copy of the browser detection isBrowserChrome method
because it was not possible to to register the proper dependency in stable version

This commit makes the crash manager use the module BrowserDetection for that purpose, with the proper
registered dependency before hand

closes odoo/odoo#56364

X-original-commit: 59e0dbab98466a23792af4a10003142614bda676
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2020-08-24 07:30:42 +00:00
Lucas Perais (lpe) 86c4f79212 [FIX] web, website: move keyboard navigation and browser detection in common
Before this commit, the files keyboard_navigation_mixin.js and browser_detection.js
were defined both in assets_backend and in assets_frontend

Obviously then, they should be defined in assets_common, as this commit intends.

X-original-commit: 42e7c01024dcc8f5d0d0ee13c120bd31374837cd
2020-08-24 07:30:42 +00:00
Dharmraj Jhala f49dbf595c [IMP] account, purchase, sale: allow sending email to self
Currently, if users try to send invoices / quotations / purchase orders to
themselves in order to look at final result, they can't do so because our
default chatter protection prevents sending mails to authors themselves.

This commit uses 'mail_notify_author' context key and allows users to send
mails from the header buttons available on SO / PO / invoices to themselves
if they are in recipients.

This commit targets only those buttons as this is the main case where we
want to allow people to send emails to themselves. In order to avoid
side effects no other use case is supported.

Task ID-2294130

closes odoo/odoo#56370

X-original-commit: 08c0dc929da38595e29a9d1db93065547cd98ad1
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-08-24 08:14:44 +00:00
Thibault Delavallée 8ff7973e79 [FIX] base, mail: allow to use templates with reports
Since de4213b771 it is not possible to anyone except admin to use templates
with a report defined on it. This could be annoying.

X-original-commit: 47f5e14eca4e13010cc11f688ea92f65a2695d38
2020-08-24 08:14:43 +00:00
David Beguin 78300be000 [FIX] website_event_track_online: set overflow-x to auto in event agenda
In order to see the overflow-x scrollbar only when needed, overflow-x have been
set to auto instead of scroll for agenda table.

Task ID: 2314778

closes odoo/odoo#56368

X-original-commit: ec189b25230177946bca8fb2b020fb168b425c5f
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-08-24 08:06:01 +00:00
Martin Trigaux 6c002f8997 [FIX] l10n_ch,l10n_mn: correct author name
Use the correct spelling of "Odoo S.A."
No need to specify it for modules only developped by Odoo S.A.

Closes odoo/odoo#54372

closes odoo/odoo#56349

X-original-commit: a443c294ac4413444d05f5c0297f8234d9ead850
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-08-22 12:55:12 +00:00
Benjamin Vray e72b153fe0 [FIX] web_editor: fix snippet top options
Before this commit some top option buttons were badly positioned
(see Carousel options).

task-2312878

closes odoo/odoo#56353

X-original-commit: 196c2e72ba5b212eccd2bba7ad33c870e0a40c70
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-08-22 20:10:08 +00:00
qsm-odoo bbe117e107 [IMP] web_editor, website: introduce foldable zones in the editor UI
Now any set of widgets and rows can be placed in a we-collapse element
so that those elements can be foldable. The first element inside (or
the mentioned "string" on the we-collapse element itself) is used as the
always shown element (with a toggler on its left to toggle the
visibility of the other items).

we-collapse inside other we-collapse is supported as well.

Limitations / Other infos:

- The use of '⌙' and &emsp; characters is not automatic (yet?).
  Sometimes it actually make sense to use them without a we-collapse or
  to not use them in a we-collapse.

- The use of we-collapse is limited to widgets inside the same option.
  So unfortunately, there is no current way to add all bg image options
  in a folable section as those contain many different options. Maybe
  in the future.

Part of https://github.com/odoo/odoo/pull/56350

closes odoo/odoo#56352

X-original-commit: d9c450ac97de40c71aebd487cff725bfda6a577b
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-08-22 17:51:32 +00:00
qsm-odoo 9ab62a9bc6 [FIX] web_editor: allow we-title alone in an option
It was already working but not perfectly aligned.

Part of https://github.com/odoo/odoo/pull/56350

X-original-commit: 95239e523b194777b58e8dd9a409a93404b44c6d
2020-08-22 17:51:32 +00:00
Xavier-Do 5c33f1df58 [FIX] crm: get correct country for phone validation
Phone validation of crm_leads was using crm.lead country instead of partner
country code. This was leading to phone number of crm_case_16 coming from
an us partner validated as a uk phone number. (same problem applies for crm_case_14)

The problem was discovered in pre/post upgrade crawler test.

closes odoo/odoo#56348

X-original-commit: a58f9fc154c038d72031b281e2bec2c0fc2915ba
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2020-08-22 11:40:19 +00:00
Xavier-Do 4da3f9cf1c [FIX] base: avoid warning when computing desc of to_buy modules
post upgrade tests will trigger 'module not found' warning when testing modules views
because of 'fake' modules without real file path.

closes odoo/odoo#56335

Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2020-08-21 16:07:00 +00:00
Xavier-Do 1495065041 [FIX] stock, hr_holidays: fix server actions groups_id
f0d37c384b added a check on write access
for server action. Since the fixed server action are readonly with strict
access right, corresponding groups are added to avoid a warning.
2020-08-21 14:18:59 +00:00
Christophe Monniez ffb0f2b7a1 [IMP] core: bump master release version to 14.1 alpha
closes odoo/odoo#56337

Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2020-08-22 09:54:52 +00:00
Samuel Degueldre 809fefbe81 [FIX] web_editor: fix small gaps between shapes and their environments
Because of the way browsers render SVGs as background images, background
SVGs will sometimes not perfectly hug the top or bottom of their
containers because of rounding in the calculation of the width from the
height, or height from the width.

This commit fixes a number of the shapes displaying this behaviour, by
making their viewbox a perfect square, this means that whenever the
width or height of the SVG is determined by the brower, it will use the
same number for the height or width respectively because the aspect
ratio is exactly one, rather than using the closest integer
approximation of the aspect ratio, which causes those artifacts.

task-2319484

closes odoo/odoo#56200

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-08-22 07:59:59 +00:00
Juan Jose Scarafia 6d52f3646c [FIX] account: update account and payment term
- Create 2 customers A & B
- On A, set a Payment Term for Sales and Purchases
- Create a customer invoice
- Add a line
- Set Partner A
  => the payment term is selected
- Set Partner B
  => the payment term is kept

Moreover, the term account is set only if the customer has a payment
term set, which is not logical.

Since the partner is not mandatory, we keep an intermediate behavior: we
set the info of the partner only if there is a partner defined.

opw-2304436

closes odoo/odoo#55632

X-original-commit: 68d470ee832ea7999ebcb58109d249d7d463c83d
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2020-08-07 13:36:06 +00:00
1ca3a590f7 [FIX] web: crash manager correctly formats error message in Firefox
Have a piece of code that throws an Error

In browsers not powered by V8, the stack trace won't be formatted and the Error
type won't appear in the crash manager modal report.

This happens because Error.prototype.stack is non-standard, although most
browsers have an implementation of it. Chrome for example automatically formats
the Error.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error
https://v8.dev/docs/stack-trace-api\#compatibility

After this commit, the Error is formatted in the crash manager report, the same
way as Chrome does it.

task-2191727

closes odoo/odoo#56318

X-original-commit: dbf670f2e0ec797aeaf998aa28b32afbdd2c3b4c
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
Co-authored-by: Lucas Perais <lpe@odoo.com>
Co-authored-by: Hardik Prajapati <hap@odoo.com>
2020-08-21 14:33:45 +00:00
David Beguin 6a5ee406d8 [IMP] website_event_*: clean sitemap
From now, you need to explicitely add sitemap=True if you want your controller
into the sitemap.  It's the default value, but if you forgot it, it will raise
a Warning on runbot. It will avoid wrong controller in sitemap and duplicate
(empty) content.  From now, if your model contains a field website_id, the
modelConverter for sitemap will automatically add the domain:
"[('website_id', 'in', (False, current_website_id))]"

It avoid redundant declaration and ugly url in redirect/rewrite view.

Task ID: 2318597

closes odoo/odoo#56114

X-original-commit: aabd31d1523fb6ca68336cc66a6e2f074173f396
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2020-08-19 10:00:10 +00:00
Goffin Simon 716e226656 [FIX] product: wrong precision display for standard_price
Steps to reproduce:

- Install MRP and Inventory
- In Settings > Decimal accuracy, change the number of digits of Product Price to 6
- Go to a product template PT

Bug:

The field standard_price was displayed with two digits instead of 6

opw:2241369

closes odoo/odoo#56235

X-original-commit: cddd79b3dce31108315a7a4c6157c49fc5e97639
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2020-08-20 14:25:10 +00:00
Jeremy Kersten cbf8d3b304 [IMP] website: perf - cache public page
closes odoo/odoo#56331

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-08-21 17:50:00 +00:00
Odoo's Mergebot 9b113830ea [MERGE][REM] website_event_(track)(_online/_session): merge with their base modules
PURPOSE

Clean organization and models linked to Event Online feature introduced in
semi stable saas-13.3 at odoo/odoo@981f95bbf4 and odoo/enterprise@14722028ae

Also clean website event menu not being available in website event but only
in website event track, which implies some extra-code to manage it.

In short: merge website_event_online in website_event, website_event_track
_(online/session) in website_event_track.

RATIONALE

_online modules have been added to extend content of website_event and
website_event_track without having any impact on those module. First step
of cleaning is to move this content directly in base module.

track_session module is mainly a rewrite of track module. Second step of
cleaning is to move its content directly in website_event_track.

SPECIFICATIONS

Move website.event.menu model from website event track to website event
module. It allows to define community menu in website_event and re-use it
in website_event_meet and website_event_track_quiz, removing some
unnecessary dependencies.

Move event.tag color field from website event online to event. This field is
part of standard event models.

Move remaining content of website event online to website event.

Move remaining content of website event track online to website event track.
Agenda notably is completely replaced by the new one developed within
track_online module.

Move all content of website event track session to website event tracK. It
was mainly of rewriting of views and can now be safely merged into the base
track module.

Ease discovering of online features: set bridges as auto install and allow to
configure CTA button on event from event_type, like other frontend related
menus and buttons, and add settings to install meet, exhibitors, live mode
and quizzed.

Update dependencies accordingly.

LINKS

Task ID-2319779
COM odoo/odoo#56067
ENT odoo/enterprise#12520
UPG odoo/upgrade#1654

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-08-21 20:08:12 +02:00
Thibault Delavallée 4bbb36bd7f [IMP] (website_)event: ease configuration of Online features
PURPOSE

Clean organization and models linked to Event Online feature introduced in
semi stable saas-13.3 at odoo/odoo@981f95b and odoo/enterprise@1472202

Also clean website event menu not being available in website event but only
in website event track, which implies some extra-code to manage it.

In short: merge website_event_online in website_event, website_event_track
_(online/session) in website_event_track.

RATIONALE

_online modules have been added to extend content of website_event and
website_event_track without having any impact on those module. First step
of cleaning is to move this content directly in base module.

track_session module is mainly a rewrite of track module. Second step of
cleaning is to move its content directly in website_event_track.

SPECIFICATIONS

Allow to configure Menu CTA button on event from event_type, like other
frontend related menus and buttons.

Add settings to ease discovering and installing sub event features like
  * meet;
  * exhibitor;
  * live mode;
  * quizzes;

LINKS

Task ID-2319779
COM odoo/odoo#56067
ENT odoo/enterprise#12520
UPG odoo/upgrade#1654
2020-08-21 17:30:13 +00:00
Thibault Delavallée de8a5652b2 [REM] website_event_track_session: merge into website_event_track
PURPOSE

Clean organization and models linked to Event Online feature introduced in
semi stable saas-13.3 at odoo/odoo@981f95bbf4 and odoo/enterprise@14722028ae

Also clean website event menu not being available in website event but only
in website event track, which implies some extra-code to manage it.

In short: merge website_event_online in website_event, website_event_track
_(online/session) in website_event_track.

RATIONALE

_online modules have been added to extend content of website_event and
website_event_track without having any impact on those module. First step
of cleaning is to move this content directly in base module.

track_session module is mainly a rewrite of track module. Second step of
cleaning is to move its content directly in website_event_track.

SPECIFICATIONS

Move all content of website event track session to website event tracK. It
was mainly of rewriting of views and can now be safely merged into the base
track module.

Update dependencies accordingly.

LINKS

Task ID-2319779
COM odoo/odoo#56067
ENT odoo/enterprise#12520
UPG odoo/upgrade#1654
2020-08-21 17:30:13 +00:00
Thibault Delavallée 1163013ed6 [REM] website_event_track_online: merge into website_event_track
PURPOSE

Clean organization and models linked to Event Online feature introduced in
semi stable saas-13.3 at odoo/odoo@981f95bbf4 and odoo/enterprise@14722028ae

Also clean website event menu not being available in website event but only
in website event track, which implies some extra-code to manage it.

In short: merge website_event_online in website_event, website_event_track
_(online/session) in website_event_track.

RATIONALE

_online modules have been added to extend content of website_event and
website_event_track without having any impact on those module. First step
of cleaning is to move this content directly in base module.

track_session module is mainly a rewrite of track module. Second step of
cleaning is to move its content directly in website_event_track.

SPECIFICATIONS

Move remaining content of website event track online to website event track.
Agenda notably is completely replaced by the new one developed within
track_online module.

Update dependencies accordingly.

LINKS

Task ID-2319779
COM odoo/odoo#56067
ENT odoo/enterprise#12520
UPG odoo/upgrade#1654
2020-08-21 17:30:13 +00:00
Thibault Delavallée b0845c0f2b [REM] website_event_online: merge into website_event
PURPOSE

Clean organization and models linked to Event Online feature introduced in
semi stable saas-13.3 at odoo/odoo@981f95bbf4 and odoo/enterprise@14722028ae

Also clean website event menu not being available in website event but only
in website event track, which implies some extra-code to manage it.

In short: merge website_event_online in website_event, website_event_track
_(online/session) in website_event_track.

RATIONALE

_online modules have been added to extend content of website_event and
website_event_track without having any impact on those module. First step
of cleaning is to move this content directly in base module.

track_session module is mainly a rewrite of track module. Second step of
cleaning is to move its content directly in website_event_track.

SPECIFICATIONS

Move remaining content of website event online to website event.

Update dependencies accordingly.

LINKS

Task ID-2319779
COM odoo/odoo#56067
ENT odoo/enterprise#12520
UPG odoo/upgrade#1654
2020-08-21 17:30:13 +00:00
Thibault Delavallée d697966585 [MOV] (website_)event(_online): move tag color field to event
PURPOSE

Clean organization and models linked to Event Online feature introduced in
semi stable saas-13.3 at odoo/odoo@981f95bbf4 and odoo/enterprise@14722028ae

Also clean website event menu not being available in website event but only
in website event track, which implies some extra-code to manage it.

In short: merge website_event_online in website_event, website_event_track
_(online/session) in website_event_track.

RATIONALE

_online modules have been added to extend content of website_event and
website_event_track without having any impact on those module. First step
of cleaning is to move this content directly in base module.

track_session module is mainly a rewrite of track module. Second step of
cleaning is to move its content directly in website_event_track.

SPECIFICATIONS

Move event.tag color field from website event online to event. This field is
part of standard event models.

LINKS

Task ID-2319779
COM odoo/odoo#56067
ENT odoo/enterprise#12520
UPG odoo/upgrade#1654
2020-08-21 17:30:13 +00:00
Thibault Delavallée 77d7a3cf6a [MOV] website_event(_track): move website event menu into website event
PURPOSE

Clean organization and models linked to Event Online feature introduced in
semi stable saas-13.3 at odoo/odoo@981f95bbf4 and odoo/enterprise@14722028ae

Also clean website event menu not being available in website event but only
in website event track, which implies some extra-code to manage it.

In short: merge website_event_online in website_event, website_event_track
_(online/session) in website_event_track.

RATIONALE

_online modules have been added to extend content of website_event and
website_event_track without having any impact on those module. First step
of cleaning is to move this content directly in base module.

track_session module is mainly a rewrite of track module. Second step of
cleaning is to move its content directly in website_event_track.

SPECIFICATIONS

Move website event menu model directly into website event. Website event menu
model has been introduced to help dealing with event-specific menus and
website menus. This is some kind of glue to synchronize both of them as people
could either

  * update an event (website_menu, website_track) that updates website menus
    availability;
  * update menus through website that should update event field value and menu
    computation;

Having a model introduced in website event track forces to have override and
code split across website_event, website_event_track, and now also in both
_online version of those two as menu management was improved.

In this commit we simplify all this code by moving most of menu management
code in website_event, leaving only business-specific code (fields and their
menus) to sub modules.

SPECIFICATIONS: WEBSITE EVENT MENU

Make type required as we don't support entries without type. Indeed this model
is used to automate menus generation / destruction, and not for hand-made
menus. We therefore set type as required and add a cascade ondelete for
selection.

SPECIFCIATIONS: COMMUNITY MENU

Doing this change allows to define community menu in website_event and re-use
it in website_event_meet and website_event_track_quiz, removing some
unnecessary dependencies. This menu is void in website_event, and displays
either meeting rooms (in meet) or quiz points leaderboard (in quiz), or a
mix of both if the two features are installed.

LINKS

Task ID-2319779
COM odoo/odoo#56067
ENT odoo/enterprise#12520
UPG odoo/upgrade#165
2020-08-21 17:30:13 +00:00
Thibault Delavallée 8da7288453 [REF] website_event_*: fix some views xml ids
PURPOSE

Clean organization and models linked to Event Online feature introduced in
semi stable saas-13.3 at odoo/odoo@981f95bbf4 and odoo/enterprise@14722028ae

Also clean website event menu not being available in website event but only
in website event track, which implies some extra-code to manage it.

In short: merge website_event_online in website_event, website_event_track
_(online/session) in website_event_track.

RATIONALE

_online modules have been added to extend content of website_event and
website_event_track without having any impact on those module. First step
of cleaning is to move this content directly in base module.

track_session module is mainly a rewrite of track module. Second step of
cleaning is to move its content directly in website_event_track.

SPECIFICATIONS

Rename some Xml IDs to ease future maintenance of views, as event application
has a lot of sub modules adding their own fields inside base view of event
models.

LINKS

Task ID-2319779
COM odoo/odoo#56067
ENT odoo/enterprise#12520
UPG odoo/upgrade#165#
2020-08-21 17:30:13 +00:00
Thibault Delavallée 0fc9e8c676 [MOV] website_event_track: reorganize module content
PURPOSE

Clean organization and models linked to Event Online feature introduced in
semi stable saas-13.3 at odoo/odoo@981f95bbf4 and odoo/enterprise@14722028ae

Also clean website event menu not being available in website event but only
in website event track, which implies some extra-code to manage it.

In short: merge website_event_online in website_event, website_event_track
_(online/session) in website_event_track.

RATIONALE

_online modules have been added to extend content of website_event and
website_event_track without having any impact on those module. First step
of cleaning is to move this content directly in base module.

track_session module is mainly a rewrite of track module. Second step of
cleaning is to move its content directly in website_event_trackit.

SPECIFICATIONS

Quickly reorganize some bits of code in website_event_track module to ease
future integration of code from _online sub-modules. It also helps
understanding and finding its way through the module.

Split python files by model: notably event.track sub models inside their own
file to better follow future modifications.

Reorganize templates by main use

  * _agenda: agenda view of tracks;
  * _list: views of tracks, list-based;
  * _page: a specific view of track, page-based;
  * move side templates in side files;
  * reorganize fields and add separators as this model will soon gain a lot
    of fields;
  * reorganize controllers to separate them by main use;

LINKS

Task ID-2319779
COM odoo/odoo#56067
ENT odoo/enterprise#12520
UPG odoo/upgrade#1654
2020-08-21 17:30:13 +00:00
Thibault Delavallée 0a17b8a7ef [MOV] website_event: reorganize module content
PURPOSE

Clean organization and models linked to Event Online feature introduced in
semi stable saas-13.3 at odoo/odoo@981f95bbf4 and odoo/enterprise@14722028ae

Also clean website event menu not being available in website event but only
in website event track, which implies some extra-code to manage it.

In short: merge website_event_online in website_event, website_event_track
_(online/session) in website_event_track.

RATIONALE

_online modules have been added to extend content of website_event and
website_event_track without having any impact on those module. First step
of cleaning is to move this content directly in base module.

track_session module is mainly a rewrite of track module. Second step of
cleaning is to move its content directly in website_event_track.

SPECIFICATIONS

Quickly reorganize some bits of code in website_event module to ease future
integration of code from _online sub-modules. It also helps understanding
and finding its way through the module.

Split python files by model: notably event.type outside of event.event file
and code.

Reorganize templates by main use

  * _list: list view of events;
  * _page: page view of events, either event itself or registration flow
    (_page_registration);
  * move side templates in side files;

LINKS

Task ID-2319779
COM odoo/odoo#56067
ENT odoo/enterprise#12520
UPG odoo/upgrade#1654
2020-08-21 17:30:13 +00:00
Nicolas Lempereur 97b3d26272 [FIX] hr_timesheet: fallback on employee in report
The report "Timesheet Entries" is added in hr_timesheet.

employee_id is added on analytic line (used for timesheet lines) in
hr_timesheet also, and on timesheets view, we display employee.

But in the report, we display "user_id.partner_id.name" for the
responsible, which only works for employee with users.

In this commit we fallback on the employee name if he doesn't have an
associated res.user (for stability keeping original value by default).

opw-2322050
closes #56315

closes odoo/odoo#56330

X-original-commit: c6b8d792f410d049a5a4566718ae1c9bffef7ec0
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-08-21 16:39:07 +00:00
lejeune quentin f4ab72925f [IMP] iot: Add the possibility to switch between scanner and keyboard
Some scanner are detected like keyboard because they do not meet
     the conditions to be supported as a scanner by the driver.

    So we add the possibility to manually switch the type of device
    between scanner and keyboard.

closes odoo/odoo#56053

Related: odoo/enterprise#12370
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2020-08-21 15:31:35 +00:00
Thibault Francois 458c26ae18 [FIX] website_sale, payment: perf issue when displaying tokens
Problem:
the controller rely on record rules to select the payment.token
to be displayed on the payment page.
This works fine with portal user, but internal user
will face client side performance issue
as they can see all the token of the database

Solution:
Don't rely on record.rule in the controller. Use the domain
from the portal user rule in the search.

To make the search of token working for partners with more than
2 levels of hierachy, use child_of operator

closes odoo/odoo#56326

X-original-commit: 3999e249ea9902e009f0366949886e14e3d7fdf4
Related: odoo/enterprise#12579
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2020-08-21 15:33:06 +00:00
Damien Bouvy 0190b6c492 [FIX] payment_paypal: reply nicely to Paypal IPN with unknown reference
If a Paypal account is configured to send IPN notifications to Odoo at
the account level (as we officially advise in our doc) and is used in
another system than Odoo, transactions from that other system will
trigger notifications that gets sent to Odoo with references that are
unknown.

This tends to generate 500 errors, but Paypal will keep trying to send
the same notification over and over; this will cause a lot of errors in
logs and could also could Paypal to contact the account owner regarding
repeated failure on the IPN endpoints, which is somewhat scary for
lambda users.

This commit simply ensures that any such payment will not trigger a
faulty response (Paypal only accept 200 OK responses), but still keep a
trace of it in the logs as a warning.

Note that enabling IPN at the account level is not strictly necessary,
as transactions sent by Odoo force this behaviour regardless of the
setting with the 'notify_url' param.

closes odoo/odoo#56323

X-original-commit: e4e4b51e0d97c5dd6afe332bf7c70d8321469a52
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2020-08-21 15:11:37 +00:00
Sébastien Theys a0e918796f [FIX] mail: remove JS record proxy in favor of accessors
- accessors are defined only once on the model
- they work per field which avoids having to check if target param is in fields
  at every read/write on record

Also store fields as list in `__fieldList` to quickly iterate them without
`Object.values`.

`__combinedFields` are now renamed to `__fieldMap` instead of just `fields` to
avoid confusion with fields definition, and to have a naming similar to
`__fieldList`.

Part of task-2308312

closes odoo/odoo#56314

X-original-commit: 42a94d49b9e8333cf91807c96f0ddd740782915e
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-08-21 14:16:34 +00:00
Sébastien Theys 79f6b15c74 [FIX] mail: avoid unnecessary update of inverse in JS models
Part of task-2308312

X-original-commit: 0e08e43decf18108d25d051ad76c093bcdf434db
2020-08-21 14:16:33 +00:00
oco-odoo 01aa711d41 [FIX] l10n_ch: fix forward-port errors
closes odoo/odoo#56307

X-original-commit: 604dedd84cac082c7575f4b40356f4ac4ff40dd3
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-08-21 13:38:52 +00:00
Florimond Husquinet (fhu) c317232223 [ADD] mail_client_extension
This module provide routes to manage people, companies, and
leads from the outlook add-on. It could eventually be accessed by
add-ons for other mail clients.

closes odoo/odoo#44936

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2020-08-21 14:47:37 +00:00
Xavier Dubuc 0263acee7f [FIX] mail: prevent composer to send message if pending uploads
task-2317862

closes odoo/odoo#56303

X-original-commit: 3b5cd048f1dfa18869e95b173b4232b4bb189025
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-08-21 12:57:44 +00:00
Florimond Husquinet (fhu) f25b730b2f [FIX] iap: take into account the new path of InsufficientCreditError
in the `crash_manager.js` of the iap module.

closes odoo/odoo#56262

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-08-21 07:34:27 +00:00
Antoine Prieels 379e4f0a72 [ADD] pos_restaurant_adyen: Tipping on the receipt
The amount is authorized when the customer scans its card, then the
customer writes the tip on the receipt and the total amount is captured
when the waiter manually inputs the tip, either right after or at the
end of the day.

closes odoo/odoo#56148

Taskid: 2321771
Related: odoo/upgrade#1661
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-08-21 12:41:10 +00:00