Changes in rules of session storage for visitors (04e97266) prevented the list
of viewed slides to be updated for public viewers, ending in possibly unlimited
counts. Fixed by touching the sessions, with a small performance improvement
"en passant".
See Odoo#86015
Task-2878900
closesodoo/odoo#93181
X-original-commit: 5b375d6c5e1f4a29add3976af7fd71600c7b4cda
Signed-off-by: Julien Castiaux <juc@odoo.com>
Searching for the product field of account move lines is something expected to be used frequently.
closesodoo/odoo#86910
Signed-off-by: William André (wan) <wan@odoo.com>
The aim of this commit is to make `get_lines_in_hierarchy` yielding the lines
in the same order even if 2 sequences are the same.
The additionnal diff correct the iteration to get it in the same order in copy
than in `get_lines_in_hierarchy`.
closesodoo/odoo#93156
Task: None
Pr-community: https://github.com/odoo/odoo/pull/93061
X-original-commit: decc29d59baee1398a4497097055a2332e2305d7
Signed-off-by: William André (wan) <wan@odoo.com>
In 7dd5437a65 the usage of imagelib was changed to match the one of
general fetchmail so the flag sent to IMAP server was (\Seen) and not
\Seen which is often accepted but not always.
From recent reports, it seems that the method `uid` and `store` may have
some difference (base on using message-id rather than UID) so this
commit is reverting 7dd5437a65 and using the parenthesis around the flag
explicitely.
opw-2853609
closesodoo/odoo#93158
X-original-commit: 550f9e77625a7917bffd693f18aafe10a04276c9
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Even though the release process changed a bit, it seems that only the
MINOR version number should be incremented in the master branch until
the next major release.
This avoid confusion when writing upgrade scripts, it should work in any
case and it leaves more room from process improvement.
closesodoo/odoo#93123
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
Follow-up of https://github.com/odoo/odoo/pull/76415
This commit mistakenly duplicated 2 tests, with exact same name
and exact same content that is being asserted.
This commit removes one of the duplicate.
closesodoo/odoo#93137
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Have Tax A and Tax B both configured with tax exigibility based on
payment
Have a Tax G set as group of taxes with A and B as childs
Make an invoice with Tax G on a line
Register a payment
The CABA entry will be generated without base line
This occur because the system checks for the base line tax exigility,
but the exibigility of a group of taxes is fixed to 'on_invoice' so we
need to check the value on the childs
opw-2858656
closesodoo/odoo#93131
X-original-commit: 766802c345aaae0d9d01ec17685e9742f27526e0
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
Steps to reproduce:
- Install ecommerce and the website_sale_delivery_mondialrelay module
- Publish the mondialrelay shipping method
- Go to the website shop
- Start a cart with an object that can be delivered (e.g. a table)
- Process to checkout
- Select mondial relay shipping method and a relay depot
- Don't click on Pay Now but go back to your cart and make it empty
- Add a non deliverable item to the cart (e.g. a warranty)
- Process to checkout and try to pay
Current behavior:
There is an error message related to mondial relay
Expected behavior:
There is no error message
Explanation:
The sale order keeps the partner_shipping_id even if it does not
contain any delivarable item. The mondial relay error message can
be sent for any order without checking that the order is supposed
is supposed to be delivered. To solve the issue we just add a
condition so that only orders with delivery can receive this message.
opw-2869883
closesodoo/odoo#93132
X-original-commit: 4cba0200f8915079e96284f215cbb97831e2d7d5
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Use of `addOrderline` presses the numpad, after clicking the product,
even if the quantity of the product being added is only 1. Because of
this, there might be a rogue press which calls `_updateSelectedOrderline`
at the wrong timing. This can be proven by looking at the screenshot where
the quantity of `Small Shelf` is 11, not 1. In this particular failing tour,
the sequence of steps properly aligned resulting to this runbot issue. To
make sure runbot isn't failing randomly, we replace `addOrderline` with
manual `click product` and `orderline check`.
Runbot: 3883, 3884, 3886
X-original-commit: 40aef1c4161f21801c1bbae823d9b5c46a035478
Part-of: odoo/odoo#93124
When using multiwarehouse, you can have moves that will be valuated on location A
and then moved to location B. In that case, the forecasted report of Location B
will have discrepancy because the move from A to B will not be valuated (internal move)
and the initial valuated stock valuation layer will still be linked to location A.
I change the way we retrieve the quantity using stock quants linked instead of
the svl.quantity linked to the selected location.
opw-2715253
closesodoo/odoo#93032
X-original-commit: a8a130e5b10aab3cb9eeedbf627b9a195cf7a253
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Reason: this fix is a patch for previous PR: https://github.com/odoo/odoo/pull/91009
As it should only depends on amount_delivery instead of fixed_price
Fix: clean the redundant condition and modify the delivery price
rendering in the else part
closesodoo/odoo#92965
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Crrently, 'parent task' stat button is visible even if the
'sub-tasks' feature is disabled.
So in this commit fixes the issue by adding the subtask group
on button.
task-2834743
closesodoo/odoo#93115
X-original-commit: cd7db331ae36ef2ecbb1b6795522cf469608c855
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
An error is thrown when trying to close a POS session in the Pakistan
localization
Steps to reproduce:
1. Install POS and Pakistan localization
2. Switch to PK Company
3. Go to Point of Sale > Configuration > Payment Methods and create a
new payment method with journal 'Cash'
4. Go to Configuration > Point of Sale and create a new point of sale
with sales journal 'Customer Invoices'
5. Open a POS session in the new POS and sell any item
6. Try to close the session, an error occurs telling you to close the
session in the back-end
7. Try to close the session, an error occurs and the message is
displayed
Solution:
Add a default POS account in the Pakistan module
Problem:
The function `_get_receivable_account` didn't find any account so it was
not possible to create the account move lines related to the POS session
opw-2857669
closesodoo/odoo#93113
X-original-commit: 77e62b56ce57edf621e4c7ed42d6b53a98fc044f
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
Before this commit, both the theme install* and upgrade flow would end
up calling the theme's `_post_copy()`.
The `_post_copy()` is in charge of enabling or disabling some website
options as ripple effect, language in footer, changing header template
etc.
From there, the user could later fine-tune its website and change those
options, altering what the theme chose during the install.
We don't want a later theme update to reapply the theme pre-selected
options and erase/revert the changes the user made after the theme
install.
This commit is then removing the call to `_post_copy()` on theme update.
Note that the `_post_copy()` is encapsulating the theme python code
which is supposed to only do some visual stuff like enabling a view or a
theme option.
Also, note that calling `_post_copy()` in a theme update will not only
re-enable/disable some views but that will create a de-sync between the
activated view and the scss value.
Indeed, for instance, enabling the hamburger menu view is not enough, it
should also be coming with a scss value change.
The mismatch between the template and the scss will lead to some visual
glitches / ugly result.
Calling `_post_copy()` when applying the theme for the first time
through the UI (the only way possible) will not create that de-sync
issue as that flow is resetting the scss value:
`_reset_default_config()` will be called through `_theme_remove()`.
* `theme install` does not refer to the module install
but the moment the theme is applied on a website, which is not the
same as themes modules behaves in their own manner. When a theme is
installed on the DB, it does nothing except creating fake records in
"standalone" tables, which will then be converted to real records and
applied on the selected website.
opw-2824045
closesodoo/odoo#93109
X-original-commit: 14387f36438b731753e2e7169f54865b123cdcfa
Related: odoo/design-themes#571
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
As we have more and more standalone tests related to the website app, it
has been decided with the runbot team to introduce a unique tag to
easily identify those tests.
The goal is to make the runbot build config easier to manage, without
the need to add the new tag name in the command.
Instead, this build will be fired by finding and testing all the
`website_standalone` tests.
The other tags are kept to easily identify what are the test related to.
Command without this (which need to be edited for each new tag):
```
--standalone cow_views,cow_views_inherit,theme_views,theme_upgrade
```
Now:
```
--standalone website_standalone
```
X-original-commit: a28c181b7f934bed06adccd2678d6c6db47422fe
Part-of: odoo/odoo#93109
Before this commit:
After the user checked the checkbox in the mail thread, a dialog create res.partner will be shown, the content of this dialog is not translated.
After this commit:
The content of dialog will be translated
closesodoo/odoo#93104
X-original-commit: 759275b913b599bedb2380ec3200671488bfc298
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Observed Behaviour
When assigning someone to a task (in project), the employee
will receive a link be email. If he opens this link in a
browser where he isn't already logged, he will be redirected
to the logging page and, after have successfully logged in,
he will be redirected to the Odoo mail module
Expected Behaviour
After a successful loggin, the user should be redirected to
the task view
Reproducibility
This issue can be reproduced with the following steps:
1. Connect as Mitchell Admin
2. Go to the project module
3. Create a new task and assign it to Marc Demo
4. Go to Mark Demo's email and open the related mail
5. Open the link in the mail in an incognito window
6. Log in as Marc Demo
Fix Description
The issue is coming from the fact that, when no user is
logged in and if the url isn't public, we redirect the
url to the connection page without ensuring we have the
correct redirection after the loggin. This is fixed by
editing the url to web/login?redirect= + target url
Related Issues/PR
opw-2802439
closesodoo/odoo#93091
X-original-commit: 0b9d49f33713fc2d5a76f25523f2d4bb5ddb3b44
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Steps to reproduce:
1. Delete the mail.template "Event: Registration Badge".
2. Go to any event.registration record.
3. Click on Send by Mail button.
closesodoo/odoo#93090
X-original-commit: 373a838d2df05b8be9a89a933b291492ba6052f0
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Improvements to the chatter in Knowledge after the first merge.
Fix the issue where the chatter would not render properly if a tracked file was
modified (this sends a message in the chatter and it was not properly
reloaded).
Prevent the full reload of the view in cases where only the chatter needs to be
reloaded. In Knowledge, if the param `keepChanges` is set to `true`, only the
chatter will be updated.
Update the style of the chatter button to add more contrast when the chatter is
toggled on. Added a minimal size for the width of the chatter in side mode so
that thread messages don't become too small.
Add `_mail_post_access = 'read'` to the model in order to allow
someone with read access to post chatter messages. This is useful when a private
article is shared with read only access rights.
Add an explicit message along with a tracked field change in case the change is
caused by a user which does not have 'write' access on the modified article.
Task-2858428
closesodoo/odoo#93088
Forward-port-of: odoo/odoo#91969
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Consider the following case:
- Article A
- Article B
- Article C
- User X has write access on B, but read access on C.
-> User X moves B so that it is now a sibling of A.
-> Since C is a child of B, it also underwent a change, which is caused by X.
To clarify this situation and the fact that X does not have write access on C, the
automatic field tracking message is made more explicit in this case (Changes of
C are a side effect of the changes of B).
Task-2858428
X-original-commit: e6af7c8c6a2eb37038742ce93018a8eb8cfbf6d6
Part-of: odoo/odoo#93088
If a private article is shared with someone which is granted 'read' access, that
someone could not post messages in the chatter.
This commit adds _mail_post_access = 'read' to the model in order to allow
someone with read access to post chatter messages.
Before this change, mail_post_autofollow was always activated with "send
message" in the chatter, and it could cause errors in the following case:
- A user has read access on a record whose model has _mail_post_access = 'read'
enabled. This means that he can post messages even if he can not edit the
record.
- If the user sends a message while mentioning someone, if mail_post_autofollow
is enabled, the server will try to subscribe the recipient to the thread even
though the sender only has read access to the record, which results in an
error.
After this change, the chatter will enable mail_post_autofollow only if the user
has write access on the thread.
Task-2858428
X-original-commit: 0c628d63b2d1b64c88c0e72513fad417070569d9
Part-of: odoo/odoo#93088
When the chatter is in side mode (lg+ sizes), its size can become quite small
(since it is proportional with the width of the viewport). Add a static minimal
width so that the display stays readable.
Change the border color of the buttons in the knowledge header so that when the
chatter is displayed, it has a better contrast (the chatter button is a toggle
on-off).
Task-2858428
X-original-commit: 7d07f6f52886d1d7b86fd008fab579ffd8e71702
Part-of: odoo/odoo#93088
Currently, when the chatter has to reload, it triggers a reload event for the
parent view. In the case of Knowledge, we want to be able to exclusively reload
the chatter because nothing changed in the article.
In Knowledge, if the param `keepChanges` is used with reload, the full form view
does not need to be fully reloaded. In this case, only the chatter will be
updated.
Task-2858428
X-original-commit: 91e268b580614da224f044061d01e69f09a5034d
Part-of: odoo/odoo#93088
How to reproduce
* Open an article and edit one of the tracked fields
(title, root_article_id, parent_id).
* Open another article
* Re-open the first article
* Open the chatter
Current behavior
The chatter does not appear.
Expected behavior
The chatter should appear.
Fix
Instead of loading the chatter with the form view, load the chatter when the
user clicks on the chatter button.
Implements the use of the chatter component differently from the
form_renderer in mail, to be able to update/render it independently from
the rest of the view.
Hide the chatter button if there is no article in the form view since there is
no chatter to display in this case.
Task-2858428
X-original-commit: b705ccf952cd67dad4f1480928c94cd7215b601a
Part-of: odoo/odoo#93088
Small reorganisation of the code to order functions alphabetically in
knowledge_controller and knowledge_renderer
Task-2858428
X-original-commit: 874dc4a93af72c706ff756b29af96f7030a3423a
Part-of: odoo/odoo#93088
*: website_blog, website_event, website_sale
The "website.snippet.filter" model introduced at [1] was not marked to
have its "name" field to be translated. As those names are shown in the
website editor panel to be able to select a filter, they have to be
translated.
[1]: https://github.com/odoo/odoo/commit/0e7640b5f22d2bea04bbe22d3189cff7e03af545
opw-2852416
closesodoo/odoo#93074
X-original-commit: fc9e5619331cf22f8605a72907153f9431ca6b15
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Specifications
- Handle the situation in which the quick access
link is used but the live session is not launched yet, by showing an
appropriate error message and by allowing a user with sufficient rights
to launch the live session directly from the quick access page.
- Make the live session's "go to" url in the presentation mode non-clickable
so that the presenter can not join the session as an attendee as it messes
up, and change the copy icon next to the url to a copy button, which is more
explicit.
Task-2816685
closesodoo/odoo#88434
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
PURPOSE:
Clicking the live session's "go to" url in the presentation mode now copies
the url instead of redirecting the presenter, to prevent him of joining the
session in user mode as it messes up.
Task-2816685
Part-of: odoo/odoo#88434
PURPOSE:
This commit allows to handle the situation in which the quick access
link is used but the live session is not launched yet, by showing an
appropriate error message and by allowing a user with sufficient rights
to launch the live session directly from the quick access page.
Since a session can be launched multiple times, the error related to
closed sessions has been removed, so that the user with the rights to do
it can also "relaunch" a session if it has been closed before.
Task-2816685
Part-of: odoo/odoo#88434
Currently, when the geolocation coordinates (latitude & longitude) of
the partner are not set, location for such partners is shown in the
middle of the sea (on /partners page).
With this commit, the coordinates are handled properly so that if they
are not set, instead of sending "0.0" to the map API, we now pass them
as a Falsy value, so that Geocoder API could use the available address
and locate such partners properly in the google map.
taskID-2819772
closesodoo/odoo#88622
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Guarded catch promotes bad patterns (using promise rejections as control
flow instead of as errors), as such, we should not use it in non-legacy
code. This commit reworks the exec method of the Mutex utility class to
avoid using it.
closesodoo/odoo#93081
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Purpose
=======
Hide the "Create Partner" button if we do not have the "create" access
right.
Do not offer to create a project if the current user can't.
Do not try to enrich if we can't create a partner.
The write access on the partner is checked on the record itself because
of access rules.
Task-2826471
X-original-commit: b678a9bc1298e9a1973074740a8c8a1d471b6848
Part-of: odoo/odoo#93058
In libmagic implementation, space before an SVG make it detected as SVG.
In odoo implementation, for the same case we don't detect it as SVG.
But in the test `test_guess_mimetype.test_mimetype_svg` we only check
odoo implementation behavior, so the test fail if module python-magic is
installed.
With this fix, the test is only run when python-magic is not installed.
opw-2746934
closesodoo/odoo#93056
X-original-commit: 8e38bfb38a3c1c3888d4f4efa1a13fa4cf6246bb
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Issue:
- Translation cannot be applied on account data.
- Replace icon with the one existing in the base module
- Add demo data
Cause:
Missing spoken_languages
Solution:
Add back spoken_lanugages
closesodoo/odoo#93030
X-original-commit: 2662c1788b2eb3d2c42f9c3142cf953d79a923af
Signed-off-by: William André (wan) <wan@odoo.com>
If you send an email from CRM and the address you are trying to send the
email to is not linked to a partner, a new partner will be created and
it will use the default_ fields in the context which may not be valid
for the partner
Steps to reproduce:
1. Install CRM and open the app
2. Trigger the list view of the pipeline
3. Select any opportunity with the email 'ErikNFrench@armyspy.com' and
click on 'EMAIL' in the top left
4. Give a subject to the email and select the template 'Welcome Demo'
5. Send the email
6. An error is thrown
Solution:
In res.partner's `default_get`, remove the `default_type` from
the default values retreived from the context if it's not a valid type
of res.partner
Problem:
Trying to create a partner with default_type in the context will try to
give this type to the partner but 'opportunity' is not a valid partner
type
opw-2827177
closesodoo/odoo#93025
X-original-commit: 2b023500d1cc2322adbc51dffda4342aba5032ef
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
When sending emails from CRM, you can save the mail as a new template.
Despite having selected the desired recipients, the mails sent will not
have any recipients.
Steps to reproduce:
1. Install CRM and open the app
2. Trigger the list view of the pipeline
3. Select any opportunities, go to Action and click on 'Send email'
4. Give a subject to the email and click on 'SAVE AS NEW TEMPLATE'
5. Send the email
6. Go to emails, there are no recipients for the emails generated
Solution:
Set the `use_default_to` to true by default when using the 'SAVE AS NEW
TEMPLATE' button
opw-2827177
X-original-commit: 1180b8cd9f0ed5bebdef97d702f29a5652fa6ac8
Part-of: odoo/odoo#93025
With some scanners, the barcode was not readable due to its size.
A 2 time width increase make the barcode width similar to the code width in text form.
OPW-2793423
closesodoo/odoo#92999
X-original-commit: d19517cf84baf979ee10e6796a6f9e093ab48485
Signed-off-by: Masereel Pierre <pim@odoo.com>
When going to quotations from a lead by clicking on a stat button, the
result we see can sometimes be inconsistent with the count of a stat
button (count can be higher than the quotation we see). This happens
because we set a default filter which shows quotations only for the
contact set on the current lead. However, even if the contact's
company is set on another quotations, we should see them since they are
considered for the stat button data.
This commit removes the default 'Customer' filter and thus allowing
also to see the quotation linked to customer's company. This does
not have any side effect because the default domain makes sure that
quotations we see are linked with current opportunity only.
task-2859354
closesodoo/odoo#91898
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
PURPOSE
This commit removes a few unessential content, fixes
misalignments and removes the input autofocus on mobile devices
SPECS
Remove a few unessential content
Some contents take a considerable space on mobile without adding
essential information, requiring the user to scroll to see useful info.
These contents are now removed on mobile devices.
Fix misalignments
Some parts were misaligned on small screens, taking unnecessary space or
cutting parts of sentences. These parts have been adapted to handle
small screens.
Remove the autofocus on the first input in survey forms on mobile devices
When a new page of a survey is loaded, the first input is autofocused so
that the user can directly complete the survey without manually getting
the focus. This causes inconsistencies and undesired behaviors on mobile
devices. Especially, when the focus is set automatically on Android devices,
the soft keyboard is opened, the viewport is reduced and the view is scrolled
to the input, which involves that the user misses information about the
survey (such as the beginning of the question for long questions), or
section descriptions. The autofocus has therefore been removed for mobile
devices.
Task-2622693
closesodoo/odoo#87990
Related: odoo/enterprise#26143
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
PURPOSE
This commit removes a few unessential content, fixes
misalignments and removes the input autofocus on mobile devices
SPECS
Remove a few unessential content
Some contents take a considerable space on mobile without adding
essential information, requiring the user to scroll to see useful info.
These contents are now removed on mobile devices.
Fix misalignments
Some parts were misaligned on small screens, taking unnecessary space or
cutting parts of sentences. These parts have been adapted to handle
small screens.
Remove action buttons related to live sessions on small screens
Since the presentation mode doesn't look good on mobile devices
(questions have a lot of linebreaks, arrows do not always work),
and since normally no one presents a live session using a mobile
device, the action buttons "Create Live Session", "Open Session Manager"
and "Close Live Session" are now hidden on small screens.
Remove the autofocus on the first input in survey forms on mobile devices
When a new page of a survey is loaded, the first input is autofocused so
that the user can directly complete the survey without manually getting
the focus. This causes inconsistencies and undesired behaviors on mobile
devices. Especially, when the focus is set automatically on Android devices,
the soft keyboard is opened, the viewport is reduced and the view is scrolled
to the input, which involves that the user misses information about the
survey (such as the beginning of the question for long questions), or
section descriptions. The autofocus has therefore been removed for mobile
devices.
Task-2622693
Part-of: odoo/odoo#87990
PURPOSE:
The 'o_survey_statistics_header' class has been added so that it can be
used as reference for template extension.
Task-2622693
Part-of: odoo/odoo#87990