Commit Graph
145967 Commits
Author SHA1 Message Date
Mohammed Shekha 6087787cd3 [IMP] web: add percentage information in pie tooltip
With this commit, we add percentage information in pie chart tooltip,
A pie chart is meant to illustrate numerical proportions.
In Odoo, when hovering a piece of a pie chart, the tooltip is currently not
displayed the proportion/percentage of the piece in the pie. The purpose of
this commit is to provide the user with the percentages of data distribution by
adding them in the tooltip.
In the tooltip displayed when hovering a piece of the pie chart, add the
percentage between brackets.

task-2608695

closes odoo/odoo#78343

X-original-commit: f73bd6dad71045d9f0a012259f148f0c768b964b
Signed-off-by: FrancoisGe <fge@odoo.com>
2021-10-19 08:22:44 +00:00
Kevin Baptiste c715ecb38b [IMP] fleet: add Write Off Date on vehicle
Add the Write Off Date on vehicle.

closes odoo/odoo#77464

Related: odoo/enterprise#21299
Related: odoo/upgrade#2878
Taskid: 2657561
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-10-19 07:12:04 +00:00
tranngocson1996 087bbf826f [FIX] l10n_vn: Change xml ID to avoid confusion
XML-ID 'chart8111' was set for account 811, which didn't really make
sense. Changed to 'chart811'
Also adapted the translation files accordingly

closes odoo/odoo#78584

X-original-commit: cbf0045f63b4e0e1b4560a7cc8ff4a2a8a6faf86
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2021-10-18 19:03:42 +00:00
Yannick Tivisse adf45e252a [FIX] hr_work_entry: Search on name and code for work entry types
closes odoo/odoo#78566

X-original-commit: 1a9ddbcface176912fb0dd3b0b237c982aa6568c
Related: odoo/enterprise#21761
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-10-18 16:26:44 +00:00
oco-odoo 7f73791820 [FIX] l10n_sa: install taxes and fiscal positions properly on demo company
When installing the module, the current company didn't receive taxes and fiscal positions, even though the accounts were properly created.

closes odoo/odoo#78568

X-original-commit: 5880192411cb96cd2a14291814bd9991a8761fdd
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2021-10-18 15:13:08 +00:00
anhe-odoo 532fd04718 [FIX] mail: chatter in chat window should log notes
Expected Behaviour

When a user reply to a mention (on an invoice, a client profile, ...) in a log_note, and this user answers directly in the chatbox, the answer should be considered as an internal discussion, and so be posted as a log_note.

Observed behaviour

Since V12, when a user reply in the chatbox, the reply is automatically set as a "send-message" reply, which is a issue as the user sends an email to all followers of the discussion while he probably thinks his answer will be visible only by the internal users.

Reproducibility

This bug can be reproduced following these steps:
1. Declare at least 2 users (A and B) and make sure user A handles notifications in Odoo
2. Log as user B, go anywhere in Odoo as user B and mention the user A in a log_note
3. Log as user A, open the mention notification and reply in the chatbox
4. The answer will be noted as a send-message answer, sending then e-mails to all followers ...

Problem Root Cause

As long as the V12 isn't supported anymore, we didn't investigate this version. In V13, the issue comes from the fact the chatbox didn't use the same composer class as the discussion module, and then it's not possible to send a log note from the chatbox. In V14, as the discussion module has been totally refactored, the "error" comes from the arbitrary choice to set "false" as the default value of "isLog" on a general message, which implies that the answer from the chatbox is considered as a "send-message" and not as a "log-note".

Related tickets

opw-2602712
opw-2659484

closes odoo/odoo#78565

X-original-commit: 9e62872561f9914beac8f58f5c3ebed83cd9defc
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-10-18 15:13:03 +00:00
Adrien Widart 60e7803f3f [FIX] stock: define the order of products allocation
The allocation order is not based on the pickings order

To reproduce the issue:
(Need sale_management,mrp)
1. Create a storable product P
2. Create a BoM for another product dummy_P and add 1xP as component
3. Create and confirm a SO with 1x product P
4. Create and confirm a MO for 1x dummy_P
5. Process a receipt transfer with one P

Error: On the SO, the reserved quantity is still 0. The product has been
reserved for the MO, even if the picking of the SO has been created
first

The default order of several SM is based on the sequence and the
identifier:
https://github.com/odoo/odoo/blob/abc9fdaae2927214d98082f391a1dc0fc75e4c77/addons/stock/models/stock_move.py#L26

The default value of the field `sequence` is 10:
https://github.com/odoo/odoo/blob/abc9fdaae2927214d98082f391a1dc0fc75e4c77/addons/stock/models/stock_move.py#L26

When creating a SO, the field isn't defined so its default value is used
(10). However, when creating the MO, the field is defined thanks to the
sequence of the related BOM line:
https://github.com/odoo/odoo/blob/864d90a064f093bd6ba24d8464ee491a443a320e/addons/mrp/models/mrp_production.py#L940
Which, in our case, is equal to 1

As a result, when allocating the quantities in `_action_assign`, the
recordset will contain first the SM of the MO and then the SM of the SO.

This commit ensures the order will be based on the priority, the date
and the identifier (the latter allows the search result to be
deterministic)

Side note: this commit also adds the identifier to the search in
`_run_scheduler_tasks` to keep consistency between the different
flows

OPW-2524205

closes odoo/odoo#78497

X-original-commit: da2b336d467d95cda8ed21707535fb7119f5d777
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
2021-10-18 15:12:55 +00:00
Julien Van Roy 2234f26a28 [IMP] account: replace tooltips for the 3 accounts in Tax Group
For clarity purpose, tooltips for the 3 accounts in Tax Group (Configuration > Tax Group) are added.

task-2602730

closes odoo/odoo#78453

Related: odoo/enterprise#21725
Signed-off-by: William André (wan) <wan@odoo.com>
2021-10-18 15:12:50 +00:00
Andrea Grazioso (agr-odoo) d60063e159 [FIX] account: use refund repartition line when needed when applying a reconciliation model with a tax from a button
The fix made in https://github.com/odoo/odoo/pull/74427 was mistakenly not forward-ported. We reintroduce it here together with the fix that was made for it by https://github.com/odoo/odoo/pull/77589 .

Before this fix, the wrong repartition was used, and the tax_tag_invert computed for the move lines in this case was inconsistent, leading to wrong reporting.

closes odoo/odoo#78546

X-original-commit: 663bc7c0a0c0d7d16cd754bba5cea34bdb6315bf
Related: odoo/enterprise#21756
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
2021-10-18 14:01:49 +00:00
5652e7ee91 [FIX] project: Fix user_ids access issues on project sharing
Both developments 6c4910a and 7563b44 have been introduced nearly
at the same time in the saas-14.5 version, but the later one is
introducing a side effect that breaks the project sharing feature.

Indeed, before there was one assignee per task (user_id), and now
we can assign several collaborators (user_ids).

As the read on a M2O is just calling the name_get method, it wasn't
an issue.

Now, as it implies to read the res.users (and the res.partner) model,
the assigned users were filtered according to a specific ir.rule
for the portal users:

    <record id="res_partner_rule" model="ir.rule">
        <field name="name">openerp.portal.res.partner</field>
        <field name="model_id" ref="base.model_res_partner"/>
        <field name="groups" eval="[(6,0,[ref('group_openerp_portal')])]"/>
        <field name="domain_force">[('id','child_of',user.commercial_partner_id.id)]</field>
    </record>

This commit creates a new compute non-stored field called
`portal_user_names` to display the name of all assignees in each task in
the project sharing feature. Thus, the portal user can see all assignees
via this char field. The `user_ids` field is removed in the views of
project sharing since the portal cannot see all assignees with this
field.
By doing this, a collaborator cannot edit the field to assign or unassign
himself to a task. To keep this behaviour, two buttons are added in the
form view of task. One called 'Assign To Me', the current collaborator
will be able to assign himself to the task when he will click on this
button. The other button called 'Unassign Me' is to allow the
collaborator to unassign himself to the task.

part of task-2633229

closes odoo/odoo#78538

X-original-commit: 3b5a657df086b54def0bc0bdae89c19c89cb39f5
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
Co-authored-by: Xavier BOL (xbo) <xbo@odoo.com>
Co-authored-by: Raphael Collet <rco@odoo.com>
2021-10-18 14:01:36 +00:00
Kishan Gajjar b2f170156a [FIX] website: restore icons for 'Big Icons Subtitles' snippet
closes #78507

closes odoo/odoo#78548

X-original-commit: 593efcf99a6aa2b18364786a807d9ec9b3c7e72f
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-10-18 12:46:02 +00:00
William Henrotin 2c37be22b8 [FIX] stock: speed up lot creation
Creating lots of production lot can take a huge amount of time if the
mail message follower is added on each chatter.

This commit removes this functionality to speed up the creation as
there is no real need to have the lot creator as follower of it.

closes odoo/odoo#78547

X-original-commit: 9b0e669216948da2710e2e16007f03e47fb7e704
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-10-18 12:45:58 +00:00
William Henrotin 13010c5d3d [IMP] stock: break the stock move line search
Searching the stock move line candidate to update at reservation can be
shorten by breaking the loop once one is found

X-original-commit: 93df2568914bee307209e1e739912976c23e1f1d
Part-of: odoo/odoo#78547
2021-10-18 12:45:57 +00:00
William Henrotin 5330dca7be [IMP] stock: create stock move lines in batch
X-original-commit: 8220234642c7c5fada4a882ba67cdb2ca5e7aaf2
Part-of: odoo/odoo#78547
2021-10-18 12:45:57 +00:00
William HenrotinandRemy Voet 30d8c17ffd [IMP] stock: recompute state speedup
The recomputation of stock move state is often done with already
the correct state (for instance in the case of move line deletion only
one of the deletion will change the state).

This commit check the move state before changing it only when it's
necessary.

Task: 2507143
X-original-commit: 80033446a091ff3ba98c58ba44ad665bfba30c98
Part-of: odoo/odoo#78547
Co-authored-by: Remy Voet <ryv@odoo.com>
2021-10-18 12:45:56 +00:00
Florian Damhaut 425ff940da [FIX] mrp : Remove operations from production template when the module is disabled
Current Behaviour :
1. Enable Work Orders
2. Add an operation to a BOM
3. Disable Work Orders
4. Create a manufacturing order for this product and finish the manufacturing.
5. Print the production order

What is the current behavior that you observe?
The production order has the operations in it even though the work order option has been disabled. This is because disabling the work order option just hides the operations and does not remove it from the BOM.

What would be your expected behavior in this case?
The printed production should not show the operation.

opw-2660545

closes odoo/odoo#78544

X-original-commit: d73752c5fe983ce6a9147721e732396394a77cc4
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-10-18 12:45:47 +00:00
Nathan Marotte (nama) 04bb7005b7 [FIX] mrp : replacing tracked part in repair fails uniqueness
Issue: When replacing a tracked part while doing a repair, we
are changing the tracking number, but when checking for uniqueness,
we don't take that change into consideration

Steps to reproduce :
 1) Manufacture product A with SN "A1" out of product B with SN "B2"
 2) Make Repair Order for "A1" to replace "B2" with Product B (SN "B1").
 3) Create Manufacturing Order product A (A2), select product B with SN
  "B2" as one of the components.
 4) Mark as done
 -> Bug : "The serial number <B2> used for component <B> has already
 been consumed".

Why is that a bug:
 When checking for uniqueness we should take into consideration the
 parts being replaced

opw-2625687

closes odoo/odoo#78407

X-original-commit: 79c673f9d15185be540dd535d7ebe10c8f138bf1
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-10-18 11:36:58 +00:00
Alvaro Fuentes 433f0c15bf [FIX] sale_timesheet_margin: fix division by zero
If the denomirator is zero, we set the computed value to zero.

closes odoo/odoo#78522

X-original-commit: 2b0a5ce53aa55da056d6acd6461a56aea75611ce
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-10-18 10:22:02 +00:00
Benjamin Vray 34c401caf8 [FIX] website: fix save animated snippet
Before this commit, when dropping custom snippet (or saved snippet)
containing an animation in the page, the animated element of the
snippet remained hidden.

task-2664876

closes odoo/odoo#78493

X-original-commit: 61d7744ca988641bd4d8a4006350ec197eece25a
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-10-18 10:21:58 +00:00
xlu-odoo 6dd4ddab2b [FIX] web_editor: fixing border-radius on dropdown menu entries
Prior to this commit, every dropdown menu entries in the web editor
had a border-radius on them. It didn't look consistent and clean.

This commit fixes those menu entries by either removing or applying a
correct border-radius.

closes odoo/odoo#78492

X-original-commit: 0239ab7efcaf3895ffb14a56a0686cf5a80bb529
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-10-18 10:21:53 +00:00
Benjamin Vray 2e57d784d3 [FIX] website, web_editor: fix overlay options of the timeline snippet
Before this commit, the CSS of the overlay option buttons of the
timeline snippet was broken.

task-2648348

closes odoo/odoo#78491

X-original-commit: 13770d650def3107378fe4010aac48dc85a5256a
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-10-18 10:21:49 +00:00
Benjamin Vray 5201f0fa0b [FIX] web_editor: prevent inline snippet drop in non-inline area
Before this commit, it was possible to drop an inline snippet (e.g.
badge, cards, etc.) next to a section when this section was a snippet
which can be dropped as main snippets or as inline snippets (e.g.
countdown, embed code, etc.).

task-2648348

closes odoo/odoo#78483

X-original-commit: e2f218fbb3d9bab9dba380582aa93e80fa9becc1
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-10-18 10:21:44 +00:00
Guillaume (guva) a14874d623 [FIX] mrp: Delivered quantity with kit
Steps to reproduce:

- Set the Decimal Accuracy at 5 digits for Product UoM
- Create a product X
- Create a kit BOM for X with a component Y, and qty 0.08600
- Create a Sale Order for 10 product X, confirm and deliver all

Issue

- On the SO, quantity delevered is 9.00000 instead of 10.00000, same
  issue occur with the same flow with a Purchase Order.

Cause

As the quantity per kit was rounded when calling _compute_qty,
the calcul of quantity ratio was not well computed.

Solution

Avoid rounding the quantity per kit, as the quantity ratio is rounded
a few steps after.

opw-2590126

closes odoo/odoo#78516

X-original-commit: 2a2b198ea6ce1d0553c606404e6db1117dc1c4a2
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
Signed-off-by: guva-odoo <guva-odoo@users.noreply.github.com>
2021-10-18 09:08:49 +00:00
Thibault Libioulle bf6b2ae590 [FIX] project,hr_timesheet: fix hr timesheet graph extension
This commit fixes the broken inheritence between project and
hr_timesheet modules regarding the GraphView.

Hr Timesheet module extends GraphView rather than ProjectGraphView which
makes the view unaware it should use the ProjectControlPanel.

This commit adds project tour steps to ensure every view contains the
project update breadcrumb.

task-2642872

closes odoo/odoo#78503

X-original-commit: aa59771d3a4ffd2f7372c58bf56ca8dcc1183d2e
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
Signed-off-by: Thibault Libioulle (tle) <tlibioulle@users.noreply.github.com>
2021-10-18 07:56:34 +00:00
Adrien Widart 67e19a5dc7 [FIX] mrp_subcontracting: validate a partial picking
When validating a receipt, if the product is subcontracted and if the
picking is not fully done, it will be impossible to create a backorder

To reproduce the issue:
1. Create two products P_compo, P_finished
    - Both storable
    - Both tracked by lot
    - P_compo must have the route "Resupply Subcontractor on Order"
2. Update P_compo's quantity: 4
3. Create a BoM:
    - Product: P_finished
    - BoM type: Subcontracting
    - Subcontractors: a partner P
    - Components: 1 x P_compo
4. In Inventory, create a planned transfer T:
    - Operation Type: Receipt
    - Receive From: P
    - Operations: 4 x P_finished
5. Mark as Todo
6. Inventory > Delivery Orders, find the delivery of P_compo for P and
process it
7. Back to T, Record Components:
    - Quantity: 3/4
    - Set a Lot for P_finished
8. Validate T, Create Backorder

Error: a User Error is raised "You need to supply a Lot/Serial Number
for product: - P_finished"

Since P_finished is subcontracted, a related MO has been generated. On
step 7, when recording the used components, since all P_finished have
not been produced, a second MO is created for the last P_finished.
However, when validating T, both MOs are selected and validated. This is
an error since the user has not yet recorded the used components for the
last MO. The latter should not be validated.

OPW-2582538

closes odoo/odoo#78496

X-original-commit: 21068076b4a6b134f5f07c4c03de7c4eb37b4688
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-10-18 07:56:30 +00:00
std-odoo bac2a86ce2 [FIX] mail_plugin: update the documentation URL
Purpose
=======
Add the new URL to the documentation for the v15.

Task-2647169

closes odoo/odoo#78410

X-original-commit: 899911539635417076fd7e88c8d772c6fcb344b0
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-10-18 07:56:26 +00:00
Olivier Dony 63367b2519 [FIX] mail.thread: fix performance of has_message
The `distinct` keyword in query
```SELECT distinct res_id FROM mail_message WHERE model=%s```
is not strictly necessary for the correctness of the result, as
it will be inserted inside a sub-query that will be able to use
the main (model, res_id) index of mail_message.

For example, when the `has_message` field is used in a domain
by the website_livechat module[1], the complete query looks
like this:
```
SELECT "mail_channel".id FROM "mail_channel"
WHERE  ("mail_channel"."active" = true) AND
       ("mail_channel"."livechat_visitor_id" = 112678387) AND
       ("mail_channel"."livechat_channel_id" = 1) AND
       ("mail_channel"."livechat_active" = true) AND
       ("mail_channel"."id" in (
           SELECT distinct res_id FROM mail_message WHERE model='mail.channel'))
ORDER BY "mail_channel"."create_date" DESC LIMIT 1;
```
In this query, it's obvious that the `distinct` makes zero difference in
the results.

However, the presence of the DISTINCT keyword means that PostgreSQL will
factor the cost of applying that UNIQUE sort in the query planning, and
use MERGE JOIN strategy to avoid sorting multiple times (ok, it could
perhaps guess that distinct is useless here, but we asked for it.)

For a database with millions of mail messages, there can easily be
millions of hits for the generic "all res_ids for model" query, so
the cost of that part will be quite high.

The plan will then look like this (notice the "Unique" step and the cost,
730ms for the index scan + 200ms for the sort):
<details>
  <summary>The query plan when `distinct` is used</summary>
```
                         QUERY PLAN
------------------------------------------------------------------------------
 Limit  (cost=151528.28..151528.29 rows=1 width=12) (actual time=1021.237..1021.239 rows=1 loops=1)
   Output: mail_channel.id, mail_channel.create_date
   Buffers: shared hit=767230
   ->  Sort  (cost=151528.28..151528.29 rows=1 width=12) (actual time=998.799..998.801 rows=1 loops=1)
         Output: mail_channel.id, mail_channel.create_date
         Sort Key: mail_channel.create_date DESC
         Sort Method: quicksort  Memory: 25kB
         Buffers: shared hit=767230
         ->  Merge Join  (cost=3.01..151528.27 rows=1 width=12) (actual time=998.786..998.790 rows=1 loops=1)
               Output: mail_channel.id, mail_channel.create_date
               Inner Unique: true
               Merge Cond: (mail_channel.id = mail_message.res_id)
               Buffers: shared hit=767230
               ->  Sort  (cost=2.44..2.45 rows=1 width=12) (actual time=0.043..0.045 rows=1 loops=1)
                     Output: mail_channel.id, mail_channel.create_date
                     Sort Key: mail_channel.id
                     Sort Method: quicksort  Memory: 25kB
                     Buffers: shared hit=5
                     ->  Index Scan using mail_channel_livechat_visitor_id_livechat_channel_id_idx on public.mail_channel  (cost=0.41..2.43 rows=1 width=12) (actual time=0.035..0.039 rows=1 loops=1)
                           Output: mail_channel.id, mail_channel.create_date
                           Index Cond: ((mail_channel.livechat_visitor_id = 112678387) AND (mail_channel.livechat_channel_id = 1))
                           Filter: mail_channel.active
                           Buffers: shared hit=5
               ->  Unique  (cost=0.57..143838.35 rows=614997 width=4) (actual time=0.033..993.210 rows=97187 loops=1)
                     Output: mail_message.res_id
                     Buffers: shared hit=767225
                     ->  Index Only Scan using mail_message_model_res_id_idx on public.mail_message  (cost=0.57..129884.36 rows=5581595 width=4) (actual time=0.032..730.233 rows=5586467 loops=1)
                           Output: mail_message.res_id
                           Index Cond: (mail_message.model = 'mail.channel'::text)
                           Heap Fetches: 17
                           Buffers: shared hit=767225
 Planning Time: 0.471 ms
 Execution Time: 1025.410 ms
(37 rows)
```
</details>

Now, if we remove the superfluous `distinct` clause, for the same
database, data volume, and result, the plan looks like this:
<details>
  <summary>The query plan when `distinct` is not used</summary>
```
                          QUERY PLAN
-------------------------------------------------------------------------------------
 Limit  (cost=3.44..3.44 rows=1 width=12) (actual time=0.069..0.069 rows=0 loops=1)
   Output: mail_channel.id, mail_channel.create_date
   Buffers: shared hit=8
   ->  Sort  (cost=3.44..3.44 rows=1 width=12) (actual time=0.068..0.068 rows=0 loops=1)
         Output: mail_channel.id, mail_channel.create_date
         Sort Key: mail_channel.create_date DESC
         Sort Method: quicksort  Memory: 25kB
         Buffers: shared hit=8
         ->  Nested Loop Semi Join  (cost=0.98..3.43 rows=1 width=12) (actual time=0.061..0.061 rows=0 loops=1)
               Output: mail_channel.id, mail_channel.create_date
               Buffers: shared hit=8
               ->  Index Scan using mail_channel_livechat_visitor_id_livechat_channel_id_idx on public.mail_channel  (cost=0.41..2.43 rows=1 width=12) (actual time=0.020..0.020 rows=1 loops=1)
                     Output: mail_channel.id, mail_channel.create_date
                     Index Cond: ((mail_channel.livechat_visitor_id = 117513256) AND (mail_channel.livechat_channel_id = 1))
                     Filter: mail_channel.active
                     Buffers: shared hit=4
               ->  Index Only Scan using mail_message_model_res_id_idx on public.mail_message  (cost=0.57..2.77 rows=10 width=4) (actual time=0.040..0.040 rows=0 loops=1)
                     Output: mail_message.model, mail_message.res_id
                     Index Cond: ((mail_message.model = 'mail.channel'::text) AND (mail_message.res_id = mail_channel.id))
                     Heap Fetches: 0
                     Buffers: shared hit=4
 Planning time: 0.761 ms
 Execution time: 0.095 ms
(23 rows)
```
</details>

Total execution time goes from 1000 ms to 0.1ms.

Reference: introduced by 9a01a2953f,
           coming from #69812, which was fixing a performance problem.

[1]  https://github.com/odoo/odoo/blob/9b224f35f45876c86dc34934379bfa9e8b3e2160/addons/website_livechat/models/website.py#L40-L44

closes odoo/odoo#78186

X-original-commit: 3ab87a848c96b284eac3dbbd6f6f2a9ea971876a
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2021-10-18 07:56:21 +00:00
Fabio Barbero 54909f5339 [IMP] survey: update "Press Enter" tooltip depending on field type
Purpose
=======
Have the "or press CTRL+Enter" (metaKey if it's a mac) shown if the input field selected is a text area, and "or press Enter" otherwise.
Hide the text at the beginning of the survey if it's from mobile.

PR: odoo/odoo/pull/77726
Task-2637120

closes odoo/odoo#77726

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-10-18 07:56:17 +00:00
Sébastien Geelen (sge) 6b264fab91 [FIX] web_editor: use color css name fix reset color
`_updateEditorUI` was reseting color to old or non css color value.
due to a race condition in the editor selection.

task-2654666

closes odoo/odoo#78499

X-original-commit: fd3791d79377b270ab98d646710ecc1d2f364810
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Sébastien Geelen <sebgeelen@users.noreply.github.com>
2021-10-18 06:49:54 +00:00
Aktiv Software 94fc798743 [ADD] CLA Signature Aktiv Software
closes odoo/odoo#78495

X-original-commit: 389e88c382d26310574675eec060c8bc42eb8ceb
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-10-18 05:41:46 +00:00
Pierre Masereel cf875e4797 [FIX] point_of_sale: use correct rate date in test
Since changes made in currency rate default value made in this PR
https://github.com/odoo/odoo/pull/76513 the date is stored based on user
timezone, and so doesn't work if the test runs around midnight with the
belgian timezone on the servers.

closes odoo/odoo#78480

X-original-commit: 0dc9a2d47833f2a13dce9891e7710815b4d27584
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-10-17 10:37:41 +00:00
Christophe Monniez fae2bd0c28 [FIX] packaging: verify repodata exists
The rpm packaging fails to generate a repository when the repodata
directory does not exists previously to the build.

The reason is that the package.py script removes the repodata before
rpm repo generation without verifying the the directory exists.

That kind of corner case happens when a new odoo version comes out.
With this commit, the script now verifies that the directory exists.

Also, while at it, a time stamp based on seconds is added to the default
build directory name to allow to build more than one time the same day
without removing the build directory. It's mainly a testing use case,
when the packaging script is tested, the build dir is usually kept for
debugging purposes.

closes odoo/odoo#78386

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2021-10-15 22:09:41 +00:00
Christophe Monniez e7231db74e [IMP] packaging: automate win installer displayed version
When a new Odoo version is released, the displayed version in the
Windows NSIS installer has to be manually updated.

With this commit, the displayed version is computed from the release.py
file.

Part-of: odoo/odoo#78386
2021-10-15 22:09:41 +00:00
Aaron Bohy 798bdcc645 [FIX] web: clickbot: correctly test filters
Since commit [1], the filters were no longer tested by the clickbot
because the DOM of the filter menu changed, and the clickbot
selector hadn't been adapted.

[1] https://github.com/odoo/odoo/commit/84715436d87bb05b421bc9ccaacda67d07571690

closes odoo/odoo#78494

X-original-commit: 54d313e5ce708cf0420aaa2529fa3f32f281205e
Related: odoo/enterprise#21735
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2021-10-15 20:58:06 +00:00
tranngocson1996 1cf4cdaa1f [I18N] l10n_vn: Update translate file
closes odoo/odoo#78476

X-original-commit: c85828ea75d9450cc83039b673fbcd822a2fe839
Signed-off-by: Florian Gilbert <FlorianGilbert@users.noreply.github.com>
Signed-off-by: Mountain Tran <tranngocson1996@users.noreply.github.com>
2021-10-15 20:58:01 +00:00
Touati Djamel (otd) 1333d11b15 [FIX] purchase: allow deleting a vendor from the product variant
steps to reproduce the bug:
- Go to inventory > products > Create a new Product from ```product.template```
- Assign two vendors to the record
- Go to inventory > products > product variants > select the newly created product
- Remove any vendor and save

Problem:
An error indicating that the record ```product.supplierinfo``` does not exist or has been deleted will be triggered

In the ```product.product``` model, we have two One2Many fields ```seller_ids``` and ```variant_seller_ids```
which both point to ```product.supplierinfo```.
When we save, the write method will be called and will first delete the seller with seller_ids
and then try to update with variant_seller_ids but as both fields point to the same field,
the seller will already be deleted and an access error will be thrown

Solution:
As the two fields are never displayed at the same time in the view.
We can use the same invisibility condition to make them read only to prevent them from being both updated at the same time

opw-2661082

closes odoo/odoo#78464

X-original-commit: acdd6ef720e837097d68032082209b619dba44d9
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-10-15 20:57:51 +00:00
prro-odoo 63e6a22205 [FIX] website_slides: build a correct form in Courses
How to reproduce the problem:
- Install the website_slides modules
- Go to the website -> Courses -> choose a course -> Add Content (Webpage)
- In the new Webpage -> Edit -> Drag and drop a Form Builder -> Save
The form is unusable: you can't write in the form's fields.

Cause of the problem : usefull attributes and values of the form were
removed due to the sanitizing of the HTML component.

Solution : the HTML components in slide are not sanitized anymore,
in order to keep valuable information for building forms.

opw-2588089

closes odoo/odoo#78155

X-original-commit: f783e23848986925937785aec82a616c4b237f16
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Signed-off-by: prro-odoo <proose@users.noreply.github.com>
2021-10-15 19:12:44 +00:00
Philippe Wauthy 1ac294c825 [REF] hr_holidays: refactor js code for time_off_calendar.*.js
task- 2643692 required customizing the calendar view to display a calendar from the employee form via the Time Off smart button.
As the changes took place after the freeze of the saas-14.5 branch, it was not possible to split the time_off_calendar.js file into its different components to have them being re-used in time_off_calendar_employee.js file.
Subsequently, some code duplication exists between the two files and makes it hard to maintain.
This commit is for making the custom calendar components more modular and more maintainable.

task-2661142

closes odoo/odoo#77767

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-10-15 17:25:14 +00:00
Prakash Prajapati 31943bc6ac [FIX] web: fix the unavailabilities day in calendar view
Currently, if there is unavailabilities day then white background and
border appear in calendar month mode. It does not show the same background.
Now the same background(grey) will appear.

closes odoo/odoo#78240
task-2648148

closes odoo/odoo#78444

X-original-commit: 64f2acc79d39331f79f3ac68d451f638cbd93393
Related: odoo/enterprise#21720
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-10-15 16:13:57 +00:00
Kamlesh Pathekar f922df6af6 [FIX] project: remove the description field border
Currently there is border visible under only the 'description' notebook.
So in this commit we removed that border.

closes odoo/odoo#78240
task-2648148

X-original-commit: 43f2ae777d59430acfc3973cb57f8a76cb29129b
Part-of: odoo/odoo#78444
2021-10-15 16:13:57 +00:00
Wolfgang Taferner be28be1eb0 [FIX] account: only display qr code if residual > 0
In case an invoice is already paid it is useless to provide
a QR Code for scanning to pay a residual of zero.

closes odoo/odoo#78437

X-original-commit: bfb5bcc07465240b0952e031522dd513dff8c2ab
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2021-10-15 16:13:51 +00:00
Younn Olivier 46c0bf7827 [FIX] website, mass_mailing: remove composed css classes
Recently, [1] broke the style of a few snippets, because it was adding a
:not selector to the parent css class, that was used to define children
classes that were adding a suffix to the parent class name with the &
symbol.

It was decided that every snippet css class should be explicitly
declared to avoid breaking the style when adding selectors to the parent
class. This will also prevent breaking the style when adding a new css
version for the snippet.

task-2660921

[1]: https://github.com/odoo/odoo/pull/77312

closes odoo/odoo#78413

X-original-commit: af6785599358d2dcb9ff811afc2e558a94d9704d
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-10-15 16:13:47 +00:00
Swapnesh Shah bd4576273a [FIX] stock: remove upgrade_boolean from wave group
Process operations in wave transfers exists in community edition.

closes odoo/odoo#78461

X-original-commit: f078b9f69341405d14a268d5371c9360aa66475d
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-10-15 14:59:04 +00:00
Julien Mougenot 8097c368c2 [FIX] *: remove manifest qweb keys
This commit removes unused "qweb" manifest keys that have been missed
during the transfer of assets declaration from xml to manifest.

closes odoo/odoo#78456

X-original-commit: 5be338fa061a3379fec44528f9db788e8fdefaab
Related: odoo/enterprise#21727
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
2021-10-15 14:58:53 +00:00
Florian Damhaut 6d42d865be [FIX] stock: Product Search in stock picking
This commit makes the picking search by product more consistent with
the general product search as the following case could happen:

  - Have a product with two variants;
  - Each variant has the following internal reference:
    - Variant 1: 'SoMething'
    - Variant 2: 'SomethingElse'
  - Create two pickings, each one containing one of the variant;
  - Then filter pickings by product and the result will vary:
    - Searching for 'SoMething' -> Found one picking
    - Searching for 'Something' -> Found two pickings

The expected behavior is to find the two pickings in both cases.

opw-2646214

closes odoo/odoo#78451

X-original-commit: d0090ee01fc3d105ad87d6764733fe332b36db56
Signed-off-by: Steve Van Essche <svs-odoo@users.noreply.github.com>
2021-10-15 14:58:49 +00:00
Florian Damhaut 14f2086ea7 [FIX] delivery : removed service from rule-based delivery quantity
Current behaviour :
Product of type service are accounted for when computing the quantity, weight and volume metrics used in the price computation of rule based delivery.

Planned behaviour :
Service-typed product should be excluded from such computations.

opw-2647067

closes odoo/odoo#78402

X-original-commit: 2993c82db51e16787de72cbb67f04d5ae1928b68
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-10-15 11:31:49 +00:00
Tiffany Chang (tic) 9a4fae9e06 [FIX] mrp: control archive operations within form view
PR odoo/odoo#76376 made it so operations (of a BoM) can now be
(un)archived in the list view. This commit makes it so we can also do
the same in the form view as well as see the "Archived" ribbon in the
form view.

Part 3 of Task: 2660820

closes odoo/odoo#78094

X-original-commit: e995860157becf34300365ac09e12ae57512e22a
Related: odoo/enterprise#21569
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-10-15 09:29:42 +00:00
Donatas e1a1410c63 [FIX] l10n_lt: remove duplicate translation
Translation files contained multiple instances of the same reference.
This caused a traceback when loading the translations.

closes odoo/odoo#78423

Fixes: #68552
X-original-commit: afaff8fc12fa7b86332b7a26b828b397fa401efe
Signed-off-by: Josse Colpaert <jco@openerp.com>
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2021-10-15 07:24:49 +00:00
oco-odoo c9f280358f [FIX] l10n_sa: remove duplicate xmlid in translations
Module was not installable in some circumstances

To reproduce:
- Make Arabic and Arabic (Syria) languages active
- Try installing l10n_sa
==> crash: "psycopg2.errors.CardinalityViolation: ON CONFLICT DO UPDATE command cannot affect row a second time"

This was due to duplicate xmlid in the translation file.

closes odoo/odoo#78411

X-original-commit: 085812020df80b66be829995b1ed9b7d70cf6925
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2021-10-15 07:24:42 +00:00
Kevin Baptiste 3cad69a838 [IMP] hr: make Plan company dependent
It was possible to assign a user that was not part of the same company
as the employee's for an activity which is misleading.

Make hr.plan and hr.plan.activity.type company dependent.

closes odoo/odoo#77524

Related: odoo/upgrade#2879
Taskid: 2658773
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-10-15 07:24:38 +00:00