summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views
AgeCommit message (Collapse)Author
2019-09-04[FIX] web: use defined variableChristophe Simonis
Oversight of previous forward-port.
2019-09-04[MERGE] forward port branch 12.0 up to 638eac9baeaChristophe Simonis
2019-09-04[FIX] web: form: race condition when editing in readonlyAaron Bohy
... and switching to 'edit' mode before the write RPC returns. For instance, on a project task form view, in readonly, change the state by clicking on the bullet, and directly switch to 'edit' mode: when the RPC returns, the view is switched back in readonly. Task 2065443 closes odoo/odoo#36400 Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-09-03[FIX] web: grouped list as grouped list as childLucas Perais (lpe)
In grouped editable list, get rid of the groups Edit one record in the editable list In a M2O, click on search more In search's list, group by a field Expand a group in the search's list Before this commit, it crashes because the event was propagated onto the first main list After this commit, it doesn't crash and the group is expanded OPW 2064156 closes odoo/odoo#36383 Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-09-03[FIX] web: editable list: edit group with create=0Aaron Bohy
This rev. disables the 'create' action in the form view reached when clicking on the 'Edit' button on a group in an grouped list. closes odoo/odoo#36384 Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-08-30[MERGE] forward port branch 12.0 up to 52f6e38cea8Christophe Simonis
2019-08-29[MERGE] forward port branch saas-11.3 up to ede253f1b2eChristophe Simonis
2019-08-29[MERGE] forward port branch 11.0 up to d61873ac4a3Christophe Simonis
2019-08-28[FIX] web: dashboard_graph disappearing issue on kanban record reloadJuhil Somaiya
When we try to change the color of kanban, the kanban record is re-renders, kanban record is replaced with kanban-box and subWidgets are re-rendered, reset of all subWidgets are called which will re-render widget but it is not rendered in DOM as DOM element is destroyed and hence dashboard_graph widget can not computed proper height of the canvas element and disappear Call on_attach_callback after widget reset is called on kanban record, as widget element is removed from DOM and new element is added in DOM so on_attach_callback should be called again. task-2036256 closes odoo/odoo#35254 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-08-27[FIX] web: 'create' in context and non inline subviewsAaron Bohy
Let's assume an action with 'create': 0 in the context, and a non inline subview in the form view. Before this rev., the 'create': 0 was applied to both the form view and the subview. This rev. applies the same logic as what the server does for inline subviews: the rule is applied to the subview iff its model is the same as the one of the form view (with key 'base_model_name' set in the context). Task 2035653 closes odoo/odoo#36109 Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2019-08-23[FIX] web: grouped list with <groupby> node and onchangeAaron Bohy
Let's assume an editable grouped list view with a <groupby> node containing subfields, and an onchange. Edit a row to trigger the onchange. Before this rev., it crashed because the onchange specs was incorrect: it followed the relation of the many2one and thus included its subfields (whereas it should only follow the relation for x2many fields). For example, go to Accounting > Accounting > Sales and edit the label of a move line. Task 2044187 closes odoo/odoo#36001 Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2019-08-22[FIX] web: graph: id not in groupbyLucas Perais (lpe)
Before this commit, when having the field "id" in the graph view it was selected to group by on it. This doesn't really make sense, and triggers an sql error anyway After this commit, we filter out that field from the groupbys OPW 2053444 closes odoo/odoo#35958 Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-08-19[MERGE] forward port branch 12.0 up to 32039b2ab44Christophe Simonis
2019-08-16[FIX] web: list: tweak columns weightAaron Bohy
2019-08-12[FIX] partner_autocomplete, web: autocomplete error when suggested company ↵Jorge Pinna Puissant
has a country - Change the company's country to Finland; - Go to Contacts and click on Create; - Tick the Company box above the Name field; - Start typing into the Name field; - Click on a company with a VAT number under its name. Before this commit, a Traceback appears. This occurs because the response of the request with the suggested company has the fields 'company_name' and 'company_code' and these fields are not in res_partner. Now, the suggested company is parsed to correctly field the country field. opw-2049636 closes odoo/odoo#35631 Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-08-07[FIX] web: favorites have unique descriptionsMathieu Duckerts-Antoine
In the favorites menu, it was possible to create two favorites with the same name (contrarily to the specifications). The root cause of the problem was that the submenus of the favorites menu were not updated at all. This commit fixes that situation. closes odoo/odoo#35495 Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2019-08-07[FIX] web: toggle favorite correctly updates other filters statusMathieu Duckerts-Antoine
When toggling a favorite filter, the options used by the active date filters/groupbys and the field created via autocompletion were not correctly cleared, leading to strange situations. This is fixed by this commit.
2019-08-06[MERGE] forward port branch saas-12.2 up to 9e74730a26bChristophe Simonis
2019-08-06[MERGE] forward port branch 12.0 up to ff9ddfdacc9Christophe Simonis
2019-08-06[MERGE] forward port branch saas-11.3 up to 97d81f1220bChristophe Simonis
2019-08-05[FIX] web: RTL on list viewNicolas Martinelli
- Set the user language to a RTL language, e.g. Arabic - Open a list view containing float or monetary fields, e.g. the invoice list view The numbers are left aligned while the corresponding columns headers are right aligned, making the list view confusing. The header alignment is hardcoded at rendering rather than in the SCSS. Therefore, `rtlcss` doesn't affect it. Instead of hardcoding the alignment, we use a proper CSS class so it is adapted by `rtlcss`. opw-2044019 closes odoo/odoo#35414 Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-08-02[FIX] web: spam new event creates multiple modalsJulien Castiaux
On the Time Off, spam click to create a new event, each click opens a new event form modal. When the modal form fields have not been cached yet, the frontend fetches them and delay the modal form opening after those fields have been fetched. As the interface is still available. It is possible to re-click multiple time during the fetch, each click schedules a new modal form. When the first finally shows, they all stack on screen. opw-203577 closes odoo/odoo#35098 Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-08-02[MERGE] forward port branch 11.0 up to 593f631e5ebChristophe Simonis
2019-07-31[FIX] web: init makeRecord fields with correct valuesLucas Perais (lpe)
In the calendar view In the partner filter in the calendar side bar type something, and backspace rapidly to remove everything Before this commit, there was a error because the framework tried to write something in the corresponding field This was because the o2m field was not initialized with the correct values After this commit, there is no error OPW 2043975 closes odoo/odoo#35330 Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-07-31[FIX] web: date filter options unselected after facet deletionMathieu Duckerts-Antoine
Select the option 'This Month' of a date filter in the filter menu and then remove the facet created correctly toggles the filter from the query but the option is still shown as selected. This commit fixes that situation. closes odoo/odoo#35340 Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-07-23[FIX] web: pivot keeps controlpanel's domain on reloadLucas Perais (lpe)
Open a pivot view, make a search for some field Click on a pivot cell to display the list view of elements matching the group's domain Go back to the pivot using breadcrumbs Before this commit, the original search domain was not kept across those actions After this commit, it is kept This difference is due to the fact that before 12.2, the whole action had an env, containing the search domain in 12.2 and afterwards, things are not done this way anymore OPW 2030555 OPW 2030983 closes odoo/odoo#35096 Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-07-23[MERGE] Forward port of 12.0 to saas-12.2 up to 5e4c1b370123deeMartin Trigaux
2019-07-22[IMP] web: do not set focus on form when lastActivatedFieldIndex is not setMohammed Shekha
When opening a dialog using mouse and closing it, form_dialog_discarded is triggered, which tries to set focus on form while lastActivatedFieldIndex is -1, as dialog is opened using mouse directly do not set focus back to form widget if lastActivatedFieldIndex is -1 task-2031706 closes odoo/odoo#34684 Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-07-16[FIX] web: no forced date matching in pie chartsMathieu Duckerts-Antoine
In a graph view in mode 'pie', a matching of dates was attempted each time a comparison and a grouping of data using the same date/datetime field was done. Unfortunately, since the read groups results are ordered using the order of groupbys, the matching was not sensible in case the date/datetime field was not the first groupby. We thus restrict the matching to the sole case where it is sensible. More work should be done to have sensible matchings in all situations. closes odoo/odoo#34379 Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-07-16[FIX] web: style chart elements in graph views only locallyMathieu Duckerts-Antoine
The elements style was set globally and thus used to modify the style of any chart in Odoo after the first loading of a graph view. For instance, the charts drawn in sale_subscription_dashboard are not the same before and after the first loading of a graph view. This is fixed by this commit.
2019-07-16[FIX] web: appropriate symbol in mobile embedded graph view groupby menuMathieu Duckerts-Antoine
2019-07-16[FIX] web: fix Groupby menu style in embedded graph viewsThomas Werland
2019-07-26[MERGE] forward port branch saas-12.2 up to 1d6d790513eChristophe Simonis
2019-07-25[FIX] web: properly handle (grouped list) pagerGéry Debongnie
when last field is numeric closes odoo/odoo#35176 Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-07-24[FIX] web: improve editable list column widthsJulien Mougenot
Changed the way some field types are displayed. Before this commit, column width in a list were calculated according to a given factor (integer), determining their weight. Now, some specific fields have an hardcoded width instead. This task also slightly tweaks some width factors, in order to try to have a better layout in most list views Task 1985916 closes odoo/odoo#35147 Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-07-24[FIX] web: context when read on multi editsvs-odoo
Before this commit, in list editable, when user save multiple records in the same time, the context is passed for the write but not for the read. Now, the context is passed also for the read. closes odoo/odoo#35113 Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2019-07-24[MERGE] Forward port of saas-12.2 to saas-12.3 up to 860ab5a1c28baMartin Trigaux
closes odoo/odoo#35119 Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-23[FIX] web: allow groupby buttons in list view at any levelGéry Debongnie
The initial implementation of the special group by buttons in list groups only supported the first level of groupby. So, if one grouped a list view by field A, it worked (if A had a groupby defined). However, if we want to group by B/A, this no longer works. opw 2040725 closes odoo/odoo#35090 Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-07-18[FIX] web: execute action from new record and go backAaron Bohy
Let's assume a form view with a readonly many2one field with a default value. When creating a new record, the user can click on the many2one value, which should open the related record in a form view (stacked in the breadcrumbs). Before this rev., this didn't work: we actually came back to the previous view/action in the breadcrumbs, when trying to open the related record. closes odoo/odoo#33172 Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-07-18[FIX] web: display groupby buttons only on the first group levelJigar Patel
task-1998791 closes odoo/odoo#34007 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-07-16[MERGE] Forward port of 12.0 to saas-12.2 up to 1bd434da34731b546Martin Trigaux
closes odoo/odoo#34901 Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-11[FIX] web: batch read of m2m in o2m after onchangeAaron Bohy
Let's assume a one2many field (editable list) in a form view with a many2many (e.g. many2many_tags), and an onchange on the one2many such that, when a row is added to the relation, the server returns update commands for (a subset of) the records being already in the relation. For thoses updated records, the many2many field needs to be read (the onchange only returns the ids in the relation). Before this rev., the many2many field was read independently for each record in the one2many. This could cause a performance issue on large relations. For instance, this was the case on account.invoice records with a lot of lines. This commit must be forwardported up to 12.2, not further. Issue 2027356 closes odoo/odoo#34771 Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2019-07-15[FIX] web: wrap char fields in list viewsAaron Bohy
This fix is similar as 793933a1, but for char fields. It prevents cells containing char fields with long value from overflowing. closes odoo/odoo#34739 Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-07-11[FIX] web: batch read of m2m in o2m after onchangeAaron Bohy
Let's assume a one2many field (editable list) in a form view with a many2many (e.g. many2many_tags), and an onchange on the one2many such that, when a row is added to the relation, the server returns update commands for (a subset of) the records being already in the relation. For thoses updated records, the many2many field needs to be read (the onchange only returns the ids in the relation). Before this rev., the many2many field was read independently for each record in the one2many. This could cause a performance issue on large relations. For instance, this was the case on account.invoice records with a lot of lines. Issue 2027356 closes odoo/odoo#34785 Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2019-07-11[FIX] web: Display boolean title in list viewsLucas Lefèvre
Since commit 9fbb4fb, the `title` attribute is added to list views `<td>`. The title value is given by field utils formatting methods, according to the field type. However, for boolean fields, the formatting method does not return a string but a jquery element (unless `forceString: true` is given as an option). Hence, the displayed title is `[Object object]`. After this commit, boolean fields do not have any title. closes odoo/odoo#34657 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-07-03[FIX] web: form: combine field and renderer classnamesAaron Bohy
The rendering of field widgets is asynchronous (as it returns a native Promise). However, the '_renderFieldWidget' method of basic renderers is sync, and returns a fake div that will be replaced by the widget'$el afterwards. The form renderer sometimes needs to add classNames on the rendered nodes (e.g. each child of an outer group as class 'o_group_col_x'). To handle this, once the field widget is ready, we copied all attributes of the fake node to the widget's node. Unfortunately, we were erasing the attr value (e.g. className) by the new one. As a consequence, the className defined in the widget were lost. This could be observed for the 'note' field in 'sale.order'. As this was only necessary for classNames, this rev. only retrieves the class attribute of the fake node, and adds it to the classNames of the widget's $el. closes odoo/odoo#34528 Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-06-27[MERGE] forward port branch saas-12.2 up to 465909f0fdeChristophe Simonis
2019-06-27[MERGE] forward port branch 12.0 up to cd21c016b06Christophe Simonis
2019-06-25[FIX] web: fix wrapping of many2one in list viewVincent Schippefilt
Before this fix, the many2one text in the list view was not wrapping. After this fix, the text will wrap according to the available space (managed automatically by the browser). closes odoo/odoo#34345 Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-06-21[MERGE] forward port branch saas-12.2 up to 8747d72f1efChristophe Simonis