summaryrefslogtreecommitdiff
path: root/addons/web/static/src/scss
AgeCommit message (Collapse)Author
2020-10-16[FIX] web, doc: remaining_days widgetNicolas Martinelli
The `remaining_days` widget is intended to be used for informative purpose, hence it should not be editable. opw-2362276
2020-10-15[MERGE] l10n_be_hr_payroll: Validate the CP200 different payslipsfw-bot
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#60084 Related: odoo/enterprise#14108 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-10-05[FIX] web: show no content helper message in centerMohammed Shekha
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#55992 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-09-24[FIX] web: remove 'overlay' overflow on modalsqsm-odoo
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#58444 Related: odoo/enterprise#13524 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-09-24[FIX] website, *: review modal behaviors with right-panelizationqsm-odoo
*: 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#58414 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-09-03[FIX] web: fix the width of the color picker widgetstd-odoo
Purpose ======= Since cb55b302936010d97eca988c68d8167c8c4360b1 we set a fixed width for the color picker widget in readonly mode. This value is quite huge and cause issue in saas-13.5 in the event track form view. Task-2320370 closes odoo/odoo#56879 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-09-23[FIX] web: properly compute popover positionSébastien Theys
- avoid updating default position list in place - ensure computed position takes into account enough margin with border - fallback to requested position instead of bottom Part of task-2270731 closes odoo/odoo#58368 X-original-commit: 3fad17421518732db2085c3eec596600cfe34f03 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com> Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-09-22[IMP] website, *: move page scrollbar to #wrapwrapqsm-odoo
*: web, web_editor, portal, account, website_blog, website_forum This is probably not ideal to move the scrolling behavior out of the html element but this will be needed for the editor to not have a double scrollbar on the right. This is actually also useful for the scrollbar to appear under the purple odoo menu instead of its right. This commit, if to be reverted in the future, however contains many improvements to make the transition easier that should be kept: jQuery and Odoo functions to be able to scrollTo a specific element, get the top scrollable element, check if an element is scrollable, etc. Also, some magic was done: if some code tries to scroll to a specific scroll position via jQuery's scrollTop or animate functions on the html/body element, those will still work as intended (obviously, using the new utils to do that is however recommended). This commit also reviews our scroll behaviors to make them more robust and share the code. Part of https://github.com/odoo/odoo/pull/57975 task-2344227
2020-09-15[FIX] web: list: call mounted on subcomponents at reloadAaron Bohy
Issue was spotted in list views containing the "badge" widget with decorations (e.g. in the Purchase Order list view). At first, the decorations were correctly applied, but they weren't anymore after a reload (e.g. after toggling a filter). They weren't because the list renderer didn't called 'on_attach_callback' on its subwidgets at reload (thus, 'mounted' wasn't called on its subcomponents, and the decorations are applied in the mounted hook). This commit moves the logic from the FormRenderer to the BasicRenderer, so that it applies on List, Kanban, and Form views. This commit also removes the transition scss rule on the badge field widget as it caused a flickering at reload. Task 2336440 closes odoo/odoo#57762 X-original-commit: 713bce22e8f412f2c26e663b9e30fdd64933ff0c Signed-off-by: Michaël Mattiello <mcm-odoo@users.noreply.github.com> Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-09-02[FIX] web: preview PDF file on iOSAdrien Dieudonne
Before this commit, the end users were unable to click on the kanban image to see document's preview. To fix this we removed lines from a previous fix which is no longer useful in 13.0 because we now use kanban views for many2X fields instead of list views. See original commit: https://github.com/odoo/odoo/commit/26c62cbb4401bffb72ce77fee481ca84b77a8143 So for mobile phones it's working fine. For iPads, this rule is no longuer necessary since iPadOS. See "Accelerated Scrolling on iOS and iPadOS": https://webkit.org/blog/9674/new-webkit-features-in-safari-13/ For previous versions it still works because the DOM has changed. Steps to reproduce: - Go to Document - Click on "o_kanban_image" => Your're stuck on a grayed page. opw-2260101 closes odoo/odoo#56974 X-original-commit: 0d41d0daa7220a791bc4df85cca4100e3634e432 Related: odoo/enterprise#12906 Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2020-09-01[IMP] base: Document layout preview improvementsSimon Genin (ges)
The document layout preview is a complete defferent simplified template with its own css that replicates at best the different styles. It does not have the external layout features and lack of fidelity. The new preview actually use the real documents templates and put the result in an iframe. It now has a high fidelity, though not perfect. The goal is for a better onboarding, where clients see easely how documents will look if they had an app to generate them. Of course, the data on the document is a false invoice. Refactor all this from base to web. Task ID 2304177 closes odoo/odoo#56415 Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2020-09-02[FIX] web: fix style of form view in modalSébastien Theys
task-2302721 closes odoo/odoo#56932 X-original-commit: 7c4787a1431538ddb69bfbc50a27dd033437a6a4 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com> Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-08-25[FIX] web: emptylist helper positionKamesh Patel
Before this commit: An empty list helper position not centered when search panel sidebar is there and some issue created while having a droplet on it as the position will shifting after a few seconds (sign_tour) After this commit: Set an empty list helper at a relative position and now it will always be displayed at the center whenever have a search panel sidebar LINKS Task-2323988 closes odoo/odoo#56498 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-08-27[IMP] website, *: add style options for navbar linksCocographique
*: web Part of https://github.com/odoo/odoo/pull/56427 task-2264627 Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-08-27[IMP] website, *: add off-canvas and other hamburger menu optionsstefanorigano (SRI)
*: web, portal Part of https://github.com/odoo/odoo/pull/56427 task-2264627 Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-08-27[FIX] web: make BS more robust with customized input groupsqsm-odoo
For some strange reason, BS is handling small and large input groups pretty well but not normal ones. Indeed when customizing the paddings of buttons and inputs individually, the normal-size input groups are broken. Also, customizing the border width of buttons always breaks input groups for all sizes. This is now fixed. Note: the first problem was actually already solved by increasing the input height to the button height. It makes actually more sense to shrink the button size to the input height as this commit does (as this is the input which is the main element in an input group). Part of https://github.com/odoo/odoo/pull/56427 task-2264627
2020-08-26[FIX] web: ribbon in form doesn't overlap kanban stateMohammed Shekha
Have a project.task that is archived Display it in form view and with the chatter on the side (big screen) (though the issue happens at any viewport size, with slight difference is positioning) Before this commit, the field kanban_state is under the ribbon, with no way to interact with it. It could happen with the title itself, or with any field that we'd put on the right side of the form. After this commit, the kanban_state field is visible. In short, siblings of the ribbon now have some right margin in css. task-2226237 closes odoo/odoo#56576 X-original-commit: d701317a6c3ba002e935f8b30ce160cc186c239a Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2020-08-24[FIX] web: misalignment in o_colorpicker for "Hide in Kanban" labelDhruv Patel
In o_colorpicker popup, the "Hide in Kanban" checkbox label is not aligned with the checkbox. With this commit, we have aligned the label with the checkbox. Task ID: 2277254 closes odoo/odoo#56444 X-original-commit: 72252ff8a6aaae86fae121a7006039a40ba6efe2 Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2020-08-20[FIX] web: start typing text in dropdown not showing on hoverDhruv Patel
When you hover on the "Start Typing" text in autocomplete dropdown, it will not visible as its CSS overwrite with the rule and change the text color as white. With this commit, we have added the css rule for specifically "Start typing" dropdown item and its looks consistent as other dropdown items. Task : 2311983 closes odoo/odoo#56233 X-original-commit: ee8739361830981539127b269363a6fcbfcd840c Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2020-08-14[IMP] web, web_editor: review colorpicker designstefanorigano (SRI)
Part of https://github.com/odoo/odoo/pull/55959 task-2157252 Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-08-12[FIX] web: Prevent field badge from overflowingJulien Mougenot
Before this commit, the field badge could overflow from its boundaries and have part of its pill/text hidden. Now, the "overflow" mixin has been applied and the badge is properly contained. closes odoo/odoo#55806 X-original-commit: f4b672bfcf21c7c7f0b6071a8dd18bd6e966266b Signed-off-by: Aaron Bohy (aab) <aab@odoo.com> Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
2020-08-12[IMP] web: no content helper style for sample modeAaron Bohy
Task ID: 2282196
2020-08-11[FIX] web: make emoji dropdown appear on top of contentxO-Tx
Form sheet with hidden overflow (added to improve ribbon widget css) prevents emoji button from showing emoji list when clicked. This commit attempts to show the complete emoji dropdown by removing overflow from the sheet container. IMPORTANT : This override won't affect ribbon since the hidden overflow was added on the widget itself. Task ID-2224393 PR #49096
2020-08-11[REF] web: rework calendar's styleMichael Mattiello (mcm)
This commit reworks the mini calendar's style to make it look like the months in year mode. It also reworks the style of the calendar's popover in modes day, week and month to reduce the differences with the year popover. Task: 2193921
2020-08-11[IMP] base,web: add year scale to calendarMichael Mattiello (mcm)
This commit adds a new year scale to the calendar view. It comes with a new view in the calendar, this view displays a 4x3 grid which cells are month views. Task: 2193921
2020-08-06[FIX] report: Font size decrease when adding too much contentAndrea Grazioso (agr-odoo)
From the Sale app create a new Quotation with a long customer reference. Click on "Save" and then Print. In the generated report the fields relative to the order details are not correctly displayed: the general font size is scaled down to make the text fit the page which is not the correct behavior. The font size should remain fixed and all the element should be visible, eventually spanning over multiple lines. This is due to the broken bootstrap support of QtWebKit, used by wkhtmltopdf to generate pdf reports. In particular the new flexbox style introduced in the library is not supported and every element based on it will be ill-displayed. The solution is to fall back to the subset of supported features to implement a different solution, which keep everything on one line but avoid the font resizing and every possible overflow. opw-2261573 closes odoo/odoo#55555 X-original-commit: 2dd3ed327aad6fecdcfd4b53c4338bf47e44401b Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-08-04[FIX] web: avoid double switching in RTLYousef Al-Hadhrami
The direction arrows in the datepicker were switched a first time in fontawesome_overridden.scss .o_rtl ..fa-chevron-left,.fa-chevron-right transform: rotate(-180deg); and a second time in datepicker.scss .o_rtl .bootstrap-datetimepicker-widget .prev,.next transform: rotate(180deg); The buttons were flipped twice Signed the Odoo CLA Fixes odoo/odoo#50090 Closes odoo/odoo#53369 closes odoo/odoo#54880 X-original-commit: 8629fa3fdfddbf24f48a58d5add0fcadca60fba4 Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-07-30[FIX] web: line break into tooltipsvs-odoo
The commit e69c72f93b0279402c1bfc581f69ad62c6aad0ca removed the line breaks into tooltip help text. This commit re-add them for the sake of readability. closes odoo/odoo#55233 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-07-24[IMP] web: change list view's groups styleMichael Mattiello (mcm)
This commit changes a bit the style of groups in list view * reduced padding-top/bottom of group headers to 5px * increased the padding-left by 2px of carets to align them with selection checkboxes (in enterprise) Task 2301397 ENT PR: https://github.com/odoo/enterprise/pull/11955 closes odoo/odoo#54736 Related: odoo/enterprise#11955 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-07-23[IMP] web: Search panel OwlJulien Mougenot
Refactoring of the search panel and its inner logic to Owl. The previous search panel widget has been divided in 2 parts: 1. Component The "Search Panel" component's responsibilities are now to render the search panel data given by its model, display some rendering logic (expanded categories, checked groups) and dispatch the events triggered on it. 2. Model Extension The "Search Panel Model Extension" holds all the search logic of the search panel. Its responsibilities are calling the server to update its data and to provide them to its component and other search extensions. Part of task 2228968 Co-authored-by: Julien Mougenot <jum@odoo.com> Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2020-07-17[FIX] web: list: do not crush text fieldsAaron Bohy
Before this commit, it might happen that text field columns in list views were completely crushed, to let space to the other columns. This commit fixes the issue by preventing text fields from being wrapped during the ideal column widths computation. Doing so, text fields will take space they deserve according to their content. They will then be wrapped if necessary, so that they aren't trimmed, unlike e.g. char fields. Task 2275747 closes odoo/odoo#54664 X-original-commit: 5c54111127bd99eedb4e0331aba5a0200feb461c Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com> Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-07-17[IMP] web: improve tooltip style/designMohammed Shekha
Improve tooltip style/design to get rid of black background and purple title, instead design tooltip like popover design, to have tooltip with white background and light grey title task-2266829 closes odoo/odoo#53723 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com> Co-authored-by: Ipsita Borisagar <ibo@odoo.com>
2020-07-14[IMP] web_editor, *: review the editor design CSSqsm-odoo
*: web, mass_mailing, website, website_form, website_sale New CSS design of the editor (step 1/x). This work is unfortunately far from perfect but is a first step towards what we want. In particular, much CSS linked to elements that are meant to be removed/moved in the upcoming weeks was done in a huge rush but will thus hopefully be removed/reviewed before the 14.0 release. As the design is now far more complex including gradients and other "complex" elements, it was also very difficult to keep a design based on css-variable so this system was removed, which means that the editor now appears the same everywhere (backend, frontend, ...). The original goal of this system was to have an adapted style for backend, frontend and website visitors. Unfortunately, the current result was a very good frontend editor design, a not-so-good backend editor design (for mass mailing at least) and a totally unadapted design for the website visitors. Making this perfect will be achievable by loading different assets for those 3 areas and hopefully those assets will only differ by the values of editor scss variables. Part of https://github.com/odoo/odoo/pull/53930 task-2157252
2020-07-09[REF] website, *: review how available fonts are defined in scssqsm-odoo
*: web, web_editor Instead of three lists + one map to define font information and user choices saved as the index of the related fonts in those lists, the fonts are now stored in an unique map <font-name> -> <data> and the user choices are saved as the font name. This allow to have a visually better definition of the fonts and allows to reorder fonts in the UI without losing user customization (and actually simplify some code). Unfortunately any user font customization < 14.0 will be lost, but this is a small price to pay (users can still rechoose the same font in the editor UI where they will go anyway to discover all the new shiny features we are introducing there). Part of https://github.com/odoo/odoo/pull/54065 task-2291398 closes odoo/odoo#54065 Related: odoo/design-themes#269 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-07-09[FIX] web: remove test-breaking css propertyqsm-odoo
This is a huge mistery. But this particular `align-items: baseline` rule, introduced by [1], yields a red runbot ~20% of the time. As it is not stricly necessary in current master (but necessary if the font changes which will be the case in the upcoming days), this commit simply removes the rule temporarily. [1]: https://github.com/odoo/odoo/commit/94b59b1972e1a18e18dfcd6c2ded495391380b9a Part of https://github.com/odoo/odoo/pull/54274 closes odoo/odoo#54274 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-07-09[FIX] web: list: don't squeeze button columnsAaron Bohy
Adjacent buttons are not displayed in a single column. When the table overflows, we try to squeeze largest columns to make it fit into its container (in this case, text may be clipped and an ellipsis is displayed). Button columns didn't get away from this. As a consequence, now that a cell may contain several buttons, some of them may be clipped and replaced by the ellipsis, which isn't what we want for buttons. This commit removes the button columns from the list of columns to squeeze, so we let the browser reduce them as much as it can, and we keep them as they are. Task 2282470 closes odoo/odoo#54258 X-original-commit: e00960daa3ed3d1fd3a7572b2acedd3d2fb0448e Signed-off-by: Julien Mougenot (jum) <jum@odoo.com> Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-07-07[FIX] web: kanban: drag column with sample dataAaron Bohy
Before this commit, in a grouped kanban view with sample data (e.g. crm.lead), one could toggle the 'settings' dropdown menu of a group, and then drag&drop the group by clicking on the muted "Fold" item in the dropdown. After this commit, dragging a column is only possible by clicking on the column title (but not on the 'config' or '+' icons, nor the config dropdown). Task 2290197 closes odoo/odoo#54179 X-original-commit: 58c38a024c96eba3469c142a8422b7bd0ab54ea4 Signed-off-by: Mathieu Duckerts-Antoine <Polymorphe57@users.noreply.github.com> Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-07-06[FIX] web, web_editor, *: review chess-like bg for transparency previewqsm-odoo
*: website The style to achieve the chess-like bg result was duplicated at many places. The 'web' app was also actually using an image from the 'web_editor' app (we can live with it in stable as web_editor always comes with web in auto_install but this was still a mistake). closes odoo/odoo#54154 Also: fix some layout issue in the colorpicker widget. Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-07-02[FIX] website_mass_mailing: editing the newsletter warning banner in the ↵jerome hanke (jhk)
translation web editor Steps to reproduce: - install website, website_mass_mailing - go to website, edit and add a popup window (you should see warning banner stating that a newsletter popup is present on this window). Save. - go to settings > languages > load a new language (fr_FR for example) and translate the website - go back to the website > select the new language > click the TRANSLATE button Previous behavior: the warning banner is not editable, also click the "Edit popup" button does nothing Current behavior: clicking the "Edit popup" button triggers an alert with a quick explanatory text opw-2280188 closes odoo/odoo#53988 X-original-commit: af57e4924dbd432f9362881dae71d2a4e4595a1f Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com> Signed-off-by: mightyjol <jhk-odoo@users.noreply.github.com>
2020-06-30[IMP] web, *: replace the bootstrap backdrop element with a bg on modalsBenjamin Vray
*: web_editor Do not display the backdrop element added by bootstrap in the body and add a background on the modal to keep the same effect. The bootstrap backdrop was probably useful for compatibility with <IE9 but is no longer needed. This also avoids z-index issues because modals could be opened in an element (e.g. the website #wrapwrap) whose stacking context is different of the body one (where the backdrop is opened). This would make the backdrop appears on top of the modal. Part of https://github.com/odoo/odoo/pull/49142 Related to task-2229551 Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-06-30[IMP] website, *: add new footer effect optionsBenjamin Vray
*: web Part of https://github.com/odoo/odoo/pull/49142 task-2229551 Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-06-30[IMP] web: prevent modal titles to overflow…Bruno Boi
…by breaking words. closes odoo/odoo#52727 Taskid: 2253703 Related: odoo/enterprise#10947 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-06-22[IMP] web: disable keyboard navigation with sample dataJulien Mougenot
Previous commit introduces the sample data feature in list and kanban views. When sample data is displayed, most parts of the renderers can't be clicked on, to prevent the user from interacting with sample records (e.g. to open a sample record in form view from the list). This commit disables keyboard navigation as well, as those sample records could still be accessed with the keyboard. To do so, several refactorings have been done in views: - _giveFocus function added on controllers (so that we can hook on the moment where we want to focus the renderer, and prevent it in sample mode), it kind of replaces giveFocus of ActionMixin which wasn't use from the outside - updateRendererState -> _updateRendererState as it is private - _setState function added on controllers, to have a hook when we set a new state (already existed, but only in kanban) - _renderView function moved from Basic to AbstractRenderer, so that we have a proper hook to deactivate clickable elements in sample mode Task 2232801 X-original-commit: 4482a03fe2f083f4f44fc6eb76d90ae22afbff91
2020-06-22[IMP] web: add support of "sample" attribute in viewsJérémy Hennecart
With this commit, it is now possible to display sample (fake) data in empty views, in the hope of easing user onboarding. This can be enabled (in list and kanban views) with attribute sample="1" on the arch root element. In this case, if there is no data to display, sample data will be generated based on heuristics (depending on field types and names). This can be used in addition to the no content helper. Task 2232801 X-original-commit: 7c8e627ff5029cb539d702705e5ce53d658c76ed Co-authored-by: Aaron Bohy <aab@odoo.com> Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com> Co-authored-by: Jérémy Hennecart <jeh@odoo.com> Co-authored-by: Julien Mougenot <jum@odoo.com>
2020-06-22[FIX] web: reduce spacing between toast notificationsDhruv Patel
Currently, toast notifications are too far apart with each other if there are multiple notifications. So with this commit, we have reduced the margin from the bottom so it looks closer. Task : 2278730 closes odoo/odoo#53381 X-original-commit: d43008b38b7b71a5dc1a260560a98ca75e1fafb4 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-06-18[FIX] web: place the notification close button to the right endLaurent Stukkens (LTU)
Prior to this commit the close button of the notification is wrongly placed when no title is provided. Applying this commit places the close button at the right end. This commit also modifies the size of the buttons to btn-sm. task-2277737 Fixes #52229 closes odoo/odoo#53219 X-original-commit: caa3f1107ddaa4cdf6878f4532632a41bc710862 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-06-15[REF] mail, *: refactor messaging with OWLSébastien Theys
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-12[IMP] web: review notification styleJulien Mougenot
2020-06-11[IMP] web: remove color from 'Start typing' optionJulien Mougenot
closes odoo/odoo#52842 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-06-10[IMP] web,*: highlight quick create feature to userDhruv Patel
Generally, Users are not necessarily aware that they can quick create a most records by simply typing in their name+enter in the many2xxx field input. The exact purpose of this commit is to make sure the user discovers the quick create feature of our many2xxx fields. For that, when the input is empty, display 'Start typing to create a record...' at the bottom of the dropdown when can_create is set and no_create_edit option not set. So the user can easily understand that by typing and pressing enter will create the new record. Also "Search and Create" options in the dropdown only been shown to the user when it type anything in the input box as the same case in the "Create" option. Task : 2266557 Co-authored-by: Mohammed Shekha <msh@openerp.com> Co-authored-by: Julien Mougenot <jum@odoo.com>