Commit Graph
2974 Commits
Author SHA1 Message Date
RomainLibert 16c17bc108 [FIX] hr: onchange department don't reset manager
We should avoid reseting the manager_id on the employee when there is no
manager defined on the department

Also updates the department form view in order to display the fields
better

closes odoo/odoo#37028

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-09-17 14:54:24 +00:00
RomainLibert 164feadb42 [FIX] hr: stop planning acitivity if user has no access
Since the introduction of the public/private employee model, having an
acitivity defined on hr.employee (the private one) for an employee that
has no rights to read it is useless.

Task id 2072987

closes odoo/odoo#37021

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-09-17 13:30:16 +00:00
Lucas Lefèvre b707a5fd0b [FIX] hr: Open department employees with searchpanel
From the department kanban view,
when clicking on the "Employees" button of a department,
it shows all employee regardless of their department.

This is a consequence of the back2basics commit 9a0fedf
which removed the department filter and added a
search panel instead.

This commit changes the search default filter
to a default filter for the searchpanel.

closes odoo/odoo#36635

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-09-16 07:29:43 +00:00
Odoo Translation Bot e80b81dca1 [I18N] Update translation terms from Transifex 2019-09-15 01:30:37 +02:00
Martin Trigaux 73e70673e7 [I18N] *: export saas-12.5 source terms
closes odoo/odoo#36853

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-09-13 11:38:37 +00:00
RomainLibert 247df46453 [FIX] hr: remove duplicate group
This duplication was introduced by a forward port

closes odoo/odoo#36841

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-09-13 10:13:21 +00:00
RomainLibert 2b34d22b42 [IMP] hr: add note field on hr_plan_activity_type
We would like to have a custom note on plan activities

closes odoo/odoo#36796

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-09-12 14:31:16 +00:00
jbm-odoo 73498572c3 [IMP] hr: Employee Profile set readonly attribute on readonly field
closes odoo/odoo#36698

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-09-11 14:00:39 +00:00
jbm-odoo 5cddbbf9f2 [FIX] web + hr: Kanban view fix o_text_overflow
Fix o_text_overflow class (in contact for example).
Add class o_text_overflow in hr_employee view to avoid email to
be too long.

closes odoo/odoo#36626

Signed-off-by: Romain Libert (rli) <rli@odoo.com>
2019-09-10 12:20:37 +00:00
Lucas Lefèvre 55a4910b2e [FIX] hr: Redirect to company employee profile
Only one employee per company and per user is allowed.
Based on the company the user is logged in, "My profile"
should redirect to the employee profile of the current
company.
If the user has no employee in the current company,
"My Profile" redirects to the simple "Preferences" screen.

Currently, it always redirects to the employee in the user's
main company (`user.company_id`)

This issue is a consequence of a5b6f31 which uses the context
to know the current company instead of `user.company_id`.

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

Un-store the employee_id field on the res.users model.

To achieve this, we need to implement a _search method for this field.

That way, each time we try to access to the employee_id value, the
returned employee depends on the context.
2019-09-10 11:46:01 +00:00
Martin Trigaux 68c753af55 [I18N] *: export saas-12.5 source terms
Still without demo data

closes odoo/odoo#36559

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-09-10 08:58:33 +00:00
Odoo Translation Bot 0d51520083 [I18N] Update translation terms from Transifex 2019-09-08 01:29:12 +02:00
Odoo Translation Bot 86809804f9 [I18N] Update translation terms from Transifex 2019-09-01 01:28:13 +02:00
Yenthe666 89a59558aa [FIX] hr: fix typo in OdooBot notification
closes odoo/odoo#35971

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-08-28 13:06:07 +00:00
Kevin Baptiste 054685875c [IMP] *: finetune search views (back2basics)
The goal of this commit is to finetune search views in several modules.

TaskID: 2055972

closes odoo/odoo#36058

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-08-26 07:40:02 +00:00
Martin Trigaux b247aa3252 [I18N] *: export saas-12.5 source terms
That will be used a the basis for the future 13.0 version
Without demo data

closes odoo/odoo#36057

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-08-26 09:38:09 +00:00
Kevin Baptiste 3ad8820276 [IMP] hr_holidays: reintroduce out of office (back2basics)
TaskID: 2057430

closes odoo/odoo#35952

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-08-22 07:33:20 +00:00
Parth Choksi ebaa132d5d [IMP] various: Clean settings UX (back2basics)
TaskID: 2028958

closes odoo/odoo#35551

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-08-21 12:12:33 +00:00
Christophe Simonis 3faea8fbf8 [MERGE] forward port branch saas-12.4 up to f26de445e5 2019-08-21 10:10:11 +02:00
Yannick Tivisse be983c7002 [FIX] hr: Expose employee timezone on public profile
Purpose
=======

It happens a lot that we access to the employee timezone to compute
presence states, leaves, ...

Instead of sudoing all those accesses, it looks better to expose this
data in the public profile.

closes odoo/odoo#35811

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-08-19 12:05:19 +00:00
Odoo Online 19727047ce [I18N] Update translation terms from Transifex 2019-08-18 06:20:13 +02:00
Christophe Simonis 964f1c2b59 [MERGE] forward port branch saas-12.3 up to 3972e9ea3e 2019-08-13 20:03:07 +02:00
Christophe Simonis 3972e9ea3e [FIX] hr: remove redefined record rule
Actually revert commit 7b1a894573

closes odoo/odoo#35698

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-08-13 14:03:14 +00:00
Martin Trigaux 8be6470a82 [I18N] *: export saas-12.4 source terms 2019-08-13 11:53:38 +02:00
Christophe Simonis b792ba7d9a [MERGE] forward port branch saas-12.3 up to 752b2553c6 2019-08-08 11:52:13 +02:00
Christophe Simonis 7d04dc1c7c [MERGE] forward port branch saas-12.2 up to 9e74730a26 2019-08-06 18:48:24 +02:00
Christophe Simonis 0fadd586fa [MERGE] forward port branch 12.0 up to ff9ddfdacc 2019-08-06 15:57:57 +02:00
RomainLibert b43e06dd5a [FIX] hr: Add the color field to public employee
The color field is necessary to be able to display some fields
(many2many_tags) and used in the kanban views

closes odoo/odoo#35216

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>

closes odoo/odoo#35462

Signed-off-by: Romain Libert (rli) <rli@odoo.com>
2019-08-05 14:27:02 +00:00
Raphael Collet 9920f20e4c [IMP] models: ORM speedup
This branch is the combination of several optimizations in the ORM:

* store field values once in the cache: the cache reflects more
faithfully the database, only fields that explicitly depend on the
context have an extra indirection in the cache;

* delay recomputations by default: use method `recompute` to explicitly
flush out pending recomputations;

* delay updates in method `write`: updates are stored in a data
structure that can be flushed efficiently to the database with method
`flush` (which also flush out recomputations);

* make method `modified` take advantage of inverse fields to inverse
dependencies;

* filter records by evaluating a domain on records in Python;

* a computed field with `readonly=False` behaves like a normal field
with an onchange method;

* computed fields are computed in superuser mode by default.

Work done by Toufik Ben Jaa, Raphael Collet, Denis Ledoux and Fabien
Pinckaers.

closes odoo/odoo#35659

Signed-off-by: Denis Ledoux <beledouxdenis@users.noreply.github.com>
2019-08-20 12:43:59 +00:00
Yannick Tivisse e631dbc182 [IMP] hr: Improve general employee form UX (back2basics)
TaskID: 2054559

closes odoo/odoo#35802

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-08-19 11:10:03 +00:00
lbs-odoo 9a0fedfc65 [IMP] various: improve searchviews UX
Improve searchviews UX in all the modules

TaskID: 2029731

closes odoo/odoo#35700

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-08-16 13:35:21 +00:00
Kevin Baptiste d3a6330b2b [IMP] hr_recruitment: improve usability (back2basics)
TaskID: 2053569

closes odoo/odoo#35767

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-08-16 13:22:29 +00:00
Yannick Tivisse abd73d61a2 [IMP] hr_holidays: Improve general UX (back2basics)
TaskID: 2053585

closes odoo/odoo#35737

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-08-16 11:24:04 +00:00
Prakash Prajapati c058562d73 [IMP] various: Add multi company domains on views
When the many2xxx field relates to a model where company_id is required, set
this  domain [('company_id','=',company_id.id)]

When the company_id field of the related model is not required, set this domain
['|',('company_id','=',company_id.id),('company_id','=',False)]

When setting the domain on a field which is in the treeview of a xxx2many field
evaluate against the company_id of the 'parent'.

Some constraints have been added on sereval models. Take a look at the complete
specification for more details.

TaskID: 2024446
Closes: #35266

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-08-16 11:17:28 +00:00
Prakash Prajapati 25714692b2 [IMP] base: remove the 'Shared contacts book' general setting
The Common partner contact setting is removed from general settings because its
behavior wasn't really clean from a technical point of view
(disabling the rule on partner access) and wouldn't work as well with new
multi-company logic.

The default logic of sharing partner will be kept, but when someone wants to
limit partner sharing, he will do so partner by partner, by
setting the company_id.
Also, the default company_id on a partner will be blank so default partner
will be a sharable by multi-company.

when the partner is created at the time of user creation then the partner's
company will be the same as user's company.and when the partner is created at
the time of company creation(partner related to company) then the company of
partner will be newly created company.

task-2024446
Closes: #35266
2019-08-16 11:14:58 +00:00
Christophe Simonis 140ee6b8f0 [MERGE] forward port branch saas-12.4 up to 98a55917a6 2019-08-14 16:48:10 +02:00
Odoo Translation Bot 5409500237 [I18N] Update translation terms from Transifex 2019-08-04 01:17:49 +02:00
Odoo Translation Bot fd0813d506 [I18N] Update translation terms from Transifex 2019-08-04 06:07:54 +02:00
Kevin Baptiste f9fafcdcfb [IMP] hr: improve employee profile usability (back2basics)
Improve the usability of the employees profile / "My Profile"

TaskID: 2048672

closes odoo/odoo#35587

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-08-13 13:00:40 +00:00
Lucas Lefèvre bb55252b67 [FIX] hr: Display company in form view
The company of an employee should be displayed
in a multi company setup.

closes odoo/odoo#35680

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-08-13 09:14:35 +00:00
RomainLibert 1ca4c49ca1 [IMP] hr: synchonize image_1920 depending on self edit setting
Currenty if the self edit setting is deactivated, a user has to be
hr_user in order to change its employee image through the employee
profile.
The problem is that if the image on the employee is currently
not set, we should copy it through the employee profile whatever the
setting value

closes odoo/odoo#35542

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-08-13 12:50:21 +00:00
Patrick Hoste 175994cbe2 [FIX][IMP] various: correctly place ribbon widget in form views
PURPOSE

Have a nice ribbon widget to display state of records: part II

SPECIFICATIONS

Next to 883c96b781 and recent ribbon widget update some form views
have to be updated. It is best displayed following those rules

  * after oe_button_box in order to fix overlapping;
  * before image to overlap it cleanly;

LINKS

Task ID : 2032621
PR : #34662

Task
2019-08-13 11:29:44 +00:00
Thibault Delavallée e7cd604afa [IMP] sms: add a is_mail_thread_sms field allowing to filter models
PURPOSE

SMS are a powerful marketing tool. For instance it is perfect to announce a
sale or to communicate a coupon code, to welcome a new customer in a fidelity
program, ...

Purpose of this task is to integrate SMS sending in batch in mass mailing. It
will use same mailing objects but sending SMS instead of emails. Some metrics
and flows will have to be slightly updated at the same time.

SPECIFICATIONS

Limit use of templates to models that are really capable of sending
SMS. Templates are now available on models that inherit from mail.thread
and effectively have fields used in SMS sending.

Technically this is done through a not stored field on ir.model that is
searchable. SMS sending capabilities is based on

  * having fields holding phone numbers, as defined on mail.thread in SMS;
  * having fields holding partners, as defined on mail.thread in SMS;

This implied some code rewriting notably about finding default SMS
recipients on a given model, in order to have fields instead of directly
returning partners.

LINKS

Task 1997464
PR #34424
Original SMS addition: Task 1922163 (4287481)
2019-08-12 12:00:22 +00:00
RomainLibert 98385da449 [FIX] hr: add name to create
To create an employee you have to give it a name

closes odoo/odoo#35556

Signed-off-by: Romain Libert (rli) <rli@odoo.com>
2019-08-08 10:01:05 +00:00
Sapan Zaveri dafb128c14 [IMP] hr, hr_attendance: badge creation and few usability improvement
hr:
-rename btn 'generate badge ID' to 'generate'
-When the badge ID is set, replace the button Generate by "Print Badge"

hr_attendance:
-Rename menu 'Manage Attendances' to "Manager"
-Add a column "Work Hours" to attendee tree view
-Add a <br> after "Welcome to"
-add class text-muted on "or"
-remove class "text-muted" on "scan your badge
-Rename the primary btn into "Identify Manually"

Task-2040884
Closes: #35473

Signed-off-by: Romain Libert (rli) <rli@odoo.com>
2019-08-09 08:36:52 +00:00
Mohammed Shekha 25ebd80b40 [IMP] *: add selection_mode condition to show/hide elements in kanban
If we use a kanban view to select a record we want to hide those elements:
dropdown boxes, buttons, anchors, some widgets, kanban color.

When it was too much change and used the new attribute
"kanban_view_ref" to explicitly define which view to open in selection_mode.

When also had to create previously unexisting kanban for
fleet.vehicle.model to show name and brand.

Task ID : 1924779
2019-08-09 09:01:19 +00:00
Lucas Lefèvre 86dfe52eab [FIX] hr: Allow user to see fields in profile
Currently, a simple user no longer see fields protected
by groups in his profile.

When retreiving the view arch, `sudo()` is used to bypass
the group protection.
But since commit 1e6c3be, `.sudo()` no longer changes the user.
Hence, groups are still checked for the simple user.

To fix the problem, the view arch should be retrieved with
a user with all groups (SUPERUSER). This assumes that
SUPERUSER has effectively all groups.

closes odoo/odoo#35486

Signed-off-by: Romain Libert (rli) <rli@odoo.com>
2019-08-07 12:40:41 +00:00
Lucas Lefèvre 9419d171a8 [FIX] hr: Allow to access employee profile
The `private_email`, `last_check_in` and `last_check_in`
fields were added by e9d9898 to the
profile view but not in `SELF_READABLE_FIELDS`.
A simple user was therefore not able to read the field and
access his profile.

To avoid any similar oversight in the future, a test is added
to ensure a simple user is able to read all fields in
the profile view.
2019-08-07 12:37:52 +00:00
mreficent 355a5dfc36 [IMP] *: fix typos in comments
closes odoo/odoo#35404

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-08-07 10:28:33 +00:00
Dharmang Soni 840442a24f [IMP] *: hide all activity related filters
All activity filters are now invisible in the corresponding search views.

These filters were only used by activity redirection (when clicking on
the activity item in the systray) so we hide them to reduce the noise
for the user.

"My Activity" filter has also been removed, its corresponding domain is
now directly set in the action where it was used.

Task 2036392
2019-08-07 07:31:32 +00:00