summaryrefslogtreecommitdiff
path: root/addons/web/static/src
AgeCommit message (Collapse)Author
2019-05-07[FIX] web: correctly display list column nameMartin Geubelle
Rev. odoo/odoo@5dc971b introduced a `description` attribute on AbstractField. Sadly, the attribute was already used for something else (in `handle` and a widget in asset, to hide the column name). So the widget new description is now displayed in the list header (instead of the field name). A new attribute `noLabel` has been now added on AbstractField (currently only used in list) to fill the same purpose as the previous `description`. Task 1981757 closes odoo/odoo#33060 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-05-07[FIX] web: correctly display header tooltips in listMartin Geubelle
A traceback occured when displaying the tooltip (only visible in debug) on a list view header if the field had a `widget` attribute (introduced in rev. odoo/odoo@5dc971b). The issue here was linked to the fact that a widget is not always rendered in list view (compared to form view) so the `Widget` property in the attributes was not there. Task 1981757
2019-04-25[REF] web: extracts category value selection in a functionThanh Dodeur
This commit extracts the logic of the selection of the default value for search panel categories into a private function so it can be hooked in other modules. task: #1959112 closes odoo/odoo#32448 Signed-off-by: Martin Geubelle (mge) <mge@openerp.com>
2019-05-03[IMP] web: multi-line many2one: only highlight first lineAaron Bohy
Rev. a3489be33 removed this feature to fix a bug (when the single line many2one, e.g. a product, is too long and displayed over several lines). However, we (fp) still want this for res_partner many2ones with show_adress. This rev. re-introduced the feature without re-introducing the bug. closes odoo/odoo#33139 Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-05-02[IMP] web: various small improvements to form viewGéry Debongnie
This commit is a few small improvement/fixes to the web framework: - allow placeholder attribute on input tags in form view - only bind click event handler to buttons managed by the framework, not custom ones - _onExecuteAction method in action manager properly fails if event cannot be properly handled closes odoo/odoo#32458 Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2019-04-30[IMP] web: close dropdowns on scrollJulien Mougenot
Dropdown from many2xxx and datepicker widgets now close on scroll to allow access of background information when scrolling. Related to task #1929483 closes odoo/odoo#32836 Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-04-30[FIX] web: Send attachment ids on file loadedLucas Lefèvre
This commit fixes a bug introduced when migrating from jquery deferred to native JS Promises (ab56e63). Steps to reproduce: 1. Go to the Expense app 2. Create a new expense 3. Click on "Attach Document" and upload a file => crash and infinite loading spinner After loading files, the `attach_document` widget is supposed to call a callback action with attachment ids as argument. Currently, attachement ids are not correclty retrieved. They are retrieved via the `arguments` object but since ab56e63 `arguments` refers to the arguments of the Promise callback function and no longer to the handler function `_onFileLoaded` arguments. closes odoo/odoo#33048 Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-04-29[IMP] base,web: adapt kanban image following image tools changesSébastien Theys
Since the images are not guaranteed to be square anymore, the kanban image had to be adapted to better handle the different image ratios. Also the placeholder has been moved into the actual image div instead of being a separate div that acted differently. The avatar placeholder was white... displayed on top of white. Now it's grey so we can actually see it. task-1958000 PR: #31811
2019-01-25[FIX] layout: increase font size of boxed layout.Rishabh Jadia
While printing the reports using boxed layout, the font-size is bit smaller and the report does not look so good. This commit improves the boxed layout by slightly increasing the font-size. Task id: #1931768 closes odoo/odoo#30497 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-04-24[IMP] web, *: share and improve notification systemqsm-odoo
* barcodes, calendar, partner_autocomplete, web_settings_dashboard Make the notification system better, using bootstrap toast component, and make it available in the frontend. The toast component allowed to remove some JS code and made the component customizable by themes but it had to be reviewed/fixed to make it functional (maybe bootstrap will review its work in next versions). This work should still be improved because there are still too many ways (deprecated and not deprecated) to instantiate toasts in the backend. The goal here was however to make the toasts more modern and make them available in the frontend. This work is needed for some tasks. @kig-odoo and @fja-odoo made a pre-work to instantiate toasts in the frontend for their respective tasks. This commit unifies the system. Part of https://github.com/odoo/odoo/pull/32793 task-1970731 closes odoo/odoo#32793 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-03-07[IMP] web: disable cache in debug assetsMartin Geubelle
When altering a view (regular or wizard's) in code/file (rather than via the client's interface) and restarting the server view caches don't get cleared and it's necessary to reload the entire client before the changes can be seen. This is annoying, and sometimes confusing so the cache is now disable in debug assets. Task 1911601 closes odoo/odoo#31667 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-04-24[IMP] web, *: add a description to generic widgetsJuhil Somaiya
A `description` key has been added on AbstractField and all generic field widgets ; it is used to display a more user friendly name (both in the webclient and in Studio). Non-generic field widgets have an empty string as description. Related task 1918327 closes odoo/odoo#30131 Signed-off-by: Martin Geubelle (mge) <mge@openerp.com> Co-authored-by: Mohammed Shekha <msh@openerp.com>
2019-04-24[REF] web, *: remove `one2many_list` widgetMartin Geubelle
This widget was exactly the same as a `one2many` and was kept for backward compatibility reasons. It can be safely removed in master. Related to task 1918327
2019-04-23[IMP] web: enable drag&drop in ungrouped kanban viewsVandan Shah
With this rev., the resequencing feature (with drag and drop) that was already available in list views is now available also in kanban views having a field with widget="handle". This works for main as well as x2many kanban views. Some code handling the resequencing has been moved from the list components (controller and renderer) to the basic ones, so that the logic is shared between list and kanban. Task 1902808 closes odoo/odoo#28581 Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com> Co-authored-by: Mohammed Shekha <msh@openerp.com> Co-authored-by: Aaron Bohy <aab@odoo.com>
2019-04-12[MOV/IMP] web, mail: update attachment widget and moved the common scss code ↵jpr-odoo
from mail to web with this commit, we have updated the attachment widget view same as like chatter attachment view moved the common scss code from mail to web for many2many_binary widget, which is used for attachment and update test case according to the widget Task ID: 1930087
2019-04-19[IMP] web: consider select tag for o_row classMohammed Shekha
This commit will fix UI glitch when seletion field and any other field kept on same line Using o_row we can put two divs, two inputs side by side but if we have case where from two elements 1 is input and second one is selection widget then we will have glitches in UI, this commit will fix that glitch task-31003 closes odoo/odoo#23914 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-04-19[FIX] web, project: consider context pivot_row_groupbyParth Patel
Fixing missed 'pivot_row_groupby' assigned to groupedBy in pivot_model.js in Load function (Already done in reload function), which was missed in commit 42f22a2. Added qunit test case for testing correct value. Apply pivot_row_groupby on user in project task-54027
2019-04-18[MOV] web, project: make cover image generic in kanbanSuraj Shukla
Previously, we could only set cover image on the kanban view of project task. This commit makes the feature generic so now cover image can be added to any kanban view. Technical notes: - field used to display the cover image has to be set as 'data-field' attribute on the kanban dropdown's menu related to cover image - developer will have to take care while designing kanban views with cover image ability in such a way that it does not break the design Task 32108 closes odoo/odoo#31731 Signed-off-by: Martin Geubelle (mge) <mge@openerp.com>
2019-04-12[MERGE] forward port branch saas-12.3 up to 120359bf0c9Christophe Simonis
2019-04-05[FIX] web: restore handle and remove button width on listMartin Geubelle
Rev. odoo/odoo@9fbb4fb wrongly removed the fixed width on handle and button width on list views. This commit restores it. closes odoo/odoo#32467 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-04-08[FIX] web: correctly update modifiers in editable list with buttonsMartin Geubelle
Since rev. odoo/odoo@015958d it is possible to add buttons in list group headers. These buttons are defined in <groupby> nodes, pointing to m2o fields. Modifiers specified on these buttons thus use fields on the m2o comodel. There was a traceback in editable list view, when grouping by a m2o that defines a groupby button with modifiers as the modifiers are not registered with the same datapoint. When updating the modifiers, one must ensure that the modifier are related to the updated record. closes odoo/odoo#32456 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-04-10[FIX] web: correctly forward-port 8d34eb1328.Christophe Simonis
I shouldn't have trust the comment and apply the patch anyway.
2019-04-10[MERGE] forward port branch saas-12.2 up to 2694174b410Christophe Simonis
2019-04-09[MERGE] forward port branch saas-12.1 up to af313858b4bChristophe Simonis
2019-04-09[MERGE] forward port branch 12.0 up to c1c322dd401Christophe Simonis
2019-04-05[MERGE] forward port branch saas-12.2 up to f2be461f090Christophe Simonis
2019-04-08[FIX] web: list: re-evalute modifiers depending on idAaron Bohy
In an editable (main) list view with modifiers depending on the record id, add a new record. While the record isn't created yet, the modifiers were correctly evaluated. However, they weren't re-evaluted when the record was saved (thus getting an id), and a reload of the view was necessary for the modifiers to be correctly applied. With this rev. they are now correctly re-evaluated when the record is saved. closes odoo/odoo#32483 Signed-off-by: Martin Geubelle (mge) <mge@openerp.com>
2019-04-08[FIX] web: editable list: shift-tab and readonly fieldsAaron Bohy
Before this rev., navigating with shift-tab didn't produce the expected result when there were readonly fields on the way. For instance, pressing shift-tab on a field: - to the right of a readonly field: the focus was kept in the current field, whereas it should have been moved to the first editable field to the left of the readonly one - in the editable first cell of a row, with a readonly field in the last column: the focus was moved to the previous line, which is ok, but on the first editable cell of it, whereas it should have been on the last editable cell. @KangOl this commit needs to be forwardported up to saas-12.2, not later (the code slightly changed in saas-12.3, and we did another version of the fix).
2019-04-05[FIX] web: corrected the order of icons in systrayVincent Schippefilt
Since the merge of JQuery 3, the building of systray icons is non deterministic. After this fix, the menus are loaded correctly in order. Task-ID: 1960741 closes odoo/odoo#32382 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-04-05[MERGE] forward port branch saas-12.1 up to f2d0995362cChristophe Simonis
2019-04-09[IMP] web: properly set margin for the kanban dropdownSuraj Shukla
While everything looks pretty perfect without this commit, setting margin on `.dropdown-toggle` and not on its parent `.o_dropdown_kanban` itself will cause glitches in Studio. While selecting the dropdown using Studio, the class responsible for displaying outline (that indicates the selection) is applied on '.o_dropdown_kanban', which is okay, but the actual child is positioned using margin, so the outline on parent div looks ugly. This commit fixes the issue by applying the margin on the proper selector. Task 1916583 closes odoo/odoo#30049 Signed-off-by: Martin Geubelle (mge) <mge@openerp.com>
2019-04-09[IMP] web: better ModelFieldSelector layoutSuraj Shukla
This commit improves the usability of ModelFieldSelector widget with following points: - add a placeholder on the input for searching fields - add more height to the same input for consistency - properly show 'X' sign within header Task 1916583
2019-04-04[MERGE] forward port branch 12.0 up to 251021796c2Christophe Simonis
2019-04-03[FIX] point_of_sale: background layout header iframeNicolas Lempereur
When a report with header is displayed in iframe with layout "Background", part of the header maybe outside of the page. For example on /my/invoices portal show of an invoice, the max width report iframe can set at 210mm (+/- 793.7px normally), the header in background layout has `min-width: 900px` so is wrongly centered and may have content outside of shown page (eg. company tagline). The same issue happen when using HTML rendering of the report in backend, but depends on the viewport width. This may be the expected configuration when printing (wkhtmltopdf should unzoom if something was too large to fit) but not when displaying html directly. opw-1915807 closes #32373 Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-04-03[FIX] web: Load correct form view for calendar popupLucas Lefèvre
When creating a record from a calendar view, the default form view is always used when using the popup mode, ignoring the `form_view_id` attribute of the <calendar/> tag. After this commit, the `form_view_id` is no longer ignored. closes odoo/odoo#32379 Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2019-03-29[MERGE] forward port branch saas-12.1 up to c0cf4049b2aChristophe Simonis
2019-03-29[MERGE] forward port branch 12.0 up to 09fb2469b49Christophe Simonis
2019-03-29[FIX] web: fix error handling of _applyChangesVincent Schippefilt
After 5df4746c9aa144e6e3fce44fea43dac1089a5c51 the error handling has been changed inaccurately. This fix sets the error handling correctly. closes odoo/odoo#32247 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-04-02[IMP] web: list: directional keys navigation in readonlyDavid Monjoie
With this rev., it is now possible to navigate with arrows in list views (except when editing, as in this case hitting the arrows moves the cursor in the input/textarea), and to expand/collapse groups with keyboard navigation. Part of task 1915702
2019-04-02[IMP] web: fetch records alongside read_groupAaron Bohy
This rev. adds params to the 'web_read_group' method, allowing to search_read records inside each groups in a single RPC, instead of doing a 'web_read_group' RPC followed by n 'search_read' RPCs, where n is the number of opened groups. Part of task 1915702
2019-04-02[IMP] web,account: editable list: no more position absoluteAaron Bohy
Before this rev., widgets were absolutely positioned in table cells. This cause an undesired effect with text fields, as their textarea overflowed and overlapped the next lines. With this rev., wigdets are now statically positioned, and the cells height and width don't change when switching a row to edit mode. Part of task 1915702
2019-04-02[IMP] web: editable list: table-layout: fixedAaron Bohy
This rev. changes the layout of *editable* list views to a fixed layout. This means that we are now responsible of the width of each column. To do that, we associate with each field type a factor, and the higher the factor is, the larger the column will be (w.r.t. the others). This default value can be overriden in the arch. The fixed layout allows to remove the absolute positionning of widgets inside editable lists (done in the next commit). Part of task 1915702 Co-authored-by: Martin Geubelle <mge@odoo.com>
2019-04-02[IMP] web: allow mass update in editable listsMartin Geubelle
From an editable list view, if you select several lines then change a field, you are now asked if you want to apply the same change on all selected lines. If you accept, a write is directly performed (without applying onchange, as the records are reloaded and the view re-rendered). If you decline, the classic behavior still occurs. Part of task 1915702
2019-04-02[IMP] web,base: put buttons in list group headersMartin Geubelle
It is now possible to put buttons in the list view group headers. When the view is grouped by a many2one field, those buttons appear next to the header title when the group is opened. The buttons are specified in the views in a <groupby> tag in the list arch, with the following structure: <groupby name="groupedField"> <!-- must be a many2one --> <button type="object" name="my_method" string="Button1"/> </groupby> It is also possible to add `field`, inside the `groupby` which can be used for modifiers. These fields thus belong on the many2one comodel, like: <groupby name="partner_id"> <field name="name"/> <!-- name of partner_id --> <button type="object" name="my_method" string="Button1" attrs="{'invisible': [('name', '=', 'Georges')]}"/> </groupby> These extra fields are fetched in batch when grouping on the field. Part of task 1915702
2019-04-02[IMP] web,board: enable pagination in grouped listsAaron Bohy
With this rev., when there are a lot of groups in a grouped list view, groups are displayed under several pages, whereas they were all displayed in the same page before. This is especially interesting with the new 'expand' attribute, to ensure that we don't read records for a large number of groups. By default, the groups limit is set to 80 (like records), and to 10 is the 'expand' attribute is set to true. This limit can be overriden with the 'groups_limit' attribute. Part of task 1915702
2019-04-02[IMP] web: list: add expand attrsAaron Bohy
When this attribute is set to true on the <tree> root node, in a grouped list view, first level groups are automatically opened. Part of task 1915702
2019-04-02[IMP] web: list: editable grouped list viewsRavi Gadhia
This rev. enables the editable feature in grouped list views. Part of task 1915702 Co-authored-by: Aaron Bohy <aab@odoo.com> Co-authored-by: Martin Geubelle <mge@odoo.com>
2019-03-29[MERGE] forward port branch saas-11.3 up to ec29b4d3648Christophe Simonis
2019-03-28[MERGE] forward port branch 11.0 up to 4231103cc99Christophe Simonis
2019-03-28[FIX] web: call super in AbstractAction willStartMathieu Duckerts-Antoine
The commit https://github.com/odoo/enterprise/commit/19a144d6af2974e964c6487170e6bca1b14d3898 has modified how libraries are loaded at several places and has introduced a bug in sale_subscription_dashboard where the libraries are no longer loaded at all. We fix that situation by calling super in the willStart method of AbstractAction that inherits from Widget. Abstract actions can now also benefit from the mechanism present in Widget willStart. closes odoo/odoo#32209 Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>