In this commit, all usages of env._t() are replaced by _t().
In templates files, env._t() didn't work because terms used
in attributes where not extracted into the translation files.
Only string are exported from .xml files to translation files.
So, to make it works, we set a variable that is then used
in attributes.
For example :
<t t-set="string_to_translate">String to translate</t>
<Dialog title="string_to_translate>...</Dialog>
task-3292454
closesodoo/odoo#131390
Related: odoo/enterprise#45631
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
Change version of Chart.js from V2.9.3 to V4.3.0
You can find changelog on
https://www.chartjs.org/docs/latest/migration/v4-migration.html
Version 4.3.0 of chart.js no longer uses moment.js. This task is a
prerequisite to completely remove the use of moment.js (task 3391739)
Why add aspectRatio : 2 ? => Canvas aspect ratio (i.e. width / height,
a value of 1 representing a square canvas). Note that this option
is ignored if the height is explicitly defined either as attribute
or via the style. The default value varies by chart type; Radial charts
(doughnut, pie, polarArea, radar) default to 1 and others default to 2.
Why no more Chart.animationService.advance(); ?
There is no longer an equivalent in this version.
However, we have verified that the problem is no longer present in this
version.
Why use now getElementsAtEventForMode ?
It's clearly noted in the changelog. follow the link above.
task-3392075
Part-of: odoo/odoo#127259
As all the templates are now imported in the owl app, there is not need
anymore to specify the owl="1" attribute in the templates.
Part of task~3443861
Part-of: odoo/odoo#130467
The goal of this commit is to prepare ground to remove
lazytranslate function _lt() and keep only _t()
for a better understanding of the use of the translation function.
In this commit,
the translate function _t() has been updated to return the translation
if they are loaded. If not, it throws an error.
the lazytranslate function _lt() returns _t() function.
Corollaries :
Steps in test tours are now a function that returns an array of steps
to avoid any interpolation of _t in this ones before translations has
been loaded.
Example :
registry.category("web_tour.tours").add("example", {
test: true,
steps: () => [
{...},
{...},
],
});
task-3292454
closesodoo/odoo#124157
Related: odoo/enterprise#43153
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
Prior to this commit, the SVG's viewBox attribute was missing, which
prevented svgs from being scaled.
This commit fixes this issue.
task-3326633
Part of task-3326263
X-original-commit: 30300c373ad1c63a6cf8b035cae0785a09c6933f
Part-of: odoo/odoo#121886
[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
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
* The tours are now run by the `MacroEngine` defined in `macro.js`.
* This is accomplished by converting (at runtime) the user-defined tours to
`Macro`s. See `tour_compilers.js` for the step (and tour-to-macro) compilation.
* API is kept the same as much as possible. Basically, declaring tours stayed
the same with some exceptions:
* `allowInvisible` can be provided in a step to allow consuming the trigger
element even if it is invisible.
* `isCheck` can now be used to replace the no operation `run` that is
traditionally signals the runner to only perform a check.
* Before, multiple `run`s can be called simultaneously. Now, each `run` method
is awaited before proceeding to the next step.
* If the trigger element is `disabled`, the tour runner will *not* proceed on
calling the `run` method and the runner will stay on current step until the
trigger element becomes `enabled`.
* However, the tour runner is okay with `disabled` trigger element if the step
has `isCheck = true`. As long as the trigger element is found for `isCheck`
step, the tour runner will happily move to the next step.
* Some tours are adjusted to properly run with this new tour runner.
* When the tour failed:
* The dom string is not logged anymore.
* However, a warning message containing the relative location of the step will
be logged. This is better in helping the author in locating the failed step.
**Some guidelines learned during the development:**
* Each step may trigger a dom mutation. It's a good practice to insert an
intermediate step that *checks* the existence of an element that result from
the action of the previous step.
* Refrain from using the `run` method for assertions. `run`, in principle, is
provided to perform actions that are not offered by the helper. Use the
`trigger` for assertions.
* During dev, find `SHOW_POINTER_DURATION` and set it to `250`. This will show
the pointer (pointing to the trigger element) for 250ms when watching the
tour.
closesodoo/odoo#107618
Task-id: 3082036
Related: odoo/enterprise#37560
Signed-off-by: Géry Debongnie <ged@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
A double line would appear if the resume / skills were empty.
task-3196398
closesodoo/odoo#114144
X-original-commit: 35ffc195e807db3fd5ea1576816c631d219863c0
Signed-off-by: Kevin Baptiste <kba@odoo.com>
- Replace "CV" with "Resume"
- Allow to choose which information to show on the resume (Contact +
Skills)
- Use the company colors by default
- Minor cosmetic changes on the template (reduced margins, better page
break, etc.)
task-3198645
closesodoo/odoo#113218
Signed-off-by: Kevin Baptiste <kba@odoo.com>
*: hr_skills, project
This commit improves the behavior of the ProgressBar field. Before 16.0,
views had a readonly mode, and to avoid having the inputs always visible,
the user had to click on the progressbar to enter into an edition mode.
Nowadays, this is redundant, and make it difficult to guess that the field
is editable. With this commit, the input is always visible, which also
allow to improve the template and the code of the component. The commit
delete unused props/options that were no longer used by the widget.
This commit also remove a legacy scss file that was still present, and the
style of the component has been moved to its own file. Some dead classnames
have been dropped, or replaced by bootstrap classes, reducing the size of
the scss file.
Tests had to be adapted, because some assertions were irrelevant, or were
triggering the click to enter edition mode.
task #3178958closesodoo/odoo#113002
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Before this commit, the field's description was stored on the
component and this component was then registered.
Now, an object describing the field is used on registration the same way
as it is done for views since https://github.com/odoo/odoo/commit/b828cfc72c587d0b73fcc5459695705640437671.
This split the component's description (props, template, ...) of
the field's description (displayName, supportedTypes, ...) and makes
it clearer.
closesodoo/odoo#112498
Task: 3171520
Related: odoo/enterprise#37105
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This is a step closer to a goal of avoiding dependence on asynchronous
modules. Starting from this commit, new tour definition should be
registered to `registry.category("web_tour.tours")` registry.
So, instead of the following:
```js
import tour from "web_tour.tour";
tour.register(name, options, steps);
```
We now do:
```js
import { registry } from "@web/core/registry";
registry.category("web_tour.tours").add(name, optionsWithSteps);
```
Notice the `options` and `steps` params are merged when registering
the tour definition. It should look something like so:
```js
registry.category("web_tour.tours").add("account_tour", {
test: true,
steps: [ ... ],
});
```
And if the `TourManager` instance is needed, one can get it from the
registry like so `registry.get("tourManager")`. Note however that
this instance is only available when the `TourManager` has been
instantiated -- so it's not available at top level of the module.
closesodoo/odoo#111103
Related: odoo/enterprise#36335
Signed-off-by: Géry Debongnie <ged@odoo.com>
Fixes skills display on both employee and applicant page.
task-3002256
closesodoo/odoo#102463
X-original-commit: b93af7c2b502d7b884fbb6a271e5c5cda03af054
Signed-off-by: Kevin Baptiste <kba@odoo.com>
This commit does multiple things:
- The readonly mode of form view is removed but not for the fields.
it means that the fields in the view are always in edit mode except
if we force them to be readonly.
- The control panel is revamped to take less vertical space and shows now
the record editing (dirtiness)/validity status after editing the record.
- The record is saved only when leaving the view or by clicking the save
button when hovering the record status in the control panel.
- The record can still be discarded by clicking the discard button when
hovering the status text in control panel.
task id: 2822553
X-original-commit: 77824ad44b6945a9811120380747f87ef6362ae2
Part-of: odoo/odoo#101118
Co-authored-by: luvi <luvi@odoo.com>
We don't want any padding in those dialogs. The presence of the
padding was a consequence of the rewritte of that dialog in owl.
It is a frequent usecase to remove the padding from the body of
dialogs. We thus introduce a new props on Dialog and when this
props is set to `true`, we do not set any padding on the body.
This commit refactors other usecases to make them use the added
props.
closesodoo/odoo#100045
Signed-off-by: Géry Debongnie <ged@odoo.com>
This commit moves the element inside the table to avoid that the
dropdown may overlap thead column labels.
Part of the overall v16 SCSS optimization/restyle, task-2704984
task-2946835
Part-of: odoo/odoo#98234
Since odoo/odoo#97984 the "Add new skills" button was opening a dialog
and was not considering the `editable` attribute of the list view.
closesodoo/odoo#99741
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Several modules need to display records data in a list table in a way
suitable to possibly different record types. Here we refactor the list
renderer to allows to specify columns (and their colspans) record by
record.
Part-of: odoo/odoo#97984
Several modules need to modify some parts of the templates used by the
list renderer. Those being called recursively (and with parameters
sometimes), it is quite lengthy to do. Now the call to templates are done
dynamically so that it is easier to extend the templates by specifying
some static keys of the ListRenderer.
Part-of: odoo/odoo#97984
Before this commit, X2Many renderers were not easily accessible from the outside,
making it difficult to override them in some extension.
After this commit, the renderers are accessible in the object `components` on the constructor.
Part-of: odoo/odoo#97984
Drop custom cursor classes in favor of Bootstrap default ones.
Part of the overall v16 SCSS optimization/restyle, task-2704984.
task-2918463
Part-of: odoo/odoo#97051
The logic not identical in BS4 -> BS5
The color contrast system in BS5 relies on WCAG 2.0 contrast algo.
So color-yiq is converted to color-contrast.
Note that there are some "texts/buttons/other visuals" elements
which will not have the same contrast as before.
$yiq-text-dark and $yiq-text-light are respectively replaced with
$color-contrast-dark and $color-contrast-light.
Note that we had to use '$min-contrast-ratio: 2.2' for .o_tag_color_X badge.
Task ID: 2766483
Part-of: odoo/odoo#95450
Co-authored-by: Stefano Rigano <sri@odoo.com>
Reorder smart buttons on the hr_employee to have them in the following order:
1. Documents
2. Holiday status
3. Time Off
4. Planning
5. Timesheets
6. Equipments
7. Cars
8. Contracts
9. Appraisal
10. Work Entries
11. Payroll
12. Attendance
13. Extra Hours
- Log in the chatter the name of the plan that has been started via the button "Launch Plan"
- When on mobile, open the Time Off Calendar in month view
- When sending a sms without any message, only display Message once in the invalid fields
- Avoid the sms-help info disappearing when clicking on it and there are characters in the body of the message
- Update the tooltip of phone number in the send sms wizard
- Avoid the employee name to be displayed on two lines on mobile if the name is too long. Reduce the font size instead
task-2735679
closesodoo/odoo#83745
Related: odoo/enterprise#23886
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Reduces load_menus answer size by 32% (between 20kb and 200kb savings
for the initial loading of the backend, depending on the number of apps
installed). Support for SVG icons in the web client for menus/apps.
Reduced PNG icons for apps list (8 bits PNG instead of 24 as our icons
don't need more colors as they are flat designs)
closesodoo/odoo#84280
Related: odoo/enterprise#24200
Signed-off-by: Fabien Pinckaers <fp@odoo.com>
When the user has no rights on the Employee app, he can still
see the information on the employee public view
If the skills module is installed, there are add and remove buttons
displayed even in the absence of user rights.
Buttons should be hidden if the user has no rights to edit the
skills and resume
task-2702678
closesodoo/odoo#81617
X-original-commit: fd2f6e9586c5c853ba36d7ce511591574fac0bb2
Signed-off-by: Kevin Baptiste <kba@odoo.com>
- Reset skill levels on skill/skill type change
- Improve form view
- Add a sequence on hr.skill
closesodoo/odoo#73305
Taskid: 2575351
Signed-off-by: Kevin Baptiste <kba@odoo.com>
When studio is installed, the List view renderer will always render a
threedot menu to promote studio, but since resume and skill widget
extend that view it also gets rendered on top of the add button.
This change completely removes the optional dropdown menu from those two
widgets.
Task ID: 2578126
closesodoo/odoo#72654
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Overall colors review to achieve WACG standard compliance.
https://www.w3.org/WAI/standards-guidelines/wcag/
Current contextual colors work fine when used for backgrounds but fail
WACG tests when are used for text.
Unfortunately Bootstrap use the same palette in both scenarios without
providing effective control over text colors.
The 'text-emphasis-variant' mixin, indeed, allows to darken a color by a
certain amount, but since the amount is not customizable per-color the
final result is always either too dark or too light for colors that are
not used as a reference.
This commit will define a specif SCSS map called `$o-theme-text-colors`
that mirrors the default '$theme-colors' structure and contain
fine-tuned values to be used specifically for text.
In order to keep the same classes names, we customize the default
'text-emphasis-variant' mixin, instructing it to first look for our
fine-tuned colors and eventually fallback to default.
This commit will also adapt all the modules that use to hardcode text
colors in SCSS rather than using default utility classes. We handle this
using different approaches:
- Use utility classes whenever is possible (eg. 'text-info')
- If apply the class directly is not possible, '@extend' it in SCSS
- If '@extend' is not ideal because of code complexity (eg. ':hover'
interactions), use the new 'o-text-color([color name])' scss function.
Before this commit, you had to scroll horizontally to see
some options like "add" and "delete" in the "resumé" tab.
It's because long titles aren't break to the next line.
.o_resume_line_title had "white-space: nowrap" property because
of list view global rules.
Steps to reproduce:
- Go to "Employee"
- Select "Mitchell Admin"
- See "Université Libre de Bruxelles - Polytechnique" as title
closesodoo/odoo#68385
Task-id: 1929043
X-original-commit: ca0d8978b6585fe4f96100df56b8a7346468dc6c
Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Before this commit, hr_skills module defined a few css rules
but weren't enclosed in a custom class to make them only
for hr skills so these rules leaked everywhere in odoo.
This commit encloses these css rules to not leak them and move
a rule which changes the color of list's remove button into web
module to keep the color.
closesodoo/odoo#67921
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
*:board,hr_skills
Hold on tight, this is a tricky one.
Allows *any* readonly list view (only plain lists, not x2manies) to
become partially editable when checking records.
This means that once checked, a record line acts just like it was
in an editable list. You can click on it, edit any of its values as long as
they're not constrained by readonly modifiers, and save them on the fly.
Clicking on an unchecked record will have the same effect as before:
it will open the record, regardless of the other selected records.
You can also check multiple records and edit them all at once by
changing the value of one selected record (just like standard multi edition).
Keyboard navigation is also allowed between selected records (TAB and SHIFT+TAB
to navigate and ENTER to save).
/!\ If a list is only made of records having all of their fields locked by
readonly modifiers, checking a record and clicking on it will do absolutely
nothing. This is to keep consistency with the rest of the specs.
Task 1967602
This commit adds a new parameter on fields for list view and one2many.
The parameter name is "optional" and its values are "hide" or "show".
Columns of the list view which have the optional parameter set are
listed in a dropdown that can be toggled from the last cell of the
table header. The ones with optional set to "hide" are hidden by
default.
User choice is stored in local storage. If no saved parameter can be
found in local storage then the default value from the view is used.
Due to the overflow behavior of the responsive table, we were forced
to wrap the table-responsive div in yet another div. We changed the
o_list_view class on the table to o_list_table in order to reuse
the more generic o_list_view class on the top-most div. CSS rules
and selectors had to be updated according to this change.
Task-1902765
When a employee succeed a course or a certification, a new line
will be added in resumé of employee profile.
+ [FIX] hr_skills: remove sequence to sort resumé
Actually, sorting a resumé doesn't work because we add new line for
title in the array.
With this commit, all sequence are removed. The resumé is sorted
by date and skills are sorted by level.
closesodoo/odoo#31764
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>