Commit Graph
146759 Commits
Author SHA1 Message Date
Kevin Baptiste 28a3bdbc4e [FIX] hr_holidays: show Dashboard data in mobile
The number of leaves taken / available was no longer available
in mobile.

closes odoo/odoo#80513

Taskid: 2701070
X-original-commit: 3c68b1cad227235a915b4908b6d73aee030e54bc
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-11-29 12:08:42 +00:00
Alexandre Kühn 93716bec8f [IMP] mail: do not use component.el in tests
Omission of some tests that still use `component.el`.
In preparation of using OWL v2 in discuss code.

Task-2694242
Task-2701230

closes odoo/odoo#80507

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-11-29 12:08:35 +00:00
Pierrot (prro) 6018b33952 [FIX] point_of_sale: select general type journal in view
The changes brought with
https://github.com/odoo/odoo/commit/6420b6d778ad24b9b441a7158ba85bc96ba5b60f
changed the default PoS journal's type for `general` instead of `sale`,
but no changes were made to the type's domain in the pos setting's view,
preventing the user to choose that journal again once it has been changed.

opw-2677130

closes odoo/odoo#80505

X-original-commit: 1d99c87b6747199368516dfd236ab2eb3d02fb4f
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2021-11-29 11:22:32 +00:00
Fabio BarberoandMohammed Shekha 1863ebc0aa [FIX] web: avoid _reset crashing because of empty parameters
Purpose
=======
Avoid displaying a traceback when editing a partner in form view.
This was observed in crm -> Sales Teams -> Clicking on a member to save
and pressing "save" (which returned a javascript traceback in master).
The same error was also observed in mass_mailing, when editing the
responsible of a mailing list.
This was due to the ev parameter being undefined in method _reset.
A simple check has been added to see if the event is defined.

Task-2694067

closes odoo/odoo#80504

X-original-commit: 88044fa003b3f17d2003bffb810965854427cbd3
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Co-authored-by: Mohammed Shekha <msh@odoo.com>
2021-11-29 11:22:28 +00:00
Rémy Voet (ryv) c3399b5470 [FIX] base: fix performance scalability of create
Issue:
------
The `create` method (models.py) doesn't scale correctly
(with huge number of values) when compute store no-readonly
field(s) are in values (at most one).
It is due to the method `protecting` (api.py) which has a
bad complexity in the `create` situation
(list of (field, records) pairs as argument):

O(r²) with `r` = number of record containing the protected field:
List of `len(r)` send to `protecting`,
loop of this list (`r` factor), loop on fields (constant factor),
create a new frozen set with the previous one (`r` factor).

Fix:
----
Decrease the complexity to O(r) by creating a map of set of ids by
protected field which allows avoiding recreating a new frozenset
for each record (update with tuple of one inside => O(1)).

Performance gain:
----------
For a very simple model with only one compute store no-readonly field,
and all `create` `values` contains this field.
+--------------+---------------+---------------+---------------+----------------+
|   Batch ->   |     1000      |     10000     |    30000      |     80000      |
+--------------+---------------+---------------+---------------+----------------+
| Before (sec) | 0.083 ± 0.006 | 1.433 ± 0.091 | 8.764 ± 0.609 | 94.428 ± 3.021 |
| After (sec)  | 0.069 ± 0.003 | 0.706 ± 0.006 | 2.188 ± 0.076 | 5.875 ± 0.104  |
+--------------+---------------+---------------+---------------+----------------+

closes odoo/odoo#80437

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2021-11-29 11:22:24 +00:00
Joseph Caburnay 7f2eda43ce [FIX] point_of_sale: localeCompare is not a function when name is false
When the loaded res.partner has `name` = false, the call to localeCompare
fails because boolean doesn't have the method. Note that `name` field
of res.partner can be false because no default is specified in its
declaration in the base module.

closes odoo/odoo#80501

X-original-commit: 9b4daee15f901f53239fffdf27a9b42c78dac3e5
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2021-11-29 10:34:00 +00:00
dht-odoo 2816537999 [FIX] mass_mailing: fix the tour bubble for mailing creation
We introduced a tour for email marketing (see commit[1]) which has one
important step, that asks user to create a new Mailing. However, the
selector for this step is generic, which makes the tour bubble appear
on every other installed app's kanban view create button.

Moreover, recently we've recently, for the mailing we've moved to
list view as landing view which previously used to be kanban view.

This commit fixes above issues by adding proper selectors for the
step (list view instead of kanban view) and by adding a new class
to mailing tree view named `o_mass_mailing_mailing_tree`. We provide
this class as extra_trigger for the tour step, so that it can target
the button specific for the tree view of the mailing.

commit[1] - c15f9ef

TaskID-2583760

closes odoo/odoo#80500

X-original-commit: c47bd34293aef5d3359911c3b6bf0da40288d6f5
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-11-29 10:33:57 +00:00
qsm-odoo b7e128a34c [FIX] web_editor: improve error message in HTML/SCSS editor
Before this commit, when the user made an error in the HTML/SCSS editor
(most of the time due to user pasting HTML code while our code excepts
*XML*), the user was stuck most of the time because the error indicator
did not always appear. And even if it did, it disappeared on scroll and
the user had to guess where to click to show the error message.

Now, the UI for the error is way clearer, with the error message opening
itself directly and pointing at the line where the error occurs. The
UI of that error message is now more robust (even though suffering
because of the ace editor which likes to re-render itself at unknown
times). The error message is also still not super clear (default error
message given by the browser) although some parsing is now done on it to
try and display it better.

task-2698641

closes odoo/odoo#80499

X-original-commit: 0d2dbb663653659c8afbf3a515444a6db633fbf9
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-11-29 10:33:54 +00:00
qsm-odoo 044d0a7908 [FIX] website: change default scss file displayed in SCSS editor
By default show the user_custom_rules.scss one as some people would
write rules in user_custom_bootstrap_overridden.scss otherwise, not
reading the comment inside explaining how that file should be used.

task-2698641

X-original-commit: d465b333a403807f09cdd49078f87b102595994e
Part-of: odoo/odoo#80499
2021-11-29 10:33:53 +00:00
qsm-odoo 2075ddf065 [FIX] web_editor: prevent crash when going to unlisted editor file
When switching to files that can only appear in debug mode in the HTML /
SCSS editor and editing them, the page reloads... and crash for no
reason. This was because the filter that allows those files to appear
is lost after reloading, now we simply ignore the file switch if not
present in the default filter.

task-2698641

X-original-commit: ef8b153a6ed80ff6e551b6eee9bc0f53a012e360
Part-of: odoo/odoo#80499
2021-11-29 10:33:53 +00:00
Laurent Smet 75c7ac3e5e [FIX] sale: Hide partner_shipping_id field on vendor bill form
Bug introduced by:
https://github.com/odoo/odoo/commit/bc131c0cfb51c953de8ec41fb820c8c7831eefb5

closes odoo/odoo#80477

Issue: 2668902
X-original-commit: 62f796faa17734ced22ed8ed885c8b575904f1c9
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Olivier Colson <oco@odoo.com>
2021-11-29 09:36:51 +00:00
Mathieu Duckerts-AntoineandAndrea Grazioso 4aa85d304a [FIX] web: pivot: keep subTrees in comparison mode
Before this commit, when comparing a period P of reference to another one,
some rows with only data comming from P would not always be presented
in the table. The problem used to manifest only when loading at least to
level at the same time (starting from Total or any header via expand all).

The reason is the following:
- the data comming from P are processed first: starting from somewhere
  in the trees of headers, some nodes linked to the data comming from P
  are progressively created with no children at first, then the children
  (if any) are added later and so on progressively.
- the data comming from the other period is processed and nodes are
  created with no children and so on in the same way, clearing possibly
  all the node children comming from P.

For example, with
  a row groupby = [field_a, field_b],
  a group [v, v1] from P
  a group [v, v2] from the other period,
a node corresponding to v would be added, then a node child for v1.
Then the node for v would be recreated with no children, then a node child
for v2 would be created. leading to a tree of row headers of the form
Total > v > v2.

Note that it was not affecting the measure values for the displayed rows
since those measures are stored separately from the tree and are linked
to the nodes via some ids.

We fix the problem by avoiding the recreation of a node if it already
exists.

opw-2635113

closes odoo/odoo#80468

X-original-commit: 364475b5da3d4aaa87db715f0c0bbaa9dd3e05c8
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Andrea Grazioso <agr@odoo.com>
2021-11-29 09:36:48 +00:00
Adrien Widart a8d350fe11 [FIX] stock: add required fields to SML's kanban view
When using a mobile, scanning a product to manage a delivery won't work

To reproduce the error:
(Need stock_barcode. Use demo data)
1. In Operations Types, edit "Delivery Orders":
    - Enable "Show Detailed Operations"
3. Create a planned delivery order DO:
    - 1 x [FURN_1118] Corner Desk Black
4. Mark a Todo
5. Switch to a mobile view
6. Edit DO and scan 601647855640 (i.e., the barcode of FURN_1118)
7. Save DO

Error: An error is displayed "The operation cannot be completed [...]
Model: Product Moves (Stock Move Line) (stock.move.line), Field: From
(location_id)"

The kanban view does not include both `location_id` and
`location_dest_id` although they are required

OPW-2688915

closes odoo/odoo#80470

X-original-commit: 248f659615a2934df7b5ee83734aa78508987fdb
Signed-off-by: Adrien Widart <awt@odoo.com>
2021-11-29 08:50:19 +00:00
Daniel Reis 2264fcc8fd [FIX] l10n_pt: wrong P&L, fix account types
closes odoo/odoo#80487

X-original-commit: 284e1e891eb673e962c4918dbb881db9d3b494a6
Signed-off-by: Josse Colpaert <jco@openerp.com>
Signed-off-by: Florian Gilbert <flg@odoo.com>
2021-11-29 08:06:24 +00:00
snd 102e7d8c35 [FIX] account_journal: ignore line_section and line_notes in account_control
When using account control on a journal, line_section and line_note do not
block the process even though they are not in the allowed accounts (they
don't have an account at all).
But when adding new accounts in the account_control_ids field, the
constraint is triggered by those lines.
This PR makes the constraint ignore those lines when assessing if
there's an issue.

opw-2677597

closes odoo/odoo#80313

X-original-commit: 9a42ebf1d9d482b031bc5bb7839cc9a8a09090ea
Signed-off-by: Florian Gilbert <flg@odoo.com>
2021-11-29 07:21:05 +00:00
lejeune quentin 4e823affb9 [FIX] point_of_sale: Add DNS server in the IoT
Currently the resolv.conf file saved when building the image
is not applied because the file is rewritten on each startup.

This commit modifies the name of the file so that the nameservers
are added when starting up when generating the resolv.conf file
We remove the domain localdomain because it is useless in this situation.

Now with this list of DNS servers, they allow other DNS server
to be used if the local DNS server does not resolve the domain.

closes odoo/odoo#80475

X-original-commit: 25c3cb0aea3b001d84a5e33dc0e52cfd8fbf6456
Signed-off-by: Masereel Pierre <pim@odoo.com>
2021-11-28 08:13:43 +00:00
Martin Trigaux cd464d84d7 [FIX] sale: render the report as superuser
Same as 5dde19c92ecee, sudo is not enough but the report needs to be
rendered with the user 1.
The access token proves the user has the access, the fact that he is a
portal, employee or public should not change the result

closes odoo/odoo#80491

X-original-commit: 66ab2ae213f05b055a032d0810de1de9334741ac
Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-11-26 20:37:46 +00:00
Hubert Van de Walle (huvw) 4a1a912c88 [FIX] portal: duplicated project invitations
Steps to follow

  - Share a project task
  -> The invitation message is duplicated

Cause of the issue

  `partners` can be empty
  -> `not partners` is then falsy

Solution

  Check the default parameter with `is None`

opw-2698724

closes odoo/odoo#80476

X-original-commit: 9514e76e21fe346ea3aee0458ad170b24f09d67e
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
2021-11-26 17:25:47 +00:00
jbw 5063948519 [FIX] account: fix _is_end_of_seq_chain exception when sequence is empty
Prevent calling _get_sequence_format_param() with None as parameter in _is_end_of_seq_chain() when sequence is empty.
Would cause an error when deleting an invoice with an empty sequence.

closes odoo/odoo#80467

Task: 2697771
X-original-commit: 6a5aab047c1e540505ba84a1ef2dcc3356e89708
Signed-off-by: William André (wan) <wan@odoo.com>
2021-11-26 16:42:22 +00:00
qsm-odoo 8ff5ab4d6c [FIX] website: review pages and features screen of the configurator
Now allow to scroll through the pages and features without hiding the
"Build my website" button on small (or zoomed) screens.

task-2670809

closes odoo/odoo#80466

X-original-commit: 8fe2674f013408d7d1449fddc7d18728cef69281
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-11-26 16:42:18 +00:00
Arthur Detroux (ard) b501e8accf [FIX] web_editor: make snippet list always full height
Before this commit, when a tour tooltip was located in the snippet
list, it could cause an overflow that would partly hide the tip and
would bug out when being hovered.

With this commit, the list is made full height, simplifying the look
and giving enough space for the tip to not overflow.

task-2670809

X-original-commit: d8c25d400af61bdfb4afd9d7921c3e93745f2407
Part-of: odoo/odoo#80466
2021-11-26 16:42:18 +00:00
Arthur Detroux (ard) c17ea66ee3 [FIX] web_editor: fix gradient slider infinite resize and safari support
Prior to this commit, if three colors were selected for a gradient and
the user would click on the third color, if that color had a value of
100%, in some conditions the picker would resize infinitely.
Also prior to this commit, the color picker slider was not supported
well under safari.

This commit fixes the SCSS rules in order to fix those behaviours.

task-2670809

X-original-commit: 5a91d8b00c35cb597b0ee5f5ec8605e4589f81c9
Part-of: odoo/odoo#80466
2021-11-26 16:42:18 +00:00
Arthur Detroux (ard) bcee349dc4 [FIX] website: restore scrollbar for some menus
After [1], the dropdown menu of the main navbar for some menus
(e.g customize on /shop) didn't have scrollbars anymore, making it hard
to navigate on smaller resolution devices.

This commit restores that.

[1]: https://github.com/odoo/odoo/commit/1971bf39810468b2b67e2ecd3c86c663d5cffcfd

task-2670809

X-original-commit: b46d2ad7c6b225ae34594991d5189672b95fc3cc
Part-of: odoo/odoo#80466
2021-11-26 16:42:17 +00:00
Hiral Bhavsar 8ca8a38bb2 [FIX] mail: dropzone deactivate for text and user's avatar
Before this commit:

Currently, in Discuss, the chat activates the drop zone when try to drag and
drop any user's avatar (or any text). The same thing happens if we do it in
the chat window or chatter.

After this commit:

The chat will not be activated drop zone if the drag is not actually
a file/a document.

Task-2590510

closes odoo/odoo#80464

X-original-commit: 0e2f46bc2cfd36dc3508a56601239c15e2301571
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-11-26 16:42:10 +00:00
Shahnawaz Idariya 8f546bfad1 [FIX] mail: fix traceback on emoji
Before this commit:

When trying to select emoji on log note before record creation,
it shows traceback.

After this commit:

Hiding the emoji button when the record is under creation.

Task-2664700

closes odoo/odoo#80352

X-original-commit: 10c06f9753540d0a58b1a93fc54947a58b092468
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-11-26 15:58:17 +00:00
Arnaud Willem 1d22af0a75 [CLA] signature for Strong Blue Conseil
closes odoo/odoo#79904

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-11-26 15:58:10 +00:00
David Beguin 75e9b2bff7 [IMP] crm: display lead reporting on all leads even if not group_use_lead
Purpose
=======

As a Lead Manager, I do not really care about what's in the "Lead Pipeline"
since this does not exist. Instead, I want to keep an eye on all the leads that
entered the CRM to see how well they are doing and how they are spread.

Specifications
==============

- Remove the group on the Reporting
	> Leads menu item, this menu can be used with Opportunities only

- Move it below the Pipeline report

- By default, this menu shows all crm.lead :
   - no matter the type (lead/opp) but with the filters in the search view
     if needed
   - no matter if won/active/lost (but again, filters allow me to change that
     if needed)
   - Default grouped by month creation date
   - Filtered on records created this year to avoid displaying 10 years of CRM
     usage - already done

=> The difference if I activate leads is that then I have the extra filters, ...
but this is already valid if I'm only working with opportunities

Also, on the report list view of the leads, this commit brings some small
modifications in order to have a better view of what kind of lead and 'where'
they are:
- Hide by default the "City" field
- Add "Type" field before "Probability" field (only if Leads are activated)
- Add "Stage_id" after "Type" field

Task-2671372

closes odoo/odoo#78748

Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2021-11-26 15:58:01 +00:00
xO-Tx 89ce9f9ab5 [FIX] web_editor, mass_mailing: fix editor history for image shapes
Issue:

1- Website editor > Set shape on image
2- Crop > shape is reapplied on the croped image
3- Change another option (e.g. image width)
4- Undo > image will be shown cropped but without any
shape applied on it.

In the current code we apply shapes on cropped images using
the event listener 'ImageOptimize > _onImageCropped', so in
'ImageTools', the 'crop()' option method will record the
"crop" action but the step where the shape is added is lost.
(See: SnippetOptionWidget > _onUserValueUpdate()).

The goal of this commit is to merge the 'ImageTools' and
'ImageOptimize' in one option so we can simply use shape
related methods to apply shapes when the crop() & resetCrop()
methods are called.
This way, the step to record will be a "cropped image with
a shape on it" instead of just a "cropped image".

task-2628964

closes odoo/odoo#80208

X-original-commit: 7c17d78fbdbb64b1aa5b55f78d3202a64a85ed2f
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-11-26 15:10:34 +00:00
Tom De Caluwé c8fdea914d [IMP] website_sale: warn for open cart on partner pricelist change
It is not always immediately clear to the end user that changing the
pricelist on a partner will not change the pricelist for any open carts
related to this partner. To clarify, this commit introduces a warning
message, indicating that the end user should change the pricelists of
these open carts manually if this is the desired effect.

Any open carts that already have the same pricelist as the new partner
pricelist are excluded from the search and will not trigger the warning
message.

task-2635067

closes odoo/odoo#77298

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2021-11-26 15:10:30 +00:00
Vishal Thacker b5e0fdfcb4 [IMP] sale_stock: DO deadline based on SO deadline
When a Sale Order is created, if no deadline was set, the Delivery Order
takes the SO expected date as deadline.
However, before this commit, if the SO has a deadline and the user
removes it, the DO deadline will not be recomputed.
Now, the DO will take the SO expected date as it does at its creation.

task-2581265
opw-2528705

closes odoo/odoo#74695

Signed-off-by: Arnold Moyaux <arm@odoo.com>
2021-11-26 15:10:26 +00:00
Vishal Thacker 7622c48223 [IMP] stock: default product replenish quantity
The product replenish wizard quantity will be set to the selected
`product_id` forecast quantity if it's a negative value (otherwise, it
will be set to 1).

task-2581265

Part-of: odoo/odoo#74695
2021-11-26 15:10:26 +00:00
Vishal Thacker e71a9e4494 [IMP] stock: added groups to packaging field
Before this commit, packaging field was visible on the stock location
form view even if the packaging configuration set to off.

task-2581265

Part-of: odoo/odoo#74695
2021-11-26 15:10:26 +00:00
Vishal Thacker ccefd39015 [IMP] stock: add orderpoint Trigger Manual filter
Replaces the orderpoint's default search on manual trigger by a search
filter named "Trigger Manual".

task-2581265

Part-of: odoo/odoo#74695
2021-11-26 15:10:25 +00:00
Vishal Thacker a317d12d50 [IMP] stock: do not open reserve/unreserve action in new breadcrumb
Before this commit: when reserve/unreserve button were clicked, it was
opening action in new breadcrumb while it should not open new breadcrumb
instead it should display in self.

After this commit: reserve/unreserve button will open action and replace
current action and will not open new breadcrumb everytime we click.

task-2581265

Part-of: odoo/odoo#74695
2021-11-26 15:10:25 +00:00
Vishal Thacker ec75fe6c0f [IMP] stock: Changed the string of lot_name field
Part-of: odoo/odoo#74695
2021-11-26 15:10:25 +00:00
Vishal Thacker b1e328d369 [IMP] uom: set one unit as a Reference Unit
Before this commit, the user was able to change the UoM type from
"Reference Unit" to "Bigger" or "Smaller" and let an UoM category with
no reference.
So, to force UoM category to have at least one Reference Unit, the user
can't change the reference unit if there is no other unit set as
reference.

task-2581265

Part-of: odoo/odoo#74695
2021-11-26 15:10:24 +00:00
Vishal Thacker b43ac31f70 [IMP] sale,stock,website_sale: texts update
- Renames "DHL"/"DHL USA Connector" into "DHL Express Connector";
- Changes the orderpoint's constraint message when the user's trying to
create an orderpoint who already exists.

task-2581265

Part-of: odoo/odoo#74695
2021-11-26 15:10:24 +00:00
Vishal Thacker 5537090f1c [IMP] product, purchase: supplier info
- Adds a default `product_id` only when the supplier info is added from
  a product variant form view;

- Adds a domain on `product_id` to constrain the field to its product
  template, and only if it has a product template (otherwise, there is
  no domain);

- Adds a onchange to remove the product variant if the user changes the
  product template and they don't match anymore because before this
  commit, it was possible to have a supplier info with a variant who
  doesn't belong to its supplier info's product template;

- Replaces the options `no_create_edit` by `no_create`/`no_open` as the
  former doesn't work as expected.

task-2581265

Part-of: odoo/odoo#74695
2021-11-26 15:10:24 +00:00
svs-odoo c948aa6a64 [IMP] point_of_sale,stock: hide reservation method
Before this commit, Reservation Method in `stock.picking.type` form view
was visible for the PoS Orders' Operation type which should not be
visible. So, reservation method will now be invisible in this case.

task-2581265

Part-of: odoo/odoo#74695
2021-11-26 15:10:23 +00:00
Vishal Thacker 202ee3a6c7 [IMP] stock, delivery: move fields to delivery
Before this commit, `print_label` and `propogate_carrier` fields were
visible despite the delivery methods setting is off.
This commit moved these two fields into delivery module so now these
fields will be visible once the user installed the delivery module.

task-2581265

Part-of: odoo/odoo#74695
2021-11-26 15:10:23 +00:00
xO-Tx 7a74418b42 [IMP] website_blog: change blog cover title to h1
SEO issue: blog post doesn't have <h1> for post title.

The goal of this commit is to change the main cover title to <h1>.

task-2454130

closes odoo/odoo#66844

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-11-26 15:10:02 +00:00
fja-odoo 80fec8b5ff [FIX] web: fix chineese calendar format
Issue:
The way we generate the dayNamesMin is not compatible with the chineese
translation provided by "moment.js".
This is because the dayNamesShort contains an extra character in front
週 (week). Because of that the names of the days on the
small calendar are all the character 週 (week).

Solution:
There is a variable (weekdaysMin) which is unused and contain a shorter
version of the days this variable is consitent in the other languages so
it should have no side effect and will fix the chinese translation as it
only contains one character.

Introduced by: 1fc33a63be

task-2692910

closes odoo/odoo#80448

X-original-commit: 7cc502a6eb61bc541dbc27beefed004fcf81e04b
Signed-off-by: Samuel Degueldre <sad@odoo.com>
Signed-off-by: fja-odoo <fja@odoo.com>
2021-11-26 14:26:35 +00:00
Benoit Socias fdd30e368c [FIX] website: survive to null texts during trigram search
Generic search bar was introduced with #65871.
But the trigram search would fail if it encounters a (SQL) NULL text
from the database. This is because when word_similarity() receives NULL
as a parameter it returns NULL, and NULL not being a number cannot be
compared with the similarity threshold.

After this commit the trigram search will exclude matches returning a
NULL similarity.

Step to reproduce:
  - Enable trigram in the DB, run `CREATE EXTENSION pg_trgm;` in psql
  - Create a product, name it `myproduct`
  - Insert NULL values inside the translation table (not sure how the
    user did it):
    `update ir_translation set value = NULL where src = 'myproduct';`
  - Search 'mypro' in the eshop search bar
    -> Traceback

opw-2680659

closes odoo/odoo#80426

X-original-commit: ef17edc32d4646c93e31e730249be83469951241
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2021-11-26 14:26:31 +00:00
dbkosky c077a1916b [FIX] l10n_fr: Re-remove negative tax groups
These negative tax groups were removed in a previous commit:
1687248
The message of the previous commit was:
Remove the negative tax groups from account_data. The negative tax groups have no application. The taxes that were in the negative tax groups are reassigned to their positive counterparts.

The previous commit was accidentally overwritten in a forward-port:
odoo/odoo#77295

closes odoo/odoo#76586

closes odoo/odoo#80240

Signed-off-by: William André (wan) <wan@odoo.com>
2021-11-26 14:26:27 +00:00
Prakash Prajapati 972bd6b1d3 [IMP] hr_timesheet: rename the string of timesheet_cost field in employee
In this commit, the string of timesheet_cost field is cost instead of Timesheet Cost.

task-2531442
closes odoo/odoo#79016

Related: odoo/enterprise#21900
Related: odoo/upgrade#2971
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2021-11-26 14:26:23 +00:00
Kartik Chavda 17e58758de [IMP] sale,sale_(project,timesheet): improve the UI
Purpose of the commit is to do the generic improvement for the
project:

So in this commit, done the following changes:
- duplicating a project, copy all milestone of project and
set is_reached and deadline field as 'False'.
- chanage the order of the state button in sale order form view.
- pass mail body as default description value in message_new
method of project task.

task-2652943

closes odoo/odoo#77065

Related: odoo/enterprise#21199
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2021-11-26 13:37:58 +00:00
yhu-odoo 79b7967785 [FIX] mrp: cancel leftover moves when create backorder
Previously, when underconsumption occured, we split the move (in
post_inventory). And if backorder, the moves not done would be linked to
the new backorder MO (when backorder MO is created).
After 8883c06ada, we create backorder MOs
before _post_inventory, making it so the moves not done will not be
linked to the backorder MOs and reserved qtys are not released.
To fix, we set cancel_backorder to be true to cancel all the leftover
moves and release the reserved qty.

Task-2697611

closes odoo/odoo#80446

X-original-commit: cffb2b455d73f64d96f91b9e0301c346989eae63
Signed-off-by: Tiffany Chang <tic@odoo.com>
2021-11-26 12:06:20 +00:00
Nicolas Bayet c911fa6395 [FIX] web_editor: remove console.log
closes odoo/odoo#80428

X-original-commit: bc6114b8efc6db10e4d26dc20aaa5481b31c3275
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-11-26 11:18:06 +00:00
Sébastien Theys 5de1c278f6 [FIX] mail: prevent from losing "read more" / "read less" state
Instead of "saving" the state into the DOM (which is lost at next render) save
the state of each button in JS.

task-2308951

closes odoo/odoo#80358

X-original-commit: 58d4d65e98d8f5196b4d6ca91cd5df96dfac1360
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-11-26 11:18:01 +00:00
jbw 08b12bbdc7 [FIX] account: fix misc reverse tags
Before this fix, all moves of type “entry“ were considered as misc operations in regard to repartition tags and the tax report. And only moves of type “out_refund” and “in_refund” were considered refunds.
Now reverse entries with sale/purchase taxes get their tags set accordingly to repartition lines.

Account                                    D      C      Tax   Tax Grids
700000 Ventes en Belgique (marchandises)   0      1000   21%   +03
451000 T.V.A. à payer                      0      210          +54
400000 Clients                             1210   0

Was reversed to:
Account                                    D      C      Tax   Tax Grids
700000 Ventes en Belgique (marchandises)   1000   0      21%   +03
451000 T.V.A. à payer                      210    0            +54
400000 Clients                             0      1210

Is now reversed to:
Account                                    D      C      Tax   Tax Grids
700000 Ventes en Belgique (marchandises)   1000   0      21%   +49
451000 T.V.A. à payer                      210    0            +64
400000 Clients                             0      1210

closes odoo/odoo#80427

X-original-commit: a337d5d5b3886eabbdc8de95eb615dffc91d5d8e
Related: odoo/enterprise#22532
Signed-off-by: Olivier Colson <oco@odoo.com>
2021-11-26 10:32:07 +00:00