Currently the exception is not logged using the logger meaning that the
only indication of the failure is the "module not loaded" error message.
Catching the exception to log it the proper way will help identifying
the cause of the issue, mainly for uninstall tests.
closesodoo/odoo#100431
X-original-commit: b16f850d9aa438aea91b8cbd7c33692e1e1b2f90
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Emptying the domain should be setting it to False, not empty string,
which is saved in DB as such.
This was not problematic at all before but since [1] the domain must be
unique. As we removed the "multi website by domain" feature, we then
were able to add that constraint.
But since then, having two website with domain == '' would raise the
constraint error, while null values (False in python) would not.
[1]: https://github.com/odoo/odoo/commit/507db4e179514d171ec82e8ea0cbaf2323a6c30d
runbot-5041
closesodoo/odoo#100430
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before this commit, when one would remove the favicon of a website in
the settings it would crash.
This is because since [1] the introduction of `base64.b64encode()` in
the `_handle_favicon()` method make it crash with `False` value.
Steps to reproduce:
- Settings > website
- Delete favicon
[1]: https://github.com/odoo/odoo/commit/6b8752604898bf2b583b7f5334e35f6a1583595e
opw-2958836
closesodoo/odoo#100399
X-original-commit: 35ce152d7e5c50cb363c0fa7adecf174fede9e46
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
In a list view, group by a date or datetime field, then open a
group and select a record. Before this commit, it crashed, because
we didn't correctly consider the groupBy value, which is of the
form "fieldName:granularity" for a date(time) field.
closesodoo/odoo#100398
Signed-off-by: Géry Debongnie <ged@odoo.com>
HtmlWithActionWidget was used in Project Updates
to handle <a/> tags in the html description.
Since odoo/odoo#72736 removes all those tags,
this widget is no longer needed.
closesodoo/odoo#100397
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Before this commit, the `channels subscription after disconnect` bus
test failed randomly. This occured when the websocket reconnection
happened before the first subscription. Indeed, the first subscription
is made only if the resulting channel list differs from the last one
we sent.
This commit fixes the issue by wating for the first subscription
before disconnecting the websocket.
closesodoo/odoo#100391
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
The overtime were not updated when a leave was updated, which lead to
incorrect situation.
Example:
- Check-in from 8:00 to 12:00
- Take a day off for the afternoon
- It was wrongly counting 4h of "undertime"
task-2982443
closesodoo/odoo#100389
X-original-commit: 0330eab5f0c477ea07f14d4aa5a0d14ae56da77c
Signed-off-by: Kevin Baptiste <kba@odoo.com>
"phone" isn't a valid input type, so it had no effect, except
breaking the tour system when a PhoneField input was the target
of a step, since the "consume event" was then "click" instead of
"input"..
closesodoo/odoo#100388
Related: odoo/enterprise#31437
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Following odoo/odoo@4636620004
`get_views` only pass the model fields included in the view architecture,
except for the main model when the search views is requested.
Because the search views requires all fields for the user to be able
to make advanced filters and advanced group by using any fields of the
model.
However, other views requires more field descriptions as well than
just the fields included in their architecture:
- the graph view requires all integer and float fields,
to automatically add suggestions of measures in the measures dropdown
menu. It's a bit like the search view, the user should be able
to choose any measure available in the model
(as long as this is integer or float fields)
- the pivot view requires all groupable fields,
so the user can group by any groupable fields of the model.
The JS MockServer `getViews` is adapted to include the changes added by the above
revision as well as the current revision,
for the qunit tests suite to be able to reflect these API changes
from the server side.
closesodoo/odoo#100376
Related: odoo/enterprise#31427
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
When sending a mass mailing with a pdf attachment, the ir.attachment
is copied in the mail.composer for each email. Spending time and
resources in the indexing of the pdf. On copy that value is already in
the vals. This is especially true when attachment_indexation is
installed, processing the pdf documents can be costly with pdfminer.
It could also be done by overwriting the copu from ir_attachment but it
could happen a misuse of mass create of ir.attachment with the same file
has the same issue
closesodoo/odoo#100374
X-original-commit: 3d59cc849ed1040c08c4d1488866ba78c80990c8
Signed-off-by: Raphael Collet <rco@odoo.com>
The HandleField widget should not be displayed in grouped list
view, probably because we do not support the resequence feature
in this situation. This is the legacy spec.
In the wowl ListView, we didn't implement this restriction. As
a consequence, some list views (e.g. DebugMenu > Open View) didn't
render correctly when grouped, because the presence of the handle
field (which is aggregatable) didn't leave any space to display
the group titles.
closesodoo/odoo#100356
Signed-off-by: Géry Debongnie <ged@odoo.com>
Before this commit, if a grouped list view contained an aggregatable
field (e.g. a float field) with a widget for which there's no
associated formatter (e.g. progressbar), the aggregate value was
left unformatted. It was for instance the case in the "My tasks"
list view, with the field "progress".
With this commit, the value is formatted according to the field
type, as expected.
Part-of: odoo/odoo#100356
This commit fixes a race condition in the RelationalModel, which
can be identified by a ListView test [1], with a subset of addons
installed. Before the fix, we didn't wait for the record to be
reloaded before re-rendering the list. It could then crash because
the data object was empty (not yet filled with values).
This commit also prevent unnecessary reload/rerendering after an
urgent save, i.e. when the user is closing the tab.
[1] editing a record should change same record in other groups when
grouped by m2m field
Part-of: odoo/odoo#100356
Since #99912 logging an error message doesn't always end qunit tests.
This was mainly to allow to failfast logging qunit errors earlier
without stopping the tests in order to test all qunit anyway.
The logic was to have an end message that stops the test.
Unfortunately some errors will prevent the qunit suite to start
and the test will wait a 1800 long timer. An example was because of
a Missing dependencies. https://runbot.odoo.com/runbot/build/19306352
This new approach will avoid to stop only if the message looks like a
qunit failure and the final message is not there (to be sure).
closesodoo/odoo#100238
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
A previous version tried to log qunit by module but it is still possible
to have multiple random errors in the same test occuring with different
combination. This will help to avoid duplicating automatically
parsed errors in this case.
Also skips the message if it is emppty/undefined.
Part-of: odoo/odoo#100238
Before: In a grouped kanban view, if all the groups are set to folded
by default, the view incorrectly thought it had no record. They were
simply not loaded and some method was not fetching the right data to
get the number of records.
It resulted in displaying the demo data and the no content helper,
making it impossible to see the actual data.
After: The number of records, despite no being fetch, is correctly used
in hasData and showNoContentHelper to fix the wrong behavior.
closesodoo/odoo#100234
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Use generic method on_delete instead of personalized one for the sake of
clarity and reproductibility.
task-2883630
closesodoo/odoo#99958
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Some (most?) people keep trying to double click on it to edit it.
The wording was not helping as "Replace this" doesn't really tell the
user how to do it. He actually has to click on the "Edit" button on the
right panel.
Personal experience, the first times I tried that code snippet, I didn't
find that button and it took me a few times before understanding how it
works.
The new wording and the shortcut button to edit it should be more clear.
Another idea was to allow dblclick to enter edit mode, but this seems
overkill and the 2 improvements here should be enough to make it easy to
figure.
Also added a comment about the `
` and one-liner, it is far from
obvious when reading the code..
task-2978786
closesodoo/odoo#99922
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
When creating an account from the website (through the link "Don't have an
account?") while having been previously identified, the creation lasts a very
long time and ends-up with a http 502 error (actually a timeout). Same when
logging although being already logged.
Technical note: The problem was due to a database deadlock because of going
twice through authentication. A record was deleted in one transaction while
being written in another (_merge_visitor deletes it and _update_visitor_last
visit writes it but with different environment).
Task-2950241
closesodoo/odoo#99723
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Prior to this fix, when a ResourceMixin was copied
and a `company_id` set in its default values,
it was not taken into account, because
ResourceMixin.copy_data first copied self.resource_id
without default values, then set the company of it
into the default values for its own copy.
Same went with `resource_calendar_id`,
just copying the calendar of its resource.
With this fix, if present, we first set these two values
in the Resource default values (`company_id` and `calendar_id`)
and only then copy them in the ResourceMixin default values
(as `company_id` and `resource_calendar_id`).
closesodoo/odoo#93823
Related: odoo/enterprise#28490
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Because `quant_ids` (`stock.quant.package`) is a one2many inverse of
`package_id` and some depends use it.
It is important to have in index on package_id on `stock.quant`
closesodoo/odoo#100371
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
In the tour course_publisher_standard and course_publisher, the triggers
were not making sure that the url was validated before clicking on the
button, therefore clicking on a disabled button. This resulted in tests
randomly failing on runbot.
This commit adds an extra trigger to make sure the URL has been
validated.
runbot-4060
closesodoo/odoo#100369
X-original-commit: 2795d33d756e3101537c8ed0a017e6cc22afb1db
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Before this commit, we propagate all the slots to the SettingsPage. This
could raise an issue if the default slot (propagated) has a content, for
more information see: https://github.com/odoo/owl/issues/1256
Now, to avoid this, we only propagate the slots that are used on the
SettingsPage component, ie: NoContentHelper.
closesodoo/odoo#100362
Signed-off-by: Géry Debongnie <ged@odoo.com>
Co-authored-by: Lucas Perais <lpe@odoo.com>
There was an extra `r` in the name of the super method called, which
produces a traceback.
closesodoo/odoo#100361
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Before this commit
==================
When the IoT customer display and customer display(without IoT) are set in the pos shop settings.
When we open the POS session it gives a warning "Connected, not owned" and nothing is displayed in the IoT display
After this commit
=================
When the IoT customer display and customer display(without IoT) are set in the pos shop settings.
When we open the POS session it will connect to the IoT display successfully.
Technical
=========
There is a wrong field name used in the js file so the IoT display is not connecting
closesodoo/odoo#100357
X-original-commit: a9ad8170145cbeae182f71943a589872a13fe77e
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
Signed-off-by: Jigar Vaghela (jva) <jva@odoo.com>
The mini UI on the frontend as a connected backend user was a bit
confusing: the "Edit" button used the exact same design and wording as
the "Edit" button in the backend but it had not the same effect as it
did not enter edit mode but just redirected the user to the website
preview (client action iframe).
We still want the same behavior, we just needed another button design:
- Change the label from "Edit" to "Editor".
- Change the "pencil" fa icon with the website app icon (same as app
switcher in enterprise).
- Use a dark color instead of the primary color. This reuses a dark
color of the website edit mode.
closesodoo/odoo#100355
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
The Dialog is no more used in the call_view.
Just cleanup the code of the import
task-2783069
closesodoo/odoo#100352
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit removes unused imports and renames some confusing variable
names and helper texts that were changed with commit f7b8f075 when
renaming the term "acquirer" to "provider".
closesodoo/odoo#100348
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
The payment term example display was not functional anymore and always displayed 0.
This was because of a inversed condition.
Took the opportunity to fix the tax reduction description.
closesodoo/odoo#100345
Signed-off-by: Laurent Smet <las@odoo.com>
Steps to reproduce:
- install the mrp_plm module (Product Lifecycle Management app);
- create a product with a long name;
- create a bill of material for that product;
- create a manufacturing order and select that bill of material;
- confirm the manufacturing order.
Issue:
The value of the bill of material field overflows into the second column.
Cause:
There is a problem in the use of classes in the .xml file (o_row and d-flex).
Solution:
Change the classes used (Bootstrap and Odoo classes) to have the correct rendering.
opw-2966863
closesodoo/odoo#100305
X-original-commit: 7a7c6870a2006edab8ffe62c016e5eb0681a46f8
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
Before this commit
When creating a new mass_mailing and hitting multiples times enter, the
content was reset.
task-2985162
closesodoo/odoo#100284
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
It feels more natural with the new name;
The "X2ManyTags" things is because it used to use
a many2many tags fields under the hood.
1) It's no longer true
2) It's an implementation detail
Part-of: odoo/odoo#100246
The X2ManyTagSelector component still used a legacy many2many tags
widget under the hood and an adapter layer on top.
With this commit, it uses new components
Part-of: odoo/odoo#100246
Commit [1] made it so the computed stock_location.warehouse_id field is
stored. Unfortunately it did not correctly add the additional depends
value of `location_id` so when this value is changed after the record
has been initially created+saved without a location_id, the warehouse
will never be correctly computed.
[1] https://github.com/odoo/odoo/commit/9978bcb366d0ea48ed25a7891e0c7653a2f96bfb
Followup to task: 2882539
closesodoo/odoo#100219
Related: odoo/upgrade#3901
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
The `is_subcontracting_location` setting is intended only for
complicated route/rule use cases therefore we make it visible
only in debug mode to prevent users from setting this value and
unintentionally creating a lot of new routes/rules unnecessary.
Additionally, it is expected that users who previously set these up
manually will not want their custom rules/routes changed but will still
need the existing behavior to continue, so we restore the previous check
for subcontracting locations set as sublocations of the primary company
subcontracting location.
Follow up to task: 2720393
Part-of: odoo/odoo#100219
Before [1], the web_editor module was auto installed. After that commit,
the bus module has been added to the web_editor dependencies. Since
the bus module is not auto installed, the web_editor module dependencies
are not met which means the login colors are wrong (blue instead of green).
This commit fixes this error by adding the `auto_install` flag to the
bus module.
[1]: odoo@a5623d24b77f523aeeafbb8c2bfaf27241ef3c8e
closesodoo/odoo#100212
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Introduce header actions so that emoji picker in knowledge
can have an action to remove emoji.
Task-2980528
closesodoo/odoo#100010
Related: odoo/enterprise#31231
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
On the application page, too much elements are set
in the primary color, creating confusion as of where is
located the main page action.
Also changes the phone field in the job application page
to be stored as a mobile phone instead of a home phone.
task-2980889
closesodoo/odoo#99976
Signed-off-by: Kevin Baptiste <kba@odoo.com>
The purpose of this commit is to improve the domain selector UX with
multiple little changes:
- The model field selector popover is now autofocused when opened
- Removal of a div that appeared during a hover on "add leaf" and
"ellipsis button"
- Caret icon next to the root node selector
- Minor CSS changes
task-2861497
closesodoo/odoo#99321
Signed-off-by: Géry Debongnie <ged@odoo.com>