Users will now have a quick way to add images on their products in batches, allowing fast visual identification of them.
task-2518519
closesodoo/odoo#70198
Signed-off-by: Antoine Vandevenne (anv) <AntoineVDV@users.noreply.github.com>
Purpose
=======
The global purpose of this PR is to improve the score of the emails sent by
Odoo as well as allowing to authenticate the Odoo server with SSL certificate.
SSL authentication
==================
We want to be able to authenticate our servers with a certificate for the
entire domain name instead of using an username and a password. That way
we will be able to configure an SMTP relay (on Office 365 e.g.) based on an
SSL certificate instead of an hard-coded IP address.
The host name of the server is defined in the MX DNS record on your domain.
The certificate must be valid for your domain name.
e.g.
> Host: openerp-org.mail.protection.outlook.com
Port: 25
Username: \<keep it blank>
Password: \<keep it blank>
Security: STARTTLS
Email: admin@odoobe.com
No spoofing
===========
Before, we were spoofing the FROM headers all the times. E.g., if someone has
an email address outside of the current email server (e.g. `test@gmail.com`)
we sent it using the default mail server and we spoofed the FROM. This causes
some issues, because emails may be marked as spam by the email clients. A
small fix for stable was merged at odoo/odoo#69218 and will be reverted as this merge
improves that behavior.
Now, we try to *not* spoof the mail from in the SMTP protocol. For that purpose
we define a default email address which is used when no mail server is
available for the sender email address. In that case, the email address
of the sender will be "encapsulated" in the default email address
(e.g. `"Admin (admin@gmail.com)" <notifications@odoo.com>`).
To know for which email address an outgoing mail server can be used, we use a
field "`from_filter`" which can be either an complete email address or a
domain name.
The headers are changed following this heuristic
1. We first look for a mail server which match the entire mail FROM
in that case, we do not change the email header (not needed)
2. If not found, we search a mail server which match the domain name of
the mail from (do not need to change the headers in that case)
3. If not found, find the mail server linked to the "notifications"
email (defined in the system parameter). Then change the FROM header
to the notifications email, and put the old one in the name part of
this header.
e.g.
Initial mail from: "Admin" < admin@example.com >
Final mail from: "Admin (admin@odoo.com)" < notifications@odoo.com >
4. If no notifications email is configured or if no mail server are
found for the notifications email, fallback to the old system and
spoof the FROM header. In that case we do not have the choice if we
want to send the email, he will probably be marked as spam.
LINKS
Task-2367946
closesodoo/odoo#61853
Related: odoo/upgrade#1903
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Purpose
=======
If the partner was removed after the user open the email on the Gmail
side, return a clean error message instead of raising a traceback.
Add translations for the new strings in the plugin.
Links
=====
Task-2567566
Followup of odoo/odoo#73653
See odoo/mail-client-extensions#15closesodoo/odoo#75076
X-original-commit: e782c85b95aed30dd38bd30c29e57a9acc540a49
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Purpose
=======
Now that we try to not spoof the FROM SMTP headers, we want to improve
the default mail FROM used in mailing. By default, it's the email of
the current user, but if no mail server is configured for it, we will
use the notification email instead and encapsulate the email of the
user in it.
e.g.:
Original: "Admin" < admin@odoo.com >
Final: "Admin (admin@odoo.com)" < notifications@odoo.com >
Show a warning message if the configured mail server can not be used
for the email from.
Task-2367946
odoo/odoo#61853odoo/upgrade#1903
PURPOSE
=======
We want to increase the score of the emails sent by Odoo and we want to
avoid them to be marked as spam by the mail clients (gmail, outook...).
SPECIFICATIONS
===============
From filter
-----------
Add a new field on the "ir.mail_server" which is "from_filter". This
field defines the email address for which the outgoing email server can
be used.
The "from_filter" can either define an email address or a domain name.
Use the system parameter "mail.default.from" which allow us to define
a default email address which is used to encapsulate the emails
(default: notifications@<catch.all.domain>).
Mail server priorities
----------------------
When sending an email, we read the FROM header and,
- We first look for a mail server which match the entire mail FROM
in that case, we do not change the email header (not needed)
- If not found, we search a mail server which matches the domain name of
the mail from (do not need to change the headers in that case)
- If not found, find the mail server linked to the "notifications"
email (defined in the system parameter). Then change the FROM header
to the notification email, and put the old one in the name part of
this header.
E.g.
Initial mail from: "Admin" < admin@example.com >
Final mail from: "Admin (admin@odoo.com)" < notifications@odoo.com >
- If no notification email is configured or if no mail server are
found for the notification email, fallback to the old system and
spoof the FROM header. In that case we do not have the choice if we
want to send the email, he will probably be marked as spam.
Sending method priority
-----------------------
In the mail server models, we defined some priorities,
1. Forced SMTP session
2. Forced mail server
3. Try to find the best mail server (see "Mail server priorities")
4. If not found, read the odoo-bin arguments
Bounce
------
As there's no standard for bounce address, we put it in the envelope
(smtp_from). But in some case, it might be considered as spoofing. So,
we use the bounce address ONLY if the mail server is configured for the
entire domain name.
One behavior which might be broken is the following; we send an email as
"std@gmail.com" and the bounce address is on the domain "odoo.com".
Before we received the bounce notifications but we were spoofing the
local part and the domain.
Now
- if a mail server is configured for GMAIL, we do not use the bounce
address (and we might not receive the bounce notification)
- if no mail server is configured for GMAIL, but one is configured for
"odoo.com"
- the FROM header will be "notifications@odoo.com"
- the FROM envelope will be the bounce address
=> In this situation we are spoofing only the local part of the email
but it's allowed as the mail server is configured for the entire
domain name
LINKS
=====
Task-2367946
odoo/odoo#61853odoo/upgrade#1903
Purpose
=======
Split the code of "send_email" in "ir.mail_server" so the changes will
be easier to review.
Task-2367946
odoo/odoo#61853odoo/upgrade#1903
PURPOSE
=======
We want to be able to authenticate our servers with a certificate
for the entire domain name instead of using a username and a password.
SPECIFICATIONS
==============
Add 2 fields on the `ir.mail_server`, which are
- the SSL certificate
- the SSL private key
When we uploaded both files, we use them to authenticate the client of
the SSL connection.
Add 2 options on the Odoo binary, so we can provide the filenames of both
files (like we do for the SMTP username/password).
SETTINGS
========
Note that this type of authentication doesn't work locally for Microsoft
office 365. It seems like Microsoft is blocking non-static IP address
(not able to ping the host locally, but it works on the server).
The host name of the server is defined in the MX DNS record. Then, on
Office 365 you must create an SMTP relay based on a certificate and not
based on a hard coded IP address. The certificate must be valid for your
domain name.
e.g.
Host: openerp-org.mail.protection.outlook.com
Port: 25
Username: <keep it blank>
Password: <keep it blank>
Security: STARTTLS
Email: admin@odoobe.com
New Python dependence
=====================
The standard SSL python library only takes a filename to the certificate
/ private key.
But, we do not want to use attachments and take the full path to the
file (in the filestore) or to create temporary file.
So, we need to use a new library "PyOpenSSL" which allows you to load
a certificate / private key from a byte array.
To make this library work with SMTPLIB we use a wrapper developed
in urllib3 (PyOpenSSLContext).
LINKS
=====
Task-2367946
odoo/odoo#61853odoo/upgrade#1903
Purpose
=======
Revert the commit a757cab857
because the rewriting of the FROM of the emails sent will
be done in a smarter way in master.
Task-2367946
odoo/odoo#61853odoo/upgrade#1903
This commit improves the form view of 'Mailing List Contacts'. It will:
- Add a color picker on the tag ('tag_ids').
- Make the bouncing counter ('message_bounce') unmodifiable.
- Make the creation date ('create_date') and the bouncing counter
('message_bounce') invisible when the user creates a new record.
task-2611112
closesodoo/odoo#74440
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Currently,when merging opportunities, they are sorted by "confidence level",
which has following criterion for sorting:
- type (active opportunity is best, inactive opportunity is better)
- stage sequence (higher is better)
- ID (older is better)
For better sorting, this commit improves the confidence level by adding
probability as a third criterion, and so now criterion for sorting is:
- type (active opportunity is best, inactive opportunity is better)
- stage sequence (higher is better)
- probability (higher is better)
- ID (older is better)
This commit also adapts the test cases accordingly which now considers
probability as a factor for calculating confidence level.
Task-2198562
PR odoo/odoo#51893
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Purpose of this merge is to force some probabilities on leads used as data
in various tests. That way when dealing with probabilities changes in tests
are easier to spot and understand.
Also fix some docstrings about stage sequence which were incorrect.
No tests has been changed, purpose was to set probabilities that do not
change any test output.
Task-2198562
PR odoo/odoo#51893
Steps to reproduce the bug:
- Create a storable product, e.g:”Product A”, with a AVCO + Automated category
- Make sure to assign an account in the price difference account field
- Create an RFQ with the “Product A”
- Confirm RFQ and receive the product
- Create the vendor bill and edit to change the unit cost from 55 to 56
- Post the bill
- Check journal items
Problem:
Price difference accounts have no partner_id
opw-2616388
closesodoo/odoo#75085
X-original-commit: 75b45e736bde32e264e7e660b4626142d8f05df2
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
reserved_availability is expressed in move uom
forecast_availability must be in product base uom
closesodoo/odoo#75077
X-original-commit: fa9abcc1b105c07e1eaf6bdd3010abe19a056088
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
Steps to reproduce:
Step 1: make a MO and create less than the quantity to produce
Step 2: Mark As Done (with no backorder)
Step 3: duplicate the MO and try to change the quantity to produce
Expected result: qty to produce changes as expected
Actual result: server error
Issue is due to the copied MO's `move_finished_ids` including a copy
of the cancelled finished move (i.e. the qty not backordered) so there
were 2 `move_finished_ids` for the product to produce. This resulted in
an access error since the onchange to update the `move_finished_ids`
only expects 1 move for the product to produce and results in a
singleton error.
Note we copy cancelled move_raw_ids because otherwise we wouldn't be
able to duplicate cancelled MOs without losing all of its components.
Issue 2 of Task: 2618962
closesodoo/odoo#75073
X-original-commit: 456c337534427db1296030b004ae061b47d8db79
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: Tiffany Chang <tic@odoo.com>
In subcontracting, there wasn't a way to make
the subcontracting resupply delivery plan before
the subcontracting receipt.
Now the hidden subcontracted MO, take in account
(in his planning) the `produce_delay` (in days) of
the product which is automatically plan the
subcontracting resupply delivery correctly.
task-2486811
closesodoo/odoo#75072
X-original-commit: 829369d3ca0530f1aad0599fbb1598810a928cc3
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
Old shortcut (ctrl+K) was conflicting with the new command palette feature, so we change it to CTRL+M.
task-2593213
closesodoo/odoo#75069
X-original-commit: 0371fe2b9e54ff557265a8f8fc919d351ed6a7d5
Signed-off-by: Antoine Guenet <Zinston@users.noreply.github.com>
Currently, empty screen of the settings is not very beautiful
without proper action helper and decoration. It displays only
'no record found' string when no setting is found for the
search string.
With this commit, we make the no content helper for the settings
consistent with other apps. It now displays empty folder and
proper helper message.
TaskID-2588387
closesodoo/odoo#74570
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit hides "other" tracks/rooms and exhibitor sections if there is only
a single record for these.
Purpose is:
Allow users to handle events that do not have a ton of things happening at the
same time without showing empty sections.
Example: I use Odoo events to broadcast my concert/zoom conference/... online
and want my website to look neat.
Task-2531084
closesodoo/odoo#71600
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Steps to reproduce the bug:
When making a payment intent from Adyen terminal with the POS, the payment intent was validated by Adyen
but Odoo stopped polling because a connection failure happened and then on retry it made second payment
even if the first one was successful.
Fix:
Now after a failure, it will try to poll again the last transaction (with get_latest_adyen_status)
and set the payment as successful or cancelled based on the last response.
opw:2587625
closesodoo/odoo#75053
X-original-commit: dcb1e2b4823c917f4c547d2cad604187f893948d
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Co-authored-by: nle-odoo <nle@odoo.com>
Step to follow
Create a sale order for a kit with a quantity of one and Dozens as a unit of
measure
Confirm and validate the delivery
The delivered quantity will be 12 instead of 1
Cause of the issue
The delivered quantity wasn't recomputed in relation to the sales order
quantity
opw-2535193
closesodoo/odoo#75044
X-original-commit: 5ce39d13d1364df3d9c9638fce7f9d374f1c9b72
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
RATIONALE
Currently, editing a mail feels a little claustrophobic because of the boxes
within boxes within boxes design. Purpose of this task is to improve
layout of mailing form view when being in Email Marketing, notably displaying
editor in full width.
SPECIFICATIONS
In this task we remove the chatter and the sheet from the form view so that
the mail editor takes up more horizontal space. The chatter is then moved into
one of the notebook's tabs.
Mass mailing form view currently has a scrollbar for the contents of the
editor: one for the form view itself and one for the sidebar. In consequence
we sometimes end up with three scrollbars side by side, which is ugly and
confusing. In this task we ensure the height of the iframe is always the same
as its contents so there is no need for a scrollbar.
Note that SMS Marketing is untouched as it keeps the old layout. Indeed there
is no need of such changes as it does not use the HTML editor. Actions that
are generic (systray, list view, ...) also use the old display..
LINKS
Task-2545445
closesodoo/odoo#71511
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Before this commit: when typing something on many2many_tags widget and clicking
on 'Create and Edit' from many2many_tags widget shows form dialog, now clicking
on the 'Save & new' button shows the old value in the name field instead of the
blank value it is because of default context passed, clicking 'Save & New' will
pass old context due to which name field will have old value, this will create
issue when there is unique name constraint, pressing 'Save & New' and then
again clicking 'Save & New' will raise constraint.
After this commit: clicking on the 'Save & new' button will shows the blank
value in the name field, to fix this issue, we removed 'default_name' key from
context.
TaskID-2323194
closesodoo/odoo#75052
X-original-commit: 6e33a4a073acd6d4dc64743d010a8d754ad8a2ff
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Mohammed Shekha <msh@odoo.com>
Before this commit, error handlers were listed at the start
of the service and some handlers couldn't be found if they
are not in the registry when the service is started.
Now, they are listed when errors are handled.
closesodoo/odoo#75011
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
* = test_discuss_full
Overall less queries.
Changes:
- Batch `mail_partner_format`.
- Batch `user.employee_id` compute.
- Remove query for current leave state, use fields (and prefetch) instead.
- Move current leave state in partner format instead of channel info.
Part of task-2622462
closesodoo/odoo#73174
Related: odoo/enterprise#20186
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
* = hr_holidays
This new module will contain more tests as time goes on.
This new test will serve as indicator for future performance improvements.
Fix missing `flush` before query in `hr_holidays`.
Part of task-2622462
The chatter's textarea gets resized dynamically. However no minimum
height is set so we can end up with a height of 0. This was the case
when the chatter was added to a notebook's tab, like in mass_mailing.
This sets that minimum height so it is equal to that of its parent.
Task-2545445
closes odoo#71511
When editing the bottom of a long e-mail, you can't see the top of the
sidebar's contents anymore. This addresses that problem by dynamically
repositioning the sidebar on scroll.
Task-2545445
closes#71511
Mass mailing form view currently has a scrollbar for the contents of the
editor, one for the form view itself, and one for the sidebar. In
consequence we can sometimes end up with three scrollbars side by side,
which is ugly and confusing.
This ensures the height of the iframe is always that of its contents so
there is no need for a scrollbar.
When inserting a new snippet we want to autoscroll to that snippet. That
is a complicated situation because the element we want to scroll is not
in the same document as the element we want to scroll _to_.
To address that situation, a new option is added to `scrollTo` so we can
pass it the element to scroll. It can then check if we are in the
aforementioned situation, in which case it can correct the scrolling and
apply it to the right element.
We use that option in mass_mailing to prevent the bug.
Task-2545445
closes#71511
Currently, editing a mail feels a little claustrophobic because of the
boxes within boxes within boxes design. This commit removes the chatter
and the sheet from the form view so the mail editor can take up more
horizontal space. The chatter is then moved into one of the notebook's
tabs.
Task-2545445
closes#71511
* = im_livechat, test_mail
The goal of moving it in models and making it independent of current user is to
be able to test it easily in future commits.
Part of task-2622462
* = crm_livechat, im_livechat, mail_bot, test_mail_full
Those are hard-coded methods just like any other, remove the magic call and the
need to forward them to the client at init.
Part of task-2622462
Ticket: 2578903
In the overview menu, the time of a calendar event was not formatted according to the user preferences. This PR fixes that.
closesodoo/odoo#75039
X-original-commit: 0f9746adab26a792fba5d9cfe8e30ea90d7c2a67
Signed-off-by: Arnaud Joset <arj-odoo@users.noreply.github.com>
Signed-off-by: Hubert Van De Walle <hubvd@users.noreply.github.com>
The given time are currently quite high (arround 5 seconds for some
bundles) but it is difficult to know what kind of assets are taking so
much time. This commit will split js and css in order to track the
generation time separatelly.
closesodoo/odoo#75030
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
Issue: When changing a settings and saving, all the operation types (stock_picking.type) that had a code different than incoming had their Show Detailed Operations (show_operations) forced to be True, even when the change in settings was totally unrelated
Steps to reproduce :
1) Go to Inventory (stock) / Configuration / Warehouse Management / Operations Types
2) Find or create an Operation Type with Type of Operation set to something else than Receipt (incoming)
3) Ensures that the checkbox Show Detailed Operations (show_operations) is **unchecked**
4) Go to Settings and check or uncheck any setting, for example Permissions > Default Access Rights
5) Save
6) Go back to the Operation Type seen before
7) Show Detailed Operation is now **checked**
Why is that a bug:
The intended behaviour was to check that Show Detailed Operations box every time we change group_stock_multi_locations, group_stock_production_lot, or group_stock_tracking_lot from **unchecked to checked**, but the actual behaviour was to check that SDO box every time one of the **3 was checked when changing settings**
opw-2604730
closesodoo/odoo#75027
X-original-commit: 66fef97e5630f1541b9d000fd5b20ae215a0f3fd
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
BEFORE
If a dialog is destroyed while the dialog is being opened, an empty
modal is still displayed. This could arrive if its parent is destroyed
in this precise phase.
AFTER
The dialog checks if it has been destroyed right before being attached
to the DOM, so displaying an empty modal should not happen anymore.
Taskid-2461277
closesodoo/odoo#74175
X-original-commit: dbfff9079cccdf209cf4164c3722bc7baa1a16d3
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Bruno Boi <brboi@users.noreply.github.com>
The command bar hints were not properly text-aligned, and the color was sometime not visible depending on the background.
task-2607335
task-2607337
closesodoo/odoo#75028
X-original-commit: 0cd597558c2da268148ca8871442014edba3fdcb
Signed-off-by: Antoine Guenet <Zinston@users.noreply.github.com>
The bold command used `assignInlineStyle`, which misidentified when a text node needed
to be wrapped in an inline element in some situations, eg:
`<p>aaa<span style="font-weight: normal;">[bbb<span>c]cccc</span>bb</span>dddddd</p>`
task-2613476
closesodoo/odoo#75015
X-original-commit: a61fe7a338289b9195dfca56389593411daf2401
Signed-off-by: Antoine Guenet <Zinston@users.noreply.github.com>
Steps to reproduce the bug:
- Go to purchase app > create a request for quotation
- click on confirm > Lock
Problem:
Date confirmation becomes invisible, and date order becomes visible
Solution:
As we have already confirmed the purchase order and the lock button only appears when the PO is confirmed,
it makes sense to leave the confirmation date visible
https://github.com/odoo/odoo/blob/13.0/addons/purchase/views/purchase_views.xml#L138-L139
opw-2612608
closesodoo/odoo#75014
X-original-commit: ebf6708b5962a54e9fbed133596dcdfdd204e33d
Signed-off-by: Djamel Touati <DjamelTouati@users.noreply.github.com>
Fix two issues:
The search of suitable payment token was searching on the journal_id
field of the payment acquirer that is no longer stored.
Change it to now search on the acquirer_id directly, since we have
this information.
The _inverse_journal_id method on payment acquirers would create
new payment line with the manual payment method when no provider
are given to an acquirer, or no payment method is existing for
a given provider. This would cause issues with the creation of
multiple line with the same name on a same journal, which would
trigger the constrains blocking that.
closesodoo/odoo#74990
X-original-commit: a3a2fcb0b299fafbf359ec9015da5c85cdb57b3a
Related: odoo/enterprise#20193
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Before this commit, MOs were not filtered based on selected BoM.
With this commit, We are filtering MOs to selected based on BoM.
Fixes#70215closesodoo/odoo#74698
X-original-commit: 847f61a7716c62b0076cef0aa13d58d7dd9d09eb
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
No need to make the same query 10 k times during lines generation. This saves
about 35% of the execution time
STEPS:
* create a PO for product tracked by serial, set qty=10000
* confirm the PO
PO validation benchmark:
```
BEFORE:
20223 7.007 11.960
20131 7.602 12.442
AFTER:
10159 4.786 8.168
10132 5.035 8.567
```
---
task-2575448
closesodoo/odoo#74016
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
Because of css rules, when a space was inserted (which is supposed to close the power box), it wouldn't be present in the innerText string.
It was fixed by using the textContent property instead, which contains all the spaces, including the invisible ones.
This might cause problems in some situation where the markup that the editor is modifying contains formatting spaces.
task-2584101
closesodoo/odoo#74766
Signed-off-by: Antoine Guenet <Zinston@users.noreply.github.com>
The auto-link making feature would insert two spaces when the user would try to add one space.
It is no longer the case.
Some selection management with the link making has been fixed as well.
task-2584101
Steps to Reproduce Bug:
- Add Attachment on Bom Line
- Delete Attachment
Bug:
- Attachment is still present on `ir.attachment`
With this commit, we are removing linked attachment on deleting `mrp.document`
closesodoo/odoo#74595
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Before this commit, It was setting first available account as default regardless
of it is deprecated or not.
With this commit, we are excluding deprecated account as default.
Fixes#74280closesodoo/odoo#74901
X-original-commit: fa07151785d9a3b3cbaddba34bea072eceda0e81
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>