With this commit, a failing tour will display more information in the logs,
which may be useful for debugging purpose.
- display full html instead of just the content of body
- display the 'content' flag of the step, which is very useful to see
which step failed
closesodoo/odoo#28863
When clicking on notifications "Late", "Today" or "Future" for the crm.lead model,
the search view called "crm.lead.search.lead" was taken instead of "view_crm_case_opportunities_filter".
and then the filters "Late Activities", "Today Activities" and "Future Activities" didn't
exist.
opw:1905722
closesodoo/odoo#28793
If a theme post copy wants to enable/disable a view, this is to
enable/disable a given functionality which is disabled/enabled
by default. So if a post copy asks to enable/disable a view which
is already enabled/disabled, we would not consider it otherwise it
would COW the view for nothing.
closesodoo/odoo#28772
This commit only re-indents the COW feature code and adds comments to
help understand its tricky parts. Also evaluate the 'no_cow' flag only
once per write.
closesodoo/odoo#28753
Install the accounting module, create a new payment for a customer
go to payment matching, reconcile the payment for the account
'Account recievable' and select a tax. There is a traceback
because of a incomplete implementation of the tax computation.
This commit complete the implementation and add the missing tests.
opw-1903172
closesodoo/odoo#28591
When creating a credit note from an invoice coming from a Sales Order,
only the "modify" mode links the refund lines with the sale lines. This
link make the invoiced quantity decreased on the sale line, which is
a willing behavior.
The 2 other modes ("cancel", and "create") does not do that link.
As the behavior of the "modify" mode was introduced as bugfix years
ago, it was time to clean that !
This commit
- extends the behavior to every mode: all refund lines are now
linked to their origin sale lines, so the invoiced quantities
are correctly applied
- clean the bricolage used to determine the invoice of the
sales order (`_get_invoiced` method) by avoiding searching
on the document source field.
- provides some tests. The old one was moved and extended.
Task-1859308
closesodoo/odoo#28471
As of 12.0, the `parent_left` and `parent_right` special fields previously
used to store the tree structure have been replaced with a single
`parent_path` field. See also PR #22558.
This merge fixes a crash in discuss, in addition to re-introduce some _quality of life_
features that have been mistakenly removed from the chatter and from chat windows:
### 1. No crash when searching messages
This was caused by the addition of moderated channels. In short, fetching twice
the same message was performing a re-render of the thread due to a mis-consideration
of a moderation status change. When the fetch reaches the fetch limit, the re-render is
considered as a "load more" fetch, which only works when there is at least one message
registered for the current search.
This is fixed by re-render when there is a change of moderation status only.
Task-ID 1910180
### 2. Easily mention followers and employees in chatter
When mentioning a user from the chatter in a document, it was always
fetching all partners in a arbitrary order. As a result, it was hard to mention
followers and employees.
This is fixed by re-introducing the previous behaviour on mentions, which
groups them by followers, then employees, then all partners.
Task-ID 1910111
### 3. Show message document link in chat window
When a message is linked to a document, it usually shows a
link next to the message. This still works in the Discuss app,
but not in chat windows.
This erroneous regression was caused by a refactoring.
This is fixed by re-introduced document links on messages in chat
windows.
Task-ID 1910119
closesodoo/odoo#28744
For a SO of 300 lines, when confirmed, it takes 195s to process stock
moves for the SO, which is an insane amount of time for any kind of
process in Odoo.
This happens because stock.move is a heavy model with lots of fields,
prefetching all these fields at once can hinder performance when
processing a lot of stock.moves.
To reduce the processing time, the prefetching is disabled in the
specific scenario of processing stock moves and pickings on SO
confirmation.
This patch increases the performance of SO validation (with stock
installed) by ~30%.
Pre-patch: 195s (300 SOL)
Post-patch: 135s (300 SOL)
closesodoo/odoo#28835
With the purchase module, when you create a new vendor, you can
select what variant of the product the vendor sells. The droplist
has the "Create & Edit" button to quickly create/edit variants.
This is not the wanted behavior. This PR removes the "Create & Edit"
suggestion.
opw-1909009
closesodoo/odoo#28845
related to: #28446
On a pure list view, click on a column to sort the records by that field.
Save the filter as favorite
Reload, now apply the filter
Before this commit, there were two issues:
1. The order of the list was never propagated to search view, which couldn't save
the filter with its attribute "sort"
2. There was no mechanism to load the attribute sort from a loading Filter
After this commit, those two issues are corrected
Unfortunately, complex search view flows are not testable in v11.0
OPW 1906968
closesodoo/odoo#28766
The POS js tests expect the "Public Pricelist" when
selecting a lambda customer in the pos interface.
Nevertheless, when installing a localization
with a specific currency,
other than the currency of the public pricelist,
it creates a new pricelist called
"Default %(currency)s pricelist for %(company)s"
and sets it by default for the customers sale pricelist.
See
https://github.com/odoo/odoo/commit/787e1037cdca48fe361ae65d790056a3d57e6b67#diff-840bfc6fc7a986fbf0e248c83d2ac1d5R57
Therefore, in the POS js tests, the pricelist selected
when selecting a lambda user was no longer
'public pricelist' but the one mentioned above,
and the tests therefore failed.
The issue is solved by creating a dedicated "Public Pricelist"
for the purpose of these tests, and sets it by default
for the customer sale pricelist,
as well as for the pos config default pricelist.
The test case was to install `l10n_pe` with `point_of_sale`
while activating the test.
e.g. `-i l10n_pe,point_of_sale --test-enable`
opw-1890928
opw-1910249
closesodoo/odoo#28839
- Configure the company in USD
- Set-up the POS in EUR:
Pricelist in EUR
Payment journal in EUR
Sales journal in EUR
- In the POS, sell a product (in EUR)
- Validate the session and post entries
The entry amounts are the EUR amounts, but they are posted in USD.
Long story short: nothing was foreseen to convert the amounts in the
appropriate currency.
Fixes#27175
opw-1904146
opw-1910248
closesodoo/odoo#28785
Implement the getter method in plain SQL. This makes reading company-dependent
fields 33% faster (on 20000 partners, reading 'property_product_pricelist'
takes 3700ms instead of 5500ms.)
closesodoo/odoo#28769
In the case of a One2many list view in a `<group>` tag, the 'External
Link' button of a Many2one field (which allows opening the form view) is
not visible.
The `flex: 1 0 auto;` should not be applied in the list view.
Corresponding PR in v12: #28741
opw-1903158
closesodoo/odoo#28812
Steps:
- open a modal form view from tree view first line and make a change
- open a modal from the second line and make a change
- open the second line back: the change were lost
In a given number of conditions (a many2one inside the form view, there
is a one2many in the form view not inside the tree view, ....) this
happened because:
- when we save the first line, we get onchange data for the second one
- this onchange data can't be applied before second line is loaded, but
it is saved so it can be applied if second line is ever opened
- when the second line is opened the saved change is applied => OK
- when the second line is opened a second time the saved change is
applied again, possibly overwriting posterious change => BAD
With this changeset, when the record with unapplied onchange is loaded
for the first time, the unapplied onchange is applied only once.
Added test without the change failed with:
- only 1 turtle for second partner (result: 0 not 1)
- second partner turtle is Michelangelo (result: "" not "Michelangelo")
opw-1846820
closes#28644
Revision on https://github.com/odoo/odoo/commit/299ebb2cdf63de2e3967da0d2f3e7effd239812b
The commit above added the notion of moderation, which
requires re-rendering the thread when a message has its
moderation changed (i.e. the message is deleted on reject
or is no longer marked as 'pending moderation').
However, this condition was triggered even when the
moderation status on the message has not changed.
This introduced a crash when using the search in discuss:
- Access a channel with more than 30 messages, so that
not all messages have been fetched.
- Search messages in this thread so that it displays more
than 30 messages, and the last message of those has already
been fetched.
> It crashes with "Cannot read property 'getID' of undefined".
The bug comes from re-fetching messages: it behaves as a
"load more" fetch, although no message has been stored yet.
A "load more" fetch requires at least one message in order to
determine the minimum message ID to fetch, thus the crash due
to having no message to get such an ID.
Here's the explanation why it fetches with load more:
when performing the search and fetching the same last message,
it will detect that it has already been fetched. Its moderation
status is 'accepted', and it will assume a change of moderation
status. This will trigger a fetch and render of the thread.
At this moment, if the search exceeds the fetch limit, not all
messages will be fetched, so that this fetch is considered as a
"load more" fetch.
This commit fixes the issue by only re-rendering the thread
when there is a change of the moderation status on an already
fetched message. Since changes of the moderation status are
handled by means of the longpolling, it should be rare to run
into the case of having a change of moderation status on a
message while using the search on a thread.
Task-ID 1910180
Revision on https://github.com/odoo/odoo/commit/cd34f6de727d5b3858420cff3c9d3c5995c4e75c
The commit above consisted of refactoring the JS mail module.
A small regression was introduced on messages linked to a document
from a chat window: it was no longer displaying the link to redirect
to the document that this message originates from. This issue was
only isolated to chat windows: it was working fine in the Discuss app.
This commit re-introduces the displaying of the document link on
messages from chat windows.
Task-ID 1910119
Revision on https://github.com/odoo/odoo/commit/cd34f6de727d5b3858420cff3c9d3c5995c4e75c
Resulting of the mail JS refactoring, the list of prefetched suggestions
has been changed as follow:
- before: list of list of mention suggestions `{Array<Object[]>}`
- after: list of mention suggestions `{Object[]}`
The change resulted in wrongly thinking that wrapping the list of
suggestions in a list was pointless, thus simplifying it as a simple
list of mention suggestions.
However, because of this change, it has become much harder to
mention employees and followers of documents from the chatter:
it now always fetches all partner suggestions at all time, whereas
before it was suggesting followers, then employees, and finally all
partners based on the input of the user.
In fact, there was a purpose of using a list of list of prefetched
mention suggestions, which is to group suggestions by "priority":
followers first, then employees, and all partners as a last resort.
This commit re-introduces prefetched mention suggestions as a list
of list of partners, so that it re-becomes easier to mention
followers and partners of a document from the chatter.
Task-ID 1910111
- Suppose a bank statement line with partner_name = x and partner = None.
- Create a reconciliation model with write-off suggestion and auto-validate = True.
- Open the reconciliation Widget.
- Check the lines created automatically: The partner_id is missing.
- Suppose a bank statement line with partner_name = x.
- Create a partner with name = x.
- Open the reconciliation widget: The partner is set by default thanks to this commit.
- This commit prevent to send notifications to inactive users.
- This fixes a bug where two partners have been merged and one of its
users is archived.
If one of the two users is inactive the code might use its `notification
type` preferences instead of the active user's one.
closesodoo/odoo#28730
The query was computing the count for all mailing lists, not just the
one being requested. This prevents optimizing the SELECT with indexes.
In addition, using a subselect for the blacklist forced a full table
scan on the contacts - switching to a LEFT JOIN avoids that.
With a blacklist of a few hundred thousand entries, and a table of
mailing list contacts in the same order of magnitude, this brings the
SELECT from 3+ seconds down to 3 milliseconds - with the same result.
Bonus: no need to perform the regexp extraction of emails to test for
NULL values -> substring(x) is NULL iff x is NULL.
When a bounce is received, we look for matching partners in order to
increment the bounce counter. However by using [`ilike','email`] we carry
the risk of matching emails that contain the bounce email:
['email', 'ilike', 'john@hitmail.com´]
will also match 'random.john@hitmail.com' for example.
Using strict equality is safer, and the worst that can happen is that
we fail to count one bounce.
This field is a dependency of some computed fields, and has to be searched on
for triggering recomputations. Without the index, the creation of stock moves
becomes slower as the table grows.
closesodoo/odoo#28757
set barcode_nomenclature_id as required field
barcode nomenclature must be required because the pos session needs it
to be able to work properly. Without this scanning barcodes will always
give an error.
closesodoo/odoo#28750
The documentation on JS testing was almost completely useless. With the
introduction of our new test utility functions, it is time to document
properly how the testing system works.
closesodoo/odoo#28834
hr_payslip_line was inheriting from hr_payslip_rule which meant that we
were copying useless data from the rules on the lines (namely the
computation rules which are only used in _compute_rule on
hr_payslip_rule).
closesodoo/odoo#28711
Add a mixin that can be used to store a normalized version of the primary
email address of the parent model. The email_normalized field can
than be used on that model to search quickly on emails (by simple
comparison and not using time consuming regex anymore)
Apply the mail.address.mixin on blacklist mixin. So that every model
inheriting the blacklist.mixin will also inherit the address.mixin.
That simplify also the comparaison to - and the searches on - the
blacklist.
Use the email.normalized from mail.address.mixin to get always a normalized
email address in the unsubscribe link. That allows to simplify the search
on email address in the controllers -> Check blacklist, send feedback, etc..
This merge is linked to task ID 1896677
closesodoo/odoo#28205
_primary_email was an array to be able to use it directly in the
depends. Typically a 'depends' with a computed value (lambda) needs
an array. Otherwise, it will only take the first character of the
field name string.
By setting _primary_email as a string, the lambda should always get
an array. But it simplifies a lot the usage of the _primary_email.
also, having an array was confusing as we could think that more than
one field can be considered as the primary email. This is not the
goal hare. So having the _primary_email as a single string is more
'self describing'. Only one field should be the _primary_email.
To avoid sending mail to an opted-out mass_mailing_contact with email address
that is not strictly an email address (a <a@a.com> instead of a@a.com),
the the get_opt_out method must be adapted to use the email_normalized field,
as this method is only useful for that specific model.
Task ID : 1896677
Use the email_normalized from mail.address.mixin if available to get always
a normalized email address in the unsubscribe link. That allows to simplify
the search on email address in the controllers -> Check blacklist,
send feedback, etc..
Task ID 1896677
Apply the mail.address.mixin on blacklist mixin. So that every model
inheriting the blacklist.mixin will also inherit the address.mixin.
That simplify also the comparaison to - and the searches on - the
blacklist.
Task ID 1896677
This Mixin can be used to store a normalized version of the primary
email address of the parent model. The email_normalized field can
than be used on that model to search quickly on emails (by simple
comparison and not using time consuming regex anymore)
This commit will be usefull to simplify the email address comparison
in the blacklist mixin but also for any models storing non normalized
email address.
Task ID : 1896677
Rev. 7c3d5dc0 recently added new helpers to use in the tests, and
moved some existing helpers to testUtils sub groups (like .dom or
.mock).
This rev. adds a compatibility layer to ease forwardports.
closesodoo/odoo#28824
During the refactoring of the js test suite, in abf32b8b, the
click_everywhere test was inadvertently updated to use the helpers.
Some missing semi-colons were fixed too.
closesodoo/odoo#28820
This module only adds an action allowing to send some invitations to surveys to
leads. It is safer to go through the survey module especially that its use is
about to be improved.
Commit linked to task ID 1910982.
closesodoo/odoo#28801