Commit Graph
80 Commits
Author SHA1 Message Date
Didier (did)andSébastien Theys add71e94b5 [FIX] mail: compute display_name for partner and user
task-2322135

closes odoo/odoo#58374

X-original-commit: d9bdbde95c3694ecdaccd58b5475631137c22e93
Related: odoo/enterprise#13478
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Co-authored-by: Sébastien Theys <seb@odoo.com>
2020-09-23 18:59:24 +00:00
Sébastien Theys 590a088750 [FIX] mail, *: fix opens and redirects, adapt messaging menu close
task-2244279
task-2262862
task-2274993
task-2277537
task-2282238

closes odoo/odoo#56755

X-original-commit: 17611f4adc5e950b0a75a2a6615b1da3c956387f
Related: odoo/enterprise#12769
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-08-28 17:34:13 +00:00
Bruno BoiandAaron Bohy 26633ea8bb [IMP] hr: add a standalone version of the avatar employee widget
This will be useful for special views like gantt, grid…

A StandaloneM2OAvatarEmployee widget will be available and would allow to
instantiate a Many2OneAvatarEmployee widget anywhere.

Usage:
  const widget = new StandaloneM2OAvatarEmployee(<parent>, <value>);
  widget.appendTo(<Node>);

Where:
  <parent> the widget parent, if it is given
  <value> {number|[number, char]} either the employee id or an array representing the employee: [id, display_name]. If only the id is passed, the widget will fetch the display_name through a name_get rpc.
  <Node> any DOM Node object you want the widget to be appended to.

Examples:
  const w1 = new StandaloneM2OAvatarEmployee(null, 3);
  const w2 = new StandaloneM2OAvatarEmployee(null, [1, 'Mitchell Admin']);
  w1.appendTo(document.body);
  w2.appendTo(document.body);

closes odoo/odoo#54230

Taskid: 2272544
Taskid: 2272582
Related: odoo/enterprise#11412
Signed-off-by: Mathieu Duckerts-Antoine <Polymorphe57@users.noreply.github.com>
Co-authored-by: Aaron Bohy (aab) <aab@odoo.com>
2020-08-17 08:30:52 +00:00
Sébastien Theys c2918c139b [IMP] web, *: improve mock server and replace most mail mockRPC
Improve mock server:

- add support for mocked `fetch`
- add support for `active_test`
- add support for x2m `in` in domains
- add support for default values computed from a function
- implement a more natural "next id" compute
- allow initial data without ids
- ensure write and x2m commands integrity
- improve bad data/bad commands error messages
- always warn for failing RPC, not only in debug mode
- fix all existing tests that had inconsistency data

Other changes done in mail (or dependents) that are not just related to tests:

- remove `direct_partner` from formatter result
  ->`correspondent` can be computed from other keys, especially `members`

- fix `livechat_visitor` convertData
  -> only process if there is value

- add `current_partner` and `current_user_id` as `init_messaging` result
  -> easier to mock than session

- remove usage of `need_moderation`
  -> that was just a search indirection to `moderation_status`

- adapt `partner_id` -> `res_partner_id` key in `_notification_format`
  -> to be consistent with field name

- add name in result of `mail_partner_format`
  -> sometimes display_name is not the same

- remove usage of `is_moderator`
  -> that was just an indirection to `moderation_channel_ids`

Enterprise counterpart: https://github.com/odoo/enterprise/pull/11523
task-2287171

closes odoo/odoo#55854

X-original-commit: 7ba3fecb3377a720d1eb70e7515a0c45da73836d
Related: odoo/enterprise#12391
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-08-13 16:26:35 +00:00
3fea5b2136 [REF] mail, *: refactor messaging with OWL
This commit is a significant rewriting of client-side discuss, chatter,
chat window, and messaging menu using OWL. The behavior should be broadly
the same, with some slight functional changes here and there.

From a technical standpoint, the code of messaging is mainly organized in 2
main groups of modules:

- models, which are logical entities that depict the client-side state of
  messaging as a whole.
- components, which are in charge of displaying information from models.

This refactoring also introduces new JS guidelines regarding folder structure
(/static) and naming rules for JS modules.

Community PR: https://github.com/odoo/odoo/pull/39023
Enterprise PR: https://github.com/odoo/enterprise/pull/6249

Task-1914207

This PR is a collaborative work by Alexandre, Julien, Sébastien and Xavier,
with the precious help of Lucas to speed it up towards the end.

closes odoo/odoo#39023

Related: odoo/enterprise#6249
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Co-authored-by: Alexandre Kühn <aku@odoo.com>
Co-authored-by: Julien Giannone <jgi@odoo.com>
Co-authored-by: Lucas Perais <lpe@odoo.com>
Co-authored-by: Sébastien Theys <seb@odoo.com>
Co-authored-by: Xavier Dubuc <xdu@odoo.com>
2020-06-15 18:12:21 +00:00
Julien Mougenot c4786fccfd [IMP] *: update notifications to optional title
closes odoo/odoo#52826

Related: odoo/enterprise#11084
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-06-12 09:01:50 +00:00
Yannick Tivisse 12b526432f [IMP] hr: Display chat icons on employee kanban/form views
Purpose
=======

On the Employees App, we dont have a smart way to start a discuss
with a colleague or an employee.

Specification
=============

Style for each button :
- use fa-comments
- use primary color/action color (green)

On private/public employees form/kanban views, add a button to
start a chat with the user

closes odoo/odoo#51484

Taskid: 2252207
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-05-25 14:50:19 +00:00
Aaron Bohy 22a66ae694 [IMP] hr: add Many2OneAvatarEmployee field widget
This widget is a variant of the Many2OneAvatarUser widget, designed
for many2one fields pointing to 'hr.employee'.

Part of task 2195254
2020-05-05 10:05:12 +00:00
Aaron Bohy e63ffeab5a [REF] mail,hr: move openDMChatWindow to MailManager
It will be used by the Many2OneAvatarUser widget defined in the
next commit.
2020-05-05 10:05:12 +00:00
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
Xavier MorelandPrakash Prajapati ab6d0c3851 [FIX] hr, purchase: update import templates
* the employees file apparently never worked as the marital status was
  updated before template files were added (respectively
  0eb58775c9 and
  b60de0db41)
* the purchase template was never updated to reflect the Big Demo Data Changes
  (58fc4e4409).

Fixes #39074

Employees file update split off of task 2059779.

closes odoo/odoo#39823

X-original-commit: 80a2f6877378a87638c04061ceaf69965c1707c0
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Co-authored-by: Prakash Prajapati <ppr@odoo.com>
2019-11-05 18:37:00 +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
Mitali Patel 3f3593a4fd [FIX] hr: Set the same name/image for administrator's employee
Make sure that the employee and its user have the same name and image
2018-08-10 11:50:07 +02:00
stefanorigano 1d9208c4fa [REF] *: improve app icons, add SVG version
- Uniform colors and design
- Replace duplicated icons (eg. sale / sale_management)
- Improve misleading icons (eg. POS)
- Add icons for new apps

Add SVG versions to lossless future editing and print/marketing use.

task-54681
2018-08-09 15:46:06 +02:00
Priyanka KakadiyaandNimesh Jethva c7eae6552e [REM] various: remove index.html for apps.
Several applications have an index.html file that is used to fill the html
description of the module. However those descriptions are generally not
up to date: they contain outdated screenshots, feature descriptions are
not maintained, ...

Instead we just rely on the discover button that redirects on the application
website. It has more chance being up to date. Moreover updating a website
is easier than updating the index.html of a module.

This commit is related to task ID 47179 and 1861544. Related PR are #22689
and #25556. First one is about classic applications while second one is about
website applications.

Co-Authored-By: Nimesh Jethva <nje@odoo.com>
2018-08-03 14:54:42 +02:00
Yannick Tivisse 58fc4e4409 [IMP] base: Improve partners/employees demo data
- Update all the pictures
- Rename the partners with a name that is easy to say for an English speaker (No more 'Agwoleight')
- Update all the addresses/phone numbers in the american format
- Unify the demo data with the new theme (Wood shop/manufacture,...)
2018-07-25 17:34:06 +02:00
Jigar Patel b60de0db41 [IMP] import/export UIs
Task 40692

Various changes to import/export (mainly) UIs:

* default to excel & "full" (non-import-compatible) export
* auto-detect encoding of CSV using chardet
* remember column -> field mapping after having imported a file (useful
   for repeated imports where auto-matching failed)
* better handle localised booleans & column names
* automatically select source list view's fields when exporting
* better integrate import templates feature and add a number of templates
2018-07-17 15:19:05 +02: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 fb363b572b [FIX] *: adapt odoo interface violet
Change color #a24689 to #875A7B

Commit https://github.com/odoo/enterprise/commit/8ac1c19fac7615fecd51e670f798d13158a4e53c
changed the odoo interface violet by changing the main LESS variable
but forgot there was many direct occurences in XML/HTML/... (for
example for the mobile browser color).

Even if it's community the odoo interface violet is used at many places
(module description, XML demo data, ...).
2016-10-05 10:29:00 +02:00
Foram Shah 2403f61e5e updated the description of 'hr' 2016-05-10 15:24:44 +02:00
Fabien Pinckaers 4c8e908b49 [IMP] Speed up app switcher loading: 645k --> 137k lossless compression for all icons 2016-02-26 11:39:38 +01:00
Yannick Tivisse 1e8a890be6 [IMP] Rename Live Chat into Website Live Chat 2015-09-07 18:25:51 +02:00
Fabien Pinckaers 3658a894bc [IMP] modules description, no external link 2015-09-04 11:59:55 +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
Simon Lejeune 74d1e43a40 [ADD] many addons: add new icons
This commits adds icons for most applications.  They are
necessary for the home menu in the enterprise edition.
2015-06-18 12:58:18 +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
rlu-odoo 8b67a7202d [REF] OpenERP --> Odoo in various UI texts
Rebranding has been done in:
- data/demo files
- html templates
- help notices
- comments
- logger messages
- and other various messages

(Commit taken from odoo-dev:8.0-improve-openerp-odoo-rlu at rev 7deaa08)

Closes #1260
2014-07-18 13:45:41 +02:00