Commit Graph
138029 Commits
Author SHA1 Message Date
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
Ravi Gohil 25d63db3f8 [FIX] l10n_in: fixed attrs
Since commit 41f119d5, group named 'column_posting' has been
removed and its attrs' been assigned to the fields it contained.
Hence, it needs to be adapted here as well.
Also, since this new attribute suppose to be applied to Indian
journals only, it has been slightly modified so that its behaviour
remains same for non-Indian companies.

Task#: 2320549

closes odoo/odoo#56039

Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-08-21 09:38:26 +00:00
std-odoo 0c6dcb5b88 [FIX] mass_mailing: fix performance issue on the "total" field
Issue
=====
There's a performance issue when computing the total field on the
mailing model. When there're a lot of record (e.g. 500.000 leads).

This is because when we compute the field, we are fetching all the
records and then we calculate the length of the array.

We can just use a `search_count` and let Postgre count the records.

Task-2313123

closes odoo/odoo#56298

X-original-commit: d1ab37de0c4782b4f12b44f9858446b4c9c7dc08
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-08-21 12:11:11 +00:00
Ibrahima Gueye 8c083bcd3e [CLA] Signature for Optesis
closes odoo/odoo#56296

X-original-commit: 050218da483a123afccf56b5462be88c263726c7
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-08-21 12:08:01 +00:00
Benjamin Frantzen (bfr) c1083ac472 [FIX] account_edi: exception during import of attachment is handled
When an exception is raised when importing an attachment with an edi.format, we try with the next edi.format (or stop if it was the last) instead of crashing.

closes odoo/odoo#56292

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-08-21 11:50:54 +00:00
Anh Thao Pham (pta) df7a13f853 [FIX] mrp: use working calendar when editing wo planned dates
- Go to Manufacturing > Configuration and activate Work Orders
- Create a Product (i.e. Product X) and create a Bill of Materials for it (with a Routing)
- Go to Manufacturing > Operations > Manufacturing Orders and create one for Product X
- Mark as Todo and Plan
- Go to Manufacturing > Operations > Work Orders and open the created one
- In Time Tracking tab, edit Planned Start Date or Expected Duration
The Planned End Date is computed without using the working calendar of the work center.
The working calendar should be used as it was at creation.

opw-2314555

closes odoo/odoo#56290

X-original-commit: 7b70da788d3a222467d88b06324a41e6c6efe605
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Anh Thao PHAM <kitan191@users.noreply.github.com>
2020-08-21 11:39:18 +00:00
Xavier-Do a5b5b88255 [FIX] rating: fix main flow tour mobile
Main flow tour mobile was still deactivated when #55995 was merged.
For a strange reason, a compute is called with a newId in mobile and not in the base
version of the main flow tour. This commit fixes the compute to handle such a case.

closes odoo/odoo#56281

Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2020-08-21 10:43:54 +00:00
Lucas Perais (lpe) 9708c6e992 [IMP] bus: notify user when assets have changed
Use case:
When the server is restarted, the python is updated,
but some users may have an ongoing session in a browser tab
This may lead to code being unsynchronized and ultimately to some
odd bugs.

Purpose:
When we are in such a case, that is, the assets were recomputed
after a update of the code and a restart of the server by the request of another user,
notify connected users that assets have changed.
Then propose them to reload the page.

Known caveats:
- This is not a developer's feature.
Since assets computing is ORM cached, they have limited
opportunities to rebuild. Namely, the feature won't trigger
each time the JS has changed, rather, it will
when JS has changed AND the cache has been reset somehow (e.g. when the server is restarted).

- This not a portal/website feature either, but only in backend.
Business clients won't be notified that the JS has changed.

- While requests debug=assets do trigger a recomputing
of the *components* of bundles, they do not save a bundle
This means that the requests that sends the notification
cannot be debug=assets.

Task 2034462

closes odoo/odoo#39875

Signed-off-by: Mathieu Duckerts-Antoine <Polymorphe57@users.noreply.github.com>
2020-08-21 12:16:25 +00:00
Adrian Torres b532e65206 [FIX] base: properly handle orphan xmlids
Before this commit:
    * Add a field with studio to any view of module A
    * Note that the model has to be unique to module A
    * Uninstall module A
    * Try to uninstall the `studio_customizations` module
    -> MissingError, impossible to uninstall `studio_customizations`

This happens because when uninstalling module A, all `ir.model.fields`
for models of said module are deleted in cascade by PostgreSQL when
unlinking the module's `ir.model`, this means that the ORM has no way of
knowing exactly which `ir.model.fields` where deleted and which
corresponding `ir.model.data` should be deleted, so the `ir.model.data`
remain in the database as orphans (that can, and will be cleaned up
later).

However since #34435 the mechanic that avoids the removal of
LOG_ACCESS_COLUMNS performs field access on records that may not exist.

This commit solves this by simply making sure that all records exist
before performing any checks that may require field access (and thus can
trigger a MissingError if the record does not exist).

opw-2316973

closes odoo/odoo#56285

X-original-commit: 08e662823ccf7dbe4d497f3f487287cba285a852
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-08-21 11:10:50 +00:00
Xavier Dubuc 4b879490dc [FIX] mail: fix some CSS in chat window and attachments
Also make rounded style for composer tool buttons.

task-2282342

closes odoo/odoo#56282

X-original-commit: 307fa6877ad72fe0afb10f1b4e67ec573422b732
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-08-21 10:45:54 +00:00
Joseph Caburnay 7f06412484 [FIX] point_of_sale,pos_restaurant: tipping workflow
This commit fixes the tipping workflow. It includes the following changes:
1. Instead of directly setting tip when clicking a tip amount in tip screen,
we set the input amount to that selected tip. Then we introduce validate
validate button to confirm setting of tip.
2. The tip screen is only shown for non-cash payments. This behavior can be
overridden in extension module in cases where the showing of the tip screen
is only available for certain type of payments.
3. We introduce a way a settle tips for multiple orders in the ticket list.
When the user filters by 'Tipping' status, an editable tip-amount column
appears which can be editted for each order. When tip amounts are final,
settle button will set tip for each order in tipping status.

closes odoo/odoo#56198

Task-id: 2322683
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-08-21 10:41:49 +00:00
Benjamin Frantzen (bfr) 5f1e527eba [FIX] account_edi: fix typo that caused AttributeError
closes odoo/odoo#56277

Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-08-21 09:59:27 +00:00
Telmo Santos 9bdba5b758 [CLA] add Telmo Santos to Camptocamp CLA
closes odoo/odoo#56057

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-08-21 10:15:49 +00:00
oco-odoo 847fb3d342 [IMP] account: taxes: replace "repartition" by "distribution"
The latter is more usual.

closes odoo/odoo#56273

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-08-21 09:38:04 +00:00
Raphael Collet 126ebbc905 [IMP] core: error message for computed field left unassigned
Non-stored readonly computed fields must be assigned by compute method.
Make the error message more explicit.

closes odoo/odoo#56269

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-08-21 09:39:27 +00:00
Christophe Monniez 5dbabad0a1 [FIX] packaging: stop docker container when odoo fails
When the Odoo installation is tested, if the test fails an error is
raised but the Docker container is not stopped.

As a result, a ghost container stays alive with a Postgres server
running. Worse, if another package is built on the same host, the
ghost container prevent the other build to succeed.

With this commit, a specific Exception is raised and the container is
stopped in any case.

closes odoo/odoo#56270

X-original-commit: fbe2092d37af02276a49e335538d8caff3a15e7d
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2020-08-21 08:59:25 +00:00
Thibault Delavallée c7c6ac47f8 [FIX] website_event_track_session: fix badly defined controller
closes odoo/odoo#56266

X-original-commit: 63f14d9689bd0ad5b8a5136aa215d1a5f789f88c
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-08-21 07:56:58 +00:00
Christophe Monniez 01679de3e5 [FIX] iap_mail: fix packaging
During the packaging for the src/deb/rpm, only regular package are taken
into account. Without an `__init__.py` file, the iap_mail is not
packaged and the whole Odoo packaging process is failling.

closes odoo/odoo#56260

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-08-21 06:59:35 +00:00
Raf Geens 389979572f [FIX] doc: correct typos including a parameter name
closes odoo/odoo#56232

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-08-21 06:26:40 +00:00
Adrian Torres 786598da02 [IMP] *: avoid overrides of res.config.settings.execute
Execute shouldn't really be overriden because it handles a very touchy
case: module (un)installs, if it is poorly overriden it can create
registry inconsistencies and can make databases crash in really dumb
ways, since the module operations *need* to be performed at the end of
the transaction (last).

Most of the time, an override of set_values() does the same job and is
much safer.

This commit updates the `res.config.settings.execute()` documentation to
reflect this.

closes odoo/odoo#56032

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-08-21 08:22:57 +00:00
Barad Mahendra d04aeb6b37 [FIX] hr_holidays: Fix traceback on employee creation
Currently, when creating the employee it will generate traceback
due to blank list of ids in query from method _get_remaining_leaves.

So in this commit, Fix the issue and do not do the query if the employee
id is False. so it should not raise the issue while creating the employee.

closes odoo/odoo#56205

Taskid: 2283753
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-08-21 06:34:38 +00:00
Barad Mahendra 2cb194e1b5 [FIX] hr_attendance: Fix traceback on creation of employee
Currently, when you create a employee when hr_aattance is installed
then it will create traceback due to falder timiezone

so in this commit, Fix the issue and if timezone is not set on
employee then pass the 'UTC'

TaskID: 2283753
2020-08-21 06:07:59 +00:00
Barad Mahendra 9c745e0271 [FIX] hr_recruitment: Fix traceback on job creation
Currently, when creating job postion from config menu then
it will generate the traceback of key error.

So in this commit, If job id found in result then assign the
documents_ids of that job else set the false.

TaskID: 2283753
2020-08-21 05:41:12 +00:00
Barad Mahendra 7fee15258d [FIX] hr: Properly define the compute method to avoid access error
Currently, Due to _compute_phones method when going to read
the work_phone and mobile_phone from salary configurator then
it will randomly failed on read access right for those two fields.

So in this commit, Defined the _compute_phones method properly and
remove the compute from mobile_phone as it's not computed anymore.

TaskID: 2283753
Closes: #56205
2020-08-21 04:40:03 +00:00