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
* im_livechat, test_event_full, website_blog, website_crm,
website_event, website_event_track, website_event_track_quiz,
webite_livechat, website_sale
There is 6 main changes in this commit:
1. Using raw SQL Upsert instead of the ORM methods. While raw SQL should
generally be avoided, it makes sense for such a low level behavior which
is impacting every flows.
Indeed, tracking visitors is a generic behavior done on all pages and
controllers. It is important to optimize it to reduce processing time
and SQL Queries.
Benchmark of that change alone:
> Rendering a tracked page improves from ~19.5ms to ~17ms (using `ab`
with 1000 loop) and the requests involved in the tracking process are
reduced from 8 SQL Queries to 3:
- 1 request to upsert the visitor
- 1 request to fetch the visitor data
- 1 request to add the tracking record
2. Adding in that upsert query the `visitor.track` insert, creating both
records in one go, bringing the query count from 3 to 2.
3. Refactoring of the `parent_id` behavior that was introduced in stable
with [1]. The purpose was to keep track of multiple visitor linked to a
same user to merge the tracking together. Especially useful for tracking
a same visitor on different devices (when logged in).
Only one visitor was kept as active, others would be archived and their
tracks would be set/moved to the main partner.
Removing those duplicate visitor was not possible because those archived
duplicated visitor were holding the devices notification push token.
Since [2], those token were moved to their own table, all related to the
main visitor.
We can then now safely remove those duplicate visitors after merging
their track to the main visitor. Thus, the `parent_id` field is no more
useful. Removing it removes a layer of complexity.
Note that thanks to this part, the `active` field can also be removed.
4. Deeper functionnal change, inspired from Plausible: The access_token
is no more stored in a cookie but is the result of a hashing method
based on <IP Adress, User Agent>.
The reason behind that change is that, in an upcoming refactoring,
sessions won't be stored anymore unless absolutely needed (login, add to
cart..). It will also ship a no cookies policy, trying to get rid of all
cookies.
This change is bringing some functional changes:
- Since the IP is included in the hash to generate the token, it means
that:
A. If an anonymous user switch IP (eg from 4G to wifi), it is
considered as a new visitor.
B. If 2 anonymous users with the exact same user agent (same browser,
same browser version, same exact os or phone) are on the same IP,
those will be considered as the same visitor.
- Since the request host is not included in the hash, it means that
visiting a DB from 2 differents URLs (domain and/or ip) on the same
device and same browser will result in a shared visitor.
It shouldn't imply any issue as this is A. not wrong and B. mostly
used for tests.
As all this is only related to non logged in user, it shouldn't be a
real issue as anonymous visitors are not supposed to be meant to be
business critical, even if we use them for "a bit more" than simple
analytics data.
5. The access_token is now replaced by the partner_id once the user logs
in, so:
- We don't need to either search on the partner_id field or the
access_token field (depending if the user is logged in or not), we can
only use the access_token row/field to do both.
- On logout, everything works out of the box as the access_token will be
regenerated since there is no partner_id anymore.
- On login, if an access_token matches the user's partner_id, that
visitor is returned.
If there is no such token, a new visitor is created for that partner_id.
In both 2 cases, tracks are moved to that visitor and the anonymous
visitor is removed.
- We can remove the code that was in charge of checking if the
access_token / visitor cookie was wrong (coming from another user eg,
different user login on same device). Indeed, such collision is not
possible anymore as the access_token automatically match the logged in
user.
- We can remove the code that was in charge of checking if the
access_token / visitor cookie was wrong (coming from a logged in user
while the current visitor is not loggedin). Such collision is not
possible anymore as the access_token is (re)generated as an anonymous
token (hash) when not logged in.
6. There is no more check to prevent a track to be created if there was
already a track for that URL in the last 30 minutes.
While this can easily be re-introduced (one CTE on the upsert), it was
adding ~100ms (from ~20 to ~110ms) to the request on a big database as
Odoo where there is ~100 millions tracks and ~100 millions visitors.
It has been validated that it was not a real issue as it is not
fundamentally wrong. If a visitor visited 20 times a product or a
specific page in that short amount of time, you might want to know that
because the user is most likely interested by it.
Changes (1+2), 3, (4+5) and 6 are all independant from each other and
could have existed on their own.
[1]: https://github.com/odoo/odoo/commit/c6b8a44b970a46dcd87a4e2cb1ad52fa340b209f
[2]: https://github.com/odoo/enterprise/pull/16781/commits/f75090fe8b42484e89e933976e8441d2f5eb9415
task-2867045
closesodoo/odoo#87857
Related: odoo/enterprise#28004
Related: odoo/upgrade#3566
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Before this commit, every visit on the website would create a visitor
and tracks, including visits from bots and crawlers (e.g. google bot).
Now, we prevent that as it doesn't bring any value to track those bots.
Note that it means there won't be any track created if you are using
tools like `ab` for perf investigation or `curl` commands.
task-2867045
Part-of: odoo/odoo#87857
Follow-up of
https://github.com/odoo/odoo/pull/92896
Task-2871688
PR above introduced PopoverManager, but forgot to include it in the
public discuss view. As a result, no popover view were working.
For example, clicking on the Emoji button in the composer was not
showing the emoji list in a popover view.
closesodoo/odoo#92950
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Recurring entries are created using the 'auto_post' selection field
- 'no' for regular entries
- 'at_date' for non-recurring auto-posted entries
- 'monthly', 'quarterly', 'yearly' for recurring auto-posted entries
Auto-posted entries can also be posted manually.
For recurring entries, the next one is created upon posting.
See : odoo/enterprise#27798
See : odoo/upgrade#3543closesodoo/odoo#92348
Task: 2855545
Signed-off-by: William André (wan) <wan@odoo.com>
- Properly compute the free product quantity.
- Free product that generate points not based on quantity
- Same free product from different rewards
- Proper timing of the reward button highlight. If there are products
that are potentially free product when added, then the reward button
is highlighted.
- Don't reorder free product reward lines. Before, if there are multiple
free product rewards, the lines are reordered at each ui action.
- Loyalty points are computed properly, at least when free products are
involved.
- Introduct some tests to protect the fixes.
closesodoo/odoo#92809
X-original-commit: 3e954d26b7e1e5c41c4f5372010f0573c9adcfe9
Signed-off-by: Masereel Pierre <pim@odoo.com>
Bug
===
Since 9c1cdd330e we ignore all incoming
email sent by mailing lists.
They are real use case when people want to be able to receive email
from mailing list (e.g. if they subscribed to an automated service,
or if someone is in leave and has done a auto-replier for that, etc).
Add a model to whitelist some email address. The alias limit
does not apply for those emails.
Task-2862092
closesodoo/odoo#92015
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
- Refactor the bank reconciliation widget to use more standards views and have a side-by-side kanban/widget views instead.
- Make sure the bank reconciliation widget is doing the same thing as the "reconcile" method on account.bank.statement.line. Then, what you see on the view is exactly what you get on the corresponding journal entry.
- Since the "reconcile" method is gone, clean the matching rules since it's now called only for one statement line at a time. Also, move the auto_validate feature into a CRON to avoid performance issues when opening the widget.
closesodoo/odoo#91448
Task: 2555114
Related: odoo/enterprise#27360
Related: odoo/upgrade#3555
Signed-off-by: William André (wan) <wan@odoo.com>
Since 'check_number' is now part of the journal item's label, the account_accountant_check_printing module is no longer necessary.
Task: 2555114
Part-of: odoo/odoo#91448
This is useful when you need to get the amount to fully paid something in advance, specially in multi currencies.
Task: 2555114
Part-of: odoo/odoo#91448
In some cases, we want to use the regular FieldMonetary widget (performing the amount rounding correctly) but without displaying the currency symbol since the currency code is displayed elsewhere.
This is needed because some currencies are using the same currency symbol like USD / MXN.
Task: 2555114
Part-of: odoo/odoo#91448
The use case is the following:
- Create a kanban view
- Customize it to open a form view on the right when clicking on a kanban card
- The form view is initialized using the context with a 'default_...' key to set a field.
=> Since the context is different every time, the 'load_views' rpc call is always triggered, leading to performance issues.
Task: 2555114
Part-of: odoo/odoo#91448
account.account: code was already in unique constraint
account.journal: inverting compound unique constraint to benefit from indexing company_id
hr.employee: user_id already in unique index
phone.blacklist: number already in unique index
stock.orderpoint: product_id already in unique constraint/index
closesodoo/odoo#92932
Signed-off-by: Fabien Pinckaers <fp@odoo.com>
Somehow the already translated term `Save` in french was translated
again from `Sauvegarder` to `Sauver`.
We already faced that issue when forward porting the tour as that
translation was not the same between versions, see [1].
The tour should be adapted to create a new fake language and some
translations for it (the ones being checked in the tour) to make it more
robust and not impacted by the real translation from transifex.
It would also makes the test faster as it wouldn't have to load a real
language which has a lot of translations.
As this is blocking and preventing any r+ in saas-15.3 a day before the
saas-15.4 freeze/release, this quick fix is introduced in the meantime.
[1]: https://github.com/odoo/odoo/pull/84528#issuecomment-1041323974closesodoo/odoo#92938
X-original-commit: 594ac2c9651f27cc1623fcd5b916cb191241651b
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
This commit should be reverted once Chrome has been upgraded to v97+ on
Runbot.
closesodoo/odoo#92921
X-original-commit: abac4e9eb4be8e31f776d745ad1fd19a310c608f
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Since Chrome 97+ some assertions in a parseDateTime test was failing.
This commit adapts these assertions as the behavior in this browser
version is more sensible.
X-original-commit: 866133f5b292ae17b68e1e593cf4c9a29f7e8839
Part-of: odoo/odoo#92921
1. Remove useless props category on component `ChannelMemberListCategory`
2. Make fields of model `DiscussSidebarCategory` more declarative,
i.e. by defining values from compute of field rather than imperative
code somewhere in the code of discuss.
3. Introduce a new model `PopoverManager`, which eases use of `PopoverView`s
as they are automatically added in the DOM in a similar way than `Dialog`s
with `DialogManager` or `ChatWindow`s with `ChatWindowManager`.
Doing so also make these popover view no longer deep child in component tree:
this fixes an issue in which popover views could be cut due to DOM tree.
Task-2871688
closesodoo/odoo#92896
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Access `/web/image/82303?height=16`, traceback because the placeholder
image cannot be resized to `"16"`.
closesodoo/odoo#92891
Signed-off-by: Julien Castiaux <juc@odoo.com>
There was a problem loading the demo data, because at the
installation of the CoA, the document types had not been loaded
yet. By changing the order in which the files are loaded
in the manifest, we make sure that the when we upgrade the demo
data to Ecuadorian standards that the right document type is set.
(as it will be there because it will be loaded before the loading
of the demo data)
closesodoo/odoo#92889
X-original-commit: a641cfb470c5454a8772851f1f9c6c0271b23774
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Josse Colpaert <jco@odoo.com>
We need to complete the onboarding of Stripe connect or
record the secret key
Actually there are not a direct link to payment from POS
So we add a link from the Stripe payment method to Stripe view form
closesodoo/odoo#92869
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
Small changes to show and hide some fields by default,
and add some in the view.
task-2855459
closesodoo/odoo#92852
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Improvements to the account move form:
- "Reconciled Entries" button -> "Reconciled Items", and goes now to the
Journal Items list view grouped by Matching number
- Removed the unwanted margin next to the "Journal Items" table (in the
"Journal Items" tab)
- the partner can be hidden, in the Journal Items list view
task-2855459
Part-of: odoo/odoo#92852
Improvements to the Journal Items list view:
- readonly set on multiple fields
- hide/optional show by default on multiple fields
- "Tax Grid" string set on tax_tag_ids for more clarity
- Added multiple fields to the "simple" list view for more consistency
with the grouped list view
- Added an edit button on some "group by" lines to edit the
corresponding field
- Removed the Revert and Duplicate button from the "grouped by" view
(on the group by line)
- Added a button to open the corresponding Journal Entry, and removed
the Journal Item form access. The Journal Item form should not be
accessible anymore.
- Show the total sum for Balance
- Added the "Tax Grid" group by
task-2855459
Part-of: odoo/odoo#92852