STEP TO REPRODUCE:
=================
* Unistall hr_org_chart application
* Click on hr application
You will have an error due to the missing hiercharchy view.
closesodoo/odoo#158523
Signed-off-by: Bertrand Dossogne (bedo) <bedo@odoo.com>
For a first iteration, Russian translations were done using DeepL using
1 large .pot file of all the standard modules to translate (e.g. no
localizations, no test modules, etc). Unfortunately for some reason
doing a msgmerge with the existing ru.po files didn't seem to work, so
old "Translators" metadata at top of files were lost (maybe they will be
re-added during next Transifex sync?)
Part-of: odoo/odoo#152285
The structure of the stat button which is not generated by a field
has been changed to match the buttons which are generated by a field.
task-3573807
Part-of: odoo/odoo#141163
Before this commit, some recent changes altered the generic view for
Org Chart view of `hr.employee` model. The problem is those changes
also altered the other hierarchy view used in others models.
This commit moves the recent specific changes to hierarchy view
of `hr.employee` model to be sure to alter only the org chart view
of that model.
Part-of: odoo/odoo#140951
This commit introduces some adjustments to the dark mode color scheme
and the use of bootstrap classes in Community.
- Mini calendar contrast -
The colors were not using variables, making them non dynamic
and breaking the contrast in dark mode.
- Avoid !important rules spreadsheet -
Prior to this commit, spreadsheet top bar was using a `bg-white` class,
making it pure black in dark mode.
Since spreadsheet is designed with light colors and we don't provide a
dark mode for it, we remove that class and set a `background-color`
property using CSS in Enterprise.
- Input color -
This commit fixes the focus behavior on the searchbar in the control
panel, the `command_palette_search`, and the `start a conversation` in
discuss.
- Copy clipboard field border color -
Make use of the `text-primary` color for the copy to clipboard field
We use the o-theme-color function to avoid an undefined since primary
doesn't exist in the o-theme-text-color map in white mode.
- Web_editor toolbar variables -
The toolbar was using the `o-brand-primary` variable
which was set to a darker shade. This caused issue when activating an
option due to how vibrant the color is.
- Improve the controls on border-color -
Introducing a custom property on the border-color to allow
further control on individual components (such as the popover).
- Improve setting tabs colors use -
Prior to this commit, the colors of the settings tabs menu were kinda
inverted. The menu was light in dark mode and dark in light mode.
We fix this by changing the values associated to the CSS variables in
use.
- Make model field selector dark mode proof -
Fixing the design of the model field selector popover in both
light and dark mode. Since the popover was using custom style with
arbitrary values, it was not designed for the dark mode and had a lack
of consistency.
To improve the design, we use variables rather than custom style, and
make sure the desired render is as close as before.
- Sign colors use -
This commit aims to improve the sign module in both light and dark mode.
There were some readability issue with some `btn-light` having poor
contrasts in both light and dark mode, and the use of some classes was a
bit unexpected (e.g `card-header` to set a grey background with some
padding).
- Improve buttons design inside listview -
Prior to this commit, this button was using custom CSS to make it look
like a primary button, while it was using classes related to secondary
buttons.
We remove the custom CSS used to style it correctly and keep our button
design consistent.
- Messaging menu layout in mail -
This commit aims to improve the design of the notifications displayed
in the messaging menu. Prior to this commit, the notifications dropdown
was using custom CSS variables overriding the regular behavior
of our dropdowns.
In fact, the layout was generating some friction:
1) Marking a notification as read would turn its background into a
darker color
2) Effects like `:hover` were all based on the custom CSS variables
resulting in an inconsistent layout.
- Multi company selector adaptations -
In darkmode the multi company selection was using the btn-light which
creates a weird effect and overrides the dropdown default hover behavior
This commit uses the btn-link to display an hover effect on the
company switch and on the checkbox while blending with the background
and the default dropdown hover effect.
- Adapts default badge design -
Improve the design of the default badges in dark mode.
If you open the light mode, these badges are dark grey with a white
text. If you switch to dark mode, they are dark grey but with a dark
text, which makes them look either muted or off.
We make use of SCSS variables to handle the color of the component,
providing a good styling in both modes.
- Fix kanban cards borders inside dropdown -
Fixes the issue with the divider inside the kanban dropdown menu not
showing in dark mode.
To ensure it is visible, we assign it the `$dropdown-divider-bg`, which
is the color it should use, as the horizontal divider above uses.
- Fix tour pointer design for dark mode -
This commit aims to insert the tour pointer and its content inside the
styling we applied to our tooltip.
To do so, we make sure it uses CSS variables, allowing more control and
consistency, plus we replicate the overall look of our tooltips.
- Fix `text-primary` on action background contrast -
This commit improves the readability of our `text-primary` classes when
it's used on a `$o-component-active-bg` background.
Prior to this commit, the `text-primary` was not meeting the contrast
standard, mainly when you were using the `CMD+K` shortcut on the
app switcher.
To prevent that, we changed the background to a `$o-component-active-bg`
background with an opacity ensuring our text provides a good contrast.
- Fix input states -
Prior to this commit, the `--o-input-border-color` CSS variable was
using the `$o-form-lightsecondary` variable to define the standard color
of the `border-bottom` property of our inputs.
This was conflicting since `$o-form-light-secondary` is also used to
define the `background-color` of our table on focus.
With this commit, we separate these two element with different variables
to make sure they don't affect each others.
- Fix kanban ghost background -
Before this commit, if you created a project without any stage or element
in it, the ghost cards that act like placeholders would be pure `#000` in
dark mode, due to the `bg-white` class.
This commit replaces that class with a `bg-light`, providing a better
visual result in both light and dark mode.
- Fix new message design -
Improve the design of the new message element while
inside Discuss, using our danger color, ensuring a good visual result in
both modes.
task-3201038
closesodoo/odoo#139966
Related: odoo/enterprise#49666
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Co-authored-by: chgo-odoo <chgo@odoo.com>
Co-authored-by: stefanorigano <sri@odoo.com>
Before this commit, the highlight added on a focus record, that styling
added was useful when we displayed only the first result in the search
to be able to build a tree but since now all the records found with
the search made by the user are shown without building a tree if it
is not possible then it is no longer needed to highlight the records
found.
This commit removes the highlight added on the focused record, the one
found by the search since it is not really needed.
task-3556262
closesodoo/odoo#138803
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
This commit adds a stat button in the form view `hr.employee` model
to be able to go to the org chart and visualize the hierarchy of
the current record displayed in the form view.
The action used inside that stat button cannot have a domain to filter
the result to just have the current record since the user will not
be able to search into the search view. The alternative is to use
a context used inside the hierarchy view to add the domain only when
we load the view (as it is a default domain).
task-3376776
Before this commit, when the user unfolds a node to display its child
nodes, if that node unfolded has some child nodes then it could be
difficult for the user to clearly see the hierarchy.
This commit adds an opacity to 50% for the sibling nodes when the user
unfold a node in the same row.
task-3376776
Before this commit, when the user unfold a node in hierarchy view,
he has to scroll to be able to see the child nodes added.
This commit adds an auto-scroll when a new row is added to directly
show the child nodes added on the view when the user unfolds a node
in the hirarchy view.
task-3376776
This commit adds a new menu called `Org Chart` in Emnployee menu
to directly have the Org chart view as first view when the user
clicks on that button.
task-3376776
This commit allows the user to drag and drop a record (hierarchy
node) into another one to set the one hovered as the manager of the
one dragged. It also allows to drag a record into a row to define
the manager of the row as the manager of the record dragged.
This commit also adds an new attribute on `hierarchy` tag to use
when we define that view for a certain model to enable the drag and
drop feature.
task-3376776
Before this commit, the icon displayed inside the Unfold button with
the number of child nodes is the default one. In the employee hierarchy
view, since the child nodes are obviously employees, the icon could
be the one displayed users (`fa-users`).
This commit adds a new attribute called `icon` on `hierarchy` tag
to be able to define another icon displayed on that button. By
doing that, the icon displayed inside employee hierarchy view can
changed to have the one expected and more relevant.
task-3376776
Before this commit, the user can unfold a node in hierarchy view but
before clicking on it he cannot know how many child nodes there are.
This commit adds the number of child nodes in the Unfold button with
the default icon.
task-3376776
Before this commit, the icon of the hierarchy view should be rotate
of 90 deg to have an appropriate icon for the view. The problem is
since the icon class is added on button classes, the button will
also be rotated with the icon instead of just the icon.
This commit defines a `i` tag inside the `button` element to select
the view to be able to apply css rotation only on the icon instead
of the whole button.
task-3376776
This commit extends the kanban compiler for the hirarchy view. Some
changes has been done in the kanban compiler to be able to reuse the
existing code.
task-3376776
This commit adds a new view called hierarchy view, that view allows
the user to visualize a hierarchy in a model. For instance, that view
could be used for `hr.employee` to easily visualize the hierarchy
inside the company (the manager and his employees) as an Organization
Chart.
That commit introduces a new method for the hierarchy view, called
`hierarchy_read`, that method will be when the view will be loaded
to get the initial data to display.
Some details for the definition of that new view:
------------------------------------------------
Some attributes can be defined on the `hierarchy` tag:
- `parent_field` (default='parent_id') contains the parent field name
to use to find the parent record of the current to build the hierarchy.
- `child_field` (optional attribute) contains the child field name
to use to find the child records (it is in fact the one2many field).
If that field is defined then some queries can be avoided since we
directly fetch the children when a read/search_read is done.
Inside the `hierarchy` tag, the fields to read can be added and then
a template as to be defined as we do when we define the kanban view.
The template to create is called `hierarchy-box` and that template
will be used to display the card inside a node in the hierarchy view.
task-3376776
Before this commit, owl was in the linter's accepted global variables.
This allowed direct access to owl global object.
For instance, to use xml from owl, you could do :
`const { xml } = owl;`
or you could use it directly:
`owl.xml`
Now, owl is not accepted on linter's global variables anymore, so to
import xml, now you need to use a proper import:
`import { xml } from "@odoo/owl";`
task-id 3498859
closesodoo/odoo#137517
Related: odoo/enterprise#48364
Related: odoo/design-themes#709
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
This commit removes the legacy session and adapts the modules where it
was used.
task 3439226
closesodoo/odoo#133153
Related: odoo/enterprise#46290
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>