Commit Graph
567 Commits
Author SHA1 Message Date
Simon Genin (ges) ecfe85db84 [REF] web: static/src/(img|fonts) => static/(img|fonts) 2021-04-29 07:34:40 +00:00
Gorash aa47eda087 [IMP] web: add mode qweb in ace
Add a new parser in the ace for the qweb highlight. This makes it possible
to visualize the qweb tags and the part of code.
Used in the website and in xml fields.

closes odoo/odoo#69609

Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2021-04-21 12:15:01 +00:00
Jérémy Hennecart ac13964244 [IMP] calendar: improve the way calendar event are displayed
With this commit we try to improve the way the events are displayed
to the user. Now, an event is displayed for each attendee of the event
that are selected in the filter. These events are displayed correctly
based on the status of the attendee in the event.
The colors displayed for the events now represent the attendees and not the
organizer.

If an attendee edit an event, it is edited for all others attendees.
Also, when an attendee that is not the organizer try to delete the event,
then the event is now declined in place of being deleted. If the organizer
delete the event, it is deleted for all attendees.

In case of an event where all attendees have declined it but the organizer,
the organizer see now a danger icon before the name of the event and it's
outlined and not filled with color, no matter of the actual status of the
organizer in the event.

task-2196775
COM PR: odoo/odoo#55190
ENT PR: odoo/enterprise#12196
UPG PR: odoo/upgrade#1532
2021-04-15 16:07:12 +00:00
Aaron Bohy 835cb1d593 [FIX] web: empty fields don't increase row height
Commit [1] tweaked the empty (unset) fields css rules s.t. they
have a non null height in readonly, to reduce the shift between
readonly and editable form view. This only concerns form view,
but the changed rule also applied in list view. As a consequence,
empty fields increased the rows height in list views.

https://github.com/odoo/odoo/commit/288b24cbdf54ac0dbee7e012f074fac9a0c68238

closes odoo/odoo#68482

X-original-commit: 020b814b3be055c6bf795153dce6079810d34b1c
Signed-off-by: Michaël Mattiello <mcm-odoo@users.noreply.github.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-03-29 15:24:24 +00:00
YOGRAJ TANDELandMohammed Shekha 7da9c296eb [ADD] calendar,lunch,web: weekly recurrent widget
with this commit we adding weekly recurrent widget, currently proeject and
calendar shows boolean for each day vertically but with this widget we displays
week days and its boolean horizontally.

Here widget will display first day as per language's week_start field, also we
adds FieldDependencies on custom widget and consider those FieldDependencies
while processing view node in basic_view.js

We add support of registry to contain owl custom widgets and add support
of rendering owl custom widgets.

Also with this commit we removes fields like sun, mon, tue etc. from view and
instead use "web_weekly_recurrence" custom widget to display boolean for each
week day.

Co-authored-by: Mohammed Shekha <msh@odoo.com>
2021-03-26 12:25:44 +00:00
Michael Mattiello (mcm) 2089fd8619 [FIX] hr_skills, web: fix css rules leak
Before this commit, hr_skills module defined a few css rules
but weren't enclosed in a custom class to make them only
for hr skills so these rules leaked everywhere in odoo.

This commit encloses these css rules to not leak them and move
a rule which changes the color of list's remove button into web
module to keep the color.

closes odoo/odoo#67921

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-03-17 14:42:29 +00:00
Romeo Fragomeli 841d29f129 [FIX] web, account: dashboard's links are not well placed on mobile
Before this commit, on mobile in the Accounting app, the link in a
kanban card was not well placed.

After this commit, in mobile we consider a link as a block so he is
moved below.

Steps to reproduce:
* Open Odoo on Mobile
* Go to Accounting => Bug ("Create Manually" is in a strange position)

Task ID : 2200168 (4.a)

closes odoo/odoo#67692

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2021-03-11 16:22:29 +00:00
Younn Olivier 2ecb5e1777 [FIX] web, web_editor: customize colorpicker inputs from web_editor
Styles for the hex and rgba inputs from the color picker were modified
on directly from the web module, which means that for a specification
concerning only the frontend colorpicker, the backend colorpicker was
also changed.

This commit reverts the changes that were made and only applies the new
style for the website editor.

Related to https://github.com/odoo/odoo/pull/65249

closes odoo/odoo#67396

X-original-commit: 9529e29615699942aac89099cd37144e052b9004
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-03-05 16:17:55 +00:00
Géry Debongnie 2c777546a7 [FIX] web: prevent traceback when pressing TAB in color_picker widget
The color_picker widget, that can be seen for example in the track form
view for event tracks, had an issue: if the user clicked on it, then
pressed TAB, a traceback was displayed.

The problem comes from the fact that the color picker widget inherits
from FieldInput, but is not a fieldinput, so many expectations made by
the FieldInput code do not hold, such as the code run when handling
navigation (by TAB and such keypress). Because of that, the code in
_onNavigationMove crashed, because it expected an input.

Since this is a bug fix, I simply disabled the navigation in that case,
so no crash happens.  Sadly, this widget has still a big issue: it
clearly does not work as most users would expect: pressing TAB or arrows
should update the selection.  But this would be a more complicated
refactoring, for a bug which is clearly not critical, therefore this
commit implements the simple and safe solution.

Also, we disable the focus outline to minimize the wrong expectation.
Seeing them kind of implied that one could update the selection with the
keyboard.

Note that the widget color_picker was moved from another addon to web/, without
any tests nor documentation.

OPW 2467369

closes odoo/odoo#67195

X-original-commit: 580456b6ab36d16195eae9ffd776ff245ecd936e
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-03-03 22:05:10 +00:00
Prakash Prajapati 4eb549cc78 [FIX] web: Fix scroll issue in full calendar
Currently, When we load the Year view of the calendar then
the view is not properly scrolled top due to padding at the
top.
Calendar is scrolled to the current month but due to top
padding in year view it was not scrolled top when initially it
was loaded.

So in this commit, remove the top padding and use padding on month
so it will not have initial scroll when scroll to the particular month.

Set default calendar view to 'month'.

closes odoo/odoo#66811

Taskid: 2428655
X-original-commit: adbade3c1a000c476644e616d66af5cb982249cf
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-02-25 10:54:56 +00:00
Arnaud Joset c9003f3f4b [IMP] web: calendar improvements
This commit improves the calendar behavior.

 * Before this commit, the invisible attribute were not evaluated in the calendar popover.
 * Several alignment, label, improvements

taskid: 2342252
2021-02-25 08:25:51 +00:00
Arnaud Joset 0915ac5a0e [IMP] web: Improve alignment in FieldMany2ManyTagAvatar
Before this commit, the avatar was not properly aligned with the text.

Taskid: 2342252
2021-02-25 08:25:51 +00:00
Adrien Dieudonne b92ec789e2 [FIX] web: m2o extra button misaligned on mobile
Before this fix, the extra button was out of the right edge of the
screen.

On desktop, m2o external buttons have to overflow over the right padding
of the parent element. This is done to avoid to reduce the size of the
input when the button appears (when a value is set).

But on mobile, there is not enough padding and we therefore prefer to
reduce the size of the field if an extra button should appear.

To fix this, we simply ignore these rules on mobile.
Note that the css selector that really cause this issue was the one
related to '.o_row' and the second one has no effect.

Steps to reproduce:
- Go to "Inventory / Operations / Scrap"
- Click on "Create"
- Choose a product and set UOM field

Related task-ID: 1929043

closes odoo/odoo#66463

X-original-commit: 2fc36e91d95b81f79d0a23f3958011c55a7ff105
Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2021-02-18 13:07:23 +00:00
Nicolas Lempereur 376a77ed65 [FIX] web: show more text of short calendar event
In a4d170ad9 there were some improvment to not show event totally empty
on the day calendar view because of different style (font + padding).

The lower part of the text was still a little cut, this commit try to
improve this for week and day view mode by removing 5 additional pixels.

opw-2422700

note:

Also fix the fc-short for fullcalendar Odoo, we had this 2019 change:

fullcalendar/fullcalendar@e879c43

that made it not working without title (odoo use case), in 2020 it was
reverted when refactoring for 5.0:

fullcalendar/fullcalendar@7c7ce1e

closes odoo/odoo#66109

X-original-commit: b856d312be19b0fdf636600a76c4d9b427eedb7c
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2021-02-16 12:24:41 +00:00
Adrien Dieudonne df1d279cbc [IMP] web: form: checkbox with optional field on mobile
This commit adds a class to be able to show/hide
other fields depending on a checkbox status.

This class is needed to have this behavior on desktop but also
on mobile.

Related task-ID: 1929043
2021-02-16 09:41:12 +00:00
Mohammed Shekha a036f5ccf4 [FIX] web: horizontal scrollbar in form without sheet
before this commit: when form view have buttonbox or notebook tag and form does
not have sheet tag then form will have horizontal scrollbar in screen, this is
because we added scss mixin which always add negative margin of 32px because we
added mixin by considering form will have sheet tag and because of that when
form does not have sheet tag it shows useless horizontal scrollbar.

after this commit: if formview does not have sheet tag and form contains button
box or notebook tag then form will be displayed properly without unnecessary
horizontal scrollbar.

task-2411627

closes odoo/odoo#63961

Related: odoo/enterprise#15519
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-02-15 11:43:32 +00:00
Laurent Stukkens (LTU) b32e4b7141 [FIX] web: ensure o_status is well displayed
Before this commit:

* When a o_status class is set on a label element it is not well displayed
  in project.task_type_edit, event.event_stage_view_form and helpdesk.helpdesk_stage_view_form
  since this commit has been introduced 288b24cbdf

After this commit:

* o_status labels are correctly displayed.

task-2453268
Related PR: odoo/enterprise#16173

closes odoo/odoo#66048

X-original-commit: 6bb64722a11fb6c7ba216aff5ae1c11159c92559
Related: odoo/enterprise#16300
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-02-12 11:15:34 +00:00
Younn Olivier f9695ecf8f [FIX] web : use same border on focused color palette inputs as others
The hex and rgba inputs styles were not matching other inputs ones when
focused.

closes odoo/odoo#66057

X-original-commit: 850581c49c84042bd5b40b632798c56789a1c60e
Signed-off-by: Samuel Degueldre <sdegueldre@users.noreply.github.com>
2021-02-12 12:01:14 +00:00
Mohammed Shekha 68ccf3bec5 [IMP] web: fix UI glitch on image widget when too smal image
with this commit, we fixes UI glitch on image widget when image is too small,
when hovering over too small image Edit and Delete icon will ne displayed but
it is displayed with glitch, so to avoid that glitch we added min-width to
icons div.

task-2376452

closes odoo/odoo#66077

X-original-commit: 7aaad8480dde97b2d04b4148e4e54beb57b7f141
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-02-12 13:56:35 +00:00
Mohammed Shekha c56b6f6e78 [FIX] web: badge widget vertical alignment
before this commit: badge widget was not displayed vertically aligned

after this commit: badge widget will display vertically align

task-2351554

closes odoo/odoo#65940

X-original-commit: 1f99f5df22b3d36775a7386af170c126a481279b
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-02-11 10:34:31 +00:00
Mohammed Shekha 4b122de129 [FIX] web: date options are not displayed in dropdown
before this commit: when groupby dropdown is opened and hover over date/datetime
field then it does not show options like Day, Month, Quarter, Year instead it
adds horizontal scrollbar, this issue is raised after commit: https://github.com/odoo/odoo/commit/cf351ae49875ec7d28a18747b65ed2a61f55262b
So this commit simply reverts that commit and fix the issue solved by above commit
different way.

with this commit: reverts https://github.com/odoo/odoo/commit/cf351ae49875ec7d28a18747b65ed2a61f55262b
and fix the issue solved in above commit different way.

task-2452033

closes odoo/odoo#65905

X-original-commit: a622936ab09497086f43715e546a1b33418d0ee3
Related: odoo/enterprise#16272
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-02-10 17:22:59 +00:00
Mithilesh Rao 6cd42e016d [IMP] hr_holidays,web: Improve the mobile view for calendar and times off
Purpose of the task is to improve mobile interface of the Time Off
and calendar view.

So in this commit, we have improved UI as below:
hr_holidays:
 - Move the leave summary topbar from top to sidebar filter of
calendar for small screen
 - Improve the kanban view of leave for mobile and added the
badge for state.

web:
 - Improve the calendar year mobile view by spliting the month view
in 2 column.

TaskID: 2333778
Related PR: https://github.com/odoo/enterprise/pull/13454

closes odoo/odoo#61474

Related: odoo/enterprise#13454
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-02-08 08:35:05 +00:00
Mohammed Shekha d9492be108 [FIX] web: popover opened in rtl takes full space
before this commit: smiley box popover in rtl langauge takes full space it is
because of left:0 given on o_popover class by default, which will be converted
to right:0 when in rtl language and popover position will computed by popper
will set left:'some pixels' due to which it takes full space.

after this commit: smiley box will be displayed with expected width,
unnecessary will not be added, as we have removed left:0 css, hence it will not
be converted to right:0 when in RTL mode.

task-2418264

closes odoo/odoo#65419

X-original-commit: 0bd842ad62901499abb703c92b15496cdfa05cc0
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-02-02 14:15:10 +00:00
Michael Mattiello (mcm) 2c3ac6b254 [IMP] web: add quick edit behaviour
This commit adds the quick edit behaviour.
The quick edit allows to click on fields in readonly form view to switch
into edit mode. After switching mode, the clicked field is automatically
focused.
A few fields have a custom quick edit behaviour after mode switched:
  - checkboxes automatically toggle.
  - radio buttons are set to the selected value.
  - one2many list's cell are focused.
One2many list fields now show the "add a line" in readonly mode.

task 2330101
2021-02-02 12:40:23 +00:00
Michael Mattiello (mcm) 288b24cbdf [IMP] web: reduce shift when switching form mode
This commit does 4 things in order to reduce the shift when switching
mode in form view:

1. modifies the render function of many2one and x2many radio
   fields to render them the same in edit mode and read mode.
2. removes margins in inner form groups.
3. sets a minimum height on rows to align them.
4. empty fields are now visible. (as a blank line)

task 2330101
2021-02-02 12:40:22 +00:00
Nasreddin (bon) e2bca07207 [FIX] web: Show scroll in report view search filter
Issue

	- Install "Accounting" module
	- Ensure there is more then 20 journals ( or
	  must do a zoom-in on the browser)
	- Go to Accounting -> Reporting -> Profit and Loss
	- Click on "Journals" filter

	Not all journals are displayed.

Cause

	No scroll or max-height set on dropdown.

Solution

	Set a max-height and an overflow:auto on `.dropdown-menu`
	and `o_dropdown_menu` css classes.

opw-2430101

closes odoo/odoo#65167

X-original-commit: cf351ae49875ec7d28a18747b65ed2a61f55262b
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
2021-01-27 17:50:09 +00:00
Adrien Dieudonne 7384c87b3f [FIX] web: o_row style not applied on mobile
Before this commit o_row class wasn't applied on mobile because
we wanted that each field take all width.

But we have noticed that this class is quite well used on desktop
and is often used for specic cases that we also want on mobile.
Example: Unit of measure (UOM) next to a numeric field.

So in this commit, we simply removed mobile media queries.
Due to the number of places where this class is used, fixes will
surely follow.

Related to task ID: 1929043
2021-01-20 12:39:42 +00:00
jbw 209c0b7371 [FIX] web: render custom checboxes unclickable on sample data
Custom checkboxes were clickeable on sample data, generating errors.

closes odoo/odoo#62296

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2021-01-15 14:52:09 +00:00
Nicolas (vin) b7406497f3 [IMP] web: improve slightly the tag with color 0
To improve the display of tags, we are increasing slightly
the size of the line in the tag to avoid cutting the bottom of some
letters, as well as making the color of the border lighter.

Task id #2368889

closes odoo/odoo#61481

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-01-06 06:48:07 +00:00
Samuel Degueldre 3bb892cfab [FIX] web_editor: fix icons losing classes when modifying them
Previously, when double clicking and image, video, icon, or document in
the web-editor and replacing it with a different media type, it would
lose its custom classes. This means among other things, that it would
lose margins and paddings from bootstrap classes, or in the case of the
three columns snippet, that the new media would not be properly rounded
in its top corner, or not show up at all in the case of the video. The
only exception was when changing any media type to an icon, but in that
case it would also keep some of the media-specific classes that are
supposed to be removed (eg img-fluid or media_iframe_video).

This commit fixes that as well as some _clear behaviour that didn't
remove all classes that had to be removed, eg some fa-classes would
linger depending on their order, and the o_image class from documents
would always remain

Part of https://github.com/odoo/odoo/pull/64234
task-2282542

closes odoo/odoo#64234

X-original-commit: 99531f5dd8966fc4ad89d1e9c2886ad701527f3a
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-01-12 06:52:14 +00:00
Mohammed Shekha 5e6fd455b1 [IMP] web: export: change field sorting icon to fa-sort
task-2413274

closes odoo/odoo#62998

Related: odoo/enterprise#15215
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-12-22 11:21:03 +00:00
Mohammed Shekha e3be9d183f [IMP] web: editable list: change handle icon to fa-sort
task-2413274
2020-12-22 11:21:03 +00:00
dht-odoo c76fa80487 [IMP] web: handle buttons with long strings on quick create kanban card
Right now, the quick create kanban card is having three buttons, Add, Edit
and Discard. In some languages, the translation terms of these buttons may be
quite long. This pushes the last button into second line and leads to an
ugly display.

This commit replaces the 'Discard' button with trash icon and makes sure that
all buttons are always in single line. If the strings are too long, they will
be cropped automatically.

Task ID-2373130

closes odoo/odoo#62326

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-12-11 13:58:04 +00:00
Giacomello Nathan 2af0a86db8 [IMP] Web: Add field to calendar & resize Year view
- Resize Year view
- Add "is_hatched" field
- Scroll to current month in Year view
- Hide the sidebar if no filter is present

The goal with Year view is to display it in a single page without scroll bar.
Before this commit, a scrollbar was displayed on the right of the screen.
This results in some data wasn't displayed on the screen.
Now, the year view is scaled to the browser.
That means that all information are now on the screen (without scrollbar).

"is_hatched" is used to hatch date under specific conditions
The goal was that it was not possible to display some information differently depending on a variable.
Now, if a variable named "is_hatched" is set to true and passed to the calendar view, the specific date is hatched.

Task id #2318645
2020-12-09 15:53:09 +01:00
Kevin Baptiste e562a22ad2 [IMP] base: add CopyClipboardURL
This commit adds a CopyClipboardURL widget which can be clicked on to open
the link.

TaskID: 2367543
2020-12-09 08:20:22 +01:00
Kevin Baptiste c90bf3f703 [FIX] web: do not overlap calendar popover
The content of the popover was overflowing on the button if they were
too many elements. It will now display a scrollbar when needed.

TaskID: 2367543
2020-12-09 08:20:22 +01:00
Hardik Prajapati 625fb86abe [FIX] web: Fix the height of svg when signature is empty
Currently, in the user setting, hovering on the live chat input will
focus on the signature div due to long height of the empty svg.

So in this commit fixes the issue by adding the css property in the
svg element of signature widget due to that svg element contains the
proper width and height.

closes odoo/odoo#61897

Taskid: 2361880
X-original-commit: 6fe2a0b8b6f8dadb2eb7008019f2d7266dcf6fb1
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-11-17 19:26:05 +00:00
Benjamin Vray b42ad68c2c [IMP] web: redesign toast
Remove the icon of the toast elements. Remove the header and move the
title in the body, as simple text. Move buttons at the bottom instead
of at the right side.

Note: this will be refactored with OWL anyway but this is a first step
towards more consistent tips across backend and frontend.

task-2311554

closes odoo/odoo#61756

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-11-16 09:05:34 +00:00
Adrien Dieudonne 55a458ae9b [IMP] web: change status bar dropdown stage color when disabled
Before this commit we didn't notice when the dropdown buttons were
disabled or not.
Now, we do the same as on desktop:
the text color is gray when you aren't able to change the stage.

Note that the previous css selector didn't worked because
we are in a dropdown on mobile.

Task ID: 2348528
2020-11-16 09:01:53 +00:00
Adrien Dieudonne 09e1028944 [FIX] web: statusbar: border color for disabled buttons
Before this commit, the intent was to change the border color
of the first button that appears when the status bar is disabled.

The problem was that this added a border for all buttons and
not only the (visually) first one.
2020-11-16 09:01:53 +00:00
IEL e8804333fb [FIX] web: force ltr for phone numbers in reports
FYI: while letters are written right to left in languages like hebrew, arabic,
persian, the numbers (including phone numbers) are written left to right

STEPS:

* via Odoo Studio add Address block (select "doc > Customer" for field
expression)
* create a sale order for customer with rtl language
* set phone number for the customer with plus sign, e.g. +1 222 33 44 55
* print Quotation / Order

BEFORE: 222 33 44 55 1+ or similar mess

AFTER: +1 222 33 44 55

WHY:

* css is copy-pasted from ui.scss:

  https://github.com/odoo/odoo/blob/6ba81c99d0c7f8e57ae573318f5e3d1ff53fa561/addons/web/static/src/scss/ui.scss#L91-L98

* Address block already has o_force_ltr class

  https://github.com/odoo/odoo/blob/6ba81c99d0c7f8e57ae573318f5e3d1ff53fa561/odoo/addons/base/views/ir_qweb_widget_templates.xml#L35-L36

DEPLOYMENT: to fix phone in footer, you need to upgrade ``web`` module

---

opw-2368525

closes odoo/odoo#61416

X-original-commit: 6f0957466165a418762d10ddac658d642547a9cb
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
2020-11-05 13:51:16 +00:00
David Beguin abe68c9fb8 [IMP] web: add margin for statusbar_buttons icons
Before this commit, when adding a icon to a statusbar button, there was no
margin between icon and text. This makes button not very nice as button is
very near to the text itself.

After this commit, for readability purpose, a margin has been added to the
icons of a statusbar button. Statbutton margin has been chosen to keep
things coherent through form buttons.

LINKS

Task ID-2083049
COM PR odoo/odoo#49129
ENT PR odoo/enterprise#9715
UPG PR odoo/upgrade#1883
2020-11-05 08:12:17 +00:00
Pedro (pno) a0ebb46098 [FIX] {base, coupon, crm, event, mass_mailing, product, project, sales_team, utm, web}: prevent long texts from overflowing
Previously, in multiple modules, long names would result in an overflow of text.
With this commit long texts should appear like this: [aaaaa...] instead of
going out of their boxes.

Various views are updated, depending on which fields we wanted to prevent
from overflowing and the probability they do so.

Task ID-2325219
PR odoo/odoo#57713
PR odoo/enterprise#13226

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-11-04 07:32:27 +00:00
Romain Estievenart b04c670ba0 [IMP] web: improve Export Data UI on mobile
This commit improves the UI of the Export Data action's modal on mobile
screens:
* open it full-screen
* 2 main panels are one after the other (side-by-side on desktop)

Task ID: 1879566
2020-10-21 14:45:40 +00:00
Nicolas Martinelli c0501bf54c [FIX] web, doc: remaining_days widget
The `remaining_days` widget is intended to be used for informative purpose,
hence it should not be editable.

opw-2362276

X-original-commit: 4c72b1536a19cd517046113a5ad93b5782774664
2020-10-20 06:08:32 +00:00
fw-bot 2be103239f [MERGE] l10n_be_hr_payroll: Validate the CP200 different payslips
Purpose
=======

In Belgium, the job market is divided into "sectors": chemicals, metals, banks,
department stores, pharmacies ... This breakdown is made on the basis of the
activities of the company. In order to be able to ensure the functioning of the
sectors, each sector has its own consultation body, called the "joint commission".

A joint committee is a consultation body in which representatives of employers
and unions set, after negotiation, the minimum wage conditions as well as the
working conditions in legal texts, called “collective labor agreements”. These
are applicable to all employees in a specific sector.

These are agreements that employers and workers in a given sector must make and
respect. These agreements may be different from one sector to another. Each sector
has its label and number.

The CP 200 is the auxiliary joint committee of employees (CPAE). About a quarter
of private sector companies and employees in Belgium are found in CP 200. This
makes it the largest and most diverse CP in the country!

TaskID: 2352568

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

Most of the different use cases that we can face in belgian payroll for CP200
have been tested and validated by a fiscal expert.  Briefly, it covers the following
use cases:

- Unpaid time off
- Legal time off
- Credit time
    - Classical
    - With paid time off
    - With unpaid time off
    - With sick time off
    - Starting in the middle of a month
    - Full time (O hours / week)
- Half-days in working hours
    - Classical
    - With full-day time off
    - With half-day time off
- Low salaries
- Back-to-work - Sick time off
    - Relapse
    - Guaranteed salary
    - Long sick off (+1 month)
- Student contracts
- Posted Employess
    - Without ONSS
    - Wihtout withholding taxes
- Public Holiday
    - Classical (during the working hours)
    - Compensation (during the week end)
    - After the end of the contract
    - Note: Variable compensation is not handled yet, but it's planned
- Brief Holiday (In french: "Petit Chômage")
    - 1 day
    - 1 week
    - Note: Variable compensation is not handled yet, but it's planned
    - 1 day for unpredictable reason
- End of contract in the middle of the month
- Half-days time off
- New design of the payslip to improve readability

The detailed list of the fixes/improvements is the following:

- 1/ hr_work_entry_contract: Define 1 leave work entry per presence

    Purpose:
    Some sick time off have to be defined into different work entry types, according
    to the type of sick leaves.

    Example: after 30 calendar days of sick leaves, the employee is not paid by the
    same organism and therefore, the time off should be reported into different work
    entry types.

    Specification:
    Instead of creating a big work entry per time off, create as many work entries
    as there should have been presence work entries.

- 2/ hr_work_entries: Prevent users deleting work entries

    Prefer to archive them instead.

- 3/ hr_work_entry: Display work entry type on calendar views

- 4/ web: Add styling classes for report

    Purpose:
    Those classes are useful for the payslip printed pdf reports, but some
    of them are useless for any kind of report, and thus the classes have
    been defined in the web addons.
    Task-2341886

- 5/ resources: Take company attendances/global leaves on creation

    Purpose:
    When creating a new calendar (38 hours/week) on a Belgian company,
    the new calendar is prefilled on a 40 hours/week basis, even if the
    company calendar is correctly defined.

    Specification:
    Copy the global time off + the attendances on the company calendar
    on company modification

- 6/ hr_holidays: Allow to refuse overlapping time offs

    Purpose:
    It's normally not possible to create 2 time off that overlaps on the
    same period.

    But, if for a given reason it happens on a production database, it should
    be possible to refuse those time off. Otherwise, the user is stuck with
    this wrong configuration.

- 7/ hr_holidays: Prevent creating time off of 0 hours

    Purpose:
    It makes no sense + it could cause conflicts when generating the work
    entries

- 8/ resource: Add method to retrieve the longest work day

    Purpose:
    Add a method on the calendar to retrieve the maximum number of hours
    an employee is supposed to work.

    Example:
    Monday: 8-12, 13-17
    Tuesday: 8-12, 13-17
    Wednesday: 8-12
    Thurday: Off
    Friday: Off

    The method will return 8

- 9/ hr_holidays: Adapt query counter due to changes on hr_payroll

    See: https://github.com/odoo/enterprise/pull/13848/

- 10/ hr_payroll: Update translations

    Lots of new terms have been added on the printed reports, etc...

- 11/ l10n_be_hr_payroll: Consider out of contract public holiday

    Purpose:
    If there is a public holiday less than 30 days after the end of the
    contract, the employee should be paid for that day too

- 12/ l10n_be_hr_payroll_posted_employee: Add an easy way to create a public time off

    Purpose:
    Public time off should be created via the calendar (at least for belgian companies using payroll).

    The reason behind this is that there should be a resource.calendar.leaves available even if the
    employee ends its contract. If it's created using a hr.leave, there won't be any
    resource.calendar.leave as the employee is not supposed to work anymore at that time.

    When an employee leaves the company, it's possible that he's paid for public time off if it
    occurs less than 30 days after the end of his contract.

- 13/ l10n_be_hr_payroll: Rename bank holiday into Public holiday

    Purpose:
    A bank holiday is a specific holiday name, not the generic one.

- 14/ hr_work_entry_contract: Add menuitem to access calendars

    It shouldn't be required to enter debug mode to access this information.

- 15/ l10n_be_hr_payroll_posted_employee: Add support for posted employees

    Purpose:
    https://www.socialsecurity.be/citizen/fr/travailleur-salarie-occupe-en-belgique-detache-a-l-etranger

- 16/ l10n_be_hr_payroll: Implement guaranteed wage/relapse for sick leaves

    Purpose:

    Guaranteed salary for employees:
    The employee who is incapacitated for work as a result of a work accident, an accident on
    the way to work or an occupational disease retains, at the employer's expense, the right to
    his remuneration for the first 30 days of incapacity for work. The daily allowances relating
    to this period are paid to the employer by the body responsible for industrial accidents or
    by the Fund for Occupational Diseases.

    Successive disabilities - relapse:
    It is possible that a worker will be unable to work during different successive periods.

    When two incapacities follow one another without interruption (for example, accident followed by
    illness; successive illnesses of a different nature), there is only one period of incapacity and
    the guaranteed remuneration is not due again. time.

    On the other hand, we talk about relapse when a new disability occurs after the worker has returned
    to work normally.

    In this case, the guaranteed remuneration is not due again when the new incapacity for work occurs
    within the first 14 days following the end of a period of incapacity for work giving rise to the
    payment of the guaranteed remuneration.

    However, there is still a right to the guaranteed salary for the part remaining to run, if the first
    period of incapacity has not exhausted the entire right to the guaranteed salary during the first
    period of incapacity. A new guaranteed wage is also due again when the worker establishes by a
    medical certificate that this new incapacity for work is due to another illness or to another
    accident.

- 17/ hr_work_entry_contract: Define 1 leave work entry per presence

    Purpose:
    Some sick time off have to be defined into different work entry types, according
    to the type of sick leaves.

    Example: after 30 calendar days of sick leaves, the employee is not paid by the
    same organism and therefore, the time off should be reported into different work
    entry types.

    Specification:
    Instead of creating a big work entry per time off, create as many work entries
    as there should have been presence work entries.

- 18/ test_l10n_be_hr_payroll: Add test for full time credit time

- 19/ test_l10n_be_hr_payroll: Add test for out of contract credit time

- 20/ test_l10n_be_hr_payroll: Avoid undeterministic bug on generated tests

- 21/ hr_payroll: Don't display out of contract line on pdf

- 22/ test_l10n_be_hr_payroll: Fix undeterministic test crashes

- 23/ payroll : Improve the printed payslip report

    Improves the design of the payslip report
    Generates the report in the employee's language (add a message if the lang is not official)
    Adds some data to Laurie Poiret
    Task-2341886

- 24/ test_l10n_be_hr_payroll_account: Add test for unjustified reasons

- 25/ test_l10n_be_hr_payroll_account: Add tests for small unemployment

- 26/ test_l10n_be_hr_payroll_account: Add tests for half days time off

- 27/ test_l10n_be_hr_payroll_account: Fix false positive

- 28/ hr_holidays: Prevent creating time off of 0 hours

    Purpose:
    It makes no sense + it could cause conflicts when generating the work
    entries

- 29/ test_l10n_be_hr_payroll_account: Add test for end of contract

- 30/ test_l10n_be_hr_payroll_account: Add tests for public holidays

- 31/ hr_payroll: Display amount if hourly wage

- 32/ hr_work_entry_contract: Allow creating record on gantt view

- 33/ l10n_be_hr_payroll: Add new structure for student employees

    Purpose:
    Also bring some fixes on fields display + hours/days counts
    TaskID: 2347843

- 34/ test_l10n_be_hr_payroll_account: Add test for low salaries

    Ensure the correct computation of the employment bonus.

- 35/ l10n_be_hr_payroll: Make separate lines for half/full worked days

    Purpose:
    Worked days should be separated between the complete full days and the
    half days.

    Example:
    I work on Monday, Tuesday, Wednesday (half day)

    The calculation is OK, but the number of days is, in principle, 14 in the month of
    September 2020 (9 full and 5 in half-days). This number of days should be the subject
    of 2 separate lines:

    9 days - 68.4 hours - € 1,100.77
    5 days (in the form of half-days) - 19 hours - 224.33 €.

    In this case, we cannot use the hourly formula since the monthly salary must always be
    the same, without having an identical number of working days.

    The worker benefits from 14 meal vouchers. The number of days must however correspond
    to the number of meal vouchers so that the worker can check.

- 36/ test_l10n_be_hr_payroll: Test credit time with sick leaves

- 37/ test_l10n_be_hr_payroll_account: Test credit time with unpaid leaves

- 38/ l10n_be_hr_payroll: Don't consider time off as credit times

    Purpose:
    When generating the work entries, we compare the standard attendances
    (i.e. the full time contract) and the credit time attendances to
    deduct the intervals on which the employee is on credit time.

    But if the employee is on a time off during a period, those intervals
    will be removed from the supposed attendances, and then those periods
    are considered as credit time.

- 39/ l10n_be_hr_payroll: Fix credit time amount on payslip computation

    Purpose:
    The time credit days must not include a corresponding amount.

    In fact, no remuneration is linked to the taking of time credits. The necessary modifications
    are:
    Code LEAVE300 -> no amount

- 40/ hr_payroll: Export standard calendar if needed on payslip export

- 41/ l10n_be_hr_payroll: Fix worked days lines amount computation

    Purpose:
    The amount was computed as a simple ratio based on the number of days.

    To be correct and compliant with the law, we should consider the hourly
    equivalent wage, and compute the amount based on the worked hours.

- 42/ l10n_be_hr_payroll: Fix unpaid worked days amount computation

    Purpose:
    Don't use the normal wage which is an integer btw.

    Compute the worked days amount using the classic hourly computation formula

- 43/ l10n_be_hr_payroll: Fix unpaid leaves retenues formula

    Purpose:
    Unpaid leave must be deducted from the usual gross monthly salary
    up to the number of working hours concerned.

    The formula is in principle the following:
    gross monthly salary * 3/12/38 -> “usual” hourly salary.

    So, in the case of 2 days of unpaid leave, corresponding to 15.2 hours,
    the formula is as follows: 2650 * 3/13/38 * 15.2 = 244.61 €.

    The gross for the days actually worked is € 2,650 - € 244.61, or € 2,405.39

- 44/ hr_payroll: Generate python test from arbitrary payslip

    When the payroll is incorrect, the feedback that we receive is
    generally: "this doesn't work".

    This commit add a route in the controller of hr_payroll, to export
    in a python file, all data useful to reproduce the exact employee
    situation about the incorrect payslip.

    Before testing and fixing the incorrect payslip, we need to anonymize all
    sensitive data about the employee. This commit converts all sensitive
    data into demo data.

    This commit add a button in payslip form view to use the new route to
    export all data about the incorrect payroll.

    This button is only displayed when we are in debug mode and the current
    user is a payroll manager.
    task-2337786

closes odoo/odoo#60136

X-original-commit: 60eaecb749ad68429e4d8ba00ff0200c3360cdcb
Related: odoo/enterprise#14147
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-10-15 19:54:53 +00:00
db39211b46 [REF] web: owl graph renderer
We convert the GraphRenderer widget to an OWL component.

Task ID: 2090967

Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Florimond Husquinet <fhu@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
2020-10-12 07:43:43 +00:00
Mohammed Shekha 657ef8ad7f [FIX] web: show no content helper message in center
no content helper message is displayed in bottom in modal when there is sample
data, when no content helper message is displayed in modal and there is sample
data the ndisplay no content message in center which is not the case for modal.

To produce this issue: go to Expense -> Create Expense -> Create expense line
and if there is not expense line then sample data is displayed and no content
helper message is displayed at bottom of sample data, it should be displayed
in center of sample data with blurry effect.

With this commit this issue has been fixed.

Task-2311408

closes odoo/odoo#59175

X-original-commit: 5461efc9620a6ff6f0d61cd2a15676c6b9c58fd7
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-10-06 07:06:19 +00:00
qsm-odoo 9cf8b97fe4 [FIX] website, *: review modal behaviors with right-panelization
*: web, web_editor

Since the right-panelization made with [1], the modals were not
compensating the body scrollbar when opened anymore and the backdrop
was misplaced. This commit fixes the problems generically, to support
modals with non-body scrolling.

[1]: https://github.com/odoo/odoo/pull/57975

closes odoo/odoo#58442

X-original-commit: ebd0c90a146145079061e79c2d4c37fa182a2975
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-09-25 08:56:52 +00:00
qsm-odoo 586a5ce3a9 [FIX] web: remove 'overlay' overflow on modals
The o-scrollbar-overlay mixin was introduced for a fix on the enterprise
home menu (see related commit in enterprise that comes with this PR).
It was used on modal elements at the same time for no apparent reason:
the modal in the backend do not even scroll as this is their modal-body
that does.

This now introduced a bug in the frontend: some code which allows to
scroll to an element in a modal was not working on chrome because the
related code was checking for the element with 'overflow: auto'... which
it could not find since that element uses 'overflow: overlay'. As
overlay is a deprecated value, it seemed better to remove its use rather
than adapt the frontend code expecting the 'auto' value. This also solve
a design inconsistency between Chrome and Firefox (where the overlay
value is simply ignored).

closes odoo/odoo#58462

X-original-commit: 5ffb7bb2f461de2b3cf95ef0df6a24b668bf9bd3
Related: odoo/enterprise#13532
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-09-24 16:33:57 +00:00