If we use the cross tab, and the session has more than 50 seconds (or
does not exist), a remove is done in the init. The change trigger in
local storage causes the value of _lastNotificationID to become null.
This causes a loading error in the long poll.
Browsers add a 1px padding to inputs but they don't do it for the
select elements, which makes them unaligned.
Tested under Chrome 68, Firefox 61 and Safari 11 on MacOS 10.13.6.
Purpose
=======
The reified view removal makes sense from a functional point of view
as it allows to customize the res.users configuration view.
But this PR is also impossible to migrate efficiently as all the custom
groups that are not defined on the res.users model and that are not included
in the res.users view wont be displayed anymore.
It is still possible to add the group by hand in debug mode, but actually it is
not the clean workaround.
This could be done again in a better way, for example by defining a new field
like "UserGroup" and by allowing a easy customization with the Odoo Studio feature
Specification
=============
- Remove the generic methods to define the user's group computed fields
- Reintroduce the reified view
- Keep the main interesting feature of the original PR: Display the user's type
(Internal User, Public, Portal) as a selection field.
The override of fields_get adds "virtual" fields corresponding to
groups.
If for example we make "res.users" have inherit "mail.thread", we get
these "virtual" field as if they had "track_visibility", since we do a
"fields_get" with fields having track_visibility expecting to only get
back "track_visibility" ones.
So the system would then fail trying to track visibility on fields like
"in_group_5" and for example a res.users could not be created anymore.
With this fix, we fix the fields_get so it respect the fields we ask of
it.
fixes#22332
opw-1878654
closes#22338closes#26705
Co-authored-by: Wolfgang Pichler <wpichler@callino.at>
This commit adds a many2one between barcode.nomenclature and res.company
and removes Many2one pointing toward a nomenclature record.
This aims to improve the usability and allows using nomenclature in
inventory adjustment where a `nomenclature_id` field was set.
Purpose of this merge is to clean and simplify leave configuration and daily
use by
* simplifying leave type configuration;
* simplifying leave request and allocation encoding;
* reorganizing menus to separate personal from manager menus;
* adding missing kanban views;
For more details see sub commits. Each of them comes with its own
specifications and explanations.
This merge is linked to task ID 1876795 and closes PR #26571 .
Purpose of this commit is to add kanban views for allocation and leave
request. It is already possible to reach those views notably using the
activities systray. Default view contains only the name which is quite
sad. We therefore add real kanban views for both models.
This commit is linked to task ID 1876795 and PR #26571.
Purpose of this commit is to correctly format the allocation or request
display name depending on the mode (employee, department, company or
category).
This commit is linked to task ID 1876795 and PR #26571.
Purpose of this commit is to add an option when allocation or requesting
leaves in mass. New option is to do it by company.
Company field used for mass allocation or request is called mode_company_id
to avoid confusion with possible company_id field used for multi company.
This commit is linked to task ID 1876795 and PR #26571.
Purpose of this commit is to simplify leave request encoding. We want less
options and more straightforward encoding of leave requests.
Specifications
* taking half-day leaves is limited to one half day. It is not possible
anymore to take leaves in half days that span on several days. WHen
choosing half day the user choose whether he takes the morning or the
afternoon of the given day;
* choosing half-days leaves spanning on several days can be done taking
several leaves if necessary. It is considered as a corner case that should
not bloat the interface;
* taking hours-based leaves is limited to a given day. It is not possible
anymore to take leaves given some start and end hours that span on several
days. When choosing hours the user choose the start and end hours using
a selection for every half-hour for the given day;
* choosing hours-based leaves spanning on several days can be done taking
several leaves if necessary. It is considered as a corner case that should
not bloat the interface;
* taking leaves spanning on several days is necessarily done with full
length days;
Various misc specifications about form view cleaning
* hide "To submit" stage in the stage bar;
* move description below duration information;
* remove display name;
Duration computation, various fields and form view are updated accordingly
to this specification.
This commit is linked to task ID 1876795 and PR #26571.
Purpose of this commit is to simplify fields used in leave and allocation
used to store the duration of the requests. We want notably to get rid
of "number of days temp" that, contrary to its name, is not temporary
at all as it stores the real number of days. We also want to clarify
the hours or days encoding that is different on leave and allocation models.
Specifications
* number_of_days on leave and allocation is the master field holding the
leave or allocation duration in days;
* two fields are used for interface that are suffixed by _display in order
to indicate they are UX only: number_of_hours_display and number_of_days_
display. They are interface fields used for the user and correct number
of days is computed and stored in number_of_days;
* more specifically for leave model
* display fields are readonly as it is computed based on dates given by
the user, directly (from / to) or indirectly (half-day leaves for example);
* duration field is computed through an onchange. It could be directly
set by hand by managers if some confusion in the number of days appear;
* more specifically for allocation model
* display fields trigger an inverse as they are the real duration given
by HR officers or managers;
* duration field is computed through the inverse of display fields;
Various reports, data and use of leave / allocation models are updated to
use the correct field.
This commit is linked to task ID 1876795 and PR #26571.
Purpose of this commit is to simplify the configuration of leave type and
use the job of HR officers / manager by making options clearer and easier
to use.
Specifications for leave type :
* display name as header;
* remove accrual option from leave type. It is now configured directly
on allocation requests;
* add a "X days allocated" stmart button. If you set a general allocation
of 20 days, the stat button will display 20 days. Even if you go update
the allocation by employee after that. Purpose is to have the value of
main allocation done in group, not individual cases of some employees;
* add a "Group leaves" stmart button. It leads to a new leave requests
in group mode where mode is visible;
* have a unique allocation type field replacing the setting allowing to make
leave or allocation as well as limit and negative fields;
* limit leave duration encoding to two options, either day-based (allowing to
take full days or half a day), either hours-based (allowing to take full
days, half a day or some specific hours in a given day);
More technically
* limit and negative fields are removed. It was confusing as limit set to
True means you can actually exceed the limit). It can be computed based
on allocation_type ('no' meaning you can bypass the limit);
* request_unit is simplified. Day and half are merged into day;
* accrual and balance limit are moved to allocation model;
Specifications for allocation requests
* set accrual specific on allocation itself and not coming from the leave
type configuration anymore. Indeed we now consider accrual to be done
case by case independently from the leave type;
* remove negative and balance_limit. Indeed we now consider people have to
check by hand what is done by accrual;
Leave and allocation are slightly impacted by other changes, such as domain
for default leave types. Changes have been made as small as possible. Future
commits will still improve leave and allocation models and views, going
further in the cleaning process. Some tests are udpated to match the new
configuration of leave type.
This commit is linked to task ID 1876795 and PR #26571.
Purpose of this commit is to clean allocation and request views and prepare
future modifications. We would like to separate personal views (making a
request for myself) from manager views (giving more options).
Specifications
* views under "My" menu should be simplified
* in a general way there should be no action buttons under my. Hide
approve/refuse buttons in personal mode;
* show only leave type, description and duration when asking for an
allocation; hide details about group allocation and accrual; hide
action buttons;
* show only leave type, description and from/to choice as well as duration
when asking for a leave; hide details about group allocation; hide action
buttons;
* in list view hide employee and buttons my menu;
* views under "Manager" menu should be complete
* display complete form view;
* add buttons to approve / refuse directly from the list view in manager
menus;
This commit is linked to task ID 1876795 and PR #26571.
Currently code somehow allows people to create allocation requests on the fly
by writing on the computed remaining_leaves field. It work only under some
conditions that are not likely to happen. Moreover creating and validating
allocation requests should be done under the Leaves application while knowing
it and not hidden in an inverse field.
Let us remove that code and let people use the Leaves application to handle
allocation requests. That code comes from old versions of Leave application.
This commit is linked to task ID 1876795 and PR #26571.
Purpose is to clean a bit the code to prepare some incoming modifications.
More specifically this commit focuses on removing unused views and actions
to lessen future work in shaping them like requested.
This commit contains :
* small linting of leave fields;
* remove some unused and unnecessary views and actions;
* ensure default values for request_unit_all;
* small linting of tests;
This commit is linked to task ID 1876795 and PR #26571.
It seems specifications of new menus implemented at 9af6e9070a were not
totally correct and broke some Odoo conventions. New specification for leaves
application menus are now the following :
* Dashboard
* My leaves (user sees this only)
* New request (calendar view by default)
* Leaves requests (only my, list view by default)
* Allocation requests (only my, list view by default)
* Summary (only my, summary list view by default)
* Managers (HR officers or managers only)
* To approve
* Leaves (default filters: to approve, on my department)
* Allocations (default filters: to approve, on my department)
* All
* Leaves
* Allocations
* Payroll
* Leaves to report (default filters: grey kanban state)
* Reporting (HR officers or managers only)
* Leaves Analysis
* Report by Department
* Configuration
* Leaves Types
This commit is linked to task ID 1876795 and PR #26571.
Currently user name is synchronized with employee name. However it is
interesting to synchronize other fields like image, email and timezone.
Changing an user linked to an employee through the UI already updates those
fields. This commit ensure code handles synchronization like UI. When
updating an user its related employees are updated. When changing the
user linked to an employee through code all fields are also correctly
synchronized.
This commit is linked to task ID 1876795 and PR #26571.
When cliking on a calendar cell user is redirected to a form view to create
a new record. However if the calendar action gives a specific form view ID
it is not taken into account by calendar.
Calendar code still handles views as not being a structure holding viewID and
type but just an ordered list of items with (view ID, type). This commit fixes
that code. One calendar JS test is updated to correctly match the current
structure.
This commit is linked to task ID 1876795 and PR #26571.
Before this commit, if you have some inactive views (option form customize e.g.)
the unload crash since you cannot remove views that is still referenced by
inherit_id. Now with search with inactive views to delete all.
- We extract some code logic to methods to allow to override them.
This is needed for the subscription module where a payment token need
to be copied from a transaction to a subscription.
The subscriptions is created from a sale order and before the
payment.transaction holding the payment.token id is validated.
Since the payment.transaction is not validated, the subscription
module doesn't find the correct transaction.
By extracting this code logic, we can override exactly when it should
be.
The method _read_group_fill_temporal did not support multiple levels of
groupby. Which meant that everytime you grouped by a date and by
something else you had a traceback.