Commit Graph
141473 Commits
Author SHA1 Message Date
fja-odoo eb80d33471 [IMP] web_editor: remove empty attributes
Empty attributes were not removed from the element.
This is an issue for attributes like checked/selected on input/select.

Part of: https://github.com/odoo/odoo/pull/47949
task-2011583
2021-02-26 13:51:13 +00:00
fja-odoo a34043d404 [IMP] web_editor: add selectProperty option method
This method will enable property selection as an option default method.

Part of: https://github.com/odoo/odoo/pull/47949
task-2011583
2021-02-26 13:51:13 +00:00
fja-odoo 3a972e6a0e [REF] website_form: make placeholder use selectAttribute
Have the placeholder of website_form use the new selectAttribute method

Part of: https://github.com/odoo/odoo/pull/47949
task-2011583
2021-02-26 13:51:13 +00:00
Andrea Grazioso (agr-odoo) f03a31cc8c [FIX] point_of_sale: allow pos user to open pos with cash control
Have a user [DEMO] with just user permission on POS
Have a POS configured with advanced cash control
With user [DEMO] open POS session

Traceback will occur because [DEMO] cannot access the relevant model

opw-2464150

closes odoo/odoo#67141

X-original-commit: 0bae5994649172ec572c619fadb0c8f8aaf58baa
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-03-03 13:17:48 +00:00
Nicolas (vin) fdd93cbb76 [REF] product: Generalise the setting of variant fields
Extract the way images are set on a product into a new method to
allows having the same behavior with other variant fields.

Now also used to set an Intrastat code varying from the template one.

Task id #2369561

closes odoo/odoo#65348

Related: odoo/enterprise#15099
Related: odoo/upgrade#1996
Signed-off-by: William André (wan) <wan@odoo.com>
2021-03-02 15:08:25 +00:00
nouraellm 2f3978bab7 [FIX] mrp: fix reserved_qty precision issue with forecast availability
Description of the issue/feature this PR addresses:
- Fix tends to fix reserved_qty if the precision of product_uom_qty is higher than 0.5

Current behavior before PR:
- If the precision of product_uom_qty is higher than 0.5 reserved_qty (components availability) appears to be not available although there is enough qty in the stock.

Desired behavior after PR is merged:
- Unless there's no enough qty in the stock, reserved_qty is available.

opw-2425473
opw-2459650
opw-2448443
opw-2446985
opw-2440853
opw-2464507

closes odoo/odoo#67116

X-original-commit: e406e7b2512b52bd45c9c825981678cd2bbd3128
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-03-03 08:58:47 +00:00
Sébastien Theys 2cc56315a1 [FIX] mail: correct display of channel name in invite dialog
Some characters were not rendered properly, this commit restores the display
as it was in v13.0.

closes odoo/odoo#67095

X-original-commit: 9c8286b8a6fb376aa21b833cb35da044d2eb0e23
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-03-02 16:12:48 +00:00
qdp-odoo bb1f14e728 [IMP] hr_expense: add "payment_status" field + change error msg
- Add "payment_status" field to be more explicit.
- Turn error message "Expenses must have an expense journal specified to
  generate accounting entries." into "Specify expense journal in tab
  Other Info to generate accounting entries."

closes odoo/odoo#65528

Task: 2424870
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-03-03 09:39:46 +00:00
root 2518747151 [IMP] payment: better exception feedback for logs
closes odoo/odoo#67120

Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
2021-03-02 19:26:37 +00:00
Nikunj Ladava af1b3df986 [IMP] crm: add sales person and team on partner created from lead form view
When we create a partner on lead form view, the user and team are
propagated to the created partner, while they do not when we do the
same from lead kanban using quick create.

With this commit, user (salesperson) and team are propagated to the
partner created through lead kanban (quick create) as well.

Task ID-2446969
PR #65846

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-03-03 08:30:50 +00:00
Nikunj Ladava ee30ecef0d [IMP] crm: propagate partner's company_name to lead partner_name
When setting a partner on a lead if we select the individual customer that
is not a company with company_name being set, propagate it to partner_name
on lead.

Task ID-2446969
PR #65846
2021-03-03 08:30:47 +00:00
William Henrotin abe3d2f3e7 [FIX] stock_account: compute value in sudo
This commit makes the product's value computation in sudo mode in order
to be performed even by stock users.

closes odoo/odoo#67118

X-original-commit: a87c7fbad55d987b37a50e2b74b4dd9f9096a349
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-03-02 18:39:28 +00:00
ijas ahammed 836f962404 [FIX] mass_mailing: allow duplicating mailing contact from mailing list
Before this commit:
While trying to duplicate a mailing contact within particular
mailing list, it  throws an user error saysing that 'A mailing
contact cannot subscribe to the same mailing list multiple times.'

After this commit:
User can duplicate a mailing contact from a mailing list without
the user error. In this case, we simply remove the default_list_ids
from the context, because all the mailing lists will be simply be
copied over from the existing contact and so we don't have to
re-add the default ones.

closes odoo/odoo#67094

Task-id: 2431344
X-original-commit: b92ebf3a47b7b1263669ac020ac8c213027400ea
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-03-02 16:09:12 +00:00
William Henrotin 56097c56e1 [FIX] purchase: add read access on tax tag
As a user accessing only the purchase module, create a request for
quotation, add a line with a tax and a cost > 0.
Confirm the RfQ to create the purchase order.

Before this commit, the user get a access error on account.account.tag
This patch add read access on this model for purchase users

opw : 2466688

closes odoo/odoo#67105

X-original-commit: b52e6ae72429add2bfa01496e704fd9f34a56e01
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-03-02 16:59:06 +00:00
Martin Trigaux c252a8ca7b [I18N] sale_timesheet: translate "Late" on web too
This is used in mail and sale_timesheet but wasn't an openerp-web
translation there.
Similar to 5caa0f0cc2c9025bef

closes odoo/odoo#67117

X-original-commit: 4c92805bd912b3b9753fe558f7525b9697564067
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-03-02 18:26:01 +00:00
Julien Castiaux 917964266e [FIX] mass_mailing: wrong clicks_ratio compute
The `clicks_ratio` field was computed outside of its compute method,
this is illegale as the ORM cannot protect the field from being included
in the "towrite" structure.

Backport of 7acc035

closes odoo/odoo#67111

X-original-commit: ca1f2e9d1285a02ebaf2502eaeb3d38feea6c477
Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
2021-03-02 17:44:20 +00:00
Thibault Francois 30ee35498b [FIX] website_event: make allowed_field customizable
Problem
-------
Since
https://github.com/odoo/odoo/commit/d3b18979bfb5496fa4370fdf03a806c469127730,
when a visitor register for an event, the fields in the POST are checked against a list of allowed fields.

The list is hardcoded inside the method _process_attendees_form.

Solution
--------
Move this list in a specific method that can be easily overidden by
another module

closes odoo/odoo#67080

X-original-commit: ebadf16c7c38ca52ec4c5ce871c2584aaa98b91d
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Thibault Francois <tfr-odoo@users.noreply.github.com>
2021-03-02 15:12:18 +00:00
yhu-odoo cf8073f3f4 [FIX] mrp_subcontracting: wrong subcontracted productions
Previously, when we find out subcontracted productions of moves, we get
all production_id from the origin moves of the moves. When user use
multple steps manufacturing, moves may also have their move_orig_ids.
In this case, we will consider its production_id as subcontracted
production.
To fix, we filered the moves, consider only move that is_subcontract is
true.

closes odoo/odoo#67101

X-original-commit: 60d799059d60befc976fd0fe5e2c0afec5d3f83b
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: Yuchen Huang <yhu-odoo@users.noreply.github.com>
2021-03-02 16:29:24 +00:00
Samuel Degueldre 8e2e6fcce8 [FIX] web: fix error-handling infinitely-looping on non-chrome browsers
The formatTraceback function relies on _t to add the error message to
tracebacks, it was recently moved around while refactoring but it seems
that its dependency was forgotten and not imported. This causes the
attempt to call _t to crash, which will try to format the error, which
will again try to call _t and crash, until the browser itself crashes.

This commit fixes that issue by adding the required import.

closes odoo/odoo#67079

Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2021-03-02 15:04:00 +00:00
ijas ahammed eca92a97be [IMP] base: display db ID along with name in partner merge wizard
Before this commit:
When merging the contacts, chances are there that the name of records being
merged are exactly same, and so we might not be able to distinguish them
and so can not tell for sure that which records are being merged to which
destination record.

After this commit:
In the 'Destination Contact' field, now we also show ID of the partner
along with the name, so that end user can easily distinguish between
them. For this, we pass 'partner_show_db_id' on the context for that field from
view, allowing us to get expected result from the name_get by using this
context key.

Task ID-2323060

closes odoo/odoo#66026

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-03-02 14:12:50 +00:00
nounoubensebia 52df97e4f3 [IMP] mass_mailing: improve list duplication and protect "opt-out-ness" of contacts
Before this commit, on duplication, the contacts who opted-out from the
original list have the opt-out field set to False on the duplicated list.

After this commit, on duplication, for a contact who has opted-out from the
original list,the opt-out field will be set to True on the duplicated list,
Because when a recipient opt-out from a mailing list, chances are high that he
does not want to be included in the new duplicated list.

This commit also brings some fixes to the update and create methods on the
mailing_contact_subscription model so that

- The unsubscription_date is set to now only when no unsubscription_date is
  given, because when another value for unsubscription_date is given by the
  user it should be applied

- The opt_out field is set to True when the user sets an unsubscription_date,
  because when a date is set for unsubscription_date, it means that the user
  has opted-out from the list

We also update name of mailing list when duplicating it, adding a copy
mark to it.

Finally we also avoid copying mailing_ids through m2m relationship as it
may impact existing mailings.

Task ID-2431383

closes odoo/odoo#65277

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-03-02 14:19:34 +00:00
Dhruv Patel c21d523623 [FIX] mail: chatwindow search autocomplete with long name overflowing
When we search for a name in the chat window having a very long name
of the user will overflowing the screen. The autocomplete dropdown list is
overflowing and rendering out of the screen.

With this commit, we have resized the width of autocomplete dropdown list with
the width of the outer element's width as it's standard behavior.

Task : 2449115

closes odoo/odoo#67063

X-original-commit: 72e96af8dc392796d4e45b96784e7ac50d660127
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-03-02 13:07:47 +00:00
Yannick Vaucher c5ecf8b654 [FIX] l10n_ch: human readable ISR number set to False
The condition on computation of `l10n_ch_isr_number_spaced` was not in line anymore with
`l10n_ch_isr_number` computation.
With fixes on the ISR number the use of `l10n_ch_isr_postal` is rightly not
mandatory anymore.

This lead to an empty field, visible on the ISR report.

closes odoo/odoo#67058

X-original-commit: fdbfb332b528ba8b35d7529eecd610086465aff8
Signed-off-by: Josse Colpaert <jco@openerp.com>
2021-03-02 12:20:30 +00:00
Laurent Smet 7791a0bf1e [FIX] account: Fix tests depending the date after 18 months
Tests are crashing when the number of months between the data date and today is higher than 18 months due to the 'past_months_limit' field on account.reconcile.model.

closes odoo/odoo#67051

X-original-commit: fd2c14374598b7009b70196ccc6ac3607b30245a
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-03-02 11:32:27 +00:00
Géry Debongnie 3915a3f00e [FIX] web: display better tracebacks in debug=assets
A previous commit (934e0896160272542dd00) modified QUnit to make sure we
can display better tracebacks in debug=assets mode.  However, this
commit did not apply to errors coming from failing promises.

To fix this, we can simply keep a reference to the error in that
specific case.

closes odoo/odoo#67048

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-03-02 11:00:30 +00:00
Dhruv Patel 4c54cfc52e [IMP] mail: increase systray message dropdown menu height
The goal of this task to increase the height of the systray message dropdown
to simply allow more messages to be displayed at once for better readability.

Currently, we can see a maximum of 6 chat listing in the dropdown at once and
then need to scroll down for more chats to be listed
but with this commit, We can see more number of chats based on the viewport
height for better readability.

Task : 2428779

closes odoo/odoo#66432

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-03-02 11:17:50 +00:00
wan 81bf7d266c [IMP] codeowner: disable codeowner for accounting in master
We keep the codeownership in stable versions but disable it in master to
reduce the spam.
Will be added back at each freeze.

closes odoo/odoo#66150

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2021-02-15 10:48:50 +00:00
Sapan Zaveri 4f508676c2 [IMP] website_sale(_product_configurator): disable quantity everywhere.
Purpose of the commit is too make the customize option
"Select Quantity" works everywhere.

When we disable it, it's only disabled from the product page. it's
still active on the cart and on the product config modal.

So if the user decide to disable the "Select Quantity", disable it everywhere
(cart, product config modal, product itself)

Task-2008472

closes odoo/odoo#37951

Closes: #37951
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-03-02 09:06:05 +00:00
Laurent Smet 75df756751 [IMP] account: Use currency rate when populating journal entries
closes odoo/odoo#67036

X-original-commit: f6761a7e8b012f5357711303af532fa0ac5bd77a
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-03-02 09:16:29 +00:00
Laurent Smet 4eb1cb2fd7 [FIX] account: Fix always set currency_id on aml with populate
Since 14.0, 'currency_id' and 'amount_currency' should always be filled when creating account.move.lines.

X-original-commit: 7827875271adafbfc656fe09c87e37e7d1a3802f
2021-03-02 09:16:29 +00:00
Goffin Simon b69e6f2308 [FIX] payment: Error when creating a transaction
The field partner_id on model payment.transaction is not required
So in some cases if the field partner_id was not in the values
It raised a traceback.

opw:2467971

closes odoo/odoo#67018

X-original-commit: 41b0d78c861a94630be28a16a13f2bae1b629777
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2021-03-01 16:07:40 +00:00
Francois (fge) fa4b646fcb [FIX] web: traceback issue in firefox
In Firefox, the error stack generated by anonymous code (example:
erroneous code in a template) is not compatible with the stacktrace lib.

The error stack could contain lines like :
"anonymous web.assets_common.js line 9786 > Function:442".
In order to make it usable by the stacktrace lib, we will remove
the words "lines", ">", "Function:442" to get:
"anonymous owl.js:1695".

Traceback:

Before:
    Error: QWeb error: Invalid loop expression
        anonymous web.assets_common.js line 9786 > Function:442
        fn owl.js:1567
        render owl.js:1617
        renderFn owl.js:4595
        __render owl.js:4391
        __prepareAndRender owl.js:4379
        __prepare owl.js:4325
        anonymous web.assets_common.js line 9786 > Function:175
        ...

After:
    Error: QWeb error: Invalid loop expression
        anonymous owl.js:1695
        fn owl.js:1567
        render owl.js:1617
        renderFn owl.js:4595
        __render owl.js:4391
        __prepareAndRender owl.js:4379
        __prepare owl.js:4325
        anonymous owl.js:1695
        ...

closes odoo/odoo#67020

Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2021-03-02 08:46:07 +00:00
Odoo's Mergebot 64749aaeaf [FW][FIX] *: various localisation issues
Cf commit messages, courtesy of Erwin van der Ploeg

closes odoo/odoo#66983

Forward-port-of: odoo/odoo#66940
Forward-port-of: odoo/odoo#66790
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-03-02 10:30:29 +01:00
Christophe Monniez 11db495938 [FIX] packaging: include all odoo files in src build
Since this old commit 735924878f, the files that are packaged are
chosen by a list of allowed extensions. This list have to be maintained
each time that a developer adds a new kind of file in a module. This is
error prone [0] as most developer are not aware of that and it's difficult
to monitor.

Moreover, there is no reason to have a different list of installed files
when one install from the git repo instead of the source package.

With this commit, all [1] odoo sources files are included in the source
packaging and the only thing to maintain is a small black-list of file
extensions like for Python bytecode files and for version control files.

[0] see commit d33c05b62a9c6 that fix `.json` missing files.
[1] graft command: https://docs.python.org/3/distutils/commandref.html

closes odoo/odoo#67025

X-original-commit: 9c2ce1f12c2bebb4a903058eac10c17ca562fda9
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2021-03-01 17:25:18 +00:00
nouraellm 4028868229 [FIX] mrp: avoid done and cancelled MO from todo filter
Description of the issue/feature this PR addresses:
- Fix tends to hide done/cancel MOs from mrp.production form
- A planned MO is already a confirmed MO

Current behavior before PR:
- To-do filter displays all MOs

Desired behavior after PR is merged:
- To-do filter hides MOs with done/cancel state

Task ID: 2442058

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

closes odoo/odoo#67008

X-original-commit: b7064d9a0bf6cc78399b61cdf862db961bbf4d5c
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: Noura <nouraellm@users.noreply.github.com>
2021-03-01 14:28:37 +00:00
xO-Tx de351e4873 [IMP] website: add theme loader tips
The goal of this commit is to add tips when theme is loaded
to encourage users to follow the tour (in Edit mode).

task-2440450

closes odoo/odoo#67007

X-original-commit: f5f9f336b052ddc4bd327618bad6d2a3284aa3ff
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-03-01 14:27:27 +00:00
Martin Trigaux 098569761c [FIX] sale: don't force date format
Use a regular t-field that respect the date format of the language.
Before this commit, the quote in another language was something like

   Deze offerte vervalt op
   04 March 2021

X-original-commit: 469b3c66013ff57341bbcb26c3e7c84dabebed8e
2021-03-01 10:31:35 +01:00
Martin Trigaux d2043167af [I18N] website_forum: avoid conflict with "All" of web
Cf odoo/odoo#61641 there is a conflict with the "All" string
from website_forum and the one from web
This is a workaround to make the term from website_forum a openerp-web
translation and avoid an untranslated "All" on the runbot but the real
patch should be done at the framework level

X-original-commit: 0d8bb4463012a4414e0d3373a4b39a9643cdf595
2021-03-01 10:31:34 +01:00
Martin Trigaux 80e168b2e7 [I18N] stock_account: forced fetch terms from Transifex
Some terms were translated two months ago but were not present in the files
Somehow the synchronisation failed at one point

X-original-commit: 88f5e5391b34b52abc92cd3edbd58a963b97dda3
2021-03-01 10:31:33 +01:00
Martin Trigaux f1f41b68b7 [FIX] account: translate "Balance Sheet" selection
Was using the wrong method to translate

X-original-commit: 57611ac95718643b2cb03871e655864dbd74967a
2021-03-01 10:31:33 +01:00
Martin Trigaux 831aef2a00 [FIX] digest: translate field labels
Don't access through self._fields, these are the static labels.
Refer to the ir.model.fields record that has a translated label

X-original-commit: 7fc9546ca616b5a8dcb8a8927f780ac8c197dfc5
2021-03-01 10:31:32 +01:00
Martin Trigaux 4a1c2e3607 [FIX] web: translate "View ..." title
And remove code content

X-original-commit: 65cc90107d176e349bdedfebeb6f92d7312ef202
2021-03-01 10:31:32 +01:00
Martin Trigaux 9bed319507 [FIX] website_mass_mailing: translate default toaster
When creating a new mailing, it was always in English, even if English
was not activated

X-original-commit: f8308e72d9f158c17bafa3bb09cb2915ff8ba37a
2021-03-01 10:31:31 +01:00
Martin Trigaux 706ff8fbff [FIX] account: translate selections
X-original-commit: 4b6e933d5826830b24297355a9cea8a8615bc646
2021-03-01 10:31:31 +01:00
Martin Trigaux 52a7efbaf5 [FIX] account: translate wizard line message
X-original-commit: 2f3701d97568d965a7665bf7126032d3b7527ae4
2021-03-01 10:31:30 +01:00
Andrea Grazioso (agr-odoo) 442dd05854 [FIX] hr_recruitment: display recruitment analysis when no data
Have an empty database
Install Recruitment
Employee>Departments>Administration(3 dots)>Recruitments

Missing record message raise
This occur because of an access to a record that may not exists

opw-2431929

closes odoo/odoo#66764

X-original-commit: 911aec8465a4a796297a465e96b3033d1c415628
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
2021-02-24 15:02:48 +00:00
Andrea Grazioso (agr-odoo) cdb15266ae [FIX] stock: fix rounding issue on available quantity
- Have a storable product with 3140.0 quantity on hand
- Make a sale order for 3106.40, confirm and validate delivery
- Reserved quantity will be 3106.40
- Make another sale order for 33.60, confirm and go to delivery
- Reserved quantity will be 33.59 because of a rounding issue when
calculating the available quantity

opw-2449732

closes odoo/odoo#66635

X-original-commit: bb411a2f125a09713eb749b6884308a8c2f15f36
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
2021-02-22 17:14:18 +00:00
Djamel (otd) 62c849521e [FIX] survey: fix the function extract comment from the answers
Steps to follow to reproduce the bug:
	-Go to survey
	-Choose any survey with at least one "single text box" question
	-In the survey form
	-Click on the button test
	-Complete the survey, but in a "single text box" question, write the word "comment"
	-Validate the survey
	-An error is triggered.

Problem :
In the function which extracts comments from answers, it doesn't check the type in which the answer is stored.
When there is a comment, it is stored in a dict under the key: "comment".
To find the comment, the function checks if "comment"(key) is in the answer.
But in the case of "single text box" question, the answer is stored in a string.
If the word "comment" is present in the answer, the function looking for the key "comment" will return True and try to extract the comment.

Solution :
Add a check to ensure that we are looking for the key "comment" in dict type.

opw-2446194

closes odoo/odoo#67002

X-original-commit: 7064d46a804ab86d1bc50d003b8ae63490a1ef9c
Signed-off-by: Anh Thao PHAM <kitan191@users.noreply.github.com>
Signed-off-by: Djamel Touati <DjamelTouati@users.noreply.github.com>
2021-03-01 12:58:44 +00:00
Stefan Rijnhart 2861cf29b6 [FIX] Purchase double validation can be circumvented by RPC call
closes odoo/odoo#66606

X-original-commit: 99f891f0d1614b7a783fd55c0a9fdcb1ae6251da
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-02-22 13:01:59 +00:00
Thibault Francois 9b4c101484 [IMP] crm|mail: Use flanker to check email correctness
Context
-------
Lead assignement is now based on PLS probability.
We want to avoid giving the same score to real email addresses
and email addresses that are just well formed

Flanker try to acheive that be checking specific
criteria according to the domain, check the dns and mx record

Improvement
-----------
Define a mail_validate function seach as phone_validate.
If flanker is installed, use flanker for validation of
email addresses else use email_normalize.
It should help the PLS to give a bad score to well formed addresses
that flanker suspect to be wrong.

Setup
-----
NB: flanker is not available as debian package, we make it optional

To install flanker
```
pip install flanker
pip install redis
pip install dnsq
```

If you have installed it as root you may need to run
```py
from flanker.addresslib import address
```
as root for the first initialisation

closes odoo/odoo#66429

X-original-commit: f540976c8751e2bf402fed8db830ec0fbf98f654
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-02-18 09:15:35 +00:00