When updating the categories, if by any chance there is a loop in the
category hierarchy, the current code was falling into an infinite loop.
With this commit, the graph loop is broken by clearing a parent_id, and
if the resulting module category path is wrong, a clean new one will be
recreated anyway.
This allows unblocking uncomfortable situations where people cannot
update the modules list any more. In 15.0, [a check][1] has been
introduced to prevent the existence of recursive categories, but as it
is a python check it doesn't prevent corrupted data to remain corrupted.
OPW-3704007
Related to odoo/upgrade#5574
[1]: odoo/odoo@6932714200closesodoo/odoo#161583
X-original-commit: f2765d2cab5671a010404c36842bf1b4c4d6350b
Signed-off-by: Christophe Simonis (chs) <chs@odoo.com>
Since 1be6866b15, when VAT can't be
edited, the country_id select field is disabled.
Disabled fields aren't submitted in the POST query, which causes an
error `Some required fields are empty`, with the Country field being
highlighted even if a value is selected.
With this commit, when the user cannot edit their country, the value is
forced into the POST data so that it is found.
closesodoo/odoo#150909
Signed-off-by: Paul Morelle (pmo) <pmo@odoo.com>
Before this commit, when updateBusSubscription was called, it was
postponed to the next event cycle by its first line `await`.
This was needed to avoid registering too many times when adding a large
set of channels: we waited for all channels to be added by the for loop
before actually calling the function.
However, this registered one event per function call. The first one did
the job, and all the subsequent ones did nothing, apart consuming CPU
(sorting the ids and JSONifying them cost memory and CPU).
On Chrome-based browsers, this resulted in a freeze of the rendering if
the number of channels became large (e.g. 600).
With this commit, we make updateBusSubscription a debounced function,
with no delay so that the function gets executed at the next event cycle
like before.
However, the difference is that the debouncing doesn't create a new
postponed call for each call: the function will only get executed once
after the current event cycle, no matter how many times it was called.
closesodoo/odoo#127598
X-original-commit: 2a5c78679875414dcfad7692b660a9c19047485b
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This reverts commit bfadb8e491fe2acda63a79f9577eaaec8a1c8d9c.
Since that commit, the domain may be double-encoded in the database if
the user reorganizes the layout of his dashboard: once by the JavaScript
code, and once by the serialization of the innerHTML property.
However, there is no need to have it double-encoded, and some tools such
as the upgrade scripts will fail upgrading the domain.
With this commit, we are serializing the document to XML instead of HTML
and therefore the produced output is valid XML that will be correctly
interpreted by all the tools.
However, double-encoded domains might still be present in existing
databases, so we also need to take this into account when reading the
domain.
OPW-3130117
closesodoo/odoo#123045
X-original-commit: dd8f2640a281b86b73d3b296dd0a5aec7664eb4f
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Christophe Simonis (chs) <chs@odoo.com>
Signed-off-by: Paul Morelle (pmo) <pmo@odoo.com>
The selection function get_selection_class for the field classname has
obviously been thought to be overridable by subclasses in order to add
new selection classes if need be.
However, before this commit the method was passed directly to the
Selection constructor, which used the callable object directly. If it
was overridden by a subclass, the Selection object would still use the
same non-overridden callable instance.
With this commit, we give the name of the method instead of the
callable, which makes that the method is resolved after all overrides,
and therefore the resulting selection will be the overridden one.
closesodoo/odoo#122416
X-original-commit: 91bea59678c92dbb06151dbf757398f588aeefdb
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Paul Morelle (pmo) <pmo@odoo.com>
Because of the M2M relation, an account.move.line can be linked to
several sale.order.lines, making the cardinality of sale_line_ids
superior to 1.
Even if it is not possible to obtain this result with standard code,
a custom module could create this situation and posting the invoice
would result in a "ValueError: Expected singleton" exception.
This commit prevents this exception by checking whether the line is
linked to at least one downpayment SO line in the method action_post.
The test also checks that the methods button_draft and button_cancel
behave properly (spoiler alert: they will fail too in 16.0).
closesodoo/odoo#111686
X-original-commit: a2344a4cd9283e3a74caf454ce218eecf5855de0
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Signed-off-by: Paul Morelle (pmo) <pmo@odoo.com>
Login is a noun and not a verb. The corresponding verb is Log in.
And indeed the translation in French was "Identifiant" instead of
"Se connecter".
closesodoo/odoo#99478
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
bcf665a291 introduced this deprecation warning without a stacklevel
argument. Adding it makes the error highlighted precisely where the
deprecated import occurred.
closesodoo/odoo#92420
X-original-commit: 9c01ab0deec4b82c60d8f942c39f2ca33aa42afd
Signed-off-by: Julien Castiaux <juc@odoo.com>
Signed-off-by: Paul Morelle <pmo@odoo.com>
It may happen than the routing map is cleared while rendering a qweb
view. For example, if an asset bundle is regenerated, the previous one
is unlinked, which causes a cache clearing.
Previously-generated EndPoint objects aren't found any more in the new
routing map, so `request.endpoint` cannot be used any more after a cache
clearing.
This commit adds hash and comparison magic methods on http.EndPoint so
that EndPoint objects created by a previous routing map generation can
still be used after a cache clearing.
Two tests were added: one to test the comparison and hash methods, and
the other to test them in a real-case rendering.
Commit 80a04f7ebed fixed this bug too, but introduced another issue
which caused many OPW, so it was quickly reverted by deb23450f18 along
with its performance improvement 33167b3928c. This commit replaces
80a04f7ebed with another way to fix the issue.
A third test has been added in order to avoid reintroducing this other
issue.
By the way, this commit also removes the EndPoint.arguments attribute,
as commit 17f1992698 removed all usages of this attribute in Odoo 9.0,
but left this initialization here.
OPW-2834546
OPW-2834549
OPW-2834625
X-original-commit: bdc45422f5c715782b147eecda2403386ba7eb4a
Part-of: odoo/odoo#91034
When using a template with inline placeholders in the body, the Test
button will replace the placeholders, but they will remain in the final
body when the mass mailing is sent for real.
This commit fixes this issue by using the correct rendering engine for
the Test button too.
OPW-2819032
OPW-2828461
closesodoo/odoo#89346
X-original-commit: b0dcd2fa35d949dd722f1bc70401ceeb7f5d8231
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Paul Morelle <pmo@odoo.com>
When the assets are regenerated, the previous attachments are deleted.
This may happen during the execution of t-call-assets directives in a
qweb view.
However, some properties that have been accessed with a sudo() were
accessible in the cache. Clearing the cache during the view rendering
could lead to access errors, which wouldn't be present without this
directive.
This commit works around this problem by removing these attachments with
a SQL query, without relying on the classic unlink, so that the cache is
preserved in this case.
By the way, sanitize the filename when marking it for deletion.
closesodoo/odoo#83570
X-original-commit: 627d508edfb62449067a05b0e3c1a0004f0af32c
Signed-off-by: Raphael Collet <rco@odoo.com>
Signed-off-by: Olivier Dony <odo@odoo.com>
Signed-off-by: Paul Morelle <pmo@odoo.com>
Previous implementation was generating an unoptimised query which
lead to unacceptable loading time on large databases.
task-2697814
closesodoo/odoo#80316
X-original-commit: fa1578abea4ebe887d4e23a81bb1011ed986cc0c
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Accessing `valid_docs.ids` for each activity to check was costly, and in
my example the whole loop took 125 seconds to execute.
By turning it into a set, the same loop takes 0.2 seconds to execute.
When re-constructing the list based on ids to keep the order, using a
set is also faster, and takes another 0.2 seconds instead of 13.6.
closesodoo/odoo#79969
X-original-commit: f994db760b679c8acdaf4245315f89c1d31a9e1c
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Because activities_to_check was assigned in each loop, the result was
only containing the last chunk of 1000 records, instead of the whole
result.
This commit fixes the issue by concatenating into the list instead of
just assigning it.
X-original-commit: c06c96655b88cc4df59b8cdd5f05a2f600255c49
Part-of: odoo/odoo#79969
When creating the l10n_fr chart of accounts, the tax payable and tax
receivable accounts of the tax groups were missing, and this had other
effects like a missing tax report entry.
This commit fixes the issue by setting the property on the template,
like in others modules (e.g. l10n_be).
closesodoo/odoo#73700
X-original-commit: 886efb07bd8775ebc969ee44343b8aaba333742f
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Signed-off-by: Paul Morelle <madprog@users.noreply.github.com>
Scenario to reproduce the issue on runbot 12.0 Community:
- Go to Settings > Technical > Email > Digest Emails
- Select the Weekly Digest
- Click on Action > Delete
- Click on OK
- Go to Settings > Users & Companies > Users
- Click on Create
- Fill the Name and the Email Address
- Save
- Odoo Server Error - Missing Record
Some users seem to delete this record to stop receiving the digest for
everyone, including for future users. The problem is that, even if the
digest has been deleted, the config parameters are still referencing it.
This commit prevents the exception by having an empty recordset if the
digest does not exist.
closesodoo/odoo#73237
X-original-commit: 2910bd24f410e882b9745337f918a206b25925f7
Signed-off-by: Paul Morelle <madprog@users.noreply.github.com>
Account move synchronization has already taken place during the creation
of the moves. No need for this additional check during the
reconciliation itself.
This commit helps when a lot of move lines are being reconciled at once.
For instance, the duration of the reconciliation of a batch of about 700
payments on a large database took 20 minutes before this commit, and
takes about 4 minutes after this commit.
closesodoo/odoo#67447
X-original-commit: e883fffaebd05727b399b26ca86cc54df79cde93
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
By making this tree non-editable, clicking on the rows opens the
corresponding form, and gives access to more information and better
navigation.
closesodoo/odoo#65214
X-original-commit: 995bcf5a96fc1ae2be1ddccbf3a8eb7ba42c923c
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
When the name of a partner contains a regular expression operator, such
as grouping parenthesis, +, *, brackets... the resulting regexp may
match wrong names or worse be invalid and lead to an exception.
With this commit, we create a regular expression from only the words
formed from at least 3 of [a-zA-Z0-9], ignoring all other characters,
including those who may have a meaning in a regular expression.
This avoids these issues:
- regexp injection (security issue)
- punctuation resulting in erroneous regular expression ("ABC + SPRL"
resulted in "(?=.*ABC.*)(?=.*+.*)(?=.*SPRL.*)" which is invalid at
the ".*+" part)
- false positives due to words that are too small (\b were added, and
the minimal matching word size is 3)
- accentuation mismatch (both sides are filtered through unaccent)
- special cases in unicode that have a special behavior with lower().
See the discussion on odoo/odoo#63145 for a detailled explaination about
these issues.
OPW-2360687
closesodoo/odoo#64510
X-original-commit: 3c5296863f0030acc5d3dba0ff73a6f1b42d1255
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Paul Morelle <madprog@users.noreply.github.com>
When the amount of mail messages is big enough (about 1500?), the
recursion goes deeper and deeper, until the Javascript limit raises an
infinite recursion error.
This commit fixes the issue by avoiding to run an inner
_flushUpdateCycle with the update if the change is not needed, so the
second time that it is reached it does not start a new update, which
would have run another flush update cycle.
closesodoo/odoo#62096
X-original-commit: 14b1bbb248b39e0ddef4f3eb1f0f130f650ebdd4
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
The prefetching engine wants to prefetch all the registrations to all
the events of all the schedulers, which may make a lot of data.
If the autocommit is on, then all this prefetched data is discarded at
each loop.
This commit limits the prefetching to each scheduler, so that we avoid
prefetching the data unnecessarily.
closesodoo/odoo#62052
X-original-commit: 904a46f28cb64e3bd51c40dc364b256d434d1c93
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
Signed-off-by: Paul Morelle <madprog@users.noreply.github.com>
In previous versions of Odoo, in the New message box, typing a few
letters of the name of your recipient and pressing Enter would
automatically select the conversation with this contact.
Since 14.0, one has to select the first result with the Down key.
This commit restores the previous behavior by using the
[`autofocus`](https://api.jqueryui.com/autocomplete/#option-autoFocus)
option.
closesodoo/odoo#61967
X-original-commit: addd392a1b5f7e569c65a4503152ba0bdfe49eb3
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
In order to ease the usage of lazy translation, add the possibility to
add the _lt objects together and with strings.
Adding two _lt objects together or to a string will execute their
translation, so these operations still must be done once the user's
language has been defined.
For example, this is now possible:
MESSAGES = {
1: _lt("Hello, world!"),
2: _lt("Lorem ipsum"),
}
def get_text(code):
return _("Text is: ") + MESSAGES[code]
closesodoo/odoo#60844
X-original-commit: c4596664e5514018c565eaf14b93e000d972bd30
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Signed-off-by: Paul Morelle <madprog@users.noreply.github.com>
odoo/odoo@dadcec593d introduced a duplicate name in the filters of the
view project.view_project_project_filter.
This commit renames the new filter from my_projects to own_projects.
closesodoo/odoo#60137
X-original-commit: a372d34a4c98e459c5170369fd90cbd4181ba4a3
Signed-off-by: Paul Morelle <madprog@users.noreply.github.com>
Since odoo/odoo@c6397ab3b3, the printer.js
file has been refactored, and if the connection to the IoTBox failed,
the error popup could not be displayed because Gui was undefined.
Steps to reproduce on the runbot:
- Configure your POS session with an IoTBox with receipt printer and
cashdrawer
- Open your POS session
- Skip the connection to the IoTBox
- Proceed to payment
- Open the cashbox
- Error: Gui is not defined
This commit fixes the behavior by displaying the error properly.
In line with this fix, we are also putting the printing assets back in
the point_of_sale.assets because pos printing in the backend is no
longer needed.
closesodoo/odoo#60087
X-original-commit: 063e617a832d582d460dee0fcb54d837f3cafb1c
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
In odoo/odoo@d2238de576 the domain of the
action hr_holidays.hr_leave_action_action_approve_department has been
removed, as the addon was reworked and no domain is needed any more.
However, during a migration from a previous version, the older domain is
not overwritten with an empty value.
With this commit, the domain is set to an empty one, which allows the
migration to correctly update the record.
closesodoo/odoo#59673
X-original-commit: 76c2f412c09ef1169b5cf936f0770cd4200f29e2
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Since fbf347498f, when opening a view in a
dialog, the favorite filters were not loaded.
For example on the runbot:
1. In CRM, open any lead, edit it, and open the Customer dropdown
2. Create a custom filter, save it as favorite, and close the dialog
3. Open the dialog again: you don't see your new filter
With this commit, you will see your filter at step nr. 3
closesodoo/odoo#59186
X-original-commit: 418013e8dbb2aa2d4ffd4f650f080ca5a94183f9
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Paul Morelle <madprog@users.noreply.github.com>
When a module creates a disabled user during its installation or upgrade
(e.g. demo data), the UserError "You cannot perform this action on an
archived user" breaks the whole installation process.
We don't care if the mail cannot be sent for users created by an
installation, so let's just skip the whole function if we are installing
a module.
closesodoo/odoo#59036
X-original-commit: 78e22584c76c9fecbc22ab3604771fdce5f2094f
Signed-off-by: Paul Morelle <madprog@users.noreply.github.com>
Bug description:
Installing Invoicing on a database whose company is configured in the
SEPA zone, results in installing Accounting
Steps to reproduce on the Runbot:
- Start from a base enterprise database
- Go to Settings > Users & Companies > Companies and configure the
address of MyCompany to the SEPA zone (e.g. Belgium)
- Go to Apps and install Invoicing
- The Accounting application has been installed
Explanation:
The module account_sepa depends on account_batch_payment, which depends
on account_accountant.
The post_init_hook of account, _auto_install_l10n, adds the account_sepa
module to the installation if the country_code of the company is in the
SEPA zone.
The same side-effect is observed with account_bank_statement_import_camt
which depends on account_bank_statement_import, which depends on
account_accountant.
The fix is to remove the installation of these modules from the
post_init_hook of the module account, and add them to a new
post_init_hook of the module account_accountant, that will be in a PR in
the enterprise project.
closesodoo/odoo#58073
X-original-commit: db4ce56641c75403be935efa072687bff65c7bb2
Related: odoo/enterprise#13362
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Signed-off-by: Paul Morelle <madprog@users.noreply.github.com>
The permission check in BaseModel:export_data was checking if the
current user was the administrator user, instead of checking if the
environment was administrator (i.e. it should also check if the sudo bit
is set on the environment).
This commit fixes this and allows to export_data with a simple `sudo()`
instead of needing a `with_user(SUPERUSER_ID)`.
closesodoo/odoo#54647
X-original-commit: f69f47b6ba5c6c462bf617f4876a39233f60034f
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
Signed-off-by: Paul Morelle <madprog@users.noreply.github.com>
Commit 30af656e1a removed a third operand
in the domain but forgot to remove its operator, making the domain
filtering on the Participant invalid.
This commit fixes it by removing the ~~first~~ second pipe.
closesodoo/odoo#54504
X-original-commit: 44feadabab601b0df34d504b585abb9339a4a478
Signed-off-by: Christophe Simonis <chs@odoo.com>
Due to the row_number in the sale.report view, all queries using this
report were slowed down drastically as soon as there were a large amount
of sale.order.lines.
By using existing columns instead of computing new values at each query,
the queries execute in an acceptable time (even if the CASE statements
introduced by e7d8e26ae7 are still slowing down things a bit).
When there is no sale.order.line, min(l.id) would be NULL, so the
sale.order will be used instead. It is negated to avoid id conflicts.
However, note that addons/pos_sale/report/sale_report.py is not doing
anything to avoid conflicts between the ids of sale.order.line and
pos.order.line when doing its union.
closesodoo/odoo#53750
X-original-commit: 03bd6f5243e189cd05b3fc7ad774cc07ea733e14
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Paul Morelle <madprog@users.noreply.github.com>
We should push the request object on the request stack only in the
__enter__ method, in order to be symmetrical with the __exit__ method.
closesodoo/odoo#53613
X-original-commit: 30e94d305f9cffa816ddc213e0b9329c0263c145
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Paul Morelle <madprog@users.noreply.github.com>
When sending a test email for a mass mailing, it was using the default
server, ignoring the one that could have been set on the mailing object.
This commit fixes this issue, so that the way the test emails are sent
is even closer to the real process.
closesodoo/odoo#55072
X-original-commit: 6af6e4714f2ccc703e9a3189b12a2317bd6af49c
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Paul Morelle <madprog@users.noreply.github.com>
Until version 13.0, ir.ui.view:postprocess_and_fields returned a tuple
of a string and a dict of field information.
With aae1d57829, it now returns a
defaultdict instead of the dict.
This dict comes from NameManager.available_fields, which is initialized
as a defaultdict. There is no apparent reason to have a defaultdict in
this place, apart from the usage in has_field.
Furthermore, using a defaultdict has a side-effect in the search_view
computed field of all the ir.actions.act_window. On a database, if you
access env.ref('base.paper_format_action').search_view it will contain
a stringified dict, and the string default_dict(<class 'dict'>, {...})
is used in place of just {...} under the fields key.
closesodoo/odoo#53235
X-original-commit: 4586d0fbf0bdd5959b274611c58df911e50f4ef2
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
Signed-off-by: Paul Morelle <madprog@users.noreply.github.com>
Every call of initialize_sys_path was adding two new hooks to the
sys.meta_path, resulting in very long loading times on databases having
a lot of modules.
For example, 2.27s instead of 752 on a database having 130 installed
modules.
References:
- odoo/odoo#45780
- odoo/odoo#45662closesodoo/odoo#53121
X-original-commit: 2444fde7f852787d87589a93c4bc385d76ff20e9
Signed-off-by: Christophe Simonis <chs@odoo.com>
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
On invoices, we had cases where the supplier was added as a follower to
the invoice, and an email was sent to them.
This commit adds tests that reproduce the same follower assignment that
happened in saas-12.3, and fixes the issue for 13.0.
We also treat the case when custom_values is None (the default value),
and call the super method instead of just returning False.
Since saas-13.2, account.move.name is computed, so there is no default
value, and no need to specify it at the invoice creation.
closesodoo/odoo#49004
X-original-commit: 4a32716c0c57fe904e1aeea63926fb5b65e3516b
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: Paul Morelle <madprog@users.noreply.github.com>
Since Bootstrap 4, a popover object does not have an `option` attribute,
as it has been renamed to `config` instead.
This occurrence must have been missed out when we migrated.
closesodoo/odoo#48911
X-original-commit: 662dd304d5a46a028ce74864076361865d759080
Signed-off-by: fja-odoo <fja-odoo@users.noreply.github.com>
When a random survey does not use all the questions available in a page
because of the random_questions_count field, _get_answers_correctness
was still including them in the skipped category.
This commit ensures that those questions are not included in the result,
and adds a test that checks it.
closesodoo/odoo#47362
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
X-original-commit: 4df43478979766112ae70624deae9c25f40a3349
Since ae6545ccd5 in 11.0, reconciliation
model buttons were wrapping and were scrolling vertically when more than
three lines were shown.
Since the change to bootstrap 4 in 12.0, however, the reconciliation
model buttons were not wrapping any more, and were scrolling
horizontally.
This commit restores the previous behavior, which can display more
buttons before any scrolling is necessary.
closesodoo/odoo#47828
X-original-commit: 0c4195f2c2eec7589ed79a21fbbe089a75c6209f
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: Paul Morelle <madprog@users.noreply.github.com>
MailThread._mail_search_on_* was obviously never called with an
extra_domain yet, or it would have raised an exception: expression.AND
expects only one argument, with the list of expressions to AND, and here
we were passing them as *args.
closesodoo/odoo#47585
X-original-commit: b20c5350c4d0e0e140f8824e6f5d2a0009af9810
Signed-off-by: Paul Morelle <madprog@users.noreply.github.com>
* = website_crm_partner_assign, website_customer
Follow up of [1] which still had a misalignment for logos higher than large
(portrait), or logos smaller than 128px.
The layout of the related pages relies on the logos being exactly 128px for the
text following the images to be aligned.
There are two issues to fix:
- When images are bigger than 128px, due to incomplete migration at this time:
`o_image_128_max` is added to ensure they are not displayed bigger than 128px.
- When images are smaller than 128px, due to the original image being too small:
the parent element of the image is forced to the expected width of 128px.
The 128px width is actually not forced on the image itself but on the parent
of the image in order to:
- avoid a rectangular image (larger than tall) from using 128px height and
creating empty space when its height is actually smaller,
- and avoid images smaller than 128px to be scaled up.
Additional fix:
In "Our References" template, remove the `row` class on the container of
media elements, so that all media are always on their own line.
[1] 8748416b4d8ae4840d7738a0edf226f3240d97cb
closesodoo/odoo#47093
X-original-commit: 5e3242f904ddcee9cf660f13b446b88bead35777
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Before this commit, the IBAN number was showing behind the X or V of the
validator.
This commit adds a class on the input when the validator is added, so
that a padding is set on it. The result is that the IBAN text doesn't
show behind the validator any more, once it has been displayed.
closesodoo/odoo#46859
X-original-commit: 0b2c40dbe0df2802b6a1d2969b4e6651a750f928
Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
Since 12.0, the links on the login forms are no longer next to the
main button, but under it.
This commit reflects this change in the reset password form, which has
not been updated yet.
closesodoo/odoo#46798
X-original-commit: b71bf59d417983000592a226025637ee250c2bb8
Signed-off-by: Paul Morelle <madprog@users.noreply.github.com>
Use date_stop instead, and remove the instruction to remove the computed
field.
closesodoo/odoo#45669
X-original-commit: 3650adbac52d19ecc6265d90babeb6fc270d3ac2
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
Since wizards shall not be unlinked by anyone, but as we want to get rid
of this specific one immediately to get rid of eventual credentials,
do it with elevated privileges.
Before this commit, the behavior was an authorization error when trying
to applying the payment method, in a fresh invoicing configuration.
closesodoo/odoo#45363
X-original-commit: c8ee9c73d4ac9989d05843a32abc535b20d761b4
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
From Odoo 13.0, the list of answers of a user displays the name of the
answer itself, and not its parent's.
Answers created directly on a question are given a name, but answers
created from a comment are not.
This commit fixes this behavior for a better consistancy: all posts
should have a displayable name.
A migration step on saas~12.5 will populate from their parent's name
the existing posts that don't have a name.
closesodoo/odoo#45193
X-original-commit: 327079e97d12bf3bfcbc74e78bcc7ebc36149d02
Signed-off-by: Paul Morelle <madprog@users.noreply.github.com>
When a tag has a very long name, on a screen too narrow, the sidebar
overflows outside of the screen and a horizontal scrollbar appears.
By allowing the tags to wrap, the overflow does not occur any more,
excepted if there is a very long word. In that case, we truncate it.
Same goes in the short blog post template, excepted that the parent's
width is already specified.
closesodoo/odoo#44424
X-original-commit: a5ff42cefeb5e0fff4155d5ec0ff08e521bfebaa
Signed-off-by: Paul Morelle <madprog@users.noreply.github.com>
URLs with parameters were not correctly supported by the regular
expression.
For example, URLs with parameters were truncated before the '?'.
This patch adds support for a wider range of URLs, and checks in a test
that the parameters are correctly handled.
closesodoo/odoo#39762
X-original-commit: 616e145635eac06a0a44ab3d899f4a9e707b3ba8
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
When the product has a lot of variants which are displayed as checkboxes
or as colors, the jQuery selector was matching as many items, and the
event was triggered for each of them.
The result was the change event of website_sale being triggered many
times, where only one call would be enough.
The change replicates what was made on v12.0 on the same line by commit
f8dad1bb4b.
opw 2036356
closesodoo/odoo#35322
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
smtplib.SMTP API calls such as .sendmail() or .login() make sure on
their first line that this command is sent, by calling
.ehlo_or_helo_if_needed().
However, test_smtp_connection() does not use SMTP.sendmail() to simulate
sending email, or the email would really be sent.
Instead it uses the low-level API SMTP.mail() which does not make sure
that HELO was sent.
The connection test could be fixed by ensuring that this command was
sent to the server in the test method. However, this could lead to
inconsistent cases where the connection test passes whereas another
usage in the code fails because the command was not sent.
For example, someone could use the low-level API for some reason.
EHLO could have already been sent because if authentication is enabled
smtplib.SMTP.login() calls ehlo_or_helo_if_needed(). Therefore it is
correct to call it ourselves at the end of our connect() method.
STARTTLS sends a first EHLO, negociates the encryption, and leaves the
state without the second EHLO, which should still be sent to the server,
as stated by RFC 3207, in section "4.2 Result of the STARTTLS Command".
https://www.ietf.org/rfc/rfc3207.txtclosesodoo/odoo#34550
Signed-off-by: Julien Legros (jle) <jle@odoo.com>