With the discuss refactoring, two memory leaks were introduced:
- the activity service opens a broadcast channel for cross-tab
communication. Because services have no destruction mechanism, the
broadcast channel is never closed, and since most tests create their own
test environment with services, each test would leak an instance of the
activity service as it is captured by the bound onmessage function. The
activity service holds a reference to the mail store which results in a
large leak
- the RelativeTime component creates a timeout so that it can update its
time every minute or every hour depending on how old the message is,
this timeout is cleared when the component is destroyed. This component
tries to initialize the value of its timeout to `null`, but it does so
*after* calling the method that actually sets the timeout, causing the
timeout to be overriden with null and never cleared
The BroadcastChannel problem has been solved by adding BroadcastChannel
to the browser object, and patching it in the test setup code of web, as
it's a generic problem with BroadcastChannels. The timeout problem has
been fixed by simply reordering the lines so that we don't override the
timeout and it gets correctly cleared when the component is destroyed.
closesodoo/odoo#128768
X-original-commit: bd25f14d7a746fe48e09edea7ebb4aaa4634fbdc
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
The purpose of this commit is to review the responsiveness and spacing
of some settings that were visually broken.
The nested checkboxes were growing too much on smaller screens
making the content overflow.
This commit adapts these checkboxes settings to make them more readable
and consistent.
It also review the input that overflow similarly to nested checkboxes
such as the count of extra hours in attendances settings.
In 16.2 some SCSS was added to control field widget spacing on mobile,
however it was breaking the layout for the `.o_boolean_fields`.
Task-3113372
closesodoo/odoo#126347
X-original-commit: 80aa03e86bd47e6349a5fa69397857fdf6a8cc0b
Related: odoo/enterprise#43142
Signed-off-by: Tiffany Chang <tic@odoo.com>
Before this commit, when an item in discuss app is active or
mouse-hovered in dark mode, there was no indicator.
This is caused by `bg-200` being equivalent to `bg-view` in
dark mode, therefore the active items were not visually distinct
from the background.
This commit fixes the issue by keeping `bg-200` in white mode, but
this becomes `bg-100` in dark mode. That way, active items are
slightly highlighted as they should
closesodoo/odoo#128767
X-original-commit: d66db4aa257984ae984d3207819c2a23b0f6897c
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
The method 'add_member' has 'partner_ids' as a optional parameter , but
the thing is the test 'test_attachment_hijack' is only passing it as a
single ID off res.partner record. Let's say if somewhere we overide this
method and write something like
self.env['res.users'].search([('partner_id', 'in', partner_ids)]) , it
will fail because 'partner_ids' should be a list.
closesodoo/odoo#128759
X-original-commit: 75cb1266afa8b921f8d0ca153f5d05ad47c9b14c
Signed-off-by: Vranckx Florian (flvr) <flvr@odoo.com>
Translate Welcome Bot's messages according to the language of the
frontend.
closesodoo/odoo#128745
X-original-commit: 68fca3cc6a62adf418c516f28a6b29e235475b5f
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
On a products category page, there is an element ready to host a heading
but it's not explicitly marked as unremovable so when the user tries to
remove any snippet inside it, the heading host is removed as well. This
fixes it by using the `isUnremovable` utility function instead of simply
checking for the `oe_unremovable` class.
Steps to reproduce the issue this commit fixes:
1. Go into the website module
2. Click "Shop"
3. Click "Furnitures"
4. Click "Edit"
5. Drop a title block in "Drag building blocks here to customize the
header for "Furnitures" category."
6. Click the trash bin on your snippet to remove it.
It doesn't get removed. Well now it does.
task-3383348
closesodoo/odoo#128744
X-original-commit: d1836d2830d098e2c29cca2643b0b354859daeca
Signed-off-by: Antoine Guenet (age) <age@odoo.com>
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Each order does necessarily have the same confirmation template.
And `_get_confirmation_template` is `ensure_one` so it raises when self holds multiple records.
closesodoo/odoo#128743
Forward-port-of: odoo/odoo#128551
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Versions:
---------
- 16.0
Steps to reproduce:
-------------------
- Create a new Purchase Order.
- Set the Vendor to a brand new contact.
- Add a product that would be delivered.
- Confirm the PO, set the Expected delivery date in the past.
- Notice that on_time_rate and on_time_rate_perc are both -1.
- Process the delivery.
- Now on_time_rate is 0 but on_time_rate_perc is -1 still!
Issue:
------
The field OTD is -1 even when On-time delivery is 0
Cause:
------
The issue is happening because if po.on_time_rate == 0 the value
Is set to -1.
Solution:
---------
Modify the condition to ‘po.on_time_rate >= 0’ to handle this case
OPW-3413668
closesodoo/odoo#128584
X-original-commit: 4e3bf2242808435fd13be323af535cc6cc816da3
Signed-off-by: Adrien Widart (awt) <awt@odoo.com>
Signed-off-by: Matheus Leal Viana (malv) <malv@odoo.com>
Added a test asserting the correct functionality of single events deletion.
closesodoo/odoo#127980
X-original-commit: d93d564022bcdafece33f11f578013420b106b64
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
Added a test asserting the correct functionality of single events deletion.
X-original-commit: 2676c0e1b9988e862d2c21479d34372b1a5c9cea
Part-of: odoo/odoo#127980
In the 'calendar' module, the deletion of a single event wasn't being handled during archive. Now, the option 'self_only' is considered in the function 'action_mass_archive'.
X-original-commit: b8feb452c3311ce0ec526ed7304a0ce80af77c22
Part-of: odoo/odoo#127980
Before this commit, the data of all followers of a chatter were
fetched whenever `mail/thread/data` was called. This route is
called when loading the chatter for the first time, and whenever
the chatter must be reloaded.
When there are at most dozens of followers, it's not a big deal.
However, with thousand of followers, the route `mail/thread/data`
may become quite long, which made chatter barely usable with a
long loading.
This commit fixes the issue by showing only 100 followers at once
when opening the follower menu. When scrolling down the list,
it loads data of more followers.
Task-3293718
closesodoo/odoo#127966
Signed-off-by: Didier Debondt (did) <did@odoo.com>
When the user deletes the 'Portal User Template' and when any new portal user
will do signup, then traceback will be generated.
If User deletes the 'Portal User Template', then no new portal user will be
created. Also, new portal user will see the traceback as it is generated in
UI.
Steps To Produce for Portal User Template:-
1) Install the 'auth_signup' module
2) Go to Settings > Users
3) Filter only 'Inactive Users'
4) Delete the 'Portal User Template'
5) Open the Incognito tab and click on 'Don't have an account?'
6) Fill required values and click on the 'Sign Up' button
Traceback will be generated on the portal user side as well as in the
backend (Terminal)
Steps To Produce for Default User Template:-
1) Go to Settings > Users
2) Filter only 'Inactive Users'
3) Delete the 'Default User Template'
4) Try to install 'website' or 'hr_timesheet' module
Traceback will be generated
Applying these changes will resolve this issue.
sentry-4184429514,4274176666,4147914005
closesodoo/odoo#127516
X-original-commit: c3e5bed9307498b435857f7736c20cefde3ed6a7
Signed-off-by: Vranckx Florian (flvr) <flvr@odoo.com>
Signed-off-by: Urvi Soni (uso) <uso@odoo.com>
Before this commit, a test of call was using the real web media API
and would request micrphone access to the brower. This commit fixes
this issue by using the mocked version for this test.
closesodoo/odoo#128722
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Current behaviour:
If you disable the recurrence for 1 task in a suite of recurrence,
if you had other tasks belonging to the same recurrence suite, they
would still be with recurrence activated.
Expected behaviour:
It doesn't make sense for some of the tasks in a suite of tasks in a
recurrence to enabled and others disabled. If we disable the
recurrence on 1 such tasks, all tasks should linked to that
recurrence should be set as non-recurrent, regardless if the
edit-mode is set on "This task".
Steps to reproduce:
- For 14.0 -> saas-16.1:
- Install Project, Studio
- Turn on in Settings the "Recurrent Tasks"
- Create a new project and a task in it
- With studio, in debug mode, add a related field to the task form
that relates to `next_recurrence_date`. Make sure it's not "read
only"
- On the task, turn on the recurrence, set the frequency to each
day, set the `next_recurrence_date` as a day in the past
- Run the Scheduled Action "Project : Create Recurring Tasks"
- On one of the task, disable the recurrence
- Go to the other task, see that their recurrence is still active,
and the frequency changed to the defaults values of once a week.
- For saas-16.2 -> master:
- Install Project
- Turn on in Settings the "Recurrent Tasks"
- Create a new project and a task in it
- Activate the recurrence on the task, set a planned date in the past
- Set the task as "Done", this should create an new instance of the
recurrence.
- Disable the recurrence option in one of the task, observe that
is doesn't change for the other task, and the recurrence
frequency is reset to default values.
Reason for the problem:
When disabling the recurrence on 1 task, with the edit-mode set as
"This task", the recurrence is being deleted, but we don't disable
the recurrence of the other tasks linked to that recurrence.
Fix:
When we are writing `False` on `recurring_task` on a task, we
explicitely write `False` on `recurring_task` on all tasks that belong
to the recurrence after the deletion of the recurrence itself.
Affected versions:
- 14.0
- 15.0
- saas-15.2
- 16.0
- saas-16.1
- saas-16.2
- saas-16.3
- master
opw-3265212
closesodoo/odoo#128703
X-original-commit: 0a83f4030b07aba25b054aa453d81c0e27b98cc8
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
An error occurs while attempting to connect the IAP server,
The problem seems like the IAP server was down, This error is generated and
subsequently caught by a sentry.
Error: Autocomplete API error: The url that this service requested returned an
error. Please contact the author of the app. The url it tried to contact
was `https://partner-autocomplete.odoo.com/iap/partner_autocomplete/enrich`
To handle this issue, we have changed the logger error to warning.
sentry-3930839889
closesodoo/odoo#128706
X-original-commit: a5cc90262ea36c332ce5aaa78c003f63d444565b
Signed-off-by: Achraf Ben Azzouz (abz) <abz@odoo.com>
A previous PR made the Pay button smaller than it should.
This old PR was created to correct a bug in the mobile view by removing
the "More" button if it was not needed and thus making the validation
button bigger when there was no "More" button. It led to a problem
where, in desktop view, the "More" button is not present but the page
act like it was present and thus make the validation button smaller than
it should have. This commit add the condition that the screen must be in
mobile mode to shrink the validation button size.
closesodoo/odoo#128677
Signed-off-by: David Monnom (moda) <moda@odoo.com>
Steps to reproduce:
- Install `CRM` for test purpose
- Go to `CRM > Pipeline` and open any lead
- Add a new property and set a value
- Go back and open list view
- Group by `Salesperson`
- Select all records and click on `Export` in action menu
- Add 'Properties' field
- Export
Issue:
Traceback raised. No issue if not grouped.
Cause:
The properties value is a list of dict. When grouped, the properties
value is not converted to string (like it is done for list and tuples
in the non-grouped flow).
Solution:
Move the code that convert list and tuples to string in the
non-grouped flow directly to the `write_cell` method so that it is
applied in both cases.
opw-3338564
closesodoo/odoo#128682
X-original-commit: f380c56bb13773eee0e19462ba7283b04d54183b
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
When user not seleted 'work center' and only selecting 'Scheduled Start
Date' and 'Scheduled End Date' while creating 'work_order' in
'mrp_production', this traceback raises.
To reproduce the issue:
1. Install 'mrp'
2. Activate 'Work Orders' in configuration/settings
3. Go to menuitem/operation and create 'Manufacturing Orders'
4. Select any product and add a line in Work Orders
5. Give values to 'Scheduled Start Date' and 'Scheduled End Date' only.
Error: A traceback appears:"ValueError: Expected singleton:
resource.calendar()"
On '_calculate_duration_expected' method resource_calendar_id value is
getting from 'workcenter_id'.
https://github.com/odoo/odoo/blob/36459d26f1adb92f92d52ce05329e8ad3e95dd91/addons/mrp/models/mrp_workorder.py#L399-L404
Therefore in the above use case, when triggering the onchnage method,
because of resource_calender is dependend on 'workcenter' and when
workcenter is not selected it will lead to the above traceback.
Sentry-4244804815
closesodoo/odoo#128643
X-original-commit: 102ba9a848162db0029ca639ea84a9319b80d278
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
The field company id on stock lot is required but there is not a default
value. The default value should be the current company id
closesodoo/odoo#128640
X-original-commit: 9b21686616f51db1246ae51c29dab4af2c341323
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
During configure journals and to set property stock journal
from stock account , will try to create
xmlid to existing records to avoid duplicate journal codes.
but there are some existing code journal for inventory valuation
already exists. so if already journal with `STJ` and with same
company exist then will avoid to create new journal of same code.
```
psycopg2.errors.UniqueViolation: duplicate key value violates unique constraint "account_journal_code_company_uniq"
DETAIL: Key (company_id, code)=(1, STJ) already exists.
```
closesodoo/odoo#128639
X-original-commit: 6d6a6530bc43f289f8a811347e0ddd7053b5651c
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Since commit [1], as soon as you have website installed, the result of
google_recaptcha was ignored. It is because website depends of
google_recaptcha and not the opposite.
Now we don't override the result of google recaptcha in website. And if
you have recaptcha + turnstile, Turnstile will check the result of
google_recatpcha first, and if result is valid, add his own test.
[1]: https://github.com/odoo/odoo/commit/4aca39a533e9d41f5f452f36a1ffc001f586b4f4
opw-3380702
opw-3392206
closesodoo/odoo#128634
X-original-commit: c8cc447f70f2a132d49b57c3c61c181a63876d26
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Fixes the formatted string to add the correct reference
in case of no picking. e.g. mrp correction
To Fix:
without parenthesis around the expression, the first value is
considered as the value instead of evaluating the complete expression.
**Results in:**
`Correction of False (modification of past move)`
closesodoo/odoo#128619
X-original-commit: 81fd11fe70357f638434bab44705c91008efb25f
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Before this commit, a crash occurred when the user changed after
starting a livechat conversation.
Steps to reproduce (login => logout)
- Login on admin
- Go to the website
- Start a livechat conversation
- Logout
- Start typing on the chat window composer
- Crash due to `NotFound` raised after `notify_typing`
The same error could occur the other way around (logout => login).
This error is due to the user not being a channel member after it
changed.
In order to fix this issue, livechat session is cleared when the
user changes. Indeed, it the "new" user is not linked to the livechat
conversation so it makes no sense to display it.
fixes https://github.com/odoo/odoo/issues/128206
opw-3421386
closesodoo/odoo#128595
X-original-commit: 3cea3878911831eee5abee9272c7b81145ee7128
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this PR there was no way to add a sort criteria to the
partner suggestions. This commit introduce a registry of compare
functions that can be arranged thanks to a sequence key. This way,
it will be very easy to add custom sort criteria.
part of task-3332872
closesodoo/odoo#128570
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit converts the Website Dashboard to OWL.
The main goal of the Website Dashboard is to display the Plausible
Dashboard inside an iframe. Most of the code from the legacy widget was
actually used by website_sale and not website. Since Website Sale
dashboard is to be re-done in the dashboard app (by task-3222991), a lot
of the logic could be removed and simplified.
task-3164163
closesodoo/odoo#112819
Related: odoo/enterprise#44087
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This dashboard depends on the website dashboard which is to be re-done
in OWL. Instead of keeping this dashboard as a separate component, it
will be re-done in the Dashboard App (see task-3222991).
task-3164163
Part-of: odoo/odoo#112819
Prepare for OWL conversion while keeping the template's history, as
some of its code can be re-used in the new OWL Component.
task-3164163
Part-of: odoo/odoo#112819
PURPOSE
Provide various fixes and UX improvements to ease usage of Emails and
SMS marketing applications.
SPECIFICATIONS
- Add a compute field ab_testing_sms_count to compute the counts related to A/B
testing SMS.
- Add an alert message for A/B testing when no mail is sent in the form view with the
chatter.
- Add "(final)" to the source name of the final and winner A/B test mail.
- The buttons are now correctly display based on the mailing_type
(the auto mode can now send a winner manually)
- Change the copy override of `utm.source.mixin` to consider the name param of
default arg. when getting a unique name for the record.
Task-2713198
closesodoo/odoo#88997
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Before this commit, in the copy method override of `utm.source.mixin`, the name
of the default, argument was not considered while `_get_unique_names` to get a
unique name for the record.
After this commit, the name parameter of the default argument will be considered
for the same.
taskID-2713198
Part-of: odoo/odoo#88997
Before this commit
- When we were creating an alternative version in the SMS app for A/B
testing, we were not able to see different options like select
winner, compare version, etc in it because of ab_testing_mailings_count
was counting only records with type equal to mail, in method
_compute_mailing_mail_count. So, count will never increase
and those buttons will never be visible.
- We were not able to sent the mail manually in auto mode.
- We were able to see the 'Send winner Now' and 'Send this as Winner'
buttons even if no a/b test mail were send.
So, with this commit
- We have added the ab_testing_sms_count compute field in utm.campaign
and ab_testing_sms_count related field in mailing.mailing to deal
with the above problem.
- The auto mode can now send a winner manually.
- We introduce a new compute field is_ab_test_sent for computing
whether the any sibling mails of a/b testing are sent or not,
depending on that we hide / show buttons.
TaskId-2713198
Part-of: odoo/odoo#88997
- Add an alert message for A/B testing when no mail is sent in the
form view with the chatter.
- Add the final suffix in the name of the final mailing send for an
A/B testing campaign source.
task-2713198
Part-of: odoo/odoo#88997
before this commit, in the database manager page, on
clicking the Neutralize label in the db duplicate
and restore page is not check/uncheck the neutralize
checkbox.
after this commit, on clicking the label Neutralize
the field can be checked and unchecked as other field
in the same form.
closesodoo/odoo#128671
X-original-commit: 64e3d52591db49a4a441f170e216f0e3aca4fa23
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
In mobile, the product list can now be displayed as a grid or a list.
Items in the list and grid views will now always have the same author,
to maintain consistency.
closesodoo/odoo#126861
Signed-off-by: Robin Heinz (rhe) <rhe@odoo.com>
Colors of headings are inherited between levels. (E.g. if no color is
defined for `<h4>`, it uses the color of `<h3>`)
This commit changes it so that all levels only inherit from `<h1>`.
task-3140991
closesodoo/odoo#111621
Related: odoo/design-themes#633
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
*: web_editor, website_mass_mailing
Because the shape is now also part of the theme options for primary and
secondary button, it does not make sense to select it when the button
is either primary or secondary.
This commit makes the Shape option shown only for Custom buttons, and
therefore also nests it under the Style option.
task-3140991
Part-of: odoo/odoo#111621
Before this commit, when a heading font was selected, it was not
possible to deselect it (so that the H1 font gets applied again).
After this commit, the font selector has an extra "Reset" button to
restore the default state if it has a specified value.
task-3140991
Part-of: odoo/odoo#111621
Before this commit, customizing the theme option's background image or a
theme option's button style required several RPCs and refreshes of the
assets bundle.
After this commit those options are updated through a single RPC call
and a single refresh of the assets bundle.
task-3140991
Part-of: odoo/odoo#111621
This commit reorganizes the theme options to make them easier to find.
It also adds the following options:
- 'Font size' for each of the six headings
- 'Font (family)' for each of the six headings
- 'Margins' (top & bottom) for paragraph & the 6 headings
- 'Line Height' for paragraph & the 6 headings
- Harmonize buttons options with the custom button ones
task-3140991
Part-of: odoo/odoo#111621