Commit Graph
54 Commits
Author SHA1 Message Date
Romain Estievenart e0231481d6 [FIX] base,hr,web: kanban image sizing/look & feel
The image illustrating some kanban cards (like "Employees" or
"Contacts") has a weird scaling and rendering on smaller screen sizes.

Step to reproduce (on small screen):
1. Open Employee
2. Apply a filter
3. Picture is ugly (shape changes to get something pretty weird)

This commit fixes it by:
1. removing the rounding which was only applied (sic) on smaller screens
2. adjusting the size and/or the margins of the image to keep its ratio
   and the alignment with the other kanban cards.

Task ID: 2198419

closes odoo/odoo#45956

X-original-commit: dd5db84464998b45d0524055f9c96bcad894c4c9
Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
2020-02-21 14:28:04 +00:00
Sébastien Theys b6288e5446 [IMP] *: remove image_64 and clean views
There are too many image sizes. Since they are stored resized this takes time to
generate when saving a new image, it's more rows on the attachment table, more
files on the disk, ...

64px is close enough to 128px that it can be removed without a big impact on
download size.

It will even reduce download and number of requests when both images are
displayed because now only one has to be downloaded and then benefit from cache.

The difference between the two is typically around 1.5kB which is negligible
these days, especially when the request overhead is around 0.5kB already, not
even taking into account other factors such as latency.

If a 64px image must absolutely be returned, it is still possible to pass the
size parameters to the image route. But the current guideline is to handle
resizing in the views when necessary.

Views
=====

- remove width and height attributes when existing CSS rules are overriding them
  (eg. `.oe_kanban_avatar` in the right context)
- add CSS rules instead of width and height attributes when possible
- use `object-fit: cover;` where width and height are forced to avoid distortion
  of non-square images
- for products, use `object-fit: contain;` instead, keep ratio but without crop
- add new CSS rules where the expected size was max 64px*64px before due to the
  image size itself
- remove `img-fluid` where using size classes to avoid conflicting rules

task-2060865

closes odoo/odoo#36147

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2019-09-19 10:23:39 +00:00
jbm-odoo 252609d375 [IMP] employee profile: Reload the view if language changed
When a user change his langage in employee profile, he doesn't see
the result before reloading manually the page.

With this commit, when a user change his language, the page is
reloaded on saving. And remove Create button on My Profile

closes odoo/odoo#34906

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-08-02 11:44:45 +00:00
ff7a82c81b [REF] hr: adapt code after jQuery update
Part of task 1896658

Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Christophe Matthieu <chm@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: David Monjoie <dmo@odoo.com>
Co-authored-by: Martin Geubelle <mge@odoo.com>
Co-authored-by: svs-odoo <svs@odoo.com>
Co-authored-by: Vincent Schippefilt <vsc@odoo.com>
2019-03-06 20:07:17 +01:00
Lucas Lefèvre d77ce4c2a9 [IMP] hr_*: introduce the employee profile
General Purpose
===============

We want an 'Employee profile' gathering every data about an employee.
The main form view is modified to become this employee profile.
A user can also see his own profile through the Preferences menu.
The new profile replaces the current Preferences view if the hr module is installed
and the current user is linked to an employee.

A user should be able to see and edit his own profile.

*Problem*:
Many fields on hr.employee are protected by groups="hr.group_hr_user".
Therefore, a regular user cannot see or edit those fields.

This protection must be bypassed to allow read/write access
to the regular user's own data.
A similar mechanism already exists for res.users (for Preferences)

The better (least worst) solution found is to reuse this mechanism by adding related fields on res.users.

Pros:
- Don't change security access on hr.employee
- Don't implement yet another custom security layer, risking to add new security breaches
- A lot of fields are added by other modules on hr.employee.
  It would have required to integrate them with the custom security layer.
- Fields added by other modules on the user's preferences view (normal view, not the profile)
  are automatically included in the employee's profile view.
- Allow the hr.employee form view to be different than the user profile accessible
  through the Preferences menu.
  E.g. add custom buttons only relevant to the logged in user such as "Request a leave".
Cons:
- Each field from hr.employee that you want to appear on its profile
  must be added as a related field on res.users
- Those related fields must be added to user's preferences view (duplicate views)
- They also must be added to SELF_[READABLE | WRITABLE]_FIELDS

Note:
When the front-end loads the views it gets the list of available fields
for the user (according to its access rights). Later, when the front-end wants to
populate the view with data, it only asks to read those available fields.
However, in this case, we want the user to be able to read/write its own data,
even if they are protected by groups (groups are kept on the related fields on res.users).
The front-end need to be made  aware of those fields by sending all field definitions.

hr_attendance
=============

This commit integrate attendance in the new employee profile.
It also adds a stat button to this employee profile showing
the number of hours worked last month.

Remove the boolean computed field 'manual_attendance'.
This field is just a shortcut to add/remove the employee's user
in the "Manual Attendance" group.
The checkbox is confusing on the employee's form and this should
be done through the normal group management screens.

hr_presence
===========

Display the presence status on the employee kanban template.
The status is a colored chip which can be green (present),
orange (to define) or red (absent).

Currently, the presence status is only computed when accessing
the report view. As this commits displays it on the employee kanban,
it should be updated more frequently.
The state should not be updated every time the kanban view is loaded
since the computation is a bit heavy. Instead: add a cron to update
status every 15 minutes.
-> The status is accurate on the report view (status is still updated
   when loading the view)
-> The status in accurate at 15 minutes on the kanban view

[ADD] hr_attendance_presence
============================

Bridge module between hr_attendance and hr_presence.

This commit integrates hr_presence module in the employee
profile and adds the presence status on the employee kanban view.
But hr_attendance adds at the same place a similar status icon for
checkin/checkout.
This bridge module makes the status from hr_presence invisible as
hr_attendance should be the main presence control mechanism.

Also, this commit adds the ability (through a new setting option)
for hr_presence to take into account checkin/checkout to determine
the presence status.

l10n_be_hr_payroll
==================
integration with employee profile
2019-02-14 16:28:54 +01:00
qsm-odoo b04dec4025 [REF] *: rename all LESS files to SCSS
This is a simple renaming without adaptation.
2018-04-18 15:59:15 +02:00
qsm-odoo bc11426ab0 [IMP/FIX] *: Kanban dashboard LESS layout
* Fix alignement/layout problems since the reintroduction of
bootstrap grid gutter.
* Fix mobile layout problems.
* Fix various Firefox problems.
* Use odoo variables and simplify LESS.
* Use input type="text" instead of input without type.
2015-09-02 13:22:13 +02:00
qsm-odoo 916187e0fb [FIX] web_kanban + others: kanban record two columns layout
* Remove use of flex for kanban record layout (text overflow ellipsis
could not work in row wrap flex layout as flex would prefer to wrap its
elements than add an ellipsis inside its content)
* Fix xml templates (double use of o_kanban_image + non-existing class)
2015-08-20 15:26:03 +02:00
Martin Geubelle 00fa979264 [IMP] hr: improve hr_employee kanban view
Mainly fixes for the follow button and move css to less
2015-08-06 11:40:07 +02:00
Thibault Delavallée 1c38e61c35 [REM] mail, hr: removed suggested groups / suggested employees feature.
Removed fields and code related to the display of groups and employee
suggestions. This impacts notably the model of res.users in mail and
hr.
2015-07-09 10:09:10 +02:00
Géry Debongnie efe9e0241f [IMP] hr: update some templates to new design 2015-06-15 16:30:36 +02:00
Géry Debongnie 461e3d6784 [FIX] various: update some js modules to new kanban
The kanban view has been split in various files, and js modules
using them need to correctly import the classes.
2015-06-15 16:30:36 +02:00
Pankaj Joshi 98d0e3cc4b [IMP] updated icon classes which are renamed in font-awesome v4.2 and removed useless icon-* classes of old font-awesome 2015-06-08 12:52:29 +02:00
Martin Geubelle a3f3a0db68 [IMP] hr, hr_*, project, sale, sales_team, stock: in dashboards, add color picker, add domains on reports and style improvements 2015-05-22 17:54:34 +02:00
Valerie Pirenne c24332e6da [IMP][ADD] mail, various: timeline view.
This commit introduces a new view type, the timeline view. This view is
intended to display messages like the previous chatter. This is now a view
like the form or list view. Like other views it will be possible to have
custom templates for some specific needs, allowing customization.

[IMP] mail: the value tracking is modified. Previously messages were created
containing the modified values. Those values are now stored, using a new
model mail.tracking.value. The message body is dynamically build based on
the values. Tests have been updated.

This version is temporary. Indeed two main modifications will come in a short
future :

 - the new design will improve the display
 - the slack mode will change the way the Inbox and notifications are managed

All glory to the Hypnotoad.

Special thanks to Valerie Pirenne (vpi), Jerome Maes (jem) and Richat Mathot
(rim) that did not code but said a lot of things. Martin Trigaux (mat) did
nothing, a bit like for the slides modules, but he is busy sending emails.
2015-05-21 12:10:25 +02:00
Martin Geubelle 0aa5bb7ada [ADD] hr, hr_*: new dashboard view for hr departments 2015-05-12 18:00:08 +02:00
Géry Debongnie 4fdf74fe21 [IMP] web+addons: improvement to module system
The module system needs to know the dependencies of a given module
before executing the function.  This is why the dependencies were
defined once in an array, and then were described one more times in the
call to require.

But a trick can simplify this: the boot function can parse the string
representation of the module and extract the calls to require from it.
It is more work for the processor, but it leads to simpler module
definitions.
2015-03-18 09:23:37 +01:00
Géry Debongnie 2ebe3076d2 [REF] hr: update to the new module system 2015-03-18 09:01:52 +01:00
Christophe Simonis 9cf6786e75 [MERGE] forward port of branch saas-6 up to fefb298 2015-03-02 18:25:40 +01:00
Jérome Maes f6ddf1a617 [FIX] hr: employee kanban alignment style 2015-02-26 16:41:30 +01:00
dka-odoo d27910a8f2 [IMP] hr_department: new kanban view for HR Departments.
hr add a simple kanban view that is updated by the various hr modules.
Each module adds statistics and links in the kanban vignette, either
in a to do or to approve column.

The department kanban view can be seen as a small dashboard to have
the main data about the department displayed. Links allow the HR
manager to be redirected towards the various things to do or to
approve in its department.
2015-02-25 11:25:40 +01:00
Yannick Tivisse 9207c4645a [IMP] Replace all oe_e class by fontawesome + remove entyporegular library 2015-01-21 16:11:26 +01:00
Thibault Delavallée 0451f19771 [FIX] hr: fixed issue in employee image display in the kanban view
especially when using the group-by. Added a missing 'row', used an img-responsible
class instead of a fixed width.
2014-12-24 16:43:10 +01:00
Christophe Simonis d64fe8279b [MERGE] forward port of branch 8.0 up to c92e70b 2014-11-17 17:31:12 +01:00
Denis Ledoux d9e48bae42 [MERGE] forward port of branch saas-3 up to 7ab4137 2014-11-14 16:58:24 +01:00
rba-odoo 6baca1b494 [IMP] *: kanban custom CSS removal 2014-11-12 13:39:37 +01:00
Christophe Simonis e4fdd85424 [FIX] hr,mail: correct remove of suggestions. 2014-11-06 17:41:44 +01:00
Xavier Morel 8f697ee385 [FIX] incorrect qweb interpolations
unnecessary, worked by accident and broken by change to interpolation regex in 35f5fb46
2014-10-13 09:31:59 +02:00
Olivier Dony 30f43daa3b [MERGE] Forward-port of latest 7.0 bugfixes, up to aeaa826 2014-05-27 16:50:02 +02:00
Martin Trigaux 4c36ee0b59 Restore missed images during bzr to git transition 2014-05-23 10:11:25 +02:00
Fabien Pinckaers 1ddc8c7f93 [IMP] missing file 2014-05-23 09:55:24 +02:00
Fabien Pinckaers f6575e2645 [FIX] Missing file 2014-05-23 09:43:34 +02:00
Martin Trigaux f3e00b8c17 [MERGE] sync with trunk
bzr revid: mat@openerp.com-20130702095014-boktf79ocopibi0t
2013-07-02 11:50:14 +02:00
Antony Lesuisse fc70550ca2 [IMP] move html module description and icon
bzr revid: al@openerp.com-20130628100441-swpanf2jwcojygh4
2013-06-28 12:04:41 +02:00
Martin Trigaux ad78a1b6aa [MERGE] sync with latest trunk
bzr revid: mat@openerp.com-20130621075406-d9syftu04k8iytcz
2013-06-21 09:54:06 +02:00
Thibault Delavallée 0525c965a9 [CLEAN] [REF] mail, hr: cleaned JS/CSS/XML code for suggestion widgets. Those are now 2 widgets extending web.Widget, included inside a Sidebar widget.
bzr revid: tde@openerp.com-20130515103518-2djzogjdtjh0n7rl
2013-05-15 12:35:18 +02:00
Martin Trigaux 52ddce88f3 [ADD] option to globally stop showing employeep suggestions
bzr revid: mat@openerp.com-20130403152443-3jqg0v182mcqsk0f
2013-04-03 17:24:43 +02:00
Martin Trigaux 46110fbf29 [ADD] option to globally stop showing group suggestions
bzr revid: mat@openerp.com-20130403151056-4vjno2k9n77drm6y
2013-04-03 17:10:56 +02:00
Martin Trigaux 788501fd78 [IMP] better templates
bzr revid: mat@openerp.com-20130403143243-e0bysy0sqy90i2io
2013-04-03 16:32:43 +02:00
Martin Trigaux 8d8eb553ce [ADD] suggestions for employees to follow
bzr revid: mat@openerp.com-20130403142716-lmsz9hwkg7tathly
2013-04-03 16:27:16 +02:00
Martin Trigaux 307818ea0b [ADD] additions from trunk-hr-goal-mat
bzr revid: mat@openerp.com-20130320111520-fmz14if4k400s9s4
2013-03-20 12:15:20 +01:00
Martin Trigaux 893c83dcf4 [IMP] better follow buttons
bzr revid: mat@openerp.com-20130311164829-vd8wuwh1657s0vjt
2013-03-11 17:48:29 +01:00
Fabien Pinckaers 1123f9809b [IMP] CSS fix
bzr revid: fp@tinyerp.com-20121126203154-ubkwzc1cpgur4nyf
2012-11-26 21:31:54 +01:00
Fabien Pinckaers c417900255 [FIX] css hr employee
bzr revid: fp@openerp.com-20121121230513-5qtw1ci29sz07a5x
2012-11-22 00:05:13 +01:00
Paramjit Singh Sahota 507b632e41 [IMP] Improved code the kanban image which cuts from upper side.
bzr revid: psa@tinyerp.com-20121023060126-k6m0o0bfk9gnqf2s
2012-10-23 11:31:26 +05:30
Paramjit Singh Sahota bb6bc1a91b [IMP]Improved code for the kanban css of HR.
bzr revid: psa@tinyerp.com-20121010063335-n7n0j6cytjinavxs
2012-10-10 12:03:35 +05:30
Frédéric van der Essen db6c61f666 [FIX] made things more to my taste in hr and chatter's css
bzr revid: fva@openerp.com-20120920154645-lctwfo0tbaxsobwg
2012-09-20 17:46:45 +02:00
Antony Lesuisse e15e378f92 [FIX] ul li
bzr revid: al@openerp.com-20120906175616-0bpm1yhb5rrsi44u
2012-09-06 19:56:16 +02:00
Antony Lesuisse 03f7eb10f4 [FIX] remove semantic part2
bzr revid: al@openerp.com-20120906104624-sq3cd652vevmij6c
2012-09-06 12:46:24 +02:00
Thibault Delavallée febdd29d76 [MOV] hr: hr.png now icon.png, to be used in module kanban view.
bzr revid: tde@openerp.com-20120730141034-nyb8qcixcd72rdja
2012-07-30 16:10:34 +02:00