hr_recruitment: switch smart button value and label
- Switching applicant's name with "Employee" label to be consistent with
the rest of smart button's format
mass_mailing: adapt status bar layout
- Removed excessive margin between the status bar and the content
- Added no padding between status bar and the control panel
- Removed a useless border before the status
- Improved margin between alert and buttons
project: right side panel stats buttons alignment
hr_skills: fix `::before` alignment
== ISSUE ==
Before this commit, the :before line in Employee resume is not aligned
with the dots. This is due to the fact that the variable
$o-hrs-timeline-entry-padding used in the mixin isn't the right value we
should use.
There was also an issue with responsive.
== After this commit ==
We now use a calc, which process the half of the circle plus the padding
minus the border-width. The $o-horizontal-padding is the variable used
to define the padding of the line inside the form view.
We adapt this in a smaller media query since the $o-horizontal-padding
value is different.
task-2818586
Part-of: odoo/odoo#116641
- ButtonBox is moved to the ControlPanel's actions section (center).
- StatusBarField, ButtonBox and PercentPieField design.
- Chatter is moved below the ControlPanel (aka "in the view")
task-2818586
Part-of: odoo/odoo#116641
Co-authored-by: Pierre Paridans <app@odoo.com>
Co-authored-by: Pierre Rousseau <pro@odoo.com>
Co-authored-by: luvi <luvi@odoo.com>
*: account, gamification, mail, mrp, note, project, website_blog,
website_event_track.
Uniform design defining a common element shared across different
modules.
task-2818586
Part-of: odoo/odoo#116641
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>
*: web + adaptations in base, fleet, hr, hr_expense, hr_recruitment,
loyalty, lunch, mail, mass_mailing, note, project, stock, survey,
web_tour
**Foreword**
Since d19037e141 the rootnode class attribute for form/list views was
copied two times:
- on the o_view_controller div
- and on the root node of the view renderer.
Examples:
<form class="foo">...</form>
gives
<div class="o_view_controller o_form_view foo">
<div class="o_control_panel">...</div>
<div class="o_content">
<div class="foo o_form_editable ...">...</div>
</div>
</div>
and
<list class="foo">...</list>
gives
<div class="o_view_controller o_list_view foo">
<div class="o_control_panel">...</div>
<div class="o_content">
<div class="o_list_renderer foo ...">...</div>
</div>
</div>
**Issue**
This could lead to confusion and also unexpected styling issues.
See this PR #119815 to read a message JS Framework team has received.
See also another a fix that had to be made for x2m fields: 980244fa8
**Introduced Changes**
- in the form compiler, the root node attributes are no more copied to
the root div node of the compiled template the form renderer receives
- the root div node generated by the form compiler now has the
"o_form_renderer" class, which was removed during the recent form view
refactoring.
- the list renderer no more adds the root node class attribute to its
"o_list_renderer" div
- the X2ManyFieldDialog has been adapted too
- since View, X2ManyField & X2ManyFieldDialog both need to compute view
classnames derivated from the arch root node, an util has been
introduced to avoid duplicating code
- the whole codebase has been checked and adapted.
Related: odoo/enterprise#40418
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
They dates from < 2027 and are quite outdated. Favour the nl
translation instead.
n_BE is not on Transifex so it was not possible to correct bad
translations.
closesodoo/odoo#115845
X-original-commit: d04c8b7e484db8306d858c891a7a2b11885fdcd9
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
According to Wiktionary, French spacing is "the archaic practice (though
still current in French) of inserting a space around colons, semicolons,
question marks, and exclamation marks". This is not standard practice in
English and most languages of the world.
The purpose of this commit is to start purging the code from this typo,
as it may reflect poorly on the software for some people.
closesodoo/odoo#114533
Related: odoo/enterprise#37853
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This commit fixes the style of the "Add a note" element in the
activities menu list. Before this commit, the background was white
because the color was hardcoded in a scss file. This is not longer
the case with this fix.
Also, the input has a transparent background to match with the
background color.
task-3208042
closesodoo/odoo#114143
X-original-commit: 5829183b57478b3316cacda931c2245b17896a63
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
**Before this commit**
- The optional "class" attribute set on the root node of a view arch
is ignored, except for the kanban view which has a custom
way of using it.
- The optional "js_class" attribute set on the root node of a view arch
does not have any impact on the class names passed to its controller.
**After this commit**
The content of the optional attribute "class" set on the root node of an
arch like in
<list class="o_custom_class">
...
</list>
as well as an additionnal class derived [1] from the value of the
"js_class" attribute set on the root node of an arch like in
<list js_class="extended_list">
...
</list>
will both be found in the prop "className" of any view controller.
[1] a js_class value of "xyz" yields to the class "o_xyz_view"
**Note on this commit**
The kanban view was already appending the root node class attribute
to its renderer element. This is no longer the case and some styling
rules has been adapted.
closesodoo/odoo#113014
Related: odoo/enterprise#37265
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Bruno Boi <boi@odoo.com>
This commit add a mechanism to ensure that someone could never save
changes from an history that diverge (in case there is a partition in
the RTC network or a person A was disconnected while another person B
saved changes that were not transmitted to person A).
task-3002163
closesodoo/odoo#112099
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
This commit separate the templates, one for the card and another one for
the menu (the ellipsis dropdown).
The new template, called 'kanban-menu', will only contain the dropdown.
Note that, this behaviour is the same as the one used for the kanban
tooltips.
closesodoo/odoo#107589
Task-id: 3096776
Related: odoo/documentation#3284
Related: odoo/enterprise#34962
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Currently, the form sheet of the note is not displayed in
full screen due to the max-width set as 1320px inside the
o_form_sheet.
So in this commit set the max-width as 100% to display the
sheet view in whole sheet area.
task-3052597
X-original-commit: 851fe4b2d163a20e3cd9cb129a42b96690e5b908
Part-of: odoo/odoo#108440
When the user exports the note records, an error is raised because the
'__count' key does not exist in the result of the 'read_group' method.
Steps to reproduce:
------------------
- Go to the Notes
- Click on the list view of notes and filter group by Stage.
- Click on the export all button to print the excel report and see the
error.
Expected behavior:
-----------------
The data should be exported in `csv` file.
Current behavior:
----------------
An error is raised when the user wants to export the data.
closesodoo/odoo#108394
X-original-commit: 3bd979421744a11b6f10c95f47cf378720079ffb
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Commit [1] added a div around the `.note-editable` node of the html
editor. This broke some css rules. For instance, the html field in
form view's notebooks should have a transparent bottom border when
focused, this was no longer the case (e.g. crm lead form view).
Moreover, we sometimes want to control the height of the editor
(e.g. in Notes or in the mail full composer). That was broken as
well due to the added div.
This commit fixes those issues.
We also ensure to set the border-radius to 0 when the editor only
has a bottom border.
In notes, we do not want to have borders, but the rule didn't
apply due to selector precedence, we fix that as well.
Finally, we fix a typo in a selector in the web_editor addon.
[1] https://github.com/odoo/odoo/commit/60ac6be0d3545#closesodoo/odoo#107740
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Currently, when we creating a tag, it does not appear in the Kanban
view because the tag does not have a default color.
This commit solve above problem by adding default random color in tag.
task-3089296
closesodoo/odoo#107800
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
The URLs in notes created from the systray were not transformed into links.
This solves the problem.
Task-3052952
closesodoo/odoo#108147
X-original-commit: 00fbfab9b7dedc2b5917e7807d8abd2995253919
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Introduce the '@mail/model' module that gathers all the stuff involved
in model definitions. This allows us to reduce the number of imports.
* = calendar, crm, hr, im_livechat, note, rating, sms, snailmail,
website, website_livechat, website_slides
Task-3056971
Part-of: odoo/odoo#105096
*: bus, calendar, hr_holidays, im_livechat, note, rating, snailmail,
website_livechat.
The mail mock server is getting bigger and bigger. As a consequence,
navigating/keeping it up to date is quiet inconvenient.
This commit solves this issue by splitting it by model/controller.
closesodoo/odoo#98374
Related: odoo/enterprise#32314
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Model patches are now defined using the `registerPatch` function. This
function takes an object as argument which keys match those of a model
definition.
Benefits:
+ More consistent shape between model definitions and patch definitions
+ No need to import one function to each type of patch
+ No need to repeat the model name for each type of patch
+ No need to import the original definition
Task-2998282.
* = calendar, crm, hr, im_livechat, note, rating, sms, snailmail,
website_livechat, website_slides
closesodoo/odoo#101827
X-original-commit: 7d23491b44b7372209057ea2abc565a95710b316
Related: odoo/enterprise#32136
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
Remove sorting rules arrays from the functions that wrap them as they
are unnecessary noise.
closesodoo/odoo#101039
X-original-commit: b37baf8996d65d639f0178651a7be0206d0679d0
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit allows compute and sort functions to be declared within a
field definition instead of providing a string with the name of the
record method to be used to compute/sort the field value.
Example of code with compute inline:
```javascript
registerModel({
fields: {
thread: one('Thread', {
compute() {
return {
id: this.id,
model: 'mail'.thread',
};
},
}),
},
});
```
Example of code WITHOUT:
```javascript
registerModel({
recordMethods: {
_computeThread() {
return {
id: this.id,
model: 'mail.channel',
};
},
},
fields: {
thread: one('Thread, {
compute: '_computeThread',
}),
},
});
```
The aim of these changes is to empower a better separation of concerns,
by allowing to group together in one place the data related to a field.
Note that for technical reason (`Function.prototype.call` not working as
expected with arrow functions), compute/sort functions should not be
arrow functions.
closesodoo/odoo#99424
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Change some ``ref`` to low level method ``_xmlid_to_res_id``. The latter one
does not call exists, which allows to gain one query that we do not need
here.
Default methods on activity / activity mixin to find the default activity
type (todo, model-based, generic) are cleaned. Notably code was duplicated
between mixin and activity, it now always call the same code.
Remove an unnecessary ref, probably a leftover of new rendering methods on Qweb.
Remove an unnecessary sudo.
Task-2883589 (Activity performance and cleaning)
Part-of: odoo/odoo#93682
Just doing the summer file cleaning. Move mail data into files named based on
their model, easing maintenance and searching for those data.
Spotted during Task-2207626 (Rating: Delay rating notification to ease feedback)
Part-of: odoo/odoo#98661
Purpose is to have one file / model, easier when searching for inherited parts
of the code and see at a glance various usage of those models.
Spotted during Task-2207626 (Rating: Delay rating notification to ease feedback)
Part-of: odoo/odoo#98661
Steps to reproduce the issue:
- Notes app > Kanban view > Create a bunch of notes using
the + icon in the kanban view
- (optional) Modify the default order of the notes
- Add a new note using the quick add feature
- Don't modify the order of the notes and refresh the page
- The new note will be sent to the bottom of the note list
(off-screen if the list is long enough)
This happens because new notes have their sequence set to NULL, which
places them at the end of the list after ordering by sequence.
This commit sets the default sequence of a new note to 0, so that it
is placed at the top of the list and adds an additional sort on
'id desc' to consider the case where all notes have the same sequence.
opw-2924615
closesodoo/odoo#98427
X-original-commit: ec719b166635df9ed31c9c2b47fedadd2311765c
Signed-off-by: stcc-odoo <stcc@odoo.com>
This commit aims at removing unuseful help message to:
1/ reduce translators work, to focus on more useful translations
2/ not sending unuseful information in load_views
3/ reduce help message to useful messages, so that we can mark
fields having a tooltip in the future UI.
4/ some cleanup of existing messages too
The main use cases:
- REMOVED: help redundant with the field name, providing no extra info
- MOVED TO COMMENT: technical help messages, that should not be in UX
closesodoo/odoo#97279
Signed-off-by: Fabien Pinckaers <fp@odoo.com>
New styles on forms had broken the full height / no sheet style of
note's form view.
closesodoo/odoo#96741
Signed-off-by: David Monjoie (dmo) <dmo@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>
Due to the removal of btn-block we need to change the display to grid
> Dropped .btn-block for utilities. Instead of using .btn-block on the
> .btn, wrap your buttons with .d-grid and a .gap-* utility to space
> them as needed
https://getbootstrap.com/docs/5.1/migration/#buttons
Task ID: 2766483
Part-of: odoo/odoo#95450
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
*: 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>
Now that pyEnv is available, using it in the mock_server lighten the syntax.
task-2582313
closesodoo/odoo#90783
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>
Remove most values uselessly specified because giving the same value as
the default one (see _DEFAULT_MANIFEST in odoo/modules/module.py)
* auto_install is Falsy by default
* author is Odoo SA by default
* summary & description are empty strings by default
* application is False by default
* test, demo, depends and data are empty lists by default
This will reduce noise/inconsistencies between manifests specifications,
simplify analysis of manifests content, ...
closesodoo/odoo#90209
Related: odoo/enterprise#26807
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
*: calendar, hr_holidays, im_livechat, note, website_livechat.
This PR helps reducing the noise in the discuss new env PR. Indeed,
the new mockServer has the same method except that they are not prefixed
by any underscore. All calls have been changed, and the corresponding
methods created. They will be deleted later.
task-2582313
closesodoo/odoo#89659
Related: odoo/enterprise#26603
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>