Commit Graph
145188 Commits
Author SHA1 Message Date
Thanh Dodeur 29cf3d4e84 [IMP] mail: add log keeping to rtc calls
This commit adds a new field `logs` to the model `mail.rtc_session`
that holds logs for each rtc sessions of the current call, if we are
in debug mode.

This commit also adds a button to download a .json file of the logs.

closes odoo/odoo#76339

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-09-14 13:31:53 +00:00
Thanh Dodeur 2a1436ded7 [FIX] mail: add more RTC connection recovery cases
This commit adds RTC connection recovery attempts for some cases that
were not covered, like `addIceCandidate` error or `failed` ice
connection state.

Part-of: odoo/odoo#76339
2021-09-14 13:31:53 +00:00
Benoit Socias 338b437d54 [IMP] web_editor, website: make button colors selectable
Before this commit button colors were only obtained from one of the
predefined styles.

After this commit button colors can be specified by using the new
"Custom" style.

task-2612755

closes odoo/odoo#76461

X-original-commit: a010c91b5ee119cf54ed1a68a6ea06b2bc5f3978
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Benoit Socias (bso) <bso-odoo@users.noreply.github.com>
2021-09-14 12:07:50 +00:00
Goffin Simon f2044a5bb1 [FIX] snailmail: Updating country in snailmail.letter.missing.required.fields
Steps to reproduce the bug:

- Open a customer invoice I for a customer C
- Remove the country from the address of C
- Click on button Print & send on I
- Set the country of C with CTR
- Click on Update and send

Bug:

The country of C was not saved.

opw:2633425

closes odoo/odoo#76460

X-original-commit: 181d69056ae00f9eeff4cd6c8ae7bbcdc7b14599
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2021-09-14 12:07:46 +00:00
Cedric Prieels (cpr) 828d5157a5 [FIX] project{,_mrp}: fix project update stat buttons
We are copying 3 stats buttons from the project
view form (manufacturing orders, work orders and bills of materials)
 and we add them to the project update page.

See task-2638359

closes odoo/odoo#76421

X-original-commit: 4572e710a5e755c0c75c95a6d033e44f0a2799f8
Related: odoo/enterprise#20811
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-09-14 12:07:39 +00:00
alt-odoo c80648f16c [FIX] crm: prevent division by zero in lead probability computation
If for some reason we cannot compute lead probability, we should simply
continue to the next value without causing a division by zero.

For example, this can happen if all stages are team specific, as there is
a current limitation regarding the first stage (used to know how many lost
and won there is) that requires to have no team assigned to it. This is a
side effect of the commit https://github.com/odoo/odoo/commit/cd291b79eb2d2df80899867263ec71438ab8fe87 introduced in V14, and we should add
a test to ensure we do not crash in that case.

closes odoo/odoo#76379

X-original-commit: 9793bb29fe6c4d0d59905b2fcfe78ebe51e17579
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Alex Tuyls <alt-odoo@users.noreply.github.com>
2021-09-14 10:51:14 +00:00
Kevin Baptiste 4cc00d44d6 [FIX] hr_holidays: correctly compute Time Off type statbuttons
The stat buttons were showing incorrect values, the accrual action was
not returning, archiving an employee was no longer possible because an
incorrect state was used.

closes odoo/odoo#76468

Taskid: 2641596
X-original-commit: cc75a1233ed40cb1a4812a5f4a377b8859795b26
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-09-14 08:22:05 +00:00
Pierre Masereel 399b4c1301 [FIX] point_of_sale: errer when accessing ir model
When the POS want to get the reference unit of measure "Unit", it search
on the ir.model.data model.

Due to recent changes, a normal user cannot have access to the
ir.model.data model.

So we are now calling the function 'check_object_reference' that will
retrun the model and id of record, and check the access rights on the
record returned.

closes odoo/odoo#76462

X-original-commit: d43a3e12e27a3d5dd0f3c576cec88c04684669bf
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-09-14 08:22:00 +00:00
Martin Trigaux 5b6e67f75d [FIX] *: stop importing tests
See 15f2bbd40a70d9d9
Do not want to force installing freezegun on production databases

closes odoo/odoo#76453

X-original-commit: 104abf024c16198999a832d4ce7f56b3b988612f
Related: odoo/enterprise#20827
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-09-14 08:21:54 +00:00
Samuel Degueldre 97b64f4330 [IMP] mail: add test tour for guest pages
closes odoo/odoo#76445

X-original-commit: 5b669758930763c44b7a0354f78b7d161686b397
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-09-14 08:21:49 +00:00
Thibault Delavallée a877cb171c [FIX] mail: be sure layout renders on every chatter models
Task-2621326
PR odoo/odoo#76441

closes odoo/odoo#76459

X-original-commit: 242392b81b2b2ab342c38850ea9ccb8599a2f421
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-09-14 07:11:03 +00:00
Thibault Delavallée 2973ecd720 [IMP] test_mail: improve notification and post tests
Add tests for notification layouts. Purpose of this commit is to test rendering
of all current email notification layouts, ensuring they effectively render
well whatever changes done in mail thread mixin code about template preparation
or rendering. They should also correctly render on simple chatter models which
is currently not the case.

A test ensuring message_post returns an ID when called by RPC should be
called post install. That way we test overrides that frequently break
this method API, and not only the base one.

Task-2621326
PR odoo/odoo#76441

X-original-commit: d7343dc8917505914058b698c59e6520dbacffd5
Part-of: odoo/odoo#76459
2021-09-14 07:11:02 +00:00
Nicolas BayetandThibault Delavallee 60fce9f656 [FIX] mail: allow to preview a template in a specific lang
Followup of odoo/odoo@2d6df1fe7a : when forcing language in template preview
result is not returned according to the expected format.

Add tests.

Task-2643750

closes odoo/odoo#76458

X-original-commit: 80c6001f6f46cc548fb4e337ba71908bea768d86
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Co-authored-by: Thibault Delavallee <tde@odoo.com>
2021-09-14 07:10:57 +00:00
Thibault Delavallée bc7dbfea63 [IMP] test_mail: improve tests for template translations
Extract translations and preparation to setup of TestTemplate class. That
way those are usable in other tests.

Create a new model to test language computation. It holds both a string
and a partner field, allowing to test a bit jinja-based language computation.

Task-2643750

X-original-commit: 7896cbc4f2256122b5cf6c5506921398f2ebc931
Part-of: odoo/odoo#76458
2021-09-14 07:10:57 +00:00
Aurélien Warnon 24a0354d49 [IMP] website_event_track_live: hide "YouTube replay" if no YouTube URL configured
This commit slightly adapts the invisible attrs domain of the is_youtube_replay
field to account for empty OR False youtube_video_url values.

So that the youtube replay field is always hidden if no youtube URL is
configured.

Side note: The web client should probably consider empty as a Falsy value so
that we can write simpler attrs domain based on empty/False Char values.

We also took this opportunity to tweak some youtube field labels.

Task-2643205

closes odoo/odoo#76303

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-09-14 07:10:49 +00:00
Louis Wicket (wil) d81884b98f [FIX] mail, bus: move user unique index in bus
Move user unique index back in bus module so that it is defined even
without mail module installed.

closes odoo/odoo#76454

X-original-commit: beb25dff5af816fa30341490374c9da44da175c1
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-09-14 06:01:38 +00:00
Bruno Boi cfb1a65fc2 [FIX] web: make tooltips for the view switcher consistent across views
With the new OWL view infrastructure introduced by 0134495, tooltips for the view switcher are not consistent across the different views. The converted views show a popover component, the legacy views show a browser tooltip.

After this commit, the view switcher's tooltips are always a popover component.

closes odoo/odoo#76444

X-original-commit: ad7db83e6dcf4c124234a3c611b84012f898acd0
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Bruno Boi <brboi@users.noreply.github.com>
2021-09-14 06:01:34 +00:00
Bruno Boi c974b2524c [FIX] web: reintroduce RTL support
With the new OWL view infrastructure introduced by 0134495, some parts of the right-to-left design was broken.

All the issues addressed in this commit are:
- subdropdowns are shown in the correct direction
- subdropdowns' chevrons point to the correct direction
- subdropdowns keyboard navigation with left/right arrows
- popovers' arrows point to the correct direction
- the document's `<body/>` will have the `o_rtl` CSS class

X-original-commit: 8649e46bec051e6bbe21bbdb8023f747206644af
Part-of: odoo/odoo#76444
2021-09-14 06:01:34 +00:00
Swapnesh Shah 078c7161a3 [FIX] account: use current date as fallback to convert currency
Description of the issue/feature this PR addresses: Fixes #76177

Current behavior before PR:
Before this commit, There will be tracback on adding new
Journal Item if there is not date on Journal Entry.

Desired behavior after PR is merged:
Now we use current date to as fallback to convert currency.

closes odoo/odoo#76416

X-original-commit: 5919fbb8a4a3bdf4e7122dadf419a131bad8d1f8
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2021-09-14 06:01:26 +00:00
Lucas Perais (lpe) 9d0f1fd07e [FIX] web: pivot: apply table-reponsive
Otherwise the experience in mobile won't be nice.

closes odoo/odoo#76390

X-original-commit: 9e36d2eda46febda16118cd56d541b6c90501c53
Related: odoo/enterprise#20796
Signed-off-by: Mathieu Duckerts-Antoine <Polymorphe57@users.noreply.github.com>
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2021-09-14 06:01:22 +00:00
Lucas Perais (lpe) f45f12d0bd [FIX] web: control panel bottom content style
Before this commit, the style of the control panel's bottom section
was a bit broken: the button groups did not flex.
This was because the dom changed a bit.

After this commit, they do.
Also, the structure of control-panel-bottom-left has changed.
It should contain `.btn-group` elements at its root.
The spacing between groups is handled by the control-panel.
(before, those spaces were actual spaces in DOM)

X-original-commit: 18ea11c99a7e2bd58d7469927352587cb14c76c4
Part-of: odoo/odoo#76390
2021-09-14 06:01:21 +00:00
Samuel Degueldre d9a6429e45 [FIX] mail: fix broken avatar on message from non-channel members
With the introduction of the guest feature, a lot of fields are now
accessed through a controller so that they can be available to guests,
with additional checking in the controllers.

Avatar is one such field, however the extra checks were too restrictive:
we only allowed people to see the avatar if the user whose avatar was
requested was also a member of the channel. This breaks the avatar on
previous messages if a user leaves a channel.

This commit relaxes this restriction for internal users (they can now
see all avatars through this route), and adds a fallback to the avatar
placeholder for people who do not have acces (ie: guests) so that the
UI doesn't look broken.

closes odoo/odoo#76341

X-original-commit: b849fd426806332c1ecc1bbba7b568384a021c65
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-09-14 06:01:12 +00:00
oco-odoo e76e34cc08 [FIX] account: avoid crashing when using cash basis taxes with multivat setup
To reproduce:

1) Create a foreign VAT fiscal position fpos (so: assign it a different country than your fiscal country, and set a value to its foreign_vat field)

2) Create a cash basis tax in the same country as fpos

3) Make an invoice using this tax and fpos

4) Try registering a payment to your invoice. => Traceback

closes odoo/odoo#75990

X-original-commit: cefcdfb7b88d899779de65b4ac1376445cb67c73
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2021-09-14 06:00:59 +00:00
John Wilson 63c00f700d [FIX] various: --test-file on Windows
closes odoo/odoo#75341

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2021-09-14 06:00:52 +00:00
Habib (ayh) 15d5769d95 [FIX] mail: fileupload bug
Steps to reproduce (using documents app):
1. Create a new document request
2. Select the created document request, enable the chatter
3. Upload a document using the document request icon
4. Hide the chatter
5. Show the chatter
Odoo Client Error

OPW-2643331

closes odoo/odoo#76402

X-original-commit: ef6ee09121e9f6ed8310aa34800d8d765c9149cf
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-09-13 19:39:04 +00:00
Thanh Dodeur a8568d10cc [FIX] mail: remove unnecessary disconnect broadcast after ending a call
Before this commit, we would attempt to notify peers that we are
disconnecting when resetting mailRtc, which was not necessary as peers
already close the peer connection when the server notifies them that the
call participation changed.

closes odoo/odoo#76423

X-original-commit: 8ccadf41fa6752d4662e9c6ea6f4d791935d6122
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-09-13 18:31:20 +00:00
Thanh Dodeur 53ea6f8024 [FIX] mail: load audio/video elements after changing the srcObject
Before this commit, there could be tracebacks after changing the
srcObject of the audioElement of the rtcSession, this commit
fixes this issue by calling `load` on the element after changing
the srcObject.

closes odoo/odoo#76422

X-original-commit: ec3aa0ef713cc0f048dbf6f5a36c86448a411baa
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-09-13 18:31:16 +00:00
Benoit Socias 85dfd3e180 [FIX] web_editor: handle palette history better
Before this commit several history steps were added when picking a color
and history steps were added when previewing a color.

After this commit history is only updated on color selection and not
during color preview: applying the color relies on execCommand which
adds an history step => no need to add another step upon picking a color
but must be prevented during preview.

task-2599771

closes odoo/odoo#76417

X-original-commit: 4c1956d697a52e4d561e93930bb9e9f5c61e8a35
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Benoit Socias (bso) <bso-odoo@users.noreply.github.com>
2021-09-13 17:21:44 +00:00
Sébastien Mottet (oms) 905df37c8b [FIX] website: add support for svg logo in configurator
The configurator's palette selection screen didn't support
SVG logo. On SVG upload primary and secondary colors couldn't
be extracted and no palette was recommended. It comes from the
fact that Python PIL library does not support SVG. We therefore
had to convert SVG to PNG before trying to extract primary and
secondary colors. A file format checking has been added. If the
uplodad file is not an image, a notification is displayed to
the user.

task-2602521

closes odoo/odoo#76400

X-original-commit: 33f43618f727bdc1239c52c66b73f0f436035774
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-09-13 14:42:54 +00:00
Nathan Marotte (nama) 4e59a600ce [FIX] account : resequencing showed a ghost state change draft -> posted
Issue: When resequencing an account_move, the chatter showed the
resequencing but also a ghost change of state from draft to posted

Steps to reproduce :
 1) Create an invoice and post it
 2) Look up the journal entry for the invoice and resequence it to some
 arbitrary other name
 3) Check the chatter for that invoice, it shows a change from draft to
 posted

Why is that a bug:
 The state isn't changed so it shouldn't be logged

Side-Note: I don't understand why in the code until this commit we had
to force change the state to draft to change the name of the move, when
I tested, we can change the name of a posted move without any issue

opw-2581248

closes odoo/odoo#76394

X-original-commit: e4f5c0d13fb5b04c4a334758c26e442efbb247d4
Signed-off-by: William André (wan) <wan@odoo.com>
2021-09-13 14:42:51 +00:00
vst-odoo ecae67cee7 [FIX] stock: warning when change product tracking
This commit fixes two bugs:

1) When the user changes the tracking of a product template with
   variants, they get a traceback.

2) When the user changes the tracking of a product with quantity
   available, the warning is not shown.

For the 1), it was due to reading `tracking` and `qty_available` fields
on a record set (happens when the template has variants).
For the 2), it was due to the `qty_available` who is wrongly computed in
the onchange because of the records having a "new-id" instead of their
usual id.

How to reproduce:
 - Create a new product with some variants, no tracking;
 - Add quantities for those product variants;
 - Edit the product and change its tracking -> Traceback.

task-2618203

closes odoo/odoo#76071

Co-authored: svs-odoo < svs@odoo.com >
X-original-commit: 75572da12b3ad5d0f930e7e2f5dbac067a350b3c
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
2021-09-13 11:58:15 +00:00
William Henrotin 9850a3ac9b [FIX] stock_picking_batch: split move for wave
Before this commit. The move splitting was not considering _split return
a list of values.
This commit also add a bunche of missing tests

Task : 2411102

closes odoo/odoo#76371

X-original-commit: 49164aa65f4eea0e46fff207c841beb94154f636
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-09-13 10:38:47 +00:00
François (FRC) 94c2717890 [FIX] snailmail: better tests & delivery address now visible on report
Tests now check for the 'error' field in Pingen repsonse
snailmail_external_layout.js now targets the right div

closes odoo/odoo#76288

Task: 2588145 & 2583718
X-original-commit: 64ba95bc847f9db661d0e348f8bca1249da0b960
Signed-off-by: Florian Daloze (fda) <fda@odoo.com>
2021-09-13 10:38:40 +00:00
std-odoo 300b4cc624 [FIX] website_slides: fix a traceback when creating a new tag
Bug
===

Open a website page and click on "New" to create a new course from the
frontend. Then create a new tag from this view, a traceback is raised.

Since odoo/odoo@51ff8b09db the code has been refactored to use the new
JS import, but the way we import doesn't work with the "default export" used
in "slides_course_tag_add".

Task-2636073

closes odoo/odoo#76367

X-original-commit: 5838a2622d7798ce832939a05c0482f8dac01b3c
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-09-11 15:25:54 +00:00
Romain Derie 2658d29e03 [FIX] web_editor, website: re-introduce link double click
It was previously decided that double clicking on a link shouldn't do anything
other than opening the popover (which happen on single click).

It was recently decided that we should actually open the right panel link tool
on double click.

Adding double click behavior, it was needed to refactor the way the popover is
opening/closing -> We now use `focus` as trigger instead of `click`.
Side effect, it will also fix 2641448 (part about double click on word)

Courtesy of SAD for debugging the double click issue (with trigger click)

task-2618494

closes odoo/odoo#76372

X-original-commit: 4eff35ab31bfc45b4c8dca8392e9da4f4e2a7afd
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-09-10 19:36:57 +00:00
Benoit Socias 5be974283d [IMP] web_editor: add possibility to not focus LinkTool input
Before this commit, when requesting the link tool in the right panel, it would
always focus its input.

This commit adds an option to not focus the input when link tool is requested.

It will be used by next commit.

task-2618494

X-original-commit: ad13055d58b6cd92d56f483bce17ab2e19216809
Part-of: odoo/odoo#76372
2021-09-10 19:36:56 +00:00
William Braeckman fb3ac94ce8 [FIX] hr_holidays: count only valid allocations in dashboard
Since the recent time off B2B, time off validity has been moved from the
time off type to the time off allocation. Meaning that a company may use
the same time off type every year for their yearly time off.
This means that the dashboard must display currently valid data.
Remaining leaves and taken leaves will now be computed in function of
that data aswell in the dashboard.

This commit also fixes being able to take a leave if the current
allocation does not permit it if an expired one would have made it
possible.

TaskId-2636405

closes odoo/odoo#76366

X-original-commit: eeccd682124fe83d2c2342be0d8804aa2ca21146
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Signed-off-by: William Braeckman (wbr) <Williambraecky@users.noreply.github.com>
2021-09-10 18:19:40 +00:00
Habib (ayh) bbb9c957eb [IMP] account: simplify invoice payment status filters
Modify search filters on the invoice views:
Open -> Unpaid (not_paid & partial)
Closed -> Paid (in_payment & paid)
Overdue -> Overdue

[FIX] journal kanban view "late invoices/bills" should not include due date = today

Task 2635664

closes odoo/odoo#76362

X-original-commit: fa15c73a087bd6b5a81aa448df2e0a8654213246
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Signed-off-by: Habib Ayob <h4818@users.noreply.github.com>
2021-09-10 17:14:02 +00:00
Benoit Socias b5263be24c [FIX] web_editor: restore lost selection when updating color
Before this commit if the text selection was lost while the color
palette was used, the color selection was not applied on anything.

After this commit if the text selection was lost, it is restored to the
last selection known in history before applying (or previewing) the
color selection.
Also avoid to remember selections that are not part of the editable.

task-2599771

closes odoo/odoo#76357

X-original-commit: 0e706d508d6e747cff566c33d34b794a321eef5c
Signed-off-by: Antoine Guenet <Zinston@users.noreply.github.com>
2021-09-10 16:10:47 +00:00
Mathieu Duckerts-Antoine b7502e6ce6 [REF] web: search param: domains --> comparison
The search param "domains" of type Array was not satisfactory for
several reasons:
 - useless for non reporting views
 - too close from the search param "domain"
 - a key "fieldName" was put on the value (resulting in a loss of
   information in case of stringification)

We change it for a search param "comparison" of type null or Object.

closes odoo/odoo#76340

X-original-commit: 4f867099846c4214a74a7b0222ac0941537bbe29
Related: odoo/enterprise#20772
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-09-10 15:00:55 +00:00
yhu-odoo 38a4062678 [FIX] mrp_account: update reference and name of wo analytic lines
When the name of a production order changes, we should update the name
and the reference of the analytic accounting lines of its work orders.

Task-2638896

closes odoo/odoo#76090

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-09-10 15:00:51 +00:00
yhu-odoo f07ab5f5d5 [FIX] mrp_account: don't duplication analytic_account_line_id
Both mo_analytic_account_line_id and wc_analytic_account_line_id are
copied when duplicate the workorder. This is not correct.

Task-2638896

Part-of: odoo/odoo#76090
2021-09-10 15:00:51 +00:00
Xavier ALT 68d950de45 [FIX] cloc: also exclude module's "upgrades" folder by default
Since commit bbb1a8f151, module's upgrade script can also be added
into special 'upgrades' folder as an alternative to the old 'migrations'
folder.

  As those upgrade scripts are not maintained from version to version, we
should not count them as maintenance.

OPW-2536046

closes odoo/odoo#76334

X-original-commit: 28a303a67935dc5566cc0d1fe2be157736691968
Signed-off-by: Xavier Alt (xal) <xal@odoo.com>
2021-09-10 13:42:06 +00:00
Lucas Perais (lpe) 2869b0b54b [FIX] web: executeReportAction correctly pass the context
Before this commit, the context given to the client action report was incorrect
and produced a crash server-side.

After this commit the context is correctly given to the ReportAction and to the print

closes odoo/odoo#76319

X-original-commit: 43d0ed37cfd1a6a09e7d21976816f4216e94fa6a
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2021-09-10 13:42:01 +00:00
Cedric Prieels (cpr) 0976a92076 [FIX] poject,sale_timesheet: group by modified, hover lighten
In this commit, the hover color of the elements in the right panel
has been revised. Furthermore, we now group by task by default when
using the billable time stat button

task-2638359

closes #76167

closes odoo/odoo#76263

X-original-commit: a641d8e4820c4196d41e5f5b661ddef22f940477
Related: odoo/enterprise#20747
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
Signed-off-by: Xavier <xavierbol@users.noreply.github.com>
2021-09-10 13:41:52 +00:00
Xavier BOL (xbo) 58195290cc [FIX] project: count all active tasks instead of open tasks in project
Before this commit, the task_count field displayed in the 'Tasks'
stat button shows the number of open tasks, that is all tasks with
either no stage linked or stage not folded or not closed.
The problem is when the user clicks on this stat button (displayed in
project form view or in project update), he sees all active tasks in
the project.

This commit changes the count to display the number of active tasks
instead of the number of open tasks in the project.

task-2633229

closes #76167

X-original-commit: f6ace36d7f61c005f324559d02436f7ff69eb40a
Part-of: odoo/odoo#76263
2021-09-10 13:41:51 +00:00
Thanh Dodeur 59dc90ce16 [FIX] mail: sets the proper record name for mail.channel.partner
Since the addition of guests, it isn't enough to rely on the
`partner_id` of the record to get the name.

This commit adds an override of `name_get` so that the `display_name` of
the record remains consistent for both partners and guests.

closes odoo/odoo#76329

X-original-commit: 48d3f78ee3fd796907e17319607f19b8c97ba9c3
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-09-10 12:34:18 +00:00
Thanh Dodeur fdd09b60c7 [FIX] mail: prevent unnecessary re instantiation of the callViewer model
Before this commit, the callViewer model was re instantiated in cases
when the amount of RTC session would change, which was not necessary
if the call viewer was already present.

This could cause tracebacks accessing deleted callViewers.

closes odoo/odoo#76328

X-original-commit: d2c9cc55bbabd21cbbbc8a0e77f6935fdafddeea
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-09-10 12:34:13 +00:00
Thanh Dodeur bd41225e46 [FIX] mail: cleanup onbeforeunload and rpc button locks
This commits adds a proper event listener removal for `onbeforeunload`
to facilitate testing and cleans up the join/leave rpc button locking.

closes odoo/odoo#76327

X-original-commit: 28d4c80b0dd2f30fb6aab46099a3c64d18f8d3b9
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-09-10 12:34:10 +00:00
Adrian Torres c393a9882e [FIX] core: load all bases for ir.model before adding manual models
Commit cd12293386 introduced an
optimization in the way that models and their inheritances are loaded,
with this commit we defer the setting of each model class' bases
from the _build_model method to the _prepare_setup method.

This has the advantage of setting any given model class' `__bases__`
attribute only once, but it also means that when _add_manual_models is
called, the __bases__ for ir.model are not yet set (only the default
implementation exists), therefore any module overrides to ir.model do
not take effect when creating the custom models.

This meant that if one creates a custom model with chatter support (i.e.
custom ir.model behaviour implemented in mail) and one restarted the
server, the registry would not properly setup ir.model before creating
the custom model (yielding warnings about tracking and such not being
valid fields) and when creating a record of the custom model, the
registry would crash.

With this commit, ir.model's _prepare_setup is explicitly called before
_add_manual_models to ensure that all overrides to ir.model are taken
into account.

closes odoo/odoo#76325

X-original-commit: f3afb23cdf21f395855771a037c721e977dc93c8
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Signed-off-by: Adrian Torres (adt) <adt@odoo.com>
2021-09-10 12:34:06 +00:00