summaryrefslogtreecommitdiff
path: root/addons/web
AgeCommit message (Collapse)Author
2019-09-03[FIX] i18n: missing Slovenian translationJorge Pinna Puissant
Slovenian language, as many others languages, is not present in the beta/master projects in Transifex. For some reason, Transiflex removed all current translations, this was already fixed in 12, but as there are not automatic forward-port for translations, this is a manual forward-port. opw-2060055 closes odoo/odoo#36374 Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-09-05[FIX] web: unpatch test Views earlierChristophe Simonis
We need to unpatch the view as soon as we correcly applied the `groupedBy` attribute to avoid sub views to also be patched. closes odoo/odoo#36486 Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-09-05[FIX] web: correctly await promises in forward-ported testChristophe Simonis
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-09-02[FIX] web: correctly escape image nameSébastien Theys
Follow up of https://github.com/odoo/odoo/commit/2f932e3a46c6005870e4130b3c3f7151cd521f2d#r34760948 `url_quote` does not escape `/` which leads to incorrect routes when the name contains `/`. Also escape `\` to avoid potential issues on different OS. closes odoo/odoo#36146 Signed-off-by: Christophe Simonis <chs@odoo.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-09-03[FIX] web: datepicker: crash on invalid dateHarpritsinh Sisodiya
There is an open issue on the tempusdominus lib: https://github.com/tempusdominus/bootstrap-4/issues/223 It occurs when there is a valid value in a date(time) field, and the user unsets it by setting an invalid one. This rev. fixes the issue in Odoo by preventing to reach the buggy piece of code in the lib. In a few words, when the user sets an invalid date, we reset the previous valid date (which is what the lib tries to do anyway). Task 2057009 closes odoo/odoo#36211 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com> Co-authored-by: Aaron Bohy <aab@odoo.com>
2019-09-02[FIX] web: add support for `localStorage.key()` and `.length`Alexandre Kühn
These operations on local storage are necessary in order to loop on all local storage keys. Closes #36177
2019-09-02[FIX] bus: background slave tabs should not loose notificationsAlexandre Kühn
Before this commit, some notifications may be lost while forwarding them between browser tabs by means of the local storage (i.e. from the master tab to slave tabs). This happened when some slave tabs are in the background and are throttled by the browser: the master tab writes twice in the local storage (to notify slave tabs of new notifications), and slave tabs drops the 1st notification. This is caused by the mismatch between the new value in the local storage event and the actual value in the local storage. For example: ``` t(0) - Master tab receives `message` notification; t(1) - Master tab writes notifications (= `message`) in local storage; t(2) - Master tab receives `message_seen` notification; t(3) - Master tab writes notifications (= `message_seen`) in local storage; t(4) - Slave tab detects new notifications (= `message`) from local storage event, but drops it since it does not match actual local storage value (= `message_seen`); t(5) - Slave tab detects new notifications (= `message_seen`) from local storage event, and handles it since it matches actual local storage value (= `message_seen`); => Notifications received + handled: - master tab: `message`, `message_seen` - slave tab: `message_seen` => Slave tab lost "message" notification. ``` This commit fixes the issue by letting all tabs handle any local storage events, regardless of the actual value in the local storage. In the example above, this means the slave tab will not drop the notification `message` at t(4). Task-ID 2044231 Closes #36177
2019-09-01[I18N] Update translation terms from TransifexOdoo Translation Bot
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-27[FIX] base, web, website: force phone number in ltrLucas Perais (lpe)
Display your website in Right To Left Go see the phone number of the company Make that number in the form ``` 123[space]456[space]789 ``` Before this commit, the blocks of that number were inverted (intra-group order did not change) Leaving us with ``` 789[space]456[space]123 ``` After this commit, we introduce a little class to force Left To Right display OPW 2059917 closes odoo/odoo#36115 Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-08-25[I18N] Update translation terms from TransifexOdoo Translation Bot
2019-08-23[FIX] web: selection: required, option present but disabledLucas Perais (lpe)
Before this commit, a field selection which was required did not have an empty option ref: 4dfabb8f7adde06a7936502af61534c9958ed4f7 This is fine, but overlooked the fact that modules can modify the required attribute, or even views can do it So, we may end up in a situation where the field is required but set to false This configuration is problematic, at least for the timezone selection field (see OPW) After this commit, the empty option is just not visible note that `disabled = True` would not work because val is not accessible Because of commits: - 4dfabb8f7adde06a7936502af61534c9958ed4f7 for the selection feature - d77ce4c2a92c1da48150e4e84b714dd93f64847d overriding the required attribute of tz in res.user form OPW 2057913 closes odoo/odoo#35989 Signed-off-by: Lucas Perais (lpe) <lpe@odoo.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-23[FIX] web: MockServer: correctly remove childNodesAaron Bohy
Removing elements from a list while iterating over it isn't a good idea. As a consequence, the MockServer didn't support list archs with a <groupby> node containing several <field> nodes, or a <field> node precedeed by a text node.
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-27[FIX] web: searchbar: focus first itemJulien Mougenot
Doesn't focus hovered option in the searchbar Before this commit: When typing in the searchbar while having the cursor right under it, the selected option was automatically the one hovered by the cursor. Now, the default option is the first one (typically name search) and the cursor hovering only takes effect when moved for the first time. Task 2058656 closes odoo/odoo#36099 Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-08-28[IMP] web: remove m2o from supportedTypes in selection widgetMohammed Shekha
currently widget selection is not working in m2o in editable list view and to fix this issue it need a lots of changes to make it work properly, i.e. make '_fetchSpecialRelation' use correct domain for each record, batch requests as much as possible, also make all '_fetchSpecial...' work in the list case. So to avoid major changes remove supportedTypes from selection widget so user can not tempted to apply selection widget on many2one field. task-1871698 closes odoo/odoo#33485 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-08-25[I18N] Update translation terms from TransifexOdoo Translation Bot
2019-08-21[MERGE] forward port branch 11.0 up to 1b234b1be75Christophe Simonis
2019-08-19[MERGE] forward port branch 12.0 up to 32039b2ab44Christophe Simonis
2019-08-18[I18N] Update translation terms from TransifexOdoo Translation Bot
2019-08-16[FIX] web: list: break words in text fieldsAaron Bohy
closes odoo/odoo#35713 Signed-off-by: Julien Mougenot (JUM) <Arcasias@users.noreply.github.com>
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-09[FIX] web: add support for TRUE_LEAF and FALSE_LEAF in ModelFieldSelectorJinal Patel
before this commit, domain selector widget does not support TRUE_LEAF and FALSE_LEAF i.e. [(1, '=', 1)] and [(0, '=', 1)] respectively, the reason is the chain part of the domain i.e. field name has value 1/0 and we don't have field name like 1 and 0 in domain and hence ModelFieldSelector don't accept it after this commit, domain selector can handle this special two domains which is [(1, '=', 1)] and [(0, '=', 1)], add support for chain with 1/0 in ModelFieldSelector task- 1998145 closes odoo/odoo#35603 Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com> Co-authored-by: Mohammed Shekha <msh@odoo.com>
2019-08-11[I18N] Update translation terms from TransifexOdoo Translation Bot
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-08[FIX] tools: epsilon magnitudeNicolas Martinelli
The following rounding is incorrect: ``` >>> float_round(6.6 * 0.175, precision_digits=2) 1.15 ``` Indeed, 6.6 * 0.175 = 1.155 ≈ 1.16. In this specific case, the `epsilon` computed is not sufficient. A precision of 53 gives: normalized_value = 115.49999999999997 epsilon = 1.2823075934420547e-14 => new normalized_value = 115.49999999999999 Bad luck, this is just not enough to tip the value in the right direction. However, a precision of 52 is sufficient: normalized_value = 115.49999999999997 epsilon = 2.5646151868841094e-14 => new normalized_value = 115.5 The value of 53 was chosen from the `binary64` number format precision. In case of Python, the corresponding machine epsilon is 2^-52 [1]. Therefore, using 52 instead of 53 does make sense. It is worth noting that the value of the machine epsilon 2^-52 = 2.2204460492503131e-16, which is still 2 orders of magnitude below our dynamic estimation. [1] https://en.wikipedia.org/wiki/Machine_epsilon [2] `numpy.finfo(float).eps = 2.2204460492503131e-16` opw-2047368 closes odoo/odoo#35565 Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-08-18[I18N] Update translation terms from TransifexOdoo Translation Bot
2019-08-07Revert "[FIX] web: hide dashboard tooltip on page change"Christophe Simonis
Mow that the Journal Dashboard use Chart.js, this patch is unneeded. This reverts commit 6d9dabd5d933c5cd6ba5a42103894d731a5689a0. Oversight of previous forward-port.
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-08-04[I18N] Update translation terms from TransifexOdoo Translation Bot
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-08-04[I18N] Update translation terms from TransifexOdoo Translation Bot
2019-08-11[I18N] Update translation terms from TransifexOdoo Translation Bot