summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/widgets
AgeCommit message (Collapse)Author
2018-10-11[FIX] web: restore broken datepicker input behaviorMartin Geubelle
In Firefox, the input behavior and visual representation (navigation, caret placement, value selection, etc.) was broken when using a datepicker (easily reproductible on date and datetime widgets). This was due to the `focus` event being stopped on the input, which doesn't seem to be correctly supported by Firefox. The deleted code was supposed to toggle the picker when the field was clicked (see odoo/odoo@89093a1) (toggle on click and disable focus) but the lib correctly supports on focus without extra code. This also fixes the fact that the datepicker was not open on focus (only on clicked). In some tests where the field was the first in the form view, it is now correctly autofocused. Forward-port: not useful from 12.0 because the code has changed with BS4 and this has already been applied in odoo/odoo@6692919 and odoo/odoo@c63630d. Closes #23438 closes odoo/odoo#27657
2018-09-07[FIX] web: FieldDomain: reset field with a new domainAaron Bohy
Before this rev., there was a crash when a FieldDomain was reset with a new domain (e.g. coming from an onchange). For instance, it crashed in Email Marketing > create new Mass Mailing > select mailing lists. Introduced by 68332a01. opw-1882850
2018-08-30[FIX] web: fix evaluation context of the domain selectorAaron Bohy
The domain was instantiated without being given any evaluation context. As a result, the uid variable was not defined, crashing the js if present in a user-defined filter. opw 1866852
2018-04-04[FIX] web: debug manager: replace tree mode by listLucas Perais (lpe)
- Open in debug mode the 'beetle' - Click on open view - select a Tree view in the list Before this commit: A traceback appears This was because while the Tree view per se has been discontinued the mode 'tree' of an action must be supported Which was not the case for this particular widget After this commit: the list view asked for appears OPW 1833008 closes #23963 closes #24005
2018-04-03[FIX] web: time format without secondsGoffin Simon
Steps to reproduce the issue in 11.0 Enterprise: - Go to the language English - Remove from the time format the seconds - Refresh the page - Go to sales - Create a sales order; Bug: - You get the warning message closes #23596 closes #22027 opw:1829577
2018-03-05[FIX] web: translate 'External ID' stringsum1201
Closes #22763
2018-02-28[FIX] web: DomainSelectorDialog: prevent overflowAaron Bohy
The DomainSelectorDialog behaves differently from classical dialogs in terms of height and overflow: (1) its height can be larger than the screen height, and (2) its content is never scrollable (overflow visible). However, before this rev., the 'height: auto' rule ensuring (1) didn't apply, so the dialog's height was limited to the screen's height, and when it had to much content to display, it overflowed. It didn't work because the code tried to apply the rule too soon, so the .modal-dialog element was not yet available. Fixes #23292
2018-02-27[FIX] web: NotificationManager: warnings styleAaron Bohy
Warnings are styled a bit differently than notifications, as their background is red (thanks to classname 'o_error' on the warning root element). This classname isn't correctly added since rev. 920df59, which changed the root element of the 'Notification' template, which is extended by the 'Warning' template, making qweb.js fail to add the 'o_error' classname.
2018-01-22[FIX] web: set default you/all option flippedNicolas Lempereur
In 60d9f6fe the ir.default replaced uses of ir.values. But the [ir.default].set user_id has opposite meaning to [ir.values].set_default for_all_users. This was not taken into account when adapting javascript in 791152a87 and this commit fixes that. opw-805871 closes #22437
2018-01-08[FIX] web: DebugManager in dialogsAaron Bohy
For actions executed in dialogs (target='new'), a DebugManager is instantiated and appended to the dialog's header (div with classname 'modal-header'). However, in the full composer dialog (in a chatter, click on 'Send message', and then click on the expand icon), there are more than one element matching the selector '.modal-header', because it also occurs in the html generated by summernote. In this case, the widget's $el is cloned and appended to each element of the JQuery nodeset matching the given selector, but widget.$el only refers to one of those. So when it isn't the one appended in the real dialog's header, the debug manager remains empty as the widget isn't able to populate it correctly. This bug appeared with rev. 5f1ef09, as before it, the debug manager was appended to the dialog before its content.
2017-12-05[FIX] web,*: time format from user's languageAlexandre Kühn
Before this fix, the chatter always showed dates of messages in military time format. This was not the expected behavior, as the user could have had customize the date and time format in the settings of the current language. Steps to reproduce the issue: 1. Set Odoo in English 2. Settings > Translations > Languages > English 2.1. Set Date Format to %m/%d/%Y 2.2. Set Time Format to %I:%M:%S %p 3. CRM > (Select any opportunity with at least one message) > Mouse hover on elapsed time (e.g. "an hour ago") Expected: - It shows the customized time format (e.g. 11/07/2017 5:33:36 PM) Results: - It shows the military time format (e.g. Tue Nov 07 2017 17:33:36 GMT+0100) opw-781647
2017-11-10[FIX] web(_editor): enable mobile testsAaron Bohy
This rev. introduces a new test suite meant to test the webclient components on mobile devices. The key 'config.device.isMobile' is forced to true in this test suite, so that mobile specific JS files are properly executed, which isn't the case in the classic JS test suite (setting isMobile to true in the test definition is too late, as the JS files are already processed). For now, this new test suite contains a single test, which was skipped until this rev. as it couldn't be executed in the classical JS test suite. Both suites are executed at each build of the runbot, and they can be manually executed from the webclient as well (via the debug manager).
2017-11-08[FIX] web: invalid domain in DomainSelectorMartin Geubelle
A domain could contain the key `parent` (in an embedded subview), like: domain="[('display_name', '=', parent.display_name)]") This is currently not handled by the DomainSelector. This will probably be handled in a future version but for this stable version, this case that triggered an error is now catched and an error message is displayed in the widget. This was causing a traceback when opening a domain with `parent` in the edition of a subview with Studio.
2017-11-02[FIX] web: FieldSelector: add model in field attributesMartin Geubelle
The key `model` was missing in the FieldSelector selected fields. The model can be useful for example to create a one2many related field.
2017-10-31[FIX] web: FieldSelector: always keep first pageMartin Geubelle
In the FieldSelector, after clearing the chain and closing the popover, the very first page was removed from the widget `pages`. This was causing issue when trying to select a new field again. This commit ensures that the first page is not sliced.
2017-10-10[MERGE] forward port branch saas-16 up to 88a9980b0c0Christophe Simonis
2017-10-09[FIX] web: allow strings as m2o values in domain selectorqsm-odoo
Since the new views, the field parsing for m2o returns an object with id and display_name. If the given value to parse is a string, it is supposed that this is an ID. This was breaking the domain selector widget which should allow strings as name-strings of m2o values.
2017-10-03[FIX] web: The model "ir.values" has been renamedGoffin Simon
The model "ir.values" has been renamed in "ir.default" by this commit: 60d9f6fef9e15c96cb710a17318a56c1cc1c33dc
2017-09-29[FIX] web, mail, base: config's `isMobile` definitionqsm-odoo
The `isMobile` variable was defined at the right place (`config.device`) but was set at the wrong place (`config`). Thank you for making me author of all the `isMobile` lines by the way... :)
2017-09-26[FIX] web: untranslated choice in widget domainMartin Trigaux
For boolean fields, the choice is "set (true)" or "not set (false)" Missing _t to translate it
2017-09-26[FIX] web: untranslated fields in widget domainMartin Trigaux
The user context was not propagated so the list of fields was untranslated.
2017-09-25[REF] web: preliminary work for the mobile Burger MenuAaron Bohy
2017-09-21[MERGE] forward port branch saas-17 up to bf4ccb21f6cChristophe Simonis
2017-09-21[MERGE] forward port branch saas-16 up to 88395bdb8e1Christophe Simonis
2017-09-21[FIX] web: open domain selector's datepicker at the right positionqsm-odoo
Before this commit, and since the combination of new views + datepicker library update, the datepicker opened at the top left of the window when using it in a domain selector. It also could not be used at all. This was because the current scenario occured: 1) Click on the datepicker 2) The datepicker triggers that it has changed on opening 3) The whole domain selector is rerendered 4) The datepicker computes where it should open... on basis of the old destroyed domain selector As the main cause of the problem here was the (2), this commit changes the datepicker odoo widget to only notifies that it has changed when it has really changed.
2017-09-18[FIX] *: fix a bunch of incorrectly documented docstringXavier Morel
Fix a bunch of ill-documented/incomplete/incorrect method docs Without this, the automatic doc generation does not work.
2017-09-13[MERGE] forward port branch saas-17 up to 1e17035f71fChristophe Simonis
2017-09-13[MERGE] forward port branch saas-16 up to 268cf9d04abChristophe Simonis
2017-09-12[FIX] web, account: display partner in reconciliationMartin Geubelle
When selecting a partner in the reconciliation widget, using the SelectCreateDialog (Search More), the partner wasn't correctly displayed. This was due to a difference between the change format of the many2one ; when using the dialog, only the `id` is sent (while the `id` and `display_name` are sent when using the many2one dropdown). These two behaviours are now standardized and both now send `id` and `display_name`. It has the advantage of sparing some `name_get`s called by the model because the `display_name` was missing. This change implies some refactoring where the SelectCreateDialog was used.
2017-09-12[MERGE] forward port branch saas-17 up to d08b4407be3Christophe Simonis
2017-09-11[MERGE] forward port branch saas-16 up to 3ac2a1106c8Christophe Simonis
2017-09-11[MERGE] forward port branch saas-15 up to ec15765eecfChristophe Simonis
2017-09-07[IMP] web: improved date field usabilitySanjay Jamod
- datepicker doesn't default to current date by default - date string in the input is now selected when clicking the field - adapted the existing tests to the new changes
2017-08-24[MERGE] forward port branch saas-17 up to 877e7098719Christophe Simonis
2017-08-23[MERGE] forward port branch saas-16 up to aec6248bb37Christophe Simonis
2017-08-23[FIX] web: reimplement conditions in the "Set Default" dialogMartin Geubelle
The rev. https://github.com/odoo/odoo/commit/49f0413290821cb123e75b4546873cf98edf1d25 reintroduced the "Set Default" dialog but forgot the conditions part. This rev. reintroduces the missing part.
2017-08-18[FIX] web: debug manager: open the set_default dialogfwi-odoo
Before this commit, the function opening the set_default dialog was not declared anymore. This commit redefines this function in the debug manager.
2017-08-11[FIX] web: fix traceback when saving fields list during data exportKhoi Nguyen
The traceback was caused by an occurence of this.dataset, which was left out in the new views refactoring (this.dataset has been replaced by this.record).
2017-07-24[IMP] web, *: lazy load dialog xml templateqsm-odoo
* web_editor, web_planner, website The 'Dialog' class is used in both backend and frontend. Also, lots of actions can be done without the use of any modal. It thus makes sense to lazy load its related xml only when a first modal is opened. This change also allows to get rid of the "base_common.xml" file as the dialog template is the only remaining one in there and, in the future website update, it will allow to not load any static XML file on website page loadings.
2017-07-12[ADD] web, *: add rainbowificationDharmraj Jhala
This commit introduces the 'rainbowification' feature to the web client (and to some affected addons). This feature is essentially a way to display a nice friendly message when some business event happens. For example, a encouraging message is displayed when the user clear her/his inbox, or when a salesman closes a deal. The mechanism currently only displays a 'rainbowman', but could be extended later to add other kind of animation. There are a few different ways to display a 'rainbowman': - any JS code can simply trigger_up an event ('show_effect') with some options: for example this.trigger_up('show_effect', { type: 'rainbow_man', fadeout: 'no', message: $done, click_close: false, }); - an action returned by the server can have an 'effect' key, with some options - the do_execute_action method accepts a 'effect' option. This is useful when one wants to specify a rainbow on an action button in a form view Joint work with: dbh <dbh@odoo.com>, ged <ged@odoo.com>
2017-07-11[FIX] web,odoo: Remove remaining workflow related codeMehul Patel
2017-06-26[MERGE] forward port branch saas-14 up to 3bac72ba741Christophe Simonis
2017-06-21[FIX] web: remove "Edit Workflow"Nicolas Martinelli
Since all workflows have been removed, remove the menu to edit it, since it generates a traceback and confuse users.
2017-06-09[MERGE] forward port branch saas-16 up to cc38b93ab2aChristophe Simonis
2017-06-09[MERGE] forward port branch saas-15 up to 49f819a7a79Christophe Simonis
2017-06-08[FIX] web: ModelFieldSelector: add a way to clear the cacheAaron Bohy
The ModelFieldSelector keeps an internal cache for the fields_get. This cache needs to be cleared in the tests environment because a model with the same name may be defined several times accross the tests modules, but they may contain different fields. This could also be a problem with studio: when a field is created, the ModelFieldSelector cache must be cleared as well (in addition to the data_manager one). We thus introduce a new 'clear_cache' event on core.bus. When triggered, the ModelFieldSelector and the data_manager clear their respective cache. We use this event in the test environment to ensure that the cache is cleared at the end of each test using a mockEnvironment. This rev. also fixes an infinite loop in the override of destroy() in the mockEnvironment, which occured when both session and config were specified in the params.
2017-06-07[FIX] web: restore broken datepicker since lib updateqsm-odoo
There were two main problems with the datepicker since the lib was updated: - it appeared broken in the search view "Filters" menu - it did not overflow the parent which scrolls Indeed, before the update, the datepicker was placed in the <body/>. Now this is a lib option. Unfortunately, the option is broken (I don't know why they broke it since it worked before the lib update...). As the lib does not expose its internal functions, the only found workaround was to patch the lib code itself. opw-745311 opw-745625
2017-06-01[MERGE] Forward-port saas-16 up to ba15df47cb25625cb0921cba554aa0879048c90aOlivier Dony
2017-05-30[IMP] web: show user menu in small devicesDharmraj
The user menu was not visible in portrait mode with multi company in mobile. This was caused by the company menu taking too much room. We fix the issue by making the company menu smaller (just the size of an icon) (PR #16685, task 29394)
2017-05-29[FIX] web: prevent crash when exporting all dataGéry Debongnie
In the list controller, some code to determine the active domain to export was causing a crash. It was easy to see: just select all records in a list view, then click on 'Export' in the sidebar. Note that the data_export code is still quite old, and did evolve organically. It does not conform to our new design principles, in particular, the way component should communicate. But this is a task for another day.