Commit Graph
142811 Commits
Author SHA1 Message Date
Thibault Libioulle c5cac92280 [IMP] project: add project updates and milestones
This commit adds project updates in project to take in stock the current
status of the project : which task or milestone changed in the past 30
days.

The project manager is able to add a status on the project update, and
edit the description of the update. There is also a chatter in which
he/she can discuss some points with other project users.

The description is build with informations retrieved from mail tracking
values or from project.* models. Those informations are collected in a
dict and rendered in a template to ease the inheritence in further
modules needs.

Following commits will add behaviour to handle those updates and
milestones in the various views. See PR for further information.

PR : #68899

task-2393768
2021-06-01 12:01:37 +02:00
Thibault Libioulle 11f09c9930 [MOV] project: move widget to widget directory
PR : #68899

task-2393768
2021-06-01 11:59:52 +02:00
Thibault Libioulle faae0abe5c [REF] project: migrate js modules to es6
PR : #68899

task-2393768
2021-06-01 11:59:52 +02:00
Djamel (otd) 323776bb25 [FIX] web: add the context in the parameters of the rpc in the _renderBanner
Steps to reproduce the bug:
- Install Accounting
- Connect with a user who has a default company (e.g: Company A) and allowed companies (e.g: “Company A” and “Company B”)
- Choose in the company selector “Company B”
- Make sure that the onboarding panel in the default company has not been closed
- Go to accounting and close the onboarding panel
- Refresh the page

Problem:
The onboarding panel is still open because in the `account/account_dashboard_onboarding` method we check the`account_dashboard_onboarding_state` field of the default company instead of the current company because "allowed_company_ids" is not in the context
This problem is also present in all the other views where an onboarding panel is present

Solution:
Add the context in the parameters of the rpc in the _renderBanner

opw-2477148

closes odoo/odoo#71420

X-original-commit: d9b794480a5ab7f7d6a1e0d92601eb737175e212
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Djamel Touati <DjamelTouati@users.noreply.github.com>
2021-05-28 14:31:20 +00:00
jbw a3c3cd6832 [IMP] account: Right payment journal based on bank account on invoice
On an invoice, we have the possiblity to set the bank account where
the client's payment has to be done.
If our company has two payment journal with 2 differents bank accounts
(bank A & bank B) set on each of the journal (journal A & journal B),
if I create an invoice and set bank B as bank account, after clicking
on "Register Payment", the journal A will be automatically selected.

With this PR the payment journal linked to the bank account set on the
invoice is automatically selected

closes odoo/odoo#71191

Task: 2524441
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2021-05-28 07:51:01 +00:00
Adrien Widart bdcc012004 [FIX] account, mail: link attachments to invoice
When using the "Send & Print" functionality, if the user adds an
attachment, the latter won't be linked to the record.

To reproduce the error:
1. Open a posted invoice
2. Send & Print
3. Attach a file > Select a file on your device
4. Send the email

Error: The invoice's PDF is added to record's attachments, but not the
other file (from step 3).

When the module selects the attachments that need to be linked to the
invoice, it only keeps the ones currently linked to `mail.compose.message`:
https://github.com/odoo/odoo/blob/6441ab71cb68648aa735057952bf757677a20ee3/addons/mail/models/mail_thread.py#L1719-L1725
This is correct when the user creates a message directly in the chatter.
However, when the mail is created thanks to `Send & Print` functionality,
the attachment is linked to `account.invoice.send`.

Another flow have a similar issue: from invoices list, select few ones,
Action > Send & Print: the generated PDF won't be attached to their
invoice. In such a situation, here is the source of the problem:
https://github.com/odoo/odoo/blob/05ad6c477f7da2a495e5baf5b4629323b9d11fa0/addons/mail/wizard/mail_compose_message.py#L363-L367
There isn't any information about the invoice, therefore it is not
possible to linked the attachment to it.

OPW-2438457

closes odoo/odoo#71495

X-original-commit: 98d3748aca724ef06db89294531d82679df45b74
Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
2021-05-31 12:39:11 +00:00
Nicolas Pierre 262b49d85a [IMP] stock: Inventory adjustments improvements
General improvements of the new Inventory Adjustment mechanism, among which:

From the Inventory Adjustment page
 - A new inventory_quantity_set Boolean field is used to hide the Counted Quantity when not set instead of showing 0.
 - Possibile to set 0 as a Counted Quantity directly (not using the set button).
 - Allows to provide a name for the Inventory Adjustment when using the Apply button at the top of the tree view. This name is applied on the corresponding stock moves.
 - Add warnings when trying to Apply/Set on multiple records when some records are not set/already set.
 - Highlight lines when there is a mismatch between Quantity / Counted Quantity / Difference. If the user still tries to Apply, shows the option to either keep the current Difference or the current Counted Quantity for all records.
 - Set the user when directly inserting a Counted Quantity (before only when using the Set button)
 - Add the possibility to import records.
 - Add "To Apply" filter.
 - Add a 'Reset' button at the top of the tree view for multiple records.
From the Update Quantity page of a product
 - Remove the "Updated on Hand Quantity" and can directly change "On Hand" quantity
 - Pre-fill a default location (Last used location for tracked products or default destination location in single WH environment)
From the Inventory Report
 - Remove the "Updated on Hand Quantity" and can directly change "On Hand" quantity

closes odoo/odoo#71199

Task-id: 2495664
Pr-community: 71199
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-05-31 13:15:54 +00:00
Joseph Caburnay 89c9727020 [FIX] point_of_sale: show pack lot input popup when scanning product
When scanned product is tracked by lot or SN, the popup that asks
for lot should be shown, just like as when a tracked product is clicked
from the product list.

We accomplish this by introducing a new method that can be used both
by `_clickProduct` and `_barcodeProductAction`, and by making the
`_barcodeProductAction` be independent from `scan_product` method
from `PosModel`. So instead of calling directly `scan_product`, we
indentify the product first based on the barcode, then we call the
newly introduced method to ask for the lot inputs, then we call
`add_product` with proper options including the type of the parsed
barcode.

closes odoo/odoo#71496

X-original-commit: 4383cacefd01a318df70857cddf5aedda7011318
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-05-31 12:41:00 +00:00
Joseph Caburnay d64a58007d [FIX] point_of_sale: compare the quantity to number type
When identifying whether to show the decrease quantity popup or not,
the current quantity of the selected orderline is compared to the
new input quantity. This fix properly compares the current quantity
to the new input quantity in number format.

X-original-commit: 61bb684c4b610227a3a22e68512146dc2ee5974d
2021-05-31 12:40:59 +00:00
Joseph Caburnay 4ab47ee741 [FIX] point_of_sale: dot input should be recognized even at different lang
Language such as FR recognizes `,` as the decimal separator. However, it is
possible that the keyboard setting is American so the decimal point in the
numpad will send `.` when pressing it. POS should be able to recognize both.
This fix allows `.` sent from keyboard to be interpreted as decimal separator
even at language where the decimal separator is `,`. This is okay because
number inputs in POS doesn't take into account the thousand separator.

X-original-commit: 444fc5621b1157fe3c442f6a1aecfd00d5f8e5d7
2021-05-31 12:40:58 +00:00
Romeo Fragomeli 21f4dbad38 [FIX] point_of_sale: print not working in Mobile App
Before this commit, "document.execCommand" was first
method used when attempting to print, due to a bug
in Safari for Windows (ndr. which is deprecated as
the last version of Safari for Windows is 5.1.7
from may 2012).

On the mobile App, the "document.execCommand('print')"
call returns "true" even if nothing has actually been
done, which therefore prevents from executing "window.print()".

After this commit, we execute directly "window.print()"
as it's supported by all modern browsers (except Firefox Android,
which doesn't support printing at all).

Notes:
* "document.execCommand" is deprecated and the "print" command isn't even documented
* Safari 5.1.7 doesn't support Promise/Async/Await, and therefore not Odoo 13+.

References:
* https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand
* https://developer.mozilla.org/en-US/docs/Web/API/Window/print
* https://caniuse.com/?search=await
* https://caniuse.com/?search=promise
* https://apple.stackexchange.com/questions/68836/where-can-i-download-safari-for-windows

opw-2486818

closes odoo/odoo#71494

X-original-commit: a11662e525aad9a843acf54b717f3df18d8c2cab
Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
2021-05-31 12:33:26 +00:00
Romeo Fragomeli d6283f71d3 [FIX] point_of_sale: no black backgrounded receipt
Like commit odoo/odoo@1c5c762f3c

On some device (like Android Mobile) where the background is printed,
the receipt (which is white) is surrounded by a black background.

This commit fixes it by matching the receipt background (cf. white)
for the whole document and avoiding to print unnecessary background colors.

opw-1940434

X-original-commit: cf1a555ca2bc474ead1ef4fc063e8210678800d9
2021-05-31 12:33:26 +00:00
Younn Olivier 811bdd91de [FIX] website: remove "add image" button from the normal mode
The "Add image" button was shown out of the editor mode when removing
all images from a snippet.

task-2469516

closes odoo/odoo#71486

X-original-commit: 3bae864d1e587e87262c56f1c5f789ac6a6fabc4
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-05-31 11:22:41 +00:00
Paolo (pgi) b39a5806d0 [ADD] l10n_fr_fec_import: added a module for import data from FEC
A FEC file (Fichier des Ecritures Comptables) contains all the accounting data and entries recorded
in all the accounting journals for a financial year. In order to make the onboarding of new users
easier, Odoo Enterprise's French fiscal localization includes access to the ``l10n_fr_fec_import``
module, that enables the import of existing FEC files from older software to the Odoo database.

The imported data are:

    * accounts
    * journals
    * partners
    * journal entries

Every entity is imported with a generator that reads the values from each line, ready to be loaded.
The entity (only accounts for the moment) is then completed with data from the CoA's templates
and imported in the database. Journal entries are posted and reconciled.

The Odoo branch implements the install checkbox in the Settings > Accounting page for an easy install.

Task 2515785: https://www.odoo.com/web#id=2515785model=project.task
Documentation PR: odoo/documentation#979

closes odoo/odoo#71290

Related: odoo/enterprise#16704
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2021-05-31 09:54:11 +00:00
Raphael Collet ddcabf3acb [FIX] core: origin of main record in onchange
When invoking onchange() on a line in a one2many field, the inverse
many2one field is given as a dict of values.  Those values are the ones
of the "container" record in the form view, and they include the "id" of
the container record.  The method onchange() instantiates the container
record as a new record with the given values.  Fix the code to set the
expected "origin" of that record to the record with the given "id".

closes odoo/odoo#71491

X-original-commit: ebfb5d90fd4ff65ee1d2fc73faf8f9eaa18f4521
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2021-05-31 12:01:55 +00:00
Ivan Yelizariev 992236f4f4 [FIX] web: allow custom filters by ID interval
Infinite number of records cannot be exported, so after some limit we will get a
timeout error. If you need to export more records than that limit, you should be
able to filter records into batches. The easiest way to do it is making a
filter by ID:

```
[Y| ID Greater than 100000] [Y| ID less than or equal to 200000]
```

---

opw-2517946

closes odoo/odoo#71450

X-original-commit: 96b102cce95d6ed1bb6a66c17e0d39f96b05459f
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
2021-05-28 18:04:01 +00:00
Xavier BOL (xbo) cae0d03ff7 [FIX] project: ensure only stage_id field is used in ir_model_fields
Before this commit, the ir_model_fields used in the query could be
another field than the one expected, that is the stage_id field.
Indeed, since we don't check if the name column in the ir_model_fields
is right the stage_id field then we could have the user_id or another
many2one field.

This commit adds a check to be sure we only use the stage_id.

Related PR: #68343

closes odoo/odoo#71478

Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-05-31 08:59:08 +00:00
Bruno Boi d23d875464 [IMP] web: add findWhere utils
closes odoo/odoo#71473

Taskid: 2412172
X-original-commit: 9cdde27e25b13714e24082a50673454693c954ef
Related: odoo/enterprise#18611
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-05-31 09:44:12 +00:00
Bruno Boi c9dfabf3a4 [FIX] web: parseDateTime util optimizations
- `parseDateTime` util: we now caches "without zero" date and time formats

Taskid: 2412172
X-original-commit: 2ac6492cc29b7300cf1ab1635222d3b96ea5507d
2021-05-31 09:44:11 +00:00
nie 5bf597a31f [FIX] mail: use template lang on layout and display name
Steps:
- Install sale
- Go to Settings / Translations / Languages
- Activate Dutch
- Go to Settings / Users & Companies / Users
- Edit demo
  - Language: Dutch
- Go to Sales
- Create a quotation:
  - Customer: demo
- Go to Settings / Technical / Automation / Scheduled Actions
- Create a new action:
  - Model: Sales Order
  - Python code:
  ```python
  last_id = model.search([], order='id desc', limit=1)[0].id
  env.ref('sale.email_template_edi_sale').send_mail(last_id, notif_layout='mail.mail_notification_paynow')
  ```
- Click "Run Manually"
- Go to Settings / Technical / Email / Emails
- Open the last email you just sent

Bug:
Parts of the email are not in Dutch

Explanation:
This commit makes a template pass the rendering language to the layout
and the display name when calling `template.send_mail()`.

opw:2467640

closes odoo/odoo#71446

X-original-commit: 74da8e27c7e16fa92eb1547cec1a7ce82e15e0c6
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: backspac <backspac@users.noreply.github.com>
2021-05-31 07:46:23 +00:00
Adrien Widart 1c7434c900 [FIX] stock: reset stock move state
On a delivery, when changing the initial demand of a stock move, if its
value was 0 and becomes > 0, its state will be 'Partially Available' but
the reserved quantity will still be 0.

To reproduce the error:
1. Create 2 products P01, P02
    - Product Type: Storable
    - Qty On Hand: 1
2. Create + Confirm a SO with 1xP01 and 1xP02
3. Open SO's delivery
4. Unlock, set P01's initial demand to 0, Save, Lock
5. Unreserve, Check Availability
6. Unlock, set P01's initial demand to 1, Save
7. Click on PO1 line

Error: The stock move state is "Partially Available", but the initial
demand is 1 and the reserved quantity is 0. It should be "Waiting
Availability"

On step 5, since the wanted quantity of P01 is 0, the state of the stock
move becomes "Available". Then, when increasing the requested quantity,
the state automatically becomes "Partially Available" because the module
does not consider the case where the state is "Available" with a
reserved quantity equal to 0.

OPW-2488580

closes odoo/odoo#71445

X-original-commit: 05b6dfa0b1e4daf46d569c2e0a330b35e6437f8d
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
2021-05-31 07:24:17 +00:00
Younn Olivier fa2ffd6976 [FIX] website_forum: fix image size in posts
Before this commit, big images would overflow from posts containers.

task-2469516
Part of https://github.com/odoo/odoo/pull/70235

closes odoo/odoo#71444

X-original-commit: 17f736c19ae67acbaa16d2f8452e9ccb58dd3ef3
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-05-28 16:48:37 +00:00
Younn Olivier 8299191d92 [FIX] website_forum: fix image display in a forum post
The container size of a forum post was not correct when an image was
displayed with right or left alignment.

The css property clear was added at the end of the posts so that
floating elements do not float over the next section.

task-2469516
Part of https://github.com/odoo/odoo/pull/70235

X-original-commit: 0c58901cbef8b1d1808f673b7b34d1de93c2fd6d
2021-05-28 16:48:35 +00:00
Younn Olivier 77a35e86dd [FIX] portal: fix image display in a text block snippet
The container size of a text block snippet (and every snippet without
rows) was not correct when an image was displayed with right or left
alignment.

The css property clear was added at the end of the containers so that
floating elements from the section do not float over the next section.

task-2469516

closes odoo/odoo#71438

X-original-commit: fb556ed09c7ed00afbed33b6029b1315a113575a
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-05-28 16:31:02 +00:00
wan 2965012394 [FIX] l10n_ca: wrong predicate in xpath, missing fields in template preview
* `hasclass` should be used instead of `@class`
* fields added to a template should be present in `base.document.layout`
in order to be able to display the preview.

closes odoo/odoo#71249

Signed-off-by: Josse Colpaert <jco@openerp.com>
2021-05-26 09:18:14 +00:00
Younn Olivier c911d5ba5e [FIX] website_mass_mailing: remove social links duplicates
Socials links were added twice on the s_mail_block_header_social
snippet, as they were already defined in the module mass_mailing.

task-2469516
Part of https://github.com/odoo/odoo/pull/69766

closes odoo/odoo#69766

Related: odoo/upgrade#2436
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-05-31 07:52:51 +00:00
std-odoo d27fb9c952 [IMP] (crm_)mail_plugin: support translations for the Gmail addon
Purpose
=======
This commit allow the users to translate their Gmail Addon.

The language of the addon will be the language the user set on his
preference, on his Odoo database.

The translations will be downloaded from Odoo and stored in the cache,
so translator can use the existing system to translate the addon.

Task 2502261
See odoo/mail-client-extensions/pull/8
See odoo/odoo/pull/69288
See odoo/enterprise/pull/17711

closes odoo/odoo#69288

Related: odoo/enterprise#17711
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-05-31 07:26:31 +00:00
Pierre Masereel 29f6078cb3 [FIX] point_of_sale: cash rounding on invoice
When an invoice is created from pos having a cash rounding method, the
value of the rounding can depend on the payment methods.

When no rounding has been applied because of the order has been
partially paid by cash and bank, the rounding line should be deleted
from the invoice. We should also adapt the terms lines.

closes odoo/odoo#71410

X-original-commit: 846c63b6e5414d2b4620f389817379506a419573
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-05-28 13:11:42 +00:00
Joseph Caburnay eca6e539a6 [FIX] point_of_sale: double dipping in COGS and stock delivered accounts
To reproduce:

1. Sell an anglo product (inventory valuation = automated) in the pos app.
2. Go back to the backend, find the pos.order and invoice it.
3. Close the session.
4. Open the journal items related to the session (click the Journal Items
button in the session form).
5. You will see COGS (Expenses) Account and Stock Interim (Delivered) are
debited in two journal entries - one from the invoice and one from the
created picking after the closing of session.

This is because we are not properly skipping the invoiced order when
generating the global picking for the session. This commit fixes the
described issue.

closes odoo/odoo#71404

X-original-commit: 4320794da1129c7fffdebd9d0469dd81dd1f212b
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-05-28 12:42:11 +00:00
fw-bot 5a5fdcebd6 [CLA] signature for janikvonrotz
closes odoo/odoo#71434

X-original-commit: 2b4ae68892bf963f5170651e4ca4a9983ea18af9
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-05-28 15:58:58 +00:00
Demesmaeker 4d340a3304 [IMP]payment_adyen : improve the handling of result codes
By explaining why a payment was refused or had an error,
we can understand easily what has to be done to get the payment done,
instead of just knowing it was refused/had an error.

task-2501723

closes odoo/odoo#69929

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2021-05-28 13:59:32 +00:00
Aurélien Warnon 4f2443b058 [IMP] mail: make mail.template name translatable
This commit simply makes the mail.template name field translatable.

It had not been done yet since the model is quite technical but it's still
displayed for the end users within the composer so it's better to have it
translated if need be.

Task-2543495

closes odoo/odoo#71408

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-05-28 12:56:32 +00:00
Victor Feyens 060df1a363 [IMP] sale: improve test coverage
Some flows of the core `sale` code (sale_order & sale_order_line) 
weren't covered at all by tests.

This commit adds some tests to cover those flows, reducing the risks of 
broken features/flows with future sale tasks.

closes odoo/odoo#71402

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2021-05-28 12:05:48 +00:00
fw-bot 05446fcc99 Cherry pick of 3c8bdde81d508fdee301f13bcbc6e4eefc9fb02c failed
stdout:

stderr:
17:49:30.703303 git.c:344               trace: built-in: git cherry-pick 3c8bdde81d508fdee301f13bcbc6e4eefc9fb02c
error: Cherry-picking is not possible because you have unmerged files.
hint: Fix them up in the work tree, and then use 'git add/rm <file>'
hint: as appropriate to mark resolution and make a commit.
fatal: cherry-pick failed
----------
status:

closes odoo/odoo#71390

X-original-commit: 7033f4aa7d1c65ad13dcd19e66378b101b56238b
Signed-off-by: Arnaud Joset <arj-odoo@users.noreply.github.com>
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-05-28 13:12:42 +00:00
Jacky (trj) 359f517c0d [FIX] point_of_sale: random failure when reprint receipt
Because the `receiptHtml` was taken from a component which was mounted outside of the DOM, it was hardly ever destroyed for some unknown reasons and the `el.outerHTML` could not be taken to create the receipt.

closes odoo/odoo#71399

X-original-commit: a54d54c9c479aaee3bafe6e241d89d557a1e0b56
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-05-28 11:52:25 +00:00
Luis González e852a10aa6 [FIX] link_tracker: Filter by tracked URL code is not working
When trying to filter links by a tracked URL code, the following warning
is shown:

    WARNING dbname odoo.models: Cannot execute name_search, no _rec_name
	defined on link.tracker.code

and the applied filter gives all records.

closes odoo/odoo#71398

X-original-commit: 3687dabbc373e57e24ca4596c18ef1dacfde8273
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
2021-05-28 11:30:45 +00:00
Habib (ayh) abdd0bc257 [IMP] account: enable visibility of cancelled journal items
The default tree view action (debug mode) of account.move.line currently hides lines in the cancelled state. This commit modifies the default domain on the action.
Users can now filter and group all lines

part 3 of task (2486685)[https://www.odoo.com/web#id=2486685&model=project.task]

closes odoo/odoo#71392

Signed-off-by: William André (wan) <wan@odoo.com>
2021-05-25 21:26:42 +00:00
Habib (ayh) 95a6ee4afc [IMP] account: improve bank statement line search view
Enable searching for a bank statement line by amount and journal entry

part 1 of task [2486685](https://www.odoo.com/web#id=2486685&model=project.task)
2021-05-25 21:25:03 +00:00
Yannick Tivisse f6a77867df [IMP] hr: Remove M2O references to archived employees
Purpose
=======

When you archive an employee, if he's the manager/coach of someone else, the link is not removed.

closes odoo/odoo#71368

Taskid: 2536219
Related: odoo/enterprise#18588
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-05-28 08:04:40 +00:00
Mohammed Shekha b988fcdf06 [IMP] web: clear no_create enabled m2o field on focusout
Before this commit: if many2one field has no_create=True and user write
something to many2one field which does not exist and focusout of many2one
field then the text remain there on many2one input field, it creates
consution, it looks new record is created and set, so to avoid this
many2one field should be cleared if there is unmatch string and it has
no_create=True.

After this commit: if many2one has no_create=True and user types string
which does not have any match then on focusout many2one input element
will be cleared.

task-2517593

closes odoo/odoo#70173

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-05-28 10:39:32 +00:00
Romain Derie 50cb0f3276 [IMP] web_editor: remove the img overlay replace and delete
As replace and delete are already in the right panel, this is kind of a
duplicate. Related to f3ccc91d42

Also, add border around selected image so the used knows what image is selected

task-2502679
Closes #69340

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-05-26 09:55:16 +00:00
Romain Derie 6c895f8920 [IMP] web_editor: use brand-primary color for replace btn
task-2502679
Closes #69340
2021-05-26 09:52:01 +00:00
Romain Derie d585b0e560 [IMP] web_editor: remove quality optimization warning
It creates confusion for no good reason

task-2502679
Closes #69340
2021-05-26 09:52:01 +00:00
Anjali a99d882c02 [IMP] crm,*_crm: better merge leads side documents
Purpose of this commit is to ensure side documents are redirected to the
master opportunity when merging leads. Those side documents include

  * communication history (mail.message);
  * attachments (ir.attachment);
  * visitors (website.visitor);

However some documents are currently not specifically handled :

  * meetings (calendar.event);
  * activities (mail.activity);
  * sale orders (sale.order);
  * attendees (event.registration);

In this commit we ensure all are attached to the final master opportunity.
That way we prevent loosing access to those documents and ensure we keep
the complete history of all merged leads.

Also tests are added to ensure the merging of leads and its contents.

A new field is added to have the o2m field between leads and calendar events.
In order to clarify naming, ``meeting_count`` is renamed to
``calendar_event_count`` to match naming.

Task Id-2457941
COM PR odoo/odoo#68884
UPG PR odoo/odoo#2494

Related: odoo/upgrade#2494
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-05-28 12:12:51 +00:00
Thibault Delavallée 962d8a443b [FIX] crm: set lost leads as last when sorting by confidence level
When sorting by confidence level, put lost (inactive) leads last. This should
not happen when using the merge tool that filter out inactive leads but may
happen in case of manual merge.

Task Id-2457941
COM PR odoo/odoo#68884
2021-05-28 11:49:02 +00:00
dosipchuk 24154294b2 [CLA] Dmytro Osipchuk
closes odoo/odoo#71389

X-original-commit: 68182733f8a625a13e44c6be2708a98ece20d80a
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-05-28 10:58:10 +00:00
Adrien Widart 23790f6fc4 [FIX] survey: Unescape characters in mail subject
To reproduce the error:
Create a survey (title must contain ") and send it

Error:
The mail subject is incorrect: the character " is replaced with &#34;

OPW-2536206

closes odoo/odoo#71388

X-original-commit: 37cea376cc2069388b07b91f50caa6044fa6c932
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
2021-05-28 10:56:40 +00:00
yhu-odoo 2915ac1226 [IMP](stock,mrp)_account: use location valuation account
Previous fix f056254d1c5153467b10d9581214ff6d1348be76 didn't take the
situation when production location has its own valuation accounts into
consideration. Fix it in this commit.

opw-2476417

closes odoo/odoo#71064

X-original-commit: 60e83f03b871605b7aa281503269f66ac3ea940b
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: Yuchen Huang <yhu-odoo@users.noreply.github.com>
2021-05-19 17:01:08 +00:00
Odoo's Mergebot 3556615c3f [MERGE] crm_iap_lead_mining: improve industries and states management
This merge commit adds some minor improvements to crm.iap.lead.mining.requests
to ease the usage of leads generation tools.

This is done by:
- Merging and removing some of the "industries", to present the user with the
  most relevant ones ;
- Allowing to order the industries with a sequence, again in order to give
  relevant industries as top choices ;
- Disabling "states" selection for various countries, based on the available
  results in the reveal database.

More details about those changes can be found in underlying commits.

UPG PR odoo/upgrade#2288
Task-2471703

closes odoo/odoo#68128

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-05-28 14:02:13 +02:00
Antoine Guenet 5c3de22f76 [FIX] website: properly align the checkmark of checklists
The style of website requires that the checkmarks of checklists be
offseted a little bit differently in website that in field html. This
acknowledges that difference so that they're properly centered in both
cases.

closes odoo/odoo#71348

X-original-commit: 91133da51697f77951d925141ae5cff012230b63
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-05-27 14:56:39 +00:00