Commit Graph
142803 Commits
Author SHA1 Message Date
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
Antoine Guenet 7e46a7ee42 [FIX] web_editor: properly indent checklist items
Indenting a checklist item duplicated its checkbox. This properly copies
the css from the editor that was lost in translation.

X-original-commit: 14efea8ac944eba483f7300d6ba6e51592f26b80
2021-05-27 14:56:38 +00:00
Morgane DemesmaekerandValentin Chevalier 41b13d530f [IMP] payment, sale: add an acquirer dropdown when generating payment link
Actually, salesmen have to add manually the acquirer_id to the link, and it isn't user-friendly. The dropdown will show the possibility to add the acquirer_id.

Task #2504225

closes odoo/odoo#69334

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Co-authored-by: Valentin Chevalier <vcr@odoo.com>
2021-05-28 09:24:57 +00:00
Ivan Yelizariev 69976584d8 [FIX] hr_maintenance: fix typo in compute attribute
It was introduced in https://github.com/odoo/odoo/commit/3bd345597fa932abdaf780f72bacf331690f549b

closes odoo/odoo#71360

X-original-commit: c76d1a0f0210565768c88271625212359720632e
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
2021-05-27 16:50:27 +00:00
Aurélien Warnon 9d9403c56f [IMP] crm_iap_lead: add a whitelisted countries mechanism for states in iap search
States for some specific countries should not be offered as filtering options
for crm.iap.lead.mining.request because they drastically reduce the amount of
IAP reveal results.

For example, in Belgium, only 11% of companies have a defined state within the
reveal service while the rest of them have no state defined at all.

Meaning specifying states for that country will yield a lot less results than
what you could expect, which is not the desired behavior.
Obviously all companies are active within a state, it's just a lack of data in
the reveal service side.

To help users create meaningful iap searches, we only keep the states filtering
for several whitelisted countries (based on their country code).

The complete list and reasons for this change can be found on the task.

Task-2471703
2021-05-27 13:54:32 +00:00
Aurélien Warnon 2bb534d7c6 [IMP] crm_iap_lead: allow ordering crm.iap.lead.industry with a sequence
This commit simply adds a sequence field to the crm.iap.lead.industry model and
re-orders the records imported in the CSV file.

This re-ordering is performed to show preferred records to the user, having
some diversified industry choices at the top that provide interesting results.

Nothing should change functionally.

UPG PR odoo/upgrade#2288
Task-2471703
2021-05-27 13:54:31 +00:00
Aurélien Warnon edf729c09e [IMP] crm_iap_lead: allow industries to match several reveal ids
Reveal industries were naively implemented to match a single ID on the reveal
service side.

While this is very convenient from a technical point of view, it does not
really work on the user end, since various industries are very similar and some
of them could be merged to ease usability.

This commit allows the crm.iap.lead.industry to have several reveal_ids.
Since we don't want to make this too complicated, we simply stored them as a
Char and separate them with a ",".

They are split right before being sent to IAP and all reveal ids are merged
back into a single list, making it work the same way as before on the IAP side.

We also took this opportunity to completely remove some of the listed
industries, since after some research they appear to give absolutely no result.

UPG PR odoo/upgrade#2288
Task-2471703
2021-05-27 13:54:30 +00:00
Aurélien Warnon 06e77d3550 [MOV] crm_iap_lead: move crm.iap.lead.industry into its own file
Preparation commit where we simply move the crm.iap.lead.industry model into
its own file.

As we are about to make some changes to the industry, we use that opportunity
to do a bit of cleaning.

Task-2471703
2021-05-27 13:54:30 +00:00
Joseph Caburnay f2af220d38 [FIX] point_of_sale: number popup test timeout error
A fix was made in https://github.com/odoo/odoo/pull/66466 to consider
the situation where pin of employee is scanned using barcode. This
results to a change in behaviour in the NumberPopup where it no longer
accepts empty string as payload when it is confirmed. There are multiple
ways to solve this issue, and the simplest is just to adapt the test
following the behavior change. In this fix, we modify the starting
value of the popup so that when confirmed, the popup successfully
resolves.

closes odoo/odoo#70292

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-05-04 07:36:15 +00:00