summaryrefslogtreecommitdiff
path: root/addons/web/static/src/xml
AgeCommit message (Collapse)Author
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[IMP] web: sample data in pivot viewAaron Bohy
A previous commit has paved the way for displaying sample data in the reporting views. The present commit brings the required changes to have sample data in pivot views. Task ID: 2282196 Co-authored-by: Aaron Bohy <aab@odoo.com> Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2020-08-12[IMP] web: sample data in graph viewMathieu Duckerts-Antoine
A previous commit has paved the way for displaying sample data in the reporting views. The present commit brings the required changes to have sample data in graph views. Task ID: 2282196 Co-authored-by: Aaron Bohy <aab@odoo.com> Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2020-08-11[IMP] base,web: add scales param to calendarMichael Mattiello (mcm)
This commit adds the parameter `scales` in the calendar view's template. This parameter can be used to choose which mode(s) is/are allowed. This commit also refactors the way we manage calendar scales. Before scales were defined in model and renderer, now it's defined in the view and given to model, controller and renderer by params. 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-05[FIX] web: fix autocomplete over datepickerjvm-odoo
Issue - Sales > Create a quotation - Click on quotation date or start writing in it On chrome, if addresses autocomplete is enable and have data to show, a dropdown will overflow on the datepicker Cause This is mainly a chrome issue and the only way to solve it without a fix is to disable the autocomplete totally which is not really a solution since we want the autocomplete on adresses Solution Add the autocomplete off on datepicker field OPW-2308278 closes odoo/odoo#55470 X-original-commit: b40fef968ab000870574ae45ba482288cdf94ad1 Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com> Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
2020-07-23[IMP] *: adapt modules to Owl search panelJulien Mougenot
Adaptation of the rest of the environment to the changes regarding the refactored search panel and model. This commit includes the following changes: - Since the control panel model is now part of the search model, the view widget is responsible of its instantiation with the appropriate API; creating an ActionModel holding the required model extensions. - The controller is now importing/exporting the state of the entire search model as well as the current state of the search panel (given throught its props). Changes have been made to adapt to this behaviour. - The multiple components linked to the control panel model have been adapted to reflect the changes brought to it (they will now listen to the "searchModel" instead of the "controlPanelModel"). - The `test_utils_create` methods have also been adapted to properly instantiate a searchModel Part of task 2228968 Co-authored-by: Julien Mougenot <jum@odoo.com> Co-authored-by: Mathieu Duckerts-Antoine <dam@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-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-03[FIX] web: Support widgets in search viewJulien Mougenot
Since the refactor of the control panel, support of "widgets" attributes in the search view archs has been inadvertently dropped. Now, they are once again supported. Task 2061795 closes odoo/odoo#54066 X-original-commit: f33b0bc7a93e60bd0ed00b40d7459225ec0b749a Signed-off-by: Aaron Bohy (aab) <aab@odoo.com> Signed-off-by: Julien Mougenot (jum) <jum@odoo.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-29[FIX] web: update action on archive/unarchiveHardik Prajapati
Before this commit, when archiving a record through the action menu, the 'Archive' link was not updated to 'Unarchive' and same when unarchive was clicked, the link was not updated to 'Archive'. After this commit, when archiving a record through the action menu, the 'Archive' link is updated to 'Unarchive', same way when unarchiving a record link is updated to 'Archive'. This commit also introduces a new prop 'closeOnSelected' to the Dropdown component, to specify whether the dropdown should be closed when an item is selected, and makes Action Menu dropdown closed on item selected. task-2251739 closes odoo/odoo#53835 X-original-commit: dc5d02ade7747c74c31566c74932ef45c30e9356 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com> Co-authored-by: Mohammed Shekha <msh@odoo.com>
2020-06-23[IMP] project: improve calendar viewArnaud Joset
Before this commit, the calendar view showcases tasks by deadline. Because it is a simple date field, the day/week modes don't have much value and are even confusing to the users, who expect to be able to define timeframes. In addition, the quickcreate doesn't allow to select a project. This is problematic because it leads to "ghost" tasks. closes odoo/odoo#52478 Taskid: 2264594 Related: odoo/enterprise#10976 Signed-off-by: Yannick Tivisse (yti) <yti@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-12[IMP] *: limit in search panelMathieu Duckerts-Antoine
This commit introduces a new attribute 'limit' for search panel fields that allows to avoid performance issues. That integer attribute (with default 200) allows to fix a maximal number of values to display for the fields. When the number of field values to display reaches the limit, no values will be displayed. Instead, a warning message will be shown in the corresponding search panel section. Note it is possible to have no limit using limit="0" on a field. This commit reintroduces in a better way the principle brought by the fix 8d57153b34c04952a85f6642951cb2697016da84. Task ID: 2154749
2020-06-12[IMP] *: expand and hierarchize in search panelMathieu Duckerts-Antoine
The commit introduces two new attributes for search panel fields: - hierarchize: boolean attribute (default True) available for many2one fields with select="one". It allows to choose whether to hierarchize the field values using the _parent_name (if set) on the field comodel. Note that a sanitization of the parent hierarchy takes place. Basically, it ensures that parent chains are completely in the domain (on comodel) accessible by the user. See _search_panel_sanitized_parent_hierarchy documentation for more information. - expand: boolean attribute (default False) available for many2one and many2many fields. If set to true, all field values are fetched and displayed in the search panel. If set to false, only the values that have at least one corresponding value in the field model (and in some domain) are fetched. An exception in the case of an hierarchized field (hierarchize=True and _parent_name set): more/less values can be displayed in order to have a good representation of the parent hierarchy. That means we complete and sanitize the set of initial field image values. Note that the fix 8d57153b34c04952a85f6642951cb2697016da84 bringing the notion of limit in search panel has been reverted in the present commit. An upcomming commit will reintroduce the limit principle in a better way. Task ID: 2154749 Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com> Co-authored-by: Julien Mougenot <jum@odoo.com>
2020-06-12[IMP] *: enable_counters with false as defaultJulien Mougenot
In the search panel, the attribute disable_counters with default False has been changed to enable_counters with default False.
2020-06-12[IMP] web: close button on non-sticky notificationsJulien Mougenot
2020-06-10[IMP] web: replace property field icon with tooltipHardik Prajapati
PURPOSE The purpose of this task is to improve the interface by removing the fa-building icon which is automatically appended by the property field (i.e. company-dependent) and, instead, indicates that a field has company-specific values in the tooltip of the field. closes odoo/odoo#52313 Taskid: 2266519 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-06-10[IMP] web,*: make notification title optionalDhruv Patel
*odoo_referral,portal Currently, it is not possible to have one line notification, when you are not passing the title parameter as an option when generating the notification,then it will display the blank div with the default button icon only. so it is not possible to have one-line notifications since the title is mandatory. So the purpose of the task is to make the title optional, allowing for more minimalistic notification. Also removed some unnecessary titles from the notification and some stying change. This commit also increase the autoclose delay of non sticky notifications, from 2.5s to 4s. task : 2264749 closes odoo/odoo#52229 Related: odoo/enterprise#10981 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com> Co-authored-by: Dhruv Patel <dhp@odoo.com>
2020-06-04[IMP] web: Comparison menuMathieu Duckerts-Antoine
This commit replaces the "time range menu" in the control panel by a new component: the "comparison menu". Its purpose is roughly the same: compare a period of data in a reporting view with the previous period or the previous year. Its implementation is a bit simpler: it will only appear if at least one date filter is selected in the search view, and will suggest to compare each selected date option with the previous period or the previous year. Task ID: 2245719 Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com> Co-authored-by: Julien Mougenot <jum@odoo.com>
2020-06-04[REF] web: force dropdown menu icon through getterJulien Mougenot
Before this ref, the dropdown menu got his icon directly from his props. This means that any inheriting class had either to define its icon with the 'default_props' key or to have its parent giving it in the props. Now, the icon is retrieved from the props via a getter (same as title and items) and can be overridden to force a fixed icon on the class.
2020-05-15[IMP] web: various Popover improvementsSébastien Theys
Close can now be requested by children (slot content) with the event `o-popover-close`. This feature is necessary if we want a "close" button inside the popover itself, which is the case for mail.activity "Mark Done". Clicking on the popover target now acts as a toggle, which is also a feature that was expected from the previous popover implementation. Add a specific class (`o_is_open`) when the popover is displayed to be able to style its target depending on whether it is displayed or not. Ensure computed position is whole number of pixels to prevent flicker issue on Firefox. Remove forced width to let the component grow with its content. Add appropriate z-index to prevent overlap issue with the rest of our interface. closes odoo/odoo#50850 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-05-26[IMP] account,web: SearchPanel: improve folding behaviourJulien Mougenot
1) Clicks on a section value are now bound to the entire header, meaning that the sole purpose of the carets is purely esthetic. 2) Search panel categories will now only be folded if they are being clicked on while already selected. Classes that were no longer useful have been removed and tests have been updated accordingly. Task 2264700 closes odoo/odoo#51555 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-05-26[IMP] account,web: SearchPanel: move carets to the leftJulien Mougenot
In this commit, hierarchy carets in the search panel have been moved to the left side of the labels. To achieve a consistent and correct alignment, some DOM elements have been added/moved and the related SCSS sheets have been adapted. Carets on filter sections of the search panel have also been removed. Task 2258508
2020-05-26[FIX] web: calendar: hide event span when not usedRomeo Fragomeli
Due to commit odoo/odoo@8e48ba3eb59939cb5f8bdb715afa5e520b532a00 a span was added to show the time before the title on a event in month view. DOM of event +---------------+ | SPAN FOR TIME | +---------------+ | TITLE | | | | | +---------------+ This commit, hide the empty span when is not needed, to avoid empty blank space. Steps to reproduce: * Go in calendar app * Go in view week (BUG) closes odoo/odoo#51859 X-original-commit: 8456be44b1bc6746563cbca5366257a1da8b4a53 Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com> Signed-off-by: rfr-odoo <rfr-odoo@users.noreply.github.com>
2020-05-19[IMP] web: graph: add bar/line chart sortingPriyanka Kakadiya
PURPOSE Currently, reporting views such as the bar and line charts have their x-axis sorted either alphabetically or according to a sequence. When reporting, the user would be interested in sorting the x-axis values by their measure. SPECIFICATIONS Add 'ascending' and 'descending' options in graph view for bar and line charts Task 2070103 closes odoo/odoo#49970 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com> Co-authored-by: Mohammed Shekha <msh@odoo.com>
2020-05-18[FIX] web: pivot no content helperAaron Bohy
This commit reverts [1], which fixed the no content helper message of the pivot view, by moving the message definition in the JS. With Owl components, one must always use the translation function in the env (env._t), and no longer import it from 'web.core'. Moreover, there is no valid reason to define the message in JS here, except that there was a bug in owl, that has been fixed by [2] (merged in Odoo by the previous commit). [1] https://github.com/odoo/odoo/commit/c7cc672aba669175280d619ad39b14daefd7733f [2] https://github.com/odoo/owl/commit/2af8cccd65424ea75fbaa9f0a83c6974be4b1b5d closes odoo/odoo#51442 Signed-off-by: Géry Debongnie (ged) <ged@openerp.com> Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-05-15[IMP] web, web_editor: integrate colorpicker in colorpalettefja-odoo
Stop using the colorpicker dialog in the colorpalette widget. Integrate the colorpicker widget in the colorpalette widget. Of course, the colorpicker behaviors are adapted so that no useless rerendering of the colorpalette is made on each value change. The 'reset color' button is now a button like the other colors, no need for a 'color_reset' event anymore. It is removed and replaced with a 'color_picked' event with color being an empty string. The clear button now also work on hover. Also, the topbar colorpalette for text and text background colors now has the exact same behaviour as the background colorpalette: adding color preview on hover. The colorpalette now also closes on 'enter' keypress. Part of https://github.com/odoo/odoo/pull/46088 task-2195313 closes odoo/odoo#46088 Related: odoo/enterprise#8696 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-05-14[IMP] web_editor, *: make Colorpicker a Widgetfja-odoo
*: website, web Move the colorpicker dialog logic into a colorpicker *widget*, which the colorpicker dialog will now instantiate. Part of https://github.com/odoo/odoo/pull/46088 task-2195313
2020-05-14[MOV] web: rename colorpicker_dialog.xml fileqsm-odoo
The ColorpickerDialog will become a widget, this commit is only about renaming the related XML file. Part of https://github.com/odoo/odoo/pull/46088 task-2195313
2020-05-14[IMP] web: make ColorpickerDialog smallerfja-odoo
Remove HSL from the color picker and make the dialog smaller. Part of https://github.com/odoo/odoo/pull/46088 task-2195313
2020-05-08[IMP] web: Allow hide/show stroke in signatureLaurent Stukkens (LTU)
In the sign application, it appeared that when using the default signature in a signature SignItem that was higher the stroke at the bottom was doubbled. This was caused by the fact that the bottom stroke is always added to the template and that the default signature image had it already. In order to solve this, we have added a setting 'show-stroke' that allows controlling the stroke presence in the signature. Task Id 2216067 Closes #48529 Related odoo/enterprise#9538 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-05-05[IMP] web: search panel counter changesMathieu Duckerts-Antoine
This commit introduces several changes in the search panel with respect to record counts: - the record counts are now also available for the fields with select="one" attribute (if not disabled explicitely). - the record counts are better computed using the idea that selected values within a group should not impact the counts for the group values but only the counts for the other group values. On the way we have changed two keys in the values returned by the server: - 'count' becomes '__count'. It has been done to avoid a possible clash in case a model would have a field named 'count' and that the field values would be wanted for some reason. - 'name' (multi case) becomes 'display_name'. It has been done in order to make the select one and multi cases more similar and factorize some code. TASK-ID: 2166814 Co-authored-by: Raphaël Collet <rco@openerp.com> Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com> Co-authored-by: Alexis Lacroix <laa@odoo.com> Co-authored-by: Julien Mougenot <jum@odoo.com>
2020-05-05[IMP] web: FieldMany2one: reword and simplify dialogDhruv Patel
This commit improves the dialog that opens when a user clicks out of an 'un-commited' many2one. It is no longer possible to edit the value, and the sentence has been reworded. closes odoo/odoo#49528 Task: 2234212 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-05-05[IMP] web: add Many2OneAvatar field widgetAaron Bohy
In readonly, this widget displays the image of the related record next to its display_name. In edit, it behaves exactly like the regular many2one. Part of task 2195254
2020-05-05[IMP] web: add BadgeField componentAaron Bohy
This new field component displays the field's value inside a bootstrap pill badge. Supported field types are 'char', 'selection' and 'many2one'. The background color of the badge can be customized by using the decoration-xxx mechanism, e.g. <field name="state" decoration-danger="state == 'cancel'" widget="badge"/> Part of task 2195254
2020-05-04[IMP] web: ControlPanel: remove dropdown caretspka-odoo
Part of task 2234547 closes odoo/odoo#49793 Related: odoo/enterprise#10059 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com> Co-authored-by: Mohammed Shekha <msh@odoo.com> Co-authored-by: Aaron Bohy <aab@odoo.com>
2020-05-04[IMP] web,*: search menus always visiblepka-odoo
Part of task 2234547 Co-authored-by: Mohammed Shekha <msh@odoo.com> Co-authored-by: Aaron Bohy <aab@odoo.com>
2020-04-30[IMP] sales_team, web: add and improve color widget to improve UX on crm.tagvho
The color picker help the user to choose a color instead of picking it by id. The title and arial-label "no-color" default value are removed from the picker_preview because they are not accurate. Instead name of currently set color is used. Task ID 2128166 closes odoo/odoo#47474 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-04-29[FIX] web: list: fix confirmModal templateAaron Bohy
Replaces unnecessary (harmless in this case, but still), 't-raw' by 't-esc'. Also replace a t-raw used in the SwitchCompanyMenu (unnecessary and harmless as well). closes odoo/odoo#50411 X-original-commit: 691c9d2d2868885124749482aa8954322a40f130 Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com> Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-04-29[FIX] web: pivot view nocontenthelp messageHardik Prajapati
Since the commit https://github.com/odoo/odoo/commit/46cf65d68e9c13193dff4b563b9b0bbb2199dfc1 when help is not defined in action then nocontenthelp is displayed as [object, object] due to the desciption passed from renderder of the pivot view. So in this commit while calling the NoContentHelper pass the descitption as string instead of jquery element. we can use the t-value in template but that string will create issue for transalation so pass the desctiption from the pivot render. closes odoo/odoo#50347 Taskid: 2240167 Closes: #49859 X-original-commit: c7cc672aba669175280d619ad39b14daefd7733f Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-04-28[FIX] web: limit on search panel valuesMathieu Duckerts-Antoine
Before this commit, if a many2X field with a big comodel was added in a search panel, the view using it would crash. For instance that problem occured in the kanban view for hr.job, where res.users appears as the comodel for the field user_id. Now, we fix an arbitrary limit of 200 to the numbers of values to fetch for each many2X fields in the search panel. This avoid the problem mentionned above. Furthermore, in case the limit is attained for a field used as select="one", the values are displayed without being hierarchized. Indeed the limit can leads to gaps in the knowledge of the hierarchy and consequently to a bad representation of it. Task ID: 2154668 closes odoo/odoo#50334 X-original-commit: 8d57153b34c04952a85f6642951cb2697016da84 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-04-23[FIX] web: properly define control panel layoutJulien Mougenot
Before this commit, some elements in the control panel were not properly encapsulated in layout-related parent elements and this caused some inconsistencies if some of the control panel components were not displayed. For example: if the breadrumbs were missing, the search bar went to the left side instead of the right. Now, all components are in a grid-like structure (in desktop mode) and should not overstep their given boundaries. The layout in mobile remains unchanged since the top part behaves quite differently. closes odoo/odoo#50057 X-original-commit: 533db5991a5bb871198485cd71a63f75a8c6becf Related: odoo/enterprise#10148 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com> Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
2020-04-22[IMP] website, web: add "h" accesskey for home menu in communityqsm-odoo
Following the work on accesskeys on the website side with [1], there is in fact no reason to have this in enterprise and not in community. [1]: https://github.com/odoo/odoo/commit/0b0690a3934cedcab0d5e34373e8d40c2ab25660 closes odoo/odoo#49717 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-04-14[IMP] web: add a <Popover> componentDamien Bouvy
Using bootstrap popover with owl is possible, but with a lot of friction. This commit adds a Popover element to ease developments that require a popover. This component takes 2 props: - position='bottom' (optional): 'top', 'bottom', 'left', 'right' - title (optional) Its usage requires setting an `opened` slot for the content of the popover, whilst the 'trigger' of the popover uses the default slot. E.g. ```xml <Parent> <Popover> <t t-set="opened"> <p>You have opened the popover, congratulations!</p> <button t-on-click='_handlerOnParent'>Dispatch cake</button> </t> <button class="btn btn-primary">Click me!</button> </Popover> </Parent> ``` Note that: - only one popover can be opened at a time (opening a popover will close any previously opened popover) - `Popover` uses `Portal` under the hood, so events are propagated correctly even though the popover is teleported elsewhere in the dom (see example in this commit message with `_handlerOnParent`) - `<Popover>` is registed as a global component in QWeb and does not need to be added to a Component's subcomponents list closes odoo/odoo#47710 Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2020-03-31[MOV] web: extract mobile-specific code to enterpriseRomeo Fragomeli
Task ID: 2092550
2020-03-31[REF] web: extracts calendar's methods to allow customizationRomeo Fragomeli
This commit extracts some calendar's event handlers, private methods and templates to create 'hooks' allowing further customization. Task ID: 2092550
2020-03-31[REF] web: convert FieldBoolean to owlMichael Mattiello (mcm)
This commit does 4 things: - adds a file for deprecated legacy fields. - moves legacy FieldBoolean into this file. - converts FieldBoolean to owl component. - adds a new xml file for component fields' templates. task id: 2193996
2020-03-31[ADD] web: add CustomCheckbox owl componentMichael Mattiello (mcm)
This commit adds an owl component for the Odoo custom checkbox. task id: 2193996