summaryrefslogtreecommitdiff
path: root/addons/web/static/src
AgeCommit message (Collapse)Author
2018-06-12[IMP] web: add support for interval selection in groupbysMathieu Duckerts-Antoine
In this commit, we extend the search view to allow the selection of some intervals for date or datetime fields in groupby menu. The valid intervals are day, week, month, quarter, and year. It is also possible to add a button 'Group By' in the control panel owned by a graph view in case it is declared 'embedded' (e.g. in a dashboard view). Note that have three new generic reusable widgets have been introduced in this commit: DropdownMenu, GroupByMenu, and FiltersMenu.
2018-06-12[REF] web: split search_menus in separate filesMathieu Duckerts-Antoine
2018-06-11[FIX] web: correct 'popup blocked' error message.Arnold Moyaux
task-30450
2018-06-08[FIX] web: increase timeout for warning in logsGéry Debongnie
Before this commit, it could happen quite frequently that the runbot displayed a warning (coming from the JS) when some tests/tours were executed. This is the standard warning that some modules are not yet loaded. This is not harmful in anyway, but is visible in the runbot logs. With this commit, we increase the timeout to 6s. This is not really a good sign, hopefully cold starts for building assets will not increase again in the future.
2018-06-08[IMP] web: add decoration support for all field widgets (#25160)oco-odoo
It is sometimes useful to be able to customize slightly the color of a field depending on some conditions on the current record. For example, imagine that we want to show a VAT number field in green/red, if it was validated or not. To do that, we can add a field with an onchange, and simply add decoration-danger and decoration-success attributes to the field.
2018-06-08[FIX] web: properly apply css in mobile search viewGéry Debongnie
In some cases, if the device is in a mobile mode, but does not support touch, then the mobile search view is shown, as expected, but the css is not applied. Maybe this is not a big deal in practice, since the only way to notice this is to use odoo on a browser with a small window and no touch emulation, but this is still annoying and wrong: if the mobile search view is displayed, the its css should be applied in all cases. We simply fix the css rule to make it work like expected.
2018-06-07[IMP] calendar: generic improvementsSiddarth Gajjar
We need the calendar view to be consistent in the usage of time formats currently the week column (on the far left) is not consistent with what we display in the meeting time slot. It is currently not ovious that you can add and view anybody's calendar so we need to add a placeholder. In order to create a meeting you have to click on create which is not explicit. Task #1838108 Closes #24675
2018-06-07[IMP] mail: add warning when partner email is invalidXavierDo
Change the border and cross color of a recipient in mail composer when the email is invalid (doesn't contains "@"). When sending an mail from composer the user will see easily if an email adress is invalid and will cause a NO_VALID_RECIPIENT error. Task: #46158 PR: #24628
2018-06-07[MERGE] forward port branch saas-11.3 up to c00df146547Christophe Simonis
2018-06-06[MERGE] forward port branch saas-11.2 up to c834c0f5879Christophe Simonis
2018-06-06[MERGE] forward port branch 11.0 up to e7aff3775fbChristophe Simonis
2018-06-06[FIX] web: Button delete on SO line unclickableGoffin Simon
Due to ef540eb006abac0d318f2a708384d125f6203662, the button delete was not clickable on a SO line on safari. opw:1848652
2018-06-06[FIX] web: new record with o2m also with new records prevent name_getLucas Perais (lpe)
Have a model A with a o2m to B. In the list have a field B > m2o > C Also have a sequence field (widget handle) on B Then Create a record A Arrange yourself to have two new records B popping right away (through an onchange) in the o2m. Their C field have to be empty Resequence those two B lines with the handle Before this commit, there was a traceback when trying to do an name_get on the C fields Since both of them are empty, there is no record in the localData Hence, no model. And also no records anyway, so no need to do a name_get After this commit, there is no traceback, the name_get is avoided when no data is to be fetched OPW 1853088 closes #24988
2018-06-05[FIX] web: display correct week number in calendar viewslen-odoo
To compute the week number, the fullcalendar.js library uses the locale. It depends on the day on which the week starts (usually Sunday in the Americas, Monday in Europe), as well as which week is considered the first of the year. In commit: https://github.com/odoo/odoo/commit/717b472ef9ad6d2998cbefb4aafe2d1199e6235d the starting day was explicitly added, however it was computed as isoWeekday. The ISO first day of the week is always on Monday. It resulted that if the locale used Sunday as first day of the week, the calendar would consider it to be of the previous week, and thus displayed (weeknumber - 1). The fix does the same thing as was done in v10, taking the locale into account: https://github.com/odoo/odoo/commit/df124080b624a8bdb86fec352fe690725ed36bac opw 1853745
2018-06-04[FIX] web: getFocusableElement error in tree viewXavierDo
When a line in a editable tree view has no acivable element (readonly or toggle_bollean fields only) the currentFieldIndex will be null after selecting the row, and when trying to edit a field (boolean field_toggle in this example) an error will be thrown when trying to put focus on currentWidget. We need to check that the currentWidget is not undefined.
2018-05-31[IMP] mail, calendar: add today meetings in systrayBarad Mahendra
Purpose of this commit is to display today meetings in the systray. This will help people in their daily job to have quickly access to their meetings. It is displayed along with activities and reminders to have all current work to do in the same place. Displayed meetings are ongoing or not yet started ones of the current day. All-day meetings of the current day are also shown. Done meetings are not displayed to lessen noise. Clicking on the systray will open the calendar view of meetings in a day mode. This is done by a small modification in the calendar view allowing to choose the display mode from context in addition to the mode attribute of the action definition. This commit is linked to task ID 60593. Closes #24438. Thanks to @ged-odoo for quick reviewing.
2018-05-30[IMP] web, crm: minor copywriting in Kanban and CRM flowFabien Pinckaers
2018-05-30[IMP] web: better copy for adding a column in kanban viewsFabien Pinckaers
2018-05-30[IMP] web: add a badge based widget for selection fieldsSiddarth Gajjar
This commit introduces a new widget to be used for selection-based fields. Valid choices are displayed using rectangular badges and not like the standard list. This widget is valid for selection and many2one fields like selection or radio widgets. Co-authored-by: Siddarth Gajjar <sga@odoo.com> Co-authored-by: Mohammed Shekha <msh@openerp.com>
2018-05-30[MERGE] forward port branch saas-11.3 up to 53300648edeChristophe Simonis
2018-05-30[MERGE] forward port branch saas-11.2 up to aaea6fd0881Christophe Simonis
2018-05-30[FIX] web: proper rendering of widget tagMathieu Duckerts-Antoine
There was no consideration of the fact that the widget rendering process could be asynchronous. This commit fixes that situation so that render a node of type <widget name="..."> is now possible.
2018-05-30[FIX] web: small performance fix in calendar viewGéry Debongnie
In some cases, the calendar view sends a trivial domain, such as ["partner_id", "not in", []] This is clearly not really useful, and it could hurt performances in some cases (for example, if the partner_id field is a related on a large table, and non stored). This is clearly not a complete fix, but it is easy, safe and does not hurt.
2018-05-29[MERGE] forward port branch saas-11.2 up to a2f275dfc48Christophe Simonis
2018-05-29[MERGE] forward port branch 11.0 up to 4ea3838d895Christophe Simonis
2018-05-29[MERGE] forward port branch saas-11.3 up to 37eed7c509fChristophe Simonis
2018-05-29[IMP] web: correctly handle attributes on non inline viewMartin Geubelle
Before this rev. the `column_invisible` and `default_order` attribute, set in a x2m list view were only taken into account for inline views. The technical reason behind is because non inline views are fetched after the main view processing. Non inline x2m list views now correctly handle these two attributes.
2018-05-29[IMP] web: use burger menu for tablet in vertical modeKinjal Mehta
Task #34853
2018-05-29[FIX] web: domain evaluation in parented m2o in o2m listLucas Perais (lpe)
Model A has a o2m to model B Model B has a m2o parent_id on B In A's form, add a B item, then in the m2o, create record Save and New Click on the m2o Before this commit, the python crashed on name_search. This was because we sent the virtual ids to it After this commit, there is no crash OPW 1850212 closes #24948
2018-05-29[IMP] web: small optimization in calendar viewGéry Debongnie
In some cases, the calendar view sends a trivial domain, such as ["partner_id", "not in", []] This is clearly not really useful, and it could hurt performances in some cases (for example, if the partner_id field is a related on a large table, and non stored). This is clearly not a complete fix, but it is easy, safe and does not hurt.
2018-05-28[FIX] web: o2m editable decorated, paged, ordered supports adds/cancelLucas Perais (lpe)
Have a decorated (conditional on field) editable list, with a default_order. Have more records than the pager allows. Add an item, and hit escape to cancel addition. Before this commit, the cancellation crashed because the first record on the other page was trying to evaluate the decoration for its row, which is wrong in the first place. This was because creating a record increases the limit of the list, to be able to see the record being created. At cancellation though, that limit was never decreased. After this commit, the whole flow happens without problem. OPW 1844495 closes #24682
2018-05-28[IMP] all: Improve error messagesBenjamin Stiens
Many error messages are misleading or too "vague" This task aims to improve all error message. Task #47042 PR #23321
2018-05-28[FIX] web: do not hide button in pdf viewer in some casesGéry Debongnie
The pdf viewer uses an external library to display a pdf file. This library displays a few controls, such as a 'Download' button. However, this button is sometimes displayed in the top bar, sometimes in the top right dropdown menu (depending on the size of the widget). For some unknown reason, the pdf viewer widget disabled the download button. But this was inconsistent: the download button was only hidden when it was in the tob bar, and not in the dropdown menu. With this commit, we simply remove this behaviour.
2018-05-28[IMP] web,base_setup: add option to disable special effectsPankaj Kamani
Some people prefer not to be disturbed by any flashy information. In this commit, we add an option to do just that. When the 'show_effect' option is set to false, then the messages that would be displayed by an effect will be displayed in a notification. Task #37712 Co-authored-by: Mohammed Shekha <msh@openerp.com>
2018-05-28[FIX] web: Controller: concurrent control panel updatesAaron Bohy
Let's assume the following scenario: in a kanban view with a domain, remove that domain and quickly click on a record to open it in form view. On a slow network, it may happen that the reload of the kanban view (triggered by the domain change) returns after the load of the form view. Before this rev., when this happened, the form view was correctly displayed but the control panel contained the buttons, searchview, pager... of the kanban view. Note that this fix is quite ugly, but it won't be necessary anymore as soon as the control panel won't be shared between actions and controllers, i.e. as soon as each controller will have its own control panel.
2018-05-25[MERGE] forward port branch saas-11.2 up to 58e35522468Christophe Simonis
2018-05-25[MERGE] forward port branch 11.0 up to 2ca72960001Christophe Simonis
2018-05-25[FIX] web: AbstractController: handle concurrent reloadsAaron Bohy
Let's assume the following scenario in a Kanban view with a default filter. The user removes the filter, and quickly adds a new one. On a slow network, it may happen that the second reload request returns before the first one. On odoo.com, this is easy to reproduce on the tasks Kanban view. Before this rev., when this occured, the result of the first request was displayed, whereas it should have been ignored as another request was done later on.
2018-05-24[IMP] web: improve act_urlRémi Rahir
By default, Chrome browser will block pop-up windows which will block all actions from type act_url with a different target than 'self' (i.e. '_blank'). This commit adds a check when such an action is called and sends a warning in the web client when it fails to open. This mimics the behaviour already present for the report actions.
2018-05-24[FIX] web: correct style on btn-link class (#24889)rrahir
Due to the switch from less to scss, changes were made. Especially, the class oe_link is now 'deprecated' and interpreted as 'btn-link'. The previous style defined on the latter removed the padding which breaks the style when several buttons follow each other. This commit should fix the style while maintaining the intended behaviour, a vertical alignment between the button and the text inside the pane.
2018-05-23[MERGE] forward port branch 11.0 up to 02ee3fd88efChristophe Simonis
2018-05-23[IMP] web,mail: improve search view for mobile devicesGéry Debongnie
With this commit, we introduce a better screen to manipulate the search view in a mobile device. Note: most of this work was initially done by suh-odoo, then was adapted and moved to community by myself. task 31464
2018-05-23[FIX] web: fetch name_gets on list only when there are dataAlexandre Kühn
Revision on 8ac98fc78a3794e06481b02a431bcdc386a5a6ee The commit above does not check whether the list contains data or not. As a result, if there are no data in the list, there is no reason to fetch `name_gets`. In fact, there could be a traceback because some parameters of this rpc are computed from data in the list. So if there are no data in the list, the parameters of the rpc are undefined. This was the case for a test in enterprise.
2018-05-23[FIX] web: only abandon records on discard without savepointAlexandre Kühn
Revision on https://github.com/odoo/odoo/commit/9a9da5763b38a3bce54e9c4870af0032e38cacc3 The intent of the commit above was to no abandon records in a list on discard when these records have been created from a `default_get`. Also, the `default_get` may also perform an `onchange` that could create more records. The records from this `onchange` must also be included in the "do not abandon" rule. However, the rule was too relax, so that any following `onchanges` from a user interaction was also considered into this rule. As a result, it was not possible to abandon such records. With this fix, we restrict the rule to `default_get` (already the case) and only the `onchange` right after a `default_get`. Any record created on an `onchange` from a user interaction after a `default_get` should be abandoned on discard. Representation of creating the list: savepoint |----------|-----------|-------||--------|-------> create default_get onchange1 onchange2 record in the list is created by default_get or onchange1 => do not abandon on discard record in the list is created by onchange2 => abandon on discard
2018-05-18[MERGE] forward port branch saas-15 up to 021d0e6a98bChristophe Simonis
2018-05-18[MERGE] forward port branch saas-14 up to cabe0951af2Christophe Simonis
2018-05-18[MERGE] forward port branch 10.0 up to 9001a75f23cChristophe Simonis
2018-05-18[FIX] web: show names of many2one on default_getAlexandre Kühn
Before this commit, some records in a list did not show the name of their many2one fields. This case occurs when the records in the list are created from a default_get, and the records do not fit in a single page. In that case, the records in the first page correctly display the names of their many2one fields, but not the records in the other pages. Fixes #24547
2018-05-18[FIX] web: pass unique ids on `name_get` rpcAlexandre Kühn
Before this commit, when a list contains records with many2one fields that contain the same values, duplicate ids were passed to the server on rpc `name_get`. For instance, if 40 records in a list refer to a Unit of Measure with id "1" whose displayed_name is "unit(s)", the server receives a long list of ids with simply the value "1". Also, the server responds with a list of displayed_name, in this case a list of 40 strings "unit(s)". With this commit, we always pass unique ids to the server on rpc `name_get`.
2018-05-18[FIX] web: get_file handles arbitrary AND serialized exceptionsLucas Perais (lpe)
Commit bcd4c90 was intendend to make get_file handle uncaught/unserialized exceptions in the context of a http request The drawback is that when get_file received a serialized exception (route: /report/download) the JS modal was empty in that case This commit handles both the cases OPW 1848606 closes #24794