[FIX] *: selectors in tours
[FIX][TMP] account: CogMenu selector in tours
[FIX][TMP] web*: Breadcrumb targetting in tours
Adds a `o_breadcrumb` class to target the whole breadcrumb, no matter
how much elements it contains (collapsed parts, visible path, single
name...).
add classname on last breadcrumb item
[FIX][TMP] project: View buttons selector in tours (moved away from CP)
[FIX][TMP] project: Kanban selectors in tours (quick create)
[FIX][TMP] *: SearchBar selectors in tours (toggle menu)
[FIX][TMP] *: ButtonBox selector in tours
[WIP][IMP] web: add toggleSearchBarMenu in search helpers
adapt and unskip 3 list tests
adapt and unskip calendar tests
unskip web_tour test that actually pass
post rebase fix
allow to lose cell focus after multi edition (given to searchbar) - bug reported, to check later
post rebase fixes
fix
Part-of: odoo/odoo#116641
Before this commit, tests were using current date to make assertion.
It's best to avoid making tests that use current date, as it might
fail when run at specific time (e.g. at midnight or during holidays).
closesodoo/odoo#120800
X-original-commit: 5bcef0f1d6ab48e408bc5058ea90d85f96da8928
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit simply fixes how the activity renderer propagates the
group.progressValue prop to the ColumnProgress component so that
the active value is only set for the filtered column and not for every
column.
opw-3272571
closesodoo/odoo#120733
X-original-commit: 3bd539913e9ca6f9db9bb55caaa4a85b69a912e0
Signed-off-by: Luca Vitali <luvi@odoo.com>
The activity view is an aggregation view, meaning that we show all the
activies with no limit of records.
Steps to reproduce:
There is no easy way to reproduce the bug, the database should be
populated with more than 80 records in a model and have an activity
planned for the 81th record.
Current Behaviour:
The Activity view loads all the activities without limit and so the
activity for the 81th record. The problem is that the 81th record does
not have been loaded due to the default limit of the RelationaLModel.
Therefore the activity view crash because it cannot fetch the missing
record for a loaded activity.
Expected Behaviour:
The activity view laods all the activities but also loads all the
records so it can render them.
closesodoo/odoo#120654
X-original-commit: 885c7bb33a3cb25962c090290e6b27bc11a71f41
Signed-off-by: Luca Vitali <luvi@odoo.com>
Signed-off-by: Dardenne Florent (dafl) <dafl@odoo.com>
This commit introduces a date picker OWL component meant to handle the
following use-cases:
- date picker
- date & time picker
- date range picker
- date & time range picker
Basically, this component is the union of the two previous third-party
libraries handling these cases: TempusDominus and DateRangePicker.
New components introduced:
* The main addition of this commit is the `DateTimePicker` itself which
handles the display and interactions of the calendar and time pickers.
> see @web/core/datetime/datetime_picker
* The picker can then be coupled to an input using the
`useDateTimePicker` hook. The purpose of this hook is to handle events
on a given input element and syncronize its value to a date picker it
will spawn in a popover.
> see @web/core/datetime/datetime_hook
* Lastly, a simple `DateTimeInput` component will render an input and
call the hook mentioned above to handle it. This component is
effectively replacing the previous DatePicker and DateTimePicker
components (note that it does not handle range values).
> see @web/core/datetime/datetime_input
Another noticeable change of this commit is the definition of daterange
fields in views:
- Previously, the arch would have to define both fields
and bind them via their options, while also adding an arrow between
inputs or other forms of connection.
- In the new implementation, only the start date field must be declared,
and a date range can be spawned by providing an `end_date_field` in its
options.
Example:
```xml
<field
name="start_datetime"
widget="daterange"
options="{'end_date_field': 'end_datetime'}"
/>
```
warning Added limitations:
- this new way of declaring date ranges means that templates have been
revised to declare one field tag instead of two. This means that list
views using date ranges have lost the ability to be sorted on their end
date fields.
> Justification: the current use cases have been reviewed and it has
been decided that it was not needed to sort on the end date on the
affected list views.
> Workaround: drop the date range and declare both fields as simple date
pickers (i.e. without the end_date_field option).
- all modifiers applied to a field using a date range will be copied and
applied to the end date field. There is no way to define modifiers
specific to one field or the other.
> Justification: there was no use case where one of the two fields
needed specific modifiers.
> Workaround: same as the previous point: split the range into 2 simple
date picker fields.
Additional notes:
- the widget="daterange" is not mandatory in form views, but is required
in list views because only fields with explicit widgets will not be
rendered as simple <span> elements. The date range feature will be
available as soon as an end_date_field is specified.
- as the end date field is not explicitly defined in the view anymore,
any modifier depending on it need to have it defined as invisible
somewhere in the arch.
Task ID: 3121497
Part-of: odoo/odoo#112171
Co-authored-by: Julien Carion <juca@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Pierre Pulinckx <pipu@odoo.com>
Since [1], a unique id is used for fieldNodes, therefore, the code to
keep track of last update images on the activity view needs to change
also.
Before this commit, we search the write_date on the fieldModes using the
id, and if it's not present, a new one is created using as id
"write_date".
Now, as a unique id is needed, we search using the name, and if it's not
present, a new one is created using as id "write_date_0".
Note that this is already the behavior on kanbanParse.
[1]: https://github.com/odoo/odoo/commit/baebb6a5b05ac8d59501a6071a5513e31a4ca047closesodoo/odoo#118320
Signed-off-by: Luca Vitali <luvi@odoo.com>
The attribute _mail_post_access='read' on a model allows user with read only
access on the model to post a message. It was not taken into account on the
client side, making the send message button disabled for user with readonly
access on such model. This commit fixes this issue and now correctly takes
into account that class parameter.
Task-3178885 (Mail: fix 'readonly' post support)
X-original-commit: odoo/odoo@d2b8612cf7
Part-of: odoo/odoo#114511
This commit add the missing `o_action_delegate_scroll` on the activity
view controller on small screen device to scroll the activity view
content only instead of the whole controller (i.e. control panel
included).
Steps to reproduce:
1. Open Project on small screen device like a smartphone
2. Open a Project like 'Office Design'
3. Switch to the Activity view and try to scroll horizontally
=> The whole activity controller currently scroll => bug
closesodoo/odoo#110531
X-original-commit: e4d6a8ad14abee72d61fd01d8b601acc6bfa2c49
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Signed-off-by: Romain Estievenart (res) <res@odoo.com>
RATIONALE
Improve usage of composer in comment or email mode: support batch-posting in
comment, support more configuration from templates, improve global model.
SPECIFICATIONS
Support a real res_ids field on mail.compose.message model. Instead of relying
on active_ids from context, store it once for all at composer level and use
it in code. Active_ids usage is still done at default_get level, using it to
populate the field.
Improve usage of domain, renamed to res_domain to match other document related
fields naming. Add support of a res_domain_user_id field allowing to set the
user from which the domain should be evaluated.
Composer now runs on a list of IDs. Mass mail mode and comment mode are now
distinct from running on a singleton or on more records. Rendered or raw
mode is not triggered by
* mass mailing mode: always display raw mode, whatever the number of records;
* comment mode: display rendered mode when having a single record (like the
previous comment mode). Display raw mode when having either no records
either at least two records.
Task-3035101 (Mail: Support batch-posting from composer)
Part-of: odoo/odoo#99482
RATIONALE
Purpose of this commit is to be explicit in subtype chosen when invoking the
message composer / calling message_post. As default value may not always be
clear, better be explicit in case the composer default value changes.
SPECIFICATIONS
Add explicit references to subtype when it is not obvious what will be the
final subtype, notably when using helpers (post_with_view or template which
uses the composer that is not crystal clear in its subtype management).
In this commit we also add support of XMLID-based subtype when invoking the
composer. A ``default_subtype_xmlid`` context key is transformed into a
``default_subtype_id``, to be used notably in JS where we cannot easily
use a ``ref``-like statement. Post API now also supports 'subytpe_xmlid'
argument allowing to give the xml id and ease calling the methods.
Use ``_xmlid_to_res_id`` to get directly the ID of subtypes in order to
avoid useless queries from ``ref`` that does an exists.
Also remove useless values given to post API, notably author_id that is by
default the current users' partner.
Task-2710804 (Mail: Clean MailThread Posting API)
Part-of: odoo/odoo#99482
Since the refactoring of the activity view, luxon is not in the
rendering context. Resulting in crashing in some activity views
that used luxon in their template.
- Go to Appraisal
- Switch to the activity view
- Create a record in this view -> crash
Now, luxon is in the rendering context.
closesodoo/odoo#109153
Signed-off-by: Luca Vitali <luvi@odoo.com>
Before, in activity view, it was not possible for users to hide
never used columns.
Now it is possible for users to hide and show columns in the
activity view.
task-3039919
Part-of: odoo/odoo#109153
Before this commit, processing of pinned channels during
init_messaging was slow due to sorting them in sidebar
of discuss.
This commit improves the sort so that we do a binary insertion
on add rather than push + quick-sort.
Before what took 2.2 seconds now takes around 0.6 seconds.
closesodoo/odoo#108839
X-original-commit: dd4c3c0a8e38147065980cf2c431b056a5253255
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Since #107916, the ActivityModel did not include
`["activity_ids", "!=", false]` in its domain, causing incoherence in
some views and resulting in crashes.
To reproduce the issue:
- In the runbot, navigate to Website -> eCommerce -> Product.
- Switch to the activity view.
- Remove the Published filter.
- The view crashes due to an incoherence between the data records
in the `web_search_read` and the `get_activity_data` calls.
This commit resolves the issue by correctly setting the domain.
closesodoo/odoo#108807
Signed-off-by: Luca Vitali <luvi@odoo.com>
*: project, web
This commit converts the Activity view to the current framework shared by
other views. Instead of extending Kanban view/elements, the Activity view
has been implemented by its own.
The project customization of the view has also been converted, as legacy
files have been removed.
Some tests have been adapted since some classnames might differ from the old
implementation, resulting to failing tests. But the overall testing cases
have been conserved.
closesodoo/odoo#107916
Related: odoo/enterprise#35177
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Florent Dardenne <dafl@odoo.com>
This commit replaces two usecases of the legacy FormViewDialog and
SelectCreateDialog, as we are about to remove them.
closesodoo/odoo#101819
X-original-commit: b1574ae38be45e871e505100c2342887ed7dba8b
Related: odoo/enterprise#32132
Signed-off-by: Géry Debongnie <ged@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Adapt the activity widget test to use vanilla js instead of JQuery.
Moreover, selectors have been adapted to rely less on the DOM structure
and more on significant class names.
closesodoo/odoo#99924
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this PR, any fail during the QUnit test suite would have failed
the activity widget test. This is due to the fact that this test was
relying on the activity table to be the only table present in the
document. This issue is that QUnit is also using table to display
failed tests. Thus, the activity widget test was looking in the wrong
table to find its elements.
This commit fixes the issue by ensuring the test is actually targeting
the right table that is, the one inside the activity view.
Part-of: odoo/odoo#99924
Before this commit, when we open activity view and click on schedule
activity >> select a record there is a trackback due to the
invalid default_res_id passed in context.
So in this commit, fixes the issue by passing the valid res_id in
instead of object with id and display_name.
task-2927335
closesodoo/odoo#96999
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
In the BS5 migration, the legacy `checkbox` and `boolean_toggle` widget
were adapted but not the OWL Component.
Also, we have tweaked the old widget and the component to have better
positioning and margins.
Note:
the CSS for the print is already done in BS5
```css
@media print {
.form-check-input {
color-adjust: exact;
}
}
```
Also we change `offsetWidth` by `getBoundingClientRect().width` in
`list_renderer` to avoid inaccurate rounding in columns width's
calculation.
Lastly a `.o-checkbox` class is added to the Checkbox component for a
more universal and context independent targetting.
closesodoo/odoo#96185
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
This commit redesigns the `TrackingValue` component.
Part of the ChatWindow/Discuss redesign
task-2823627
closesodoo/odoo#92872
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
*: calendar, note, test_mail.
In order to ease testing and to prepare for the ActivityMenu widget to be
converted into a component, let's add the sytray menu item into the registry
systematically when using the start helper.
closesodoo/odoo#96094
Related: odoo/enterprise#29529
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This commit makes various adapations in addons with respect to
the introduction of the owl kanban view. Mainly, some selectors
in scss and in tests needed to be adapted. Moreover, in some tests
that we haven't adapted yet, we must ensure that legacy form and
list views are still used (useLegacyViews).
It also contains some adaptations in kanban templates, e.g. the
replacement of moment by luxon, the removal of underscore...
Part-of: odoo/odoo#92475
*: im_livechat, test_mail, test_mail_full.
The createMessagingMenu helper was used during tests to mount
the messaging menu and test it. However, this approach is not
very realistic and blocks some waiting PRs. In order to get closer
from the reality, let's instanciate a webClient and a systrayService
for the messagingMenu to be present at all time.
closesodoo/odoo#94301
Related: odoo/enterprise#28747
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
*: hr, hr_holidays, im_livechat, test_mail.
The target returned by the mail's test utils start method is useless since it's
almost the same thing than querying document. Let's remove it and replace it by
document. This will reduce the diff in the PR introducing the new environment in
the discuss app.
task-2582313
closesodoo/odoo#92077
Related: odoo/enterprise#27670
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
*: calendar, note, test_mail.
This PR prepares the ground for the one introducing the new environment in the discuss app.
Indeed, the start helper won't be able to handle widget anymore. To solve this issues,
we're now adding the activityMenu widget to the systrayMenu.Items array, this will be
mapped by the createWebClient helper to component and added to the new systray item
registry.
task-2582313
closesodoo/odoo#91953
Related: odoo/enterprise#27614
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
*: hr, test_mail.
This PR prepares the ground for the one introducing the new environment in the
discuss app. Indeed, the createWebClient helper will be used instead of createView/Widget
thus the returned value won't be a Widget anymore but a DOM element. This change impacts
they way the tests were written: JQuery functions have to be transformed to native JavaScript
ones. In order to reduce the noise in the main PR, those changes are done now.
task-2582313
closesodoo/odoo#91290
Related: odoo/enterprise#27313
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
*: calendar, hr, note, test_mail.
Since community#86338, widget destruction is registered in the start method. Thus,
explicit calls to widget.destroy during tests are useless. This PR prepares the ground
for the one introducing the new environment in the discuss app. Indeed, the former PR
will use createWebClient instead of createView/Widget constructor thus, we won't be able
to call destroy on the returned value anymore. In order to reduce the noise in the main PR,
all the calls to widget.destroy have been removed.
task-2582313
closesodoo/odoo#91082
Related: odoo/enterprise#27192
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
*: sms, snailmail, test_mail.
This PR helps reducing the noise in the one introducing the new environment in
the discuss app. Indeed, we won't rely on the bus anymore to listen to do actions,
we will instead use the action service. The diff is awfull because the indentation
has changed as well as the parameter names. Changing the indentation and the parameters
now will ease the review of the main task.
task-2582313
closesodoo/odoo#90581
Related: odoo/enterprise#26970
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
*: sms, snailmail, test_mail
This commit introduces models that define records being 1:1 map with components,
as a step to move further to having essentially all business code in models.
Having code in models is desirable to have very maintainable code, thanks to
robust and declarative code with an ORM-like architecture.
Task-2831082
closesodoo/odoo#90320
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This PR helps redducing the noise in the one introducing the new environment
in discuss. Indeed, the createWebClient helper will always be used so we won't
be able to use the form utils anymore. Moreover, since the clean up of the widget
is now handled by the start method, the calls to widget.destroy in those test was
not required.
task-2582313
closesodoo/odoo#90079
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This PR helps reducing the noise in the one adapting discuss
to use wowlEnv. Indeed, the start method will now only rely
on the createWebClient method. This means we'll need to adapt
those tests to use real models. To do so, we need to move
those tests in the test_mail module.
task-2582313
closesodoo/odoo#89666
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
*: calendar, note
In order to prepare the ground for test adaptation using the startServer method,
make the systray_activity_menu more realistic : instead of using a fake model, we
now rely on a method in the mock server. This method mimics the behavior of the
`systray_get_activities` present on the res.users model.
task-2792108
closesodoo/odoo#87743
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
In preparation for the adaptation of its adaptation to the new
way to seed tests data, the `systray_activity_menu_test` is moved to test_mail. Indeed,
with this adaptation, all fake models will be replaced by real ones, the `MailTestActivity`
model is the perfect candidate for this.
task-2792108
Part-of: odoo/odoo#87743
*: hr_holidays, im_livechat, mail, mail_bot, sms, snailmail, test_mail,
website_livechat, website_slides.
Mail tests are currently relying on this during tests to make env, widget,
data available. We don't wan't to add magic keys to this anymore.
task-2792108
closesodoo/odoo#86559
Related: odoo/enterprise#25341
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
*: hr, hr_holidays, im_livechat, mail, snailmail, test_mail, website_livechat,
website_slides.
This commit will remove the need to duplicate models definition for
test purposes. Indeed, for now, we need to mock the model definitions
on the client side. Those models definitions are often very different
from the ones found on the server.
This approach will allow us :
- to ease model definitions during tests
- to get closer from the real models
task-2767820
closesodoo/odoo#84828
Related: odoo/enterprise#24486
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>