If multilocation is active then display 'source' location in tree views.
Also in tree views rename the source location to 'From' and destination location to 'To'
Task #1872294Closes#26380
Purpose of this commit:
Currently warehouse is showing in sale order even if user has no rights for multi warehouses.
After this commit:
User can access warehouse on sale order even if we have enabled multiple warehouses.
This commit is related to task_id : 1896087.
closesodoo/odoo#28021
This commit is change the name of deliverd quantities to received quantities in invoicing policy in settings of purchase module
This commit is related to task ID :1871494
closesodoo/odoo#27147
This commit is the community commit linked to an enterprise improvement of
marketing automation. In this commit we simply improve display of UTM
information on mass mailings.
This commit is linked to task ID 42548 and PR #28500.
Co-Authored-By: Kishan Gajjar <kig@odoo.com>
Co-Authored-By: Thibault Delavallée <tde@odoo.com>
Purpose of this merge is to clean survey tests and add some more. This
merge holds several commits that
* create a common file holding test data and tools methods to create
questions, answers and answerlines as well as implemented some custom
assertions;
* clean exiting tests by removing tests about implementation details and
unnecessary code;
* expand tests by adding a functional test using survey routes and
controllers;
This merge is linked to task ID 1911238 and PR #28831 .
Purpose of this commit is to add a test working with routes and controllers
that check the flow of people going through the portal to fill surveys.
This commit is linked to task ID 1911238 and PR #28831.
Purpose of this commit is to clean existing tests in survey. This commit
* removes unnecessary tests checking that basically create / write correctly
works;
* removes tests based on implementation details;
* cleans tests for validation and answer creation to make them more easier
to read and understand;
* moves invitation tests into their own file;
Some helpers methods are added in common.py to ease question and answer
creation.
This commit is linked to task ID 1911238 and PR #28831.
Purpose of this commit is to add some prepared data in survey common test
file. We also add some tool methods in order to easily create new questions,
answers and answer lines. Some specific assert methods are also added to
avoid noise in tests and avoid having to duplicate some check and assertions.
This commit is linked to task ID 1911238 and PR #28831.
Purpose of this commit is to clean a bit survey test files before updating
them and creating new tests. In this commit we add a common file holding
user creation and we use the recently-introduced tool method to create
test users. Survey test class is done child of SavepointCase to use
breakpoints and avoid recreating data at each test.
Future commits will gradually remove unnecessary content for test_survey.py,
rewrite part of it to be easier to understand and add new tests.
This commit is linked to task ID 1911238 and PR #28831.
Purpose
=======
Allow to create a leave type for which leaves are not required to be approved
by a manager.
When a leave is created, it is automatically approved if the
validation type is set to "No validation".
It is useful if a manager does not need to manually approve some leave types.
Specification
=============
Add a validation type option for 'hr.leave.request': 'no_validation'
Automatically approve the leave when created and add the approver as follower
so that he can be notified about the leave creation/validation.
closesodoo/odoo#28268
- Improved the form and list views of snailmail.letter objects,
- Added menus to access the letters from the account app,
- Manage invalid address on the partners when trying to send a postal letter
This merge is linked to the task ID 1892473
closesodoo/odoo#28057
- The price of sending a letter was displayed in the currency of the company, now we express the price in terms of stamps
- Show a different message in the modal depending on the validity of the address
Add new form and tree views for snailmail.letter available in Accounting > Configuration > Management > Snailmail Letters
Add a many2one field to snailmail.letter to link to a mail.activity in case of an error with snailmail
Task #1892473
Purpose of this merge is to clean survey composer model. It currently
inherits from mail.compose.message which also inherits from mail.message.
That means a lot of fields and behavior coming from both models are present
on the survey composer. Most of them are not necessary as
* send_mail method of mail composer is overriden and super is not called.
Nothing from the complex behavior of mail.compose.message is used;
* templates are just basically supported in survey, notably mass mailing or
mass posting mode are not used;
* methods from mail.message should not be available on survey composer;
* most m2m fields coming from mail.message and composer have no use here;
In this merge we simply add the required fields and template behavior on
the survey composer and remove inheritance on mail.compose.message.
In this merge we also rename survey.mail.compose.message to survey.invite
as it simplifies code and is easier to understand.
This commit is linked to task ID 1909804.
closesodoo/odoo#28783
Purpose is to have a somehow cleaner name for this wizard as its purpose
is to send invitations. Email and composer are details on how it works.
This commit is linked to task ID 1909804 and PR #28783.
Purpose of this commit is to clean survey composer model. It currently
inherits from mail.compose.message which also inherits from mail.message.
That means a lot of fields and behavior coming from both models are present
on the survey composer. Most of them are not necessary as
* send_mail method of mail composer is overriden and super is not called.
Nothing from the complex behavior of mail.compose.message is used;
* templates are just basically supported in survey, notably mass mailing or
mass posting mode are not used;
* methods from mail.message should not be available on survey composer;
* most m2m fields coming from mail.message and composer have no use here;
In this commit we simply add the required fields and template behavior on
the survey composer and remove inheritance on mail.compose.message.
This commit is linked to task ID 1909804 and PR #28783.
In the following commit (744de4e) we introduced some floats as keys
to Selection fields (namely request_hour_from and request_hour_to)
This lead to the ORM creating a column of type int4 to store this
field which rounded the values.
In order to fix that faulty behaviour, we change these keys into strings
and then convert them to floats.
closesodoo/odoo#28891
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