Commit Graph
147668 Commits
Author SHA1 Message Date
Thibault Delavallée 37db926fe8 [REF] various: remove usage and dependency on html2text library
We have our own html2plaintext, already used in lot of use cases instead of
just a few for the html2txt library.

Notably for emails: most emails going through Odoo stack use our simple
html2plaintext to format the body alternative. When no body alternative
is given to ``build_email`` an alternative is built using the library to
remove. Using our own parser allows to have the same results compared to
using ``MailMail.send()``. Difference lies in spaces and new lines as well
as markdown. Our html2plaintext is a bit simple and does not try to generate
Markdown but generates a simple plaintext version.

This also helps solving some issues with depending on that library.

Task-2702034

closes odoo/odoo#82486

X-original-commit: b3b9627b655cd7cb928925affed6cc8d92661e8d
Related: odoo/enterprise#23364
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-01-12 16:43:16 +00:00
Thibault Delavallée be878f5d6a [IMP] base: test body alternative done in build_email
Purpose of this commit is to add some tests about body alternative done
in build_email when none is given. It uses a library we are about to
remove and testing it is therefore necessary.

Task-2702034

X-original-commit: 92b102c87bbdb9073f794a414a41460e4146acd2
Part-of: odoo/odoo#82486
2022-01-12 16:43:16 +00:00
Bayarkhuu Bataa f22d6be9d8 [FIX] hr_recruitment: provide address_id in the action
Creating employee from applicant was not providing the default
home_address_id

closes odoo/odoo#81121

X-original-commit: 68cdf057a9e769071fab6726eaf3b37d16959bf1
Related: odoo/enterprise#23443
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-01-12 16:43:08 +00:00
Bayarkhuu Bataa 574900eb96 [CLA] signature for BayarkhuuBataa
X-original-commit: 8f77c11b7a482c7093f190cb301ca65e67646cdc
Part-of: odoo/odoo#81121
2022-01-12 16:43:08 +00:00
Alvaro Fuentes 1f163eed03 [FIX] maintenance: set noupdate for stages
It's useless to trigger the udpate of the stages during module (or whole
DB) upgrade if these stages do not change. It's been the same since at
least 12.0. Updating the stage triggers a series of computes that may
end up in MemoryError during upgrade.
https://github.com/odoo/odoo/blob/7b3b623cf3359ac1eea537177f7f963e81403a01/addons/maintenance/models/maintenance.py#L434-L441

closes odoo/odoo#82651

X-original-commit: 387bc337930e55511d336351db3ce3ddd80f524c
Signed-off-by: Christophe Simonis <chs@odoo.com>
2022-01-12 15:49:39 +00:00
Kartik Chavda 5b751d36db [FIX] project: ensure email alias field is visible event if empty
This commit show alias_name field span in read only, whether it is emtpy
or not. The field is displayed in bold if not empty.

task-2722863

closes odoo/odoo#82649

Closes: https://github.com/odoo/odoo/pull/82065
X-original-commit: bbc4ff1059d161414ef4338981eb015871ac46c5
Related: odoo/enterprise#23445
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-01-12 15:49:31 +00:00
Kartik Chavda a942000c2a [FIX] project: fix 'Blocking' stat button for project update
The purpose of this commit is to:

    - Open the form view if there is only 1 blocking task.
    - Prevent the project update button to show in the view opened
      through the action_dependent_tasks action.

task-2722863

Closes: https://github.com/odoo/odoo/pull/82065
X-original-commit: 22078a6a0ee0f059db8aef3a283485bc192ce0a1
Part-of: odoo/odoo#82649
2022-01-12 15:49:31 +00:00
Kartik Chavda 960e79f843 [FIX] project: display Gross Margin button if analytic_account_id is set
The purpose of this commit is to only show 'Gross Margin' stat button
in right side panel of project update when analytic account is set
on that project.

So, in this commit we add a condition in order to only show that stat button
if an analytic account is set on that project.

task-2722863

Closes: https://github.com/odoo/odoo/pull/82065
X-original-commit: 95c1deb34330db98e24f70fceae85038d47217e7
Part-of: odoo/odoo#82649
2022-01-12 15:49:30 +00:00
Florent de LabarreandRaphael Collet 09985fd42a [FIX] stock: Exception are not correctly logged
Il during the scheduler an exception append, the error is not correctly logged.
This PR allow to catch the error with logger analyser (like sentry).

closes odoo/odoo#82648

X-original-commit: c68e1d1c13d116bda6b91fcbbcd61a26739a9894
Signed-off-by: Raphael Collet <rco@odoo.com>
Co-authored-by: Raphael Collet <rco@odoo.com>
2022-01-12 15:49:20 +00:00
roen-odoo 6a46d5e50a [FIX] point_of_sale: Spanish decimalSeparator
Current behavior:
When using spanish language in PoS the "," decimal separator was ignored

Steps to reproduce:
- Create a sale order with a discount
- Change profile language in spanish
- Open PoS and load the order created before in the PoS
- The discount is not correct, for example 18.2 will become 100

opw-2718260

closes odoo/odoo#82593

X-original-commit: ac4d985c35109b82df4f095bfe84627b290d185d
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2022-01-12 15:49:16 +00:00
Cedric Prieels (cpr) e9bc5b9f36 [IMP] {planning}: add demo data
Some demo data have been added on the planning module.

task-2677949o

closes odoo/odoo#80439

Related: odoo/enterprise#22536
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-01-12 15:49:12 +00:00
Kartik Chavda 9398542cf2 [FIX] project: hide rating warning when customer ratings is disbled
Purpose of this commit to hide rating warning in project task
stage form view.

So, in this commit add customer ratings group to rating warning
div.

task-2696911

closes odoo/odoo#80232

Related: odoo/enterprise#22470
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-01-12 15:49:00 +00:00
Victor Feyens c1709fe33e [FIX] sale_stock: query counter
closes odoo/odoo#82645

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-01-12 14:55:11 +00:00
Benoit Socias a676344ecc [FIX] website{_*}: not truncate URLs in search results
website{_*}: website, website_blog, website_event, website_forum,
website_sale, website_slides

Since the generic search bar was introduced in [1] all text fields were
truncated in search results.
This caused problems for long URLs which were truncated as well, and
therefore could become invalid.

After this commit URL fields specify `'truncate': False` in their search
detail metadata, which informs the rendering to skip the text truncation
step for that field.
Also added previously missing controller-level tests of the
autocompletion.

Steps to reproduce:
- start odoo with website_forum and demo data
- go to the Help forum
- search for "configure" in the Help forum
- click on the auto-complete suggestion
- => redirected to a 404 page because the URL was shortened
To test the fix on other models, use a long enough name that causes the
problem. E.g.: "This product has such a long name its URL would have
been truncated without the fix contained in this branch".
Note that the problem did not occur on blogs because the URL does not
contain the name, but the same fix was applied for consistency.

[1]: https://github.com/odoo/odoo/commit/7559626c54e34b41e1549e28276a650accec6986

task-2727788

closes odoo/odoo#82621

X-original-commit: 045f741be35e62f5e3a636490c6c1d475b5d78eb
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-01-12 14:55:03 +00:00
Bruno Boi 5bfcf170e5 [FIX] web: clear unused option from hotkey service
When adding an hotkey callback through the service's API, the `activeElement` option had no effect at all and in fact was relics of the hotkey service's development process.

It has been removed as it was broken anyway and not tested.

closes odoo/odoo#82625

X-original-commit: 0e3663f28fd012d0fced14759f9f38592014c076
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-01-12 14:03:37 +00:00
Cedric Prieels e2a134b398 [FIX] project,sale_timesheet: fix project update right columns values
Prior to this commit:
- Some of the project update right panel values were wrong (the number of sold and
effective hours were wrong if the service is in units, and eventual down payments are
now removed from the list of SOLs)

task-2703516

closes odoo/odoo#82607

X-original-commit: d1a06012c629f075b6faeaad2b17670e6c0e2aa5
Related: odoo/enterprise#23429
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-01-12 13:11:00 +00:00
Florent de Labarre 29b1ecb416 [FIX] base_automation: impossible to execute an action with unlink
- Create two record with state == 'one' and with activities
- Create an automated action if state == 'two' then record.sudo().activity_ids.action_done()
- Set state == 'two' in same time of two record

In the loop line 261, for the first record self.action_record_id is in cache, but for the second record it is not in cache because of the unlink made by action_done(). When the orm raise during put in cache because he have no access to self.

closes odoo/odoo#82574

X-original-commit: 2207d8adbd37c6758f350cced68f285f8960c3aa
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Raphael Collet <rco@odoo.com>
2022-01-12 13:10:57 +00:00
Romain Derie 90f411ea03 [FIX] (test_)website: fix standalone tour
Use theme_default instead of theme_common.
Instead, theme_common is not available when only website is installed as it
depends of the design-themes repository.

closes odoo/odoo#82587

X-original-commit: a10522c6509caf7f09f21e6da3224d5865f0ba6a
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-01-12 11:19:04 +00:00
FrancoisGe 1e1b45ea62 [IMP] web: Command Palette footer
This commit will change the setting of the emptyMessage and the
footer of the main command palette.
In order to make the command palette footer more customizable, we will
replace it with a Component. For example, using a footerComponent in the
main command palette allows us to adapt its text based on the namespaces
used.

Setting up an empty message:
Before:
```
registry.category("command_empty_list")
        .add("@", _lt("No user found"));
```
After:
```
registry.category("command_setup")
        .add("@", {
            emptyMessage: _lt("No user found"),
            });
```

With this commit, it is possible to add a namespace to the footer tips:
```
registry.category("command_setup")
        .add("@", {
                name: _lt("channels"),
            });
```

closes odoo/odoo#82541

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-01-12 11:19:00 +00:00
Kartik Chavda fae6762bfc [FIX] project: fix task analysis report base on set project
Purpose of this commit is to show only task that
has project_id set in 'Task Analysis' menu.

So, in this commit select only those tasks that has
project_id set in 'Task Anamysis' menu's query.

task-2722863

closes odoo/odoo#82565

Closes: #82442
X-original-commit: d8f3a0c4722d299f73892403b4ef5800913ea2a8
Related: odoo/enterprise#23409
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-01-12 10:17:53 +00:00
Josse Colpaert bb1642305f [IMP] l10n_multilang: allow tax report name to be translated too
closes odoo/odoo#82331

Signed-off-by: Olivier Colson <oco@odoo.com>
2022-01-12 10:17:47 +00:00
Nasreddin Boulif (bon) c40aadb42b [FIX] sale,website_sale: Display extra prices with taxes included
Steps to reproduce the issue:

  - Install eCommerce module
  - Go to Settings
  - Ensure `Product Prices` is set to 'Tax included'
  - Create a new Product as storable
  - Set `Sales Price` to $1.0 and `Customer Taxes` to 10.00 %
  - Under `Variants` tab add an Attribute with 2 values
  - Set "Price Extra" to $2.0 to one of the variants
  - Go to the Shop and select the product

Issue:

  The extra price badge does not include the taxes
  ($2.0 instead of $2.2), however the final price does.

Cause:

  The price_extra field from ptav (used in the badge) does not include
  the taxes.
  However, when calculating the final price, we do first the sum of all
  prices (including the extra prices) and then apply the taxes.

Solution:

  In the template, for each 'variants', we call `_get_combination_info`
  to get the variant.price_extra with taxes included/excluded
  depending the `Product Prices` setting.

opw-2669871

closes odoo/odoo#81949

X-original-commit: 6f04935d14d595faa3bb8dd6ba9e0dcf1d694886
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Nasreddin Boulif (bon) <bon@odoo.com>
2022-01-12 10:17:43 +00:00
Rémy Voet (ryv)andrco-odoo 504589efb2 [FIX] base: add __reversed__ in BaseModel for efficiency
Before when we do `reserved(records)`, it iterates in a reverse
order of `records`. Unfortunately, the `__reserved__` method don't
exist explicitly in BaseModel then Python fallback on
its own implementation using `__getitem__` and `__len__` (coming from Sequence): https://github.com/python/cpython/blob/3.10/Lib/_collections_abc.py#L1047-L1049
Because it uses __getitem__, it breaks the prefetch of the recordset.

Example:
-------------
```
partners = self.env['res.partner'].browse(1, 2, 3, 4, 5)
for partner in reversed(partners):
    partner.name
```
will generate 5 SQL requests to fetch data (one by record)

Then create our own `__reversed__` and handle the prefetch correctly
(like `__iter__`). Now in the example it will correctly generate only
1 SQL request because of the prefetch.

task-2687953

closes odoo/odoo#79622

Signed-off-by: Raphael Collet <rco@odoo.com>
Co-authored-by: rco-odoo <rco@odoo.com>
2022-01-12 10:17:36 +00:00
Rémy Voet (ryv) 7968030e62 [IMP] test_performance: add test of reversed BaseModel
task-2687953

Part-of: odoo/odoo#79622
2022-01-12 10:17:35 +00:00
Laurent Smet 10a3df3511 [FIX] account: 'ref' should be readonly on account.move.line
closes odoo/odoo#82508

X-original-commit: 38c13bbef39e3e82a77cfd4a316be94280e3cee5
Related: odoo/enterprise#23376
Signed-off-by: Florian Gilbert <flg@odoo.com>
Signed-off-by: Laurent Smet <las@odoo.com>
2022-01-12 09:24:46 +00:00
Florent de Labarre 800295a6b8 [FIX] base_automation: error not correctly show
If an error append during an automation made by a standard user, the error is not correctly show.

closes odoo/odoo#82591

X-original-commit: d76d896400016f4ec504b34e113d5f42951970a1
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2022-01-12 08:33:05 +00:00
Yolann Sabaux 00bb3652f0 [FIX] google_spreadsheet: domain encoding
Steps to reproduce:
- Go to Contacts
- type "управління" in the filter
- click on add to google spreadsheet
-> error

Solution:
- encode the domain in utf-8

OPW-2701434

closes odoo/odoo#82404

X-original-commit: 077e554703b6d8a71c81fbf6783228d04e77d96f
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: yosa-odoo <yosa@odoo.com>
2022-01-12 08:33:00 +00:00
Nicolas Lempereur 4307ad6efc [FIX] fetchmail: pop server without message no error
In 72cd8d076 there was an improvement for removing infinite loop in POP
mail server, but if there was no message to fetch, you can get an error:

UnboundLocalError: local variable 'num' referenced  before assignment

because `num` is not set when logging stats of fetching mails.

`num` should be set to 0 by default, we don't want to have it unset or
use a value from a previous loop.

opw-2724216

closes odoo/odoo#82582

X-original-commit: 7b3b623cf3359ac1eea537177f7f963e81403a01
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2022-01-12 07:44:06 +00:00
Yenthe Van Ginneken 11e17dc11b [FIX] stock_account: always use first move
Before this commit it is technically possible for "return_picking_line" to be a recordset instead of a record.
By taking the first element ([0]) we're sure it is always a record instead of a recordset to work with.

closes odoo/odoo#82578

X-original-commit: 705e60a9531fe0b042fd32a5dfc934bede15558c
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2022-01-11 17:08:54 +00:00
Didier (did) d4073f6274 [IMP] mail: move activity getters inside activity view
task-2698446

closes odoo/odoo#81805

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-01-11 17:08:50 +00:00
Mathieu Duckerts-Antoine 1f85f7403d [FIX] web: graph: line chart color
Before this commit, in a line chart in comparison mode with one groupby,
if only data comming from the comparison period were displayed, the line
(with red border) would be filled incorrectly with a blue color while it
was not supposed to be filled at all (the blue filling is supposed to be
reserved to data comming from the reference period).

closes odoo/odoo#82577

Forward-port-of: https://github.com/odoo/odoo/commit/6747d982a56af0525cf52732c43351081831d32f
X-original-commit: 519e205a4b34fdecfe6b938ff4a6e93a02c2bda2
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-01-11 16:19:00 +00:00
Mathieu Duckerts-Antoine 8c13c9cbf8 [FIX] web: graph: relabelling of fake data
In the graph view in line mode, fake data are added when there is few
data to center the graph (the points in facts). Now, there
are two problems with the relabelling of the labels created along with the
fake data:
    - the relabelling (when it works) gives "Total" instead of "" (nothing)
    - the relabelling crashes when the line chart is grouped by a date
      field, a comparison is done on that field and no data is received.

We fix the problem by introducing a custom label similar to NO_DATA
(a custom label used to manipulate fake data in the pie charts).

Forward-port-of: https://github.com/odoo/odoo/commit/a30669d1ff258e3ac71dff4d78ca295aa1be2ec8
X-original-commit: 6374618e4d201a53182c6adf2127b0e64b4e48d1
Part-of: odoo/odoo#82577
2022-01-11 16:18:59 +00:00
Thibault Francois d1d631871a [FIX] lunch: do not generate custom code counted by cloc
Issue
-----

The module lunch generate ir.cron and thus server action when
lunch.supplier and lunch.alert are created.
Those server action are counted as customization by cloc and thus
customer should pays maintenance fee just for the installation of
data_merge module

Cron are deleted when supplier and alert are deleted but the server
action remains.

Solution
--------
Avoid to count server action generated by lunch by adding
a xml_id from lunch module to those SA

Delete server actions as well

closes odoo/odoo#82576

X-original-commit: cafd96dde8df79e7158b156b961657941b0265cb
Signed-off-by: Julien Castiaux <juc@odoo.com>
Signed-off-by: Thibault Francois <tfr@odoo.com>
2022-01-11 16:18:54 +00:00
roen-odoo ca6cd0362e [FIX] hr_expense: Expense not cancelled
Current behavior:
When cancelling an expense payment, the expense state was not modified and was still 'paid' when it should be 'refused'.

Steps to reproduce:
- Create an expense and post the expense and register a payment for the expense.
- Then go the vendor payments and cancel the associated vendor payment.
- The expense still shows as paid in the expenses page.

opw-2711383

closes odoo/odoo#82496

X-original-commit: 16459957d23f4bdfddfe96d72ef96cbdc6fec539
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2022-01-11 16:18:49 +00:00
Adrien Widart 683c02b099 [FIX] repair,mrp,stock: count returned SN products
Suppose a tracked-by-usn and consumed product returns in the stock
thanks to a repair order. Using again this component in a new
manufacturing order will raise an error

To reproduce the issue:
1. In Settings, enable "Storage Locations"
2. Create two products P_finished, P_compo
    - Storable
    - P_comp tracked by USN
3. Update the quantity of P_compo:
    - WH/Stock: 1 x Lot01
4. Create a manufacturing order MO:
    - Product: P_finished
    - Components:
        - 1 x P_compo
5. Confirm, Check availability and Mark MO as Done
    - (Lot01 should be consumed)
6. Create a repair order RO:
    - Product: P_finished
    - Parts:
        - Type: Remove
        - Product: P_compo
        - Lot: Lot01
        - Destination Location: WH/Stock
7. Confirm RO, Start RO, End RO
    - (There should be one Lot01 available in stock)
8. Repeat 4-5

Error: When checking the availability on the MO, Lot01 is correctly
reserved. However, when marking the second MO as done, a User Error is
displayed: "The serial number Lot01 used for component P_compo has
already been consumed" although this lot should be available

When checking the uniqueness of the lot, nothing includes the products
back in stock thanks to the repair orders.

OPW-2701668

closes odoo/odoo#82544

X-original-commit: 3d9355f90fa1dd9436f1745c515c89947ed04de0
Signed-off-by: Tiffany Chang <tic@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
2022-01-11 15:24:11 +00:00
Gorash 2e6e2f59e5 [IMP] website: Save one sql for all images on published record
The record is read directly in sudo, the prefetch is in the sudo
environment. When reading the other information there is no longer any
need to make a request.

closes odoo/odoo#82475

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-01-11 15:24:06 +00:00
Florian Damhaut 8f4dc7d00f [FIX] mrp : Removing a workorder broke the continuity
Unlinking a workorder which was in the middle of a chain of workorder created two subchains which both created a product when reaching their new respective ends.
The issue was solve by assuring that when we a link is remove from a workorder chain, their adjacent workorders are linked together using next_workorder_id

opw-2669514

closes odoo/odoo#82553

X-original-commit: a826608044f2a0b50c2ad9ed0228717f9ec66522
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2022-01-11 14:27:05 +00:00
Guillaume (gdi)andqsm-odoo 7c8323e816 [FIX] web_editor, website: permit the user to set link on images
This restores a (basic) feature that was lost in 15.0 by mistake.

Allow the user to set a link on an image. The user can access this link
tool in the editor panel or via the CTRL+K shortcut. This tool is very
similar to the existing link tool for texts. This tool uses the
suggestion system already existing on the text link tool.

task-2666467

closes odoo/odoo#82512

X-original-commit: bfcd25c5d66765b7436114dba3316ac7331a4d97
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2022-01-11 14:27:00 +00:00
Guillaume (gdi)andqsm-odoo 5957cad422 [FIX] web_editor: ensure order of the we-input events
This commit ensures that changes are applied in the same order as the
events are triggered on the InputUserValueWidget. This was not the case
because of another bug we had to consider and which is not there
anymore, this is why this fix is done in 15.0 and not before.

Actually, this also greatly improves the inputs behavior using the
natural "change" event which occurs... when a change was made. Before,
if you hit enter 5 times then left an input, you had the option applied
6 times (which was particularly annoying for options which reload assets
like the header border or something like that).

task-2666467

X-original-commit: db62a5fac123fc72e37e94709b1a0c80f32a8a29
Part-of: odoo/odoo#82512
Co-authored-by: qsm-odoo <qsm@odoo.com>
2022-01-11 14:27:00 +00:00
Odoo's Mergebot ba2b68940c [MERGE] sale: files & xml cleanup
COM PR: odoo/odoo#82070
ENT PR: odoo/enterprise#23183
UPGRADE PR: odoo/upgrade#3135

task - 2692296

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

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-01-11 15:26:55 +01:00
roen-odoo 6be5e139d2 [FIX] l10n_gcc_pos: Saudi Arabia taxes on receipt
Current behavior:
When product name is too long and need to be splitted on PoS receipt, the tax is inserted between the two lines of the product name

Steps to reproduce:
- Install SA modules
- Change company in SA
- Create a product with a very long name
- Try to buy it on the PoS
- The receipt is not correctly former

opw-2731585

closes odoo/odoo#82543

X-original-commit: 40923391333ec3338cecd06af781d591767d9b7c
Signed-off-by: Masereel Pierre <pim@odoo.com>
2022-01-11 13:34:56 +00:00
Kartik Chavda 3e4d3a3bd4 [FIX] project: remove duplicated stat button
Purpose of this commit to remove one 'Gross Margin' stat
button from project form view.

So, in this commit remove one 'Gross Margin' from project
form view.

task-2722863

closes odoo/odoo#82551

Closes: #82068
X-original-commit: 9010dc99f2c3bb1f7ec73cb0a7475f81f649d1da
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-01-11 12:14:52 +00:00
Kartik Chavda f65b971a51 [FIX] project: remove the translate attribute from task name
Purpose of this commit is to make the name field of task
non translateble.

So, in this commit remove 'translate=true' attribute from
name field's defination.

task-2722863

Closes: #82068
X-original-commit: d344e502ad61cb9a7b2a174590ce7ae7af0c1e1a
Part-of: odoo/odoo#82551
2022-01-11 12:14:52 +00:00
Kartik Chavda 689822e129 [FIX] sale_(project,timesheet): remove extra stat button
Purpose of this commit to remove one 'Sale Order' stat button
from project update right side panel.

So, in this commit we remove tha button defined in
sale_timesheet module.

task-2722863

Closes: #82068
X-original-commit: 6c3ece94db34de5cdfd23ff5a1f23733aead461e
Part-of: odoo/odoo#82551
2022-01-11 12:14:52 +00:00
Krina Oza ff2ffb9e0d [IMP] web,sale_(project): improve keyboard navigation
The purpose of this commit is, to add keyboard shortcut
to multiple actions.

So in this commit, added keyboard shortcut to several actions
in project, sale_project, web_calendar and added smart action
in command palette on statusbar.

task-2655790

closes odoo/odoo#79805

Related: odoo/enterprise#22267
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-01-11 12:14:43 +00:00
Aurélien (avd) 2c911fe176 [FIX] web: speedup basic_model._updateRecordsData
Speedup basic_model._updateRecordsData for
many2many fields such as fetchmail.server.message_ids
and mail_channel.channel_message_ids.

Calling _.findWhere(values) inside two nested _.each
calls can be quite slow when the number of values
is big.

Remove the call to _.findWhere by first
creating a Map res_id -> data and then calling
Map.get to retrieve the data for a given res_id
when making a DataPoint

opw-2701170

closes odoo/odoo#82540

X-original-commit: aaf653e744c846d4c399498ea38e358ddee80d4a
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-01-11 11:21:11 +00:00
Samuel Degueldre 2192480ed1 [FIX] web: pass user-context in legacy RPC
Previously, RPCs would always receive the user-context as an extra
keyword argument if they had any keyword arguments themselves. When
creating the translation layer between the old API and the new RPC
service, this was overlooked, resulting in all legacy RPCs losing their
user-context unless the user context was explicitly passed. This commit
fixes that.

closes odoo/odoo#82530

X-original-commit: d959638e23a92cf880049a760c42da33e5908f41
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-01-11 11:21:07 +00:00
roen-odoo b9aa5ea33f [FIX] pos_coupon : Discount not applied correctly
Current behavior:
When using a pricelist and discount, the discount wasn't applied on the price from the pricelist but on the price defined on the product.

Steps to reproduce:
- Create a pricelist for a products
- Set the pricelist on the POS session
- Open the POS session
- Apply the 10% coupon code to the product.

opw-2714342

closes odoo/odoo#82484

X-original-commit: c7bc5f6884bb607ac50b29762ea4900a3af91f90
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2022-01-11 11:21:04 +00:00
thcl-odoo 11e7954d23 [FIX] product: close 'Labels Printing' wizard after download
Current behavior :
When the download is finished, the wizard stay open

Expected behavior :
Wizard should automatically close after downloading

Reason :
The key `close_on_report_download` wasn't defined during new wizard implementation ( commit d9f45ba694 )

OPW-2710611

closes odoo/odoo#82472

X-original-commit: e50a60573e1f9ad201d4db8607d9ff121cd476c2
Related: odoo/enterprise#23355
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Claude Thibault (thcl) <thcl@odoo.com>
2022-01-11 11:20:59 +00:00
Louis Wicket (wil) c04b313967 [IMP] mail: melt causal relations into identifying fields
With the idea of maybe merging the concepts of causal relations and
identifying fields, change the identifying fields so that their inverses
are the only fields with `isCausal: true`.

closes odoo/odoo#82521

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-01-11 10:22:43 +00:00