summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/fields
AgeCommit message (Collapse)Author
2019-01-23[MERGE] forward port branch 11.0 up to 984a99611eeChristophe Simonis
2019-01-23[MERGE] forward port branch saas-15 up to 3cba1862d44Christophe Simonis
2018-11-28[MERGE] forward port branch 11.0 up to bb6f6c57f97Christophe Simonis
2018-11-27[FIX] web: progressbar updates on field resetLucas Perais (lpe)
Have a form record with a progress bar Modify the max_value of the progress, as well as the current_value bar through an onchange Before this commit, the new max_value was not taken into account After this commit, it is. closes odoo/odoo#29056
2018-11-26[FIX] web: propagate can_create into the search popupLucas Perais (lpe)
When creating a SO line and clicking on search more for product_id Before this commit, every user had the button "Create" to create a product.product After this commit, only user in groups that actually can create a product have the button OPW 1910371 closes odoo/odoo#28924
2018-10-16[MERGE] forward port branch 11.0 up to b29b545fe84Christophe Simonis
2018-10-10[MERGE] forward port branch 11.0 up to a69f117bbf5Christophe Simonis
2018-10-12[FIX] web: prevent URL click from opening a recordSébastien Theys
If we click on a link, we only want to open the URL, and not the record when the button is on a list. PR: #27230
2018-10-12[FIX] web: don't allow reference widget to be set on char fieldslen-odoo
The reference widget is expecting a models list as selection attribute in the field declaration. It does not exist in the case of the char field. Support for char fields was added to allow for external identifiers, but it only works in readonly. As a consequence, it tracebacks in Edit mode when used in studio. We thusly remove char field from the list of supported fields. opw 1892602 closes odoo/odoo#27708
2018-10-09[FIX] web: Make datetimepicker configurable in datetime fieldssvs-odoo
The datetimepicker option was introduced to be able to customize the datetime picker widget in date/datetime fields. However, due to the way the _makeDatePicker function was coded, it did not work in datetime fields. Thank to Yajo for the initial fix closes odoo/odoo#27541
2018-09-17[MERGE] forward port branch 11.0 up to f2b8caff07bChristophe Simonis
2018-09-14[FIX] web: JournalDashboardGraph widget crash Mk.IIMOENS Alexandre
Hardening of commit:995610c065bf0242cb5023cfad2940234395739e The JournalDashboardGraph requires nv, which is lazyloaded. However it requires nvd3.js which is loaded after nv.d3.js. A function called in destroy is defined by nv.d3.js, which can make the crashhappen with the right (wrong) timing. opw 1873749
2018-09-05[MERGE] forward port branch 11.0 up to 213759b03e5Christophe Simonis
2018-09-03[FIX] web: tab selects first many2one entry without triggering spurious createlen-odoo
Suppose you select a customer for a sale order. You type the beginning of his name "think", and a name_search is triggered which finds matching results, with first result "Think Big Systems". There are three ways to select it: click, enter or tab. Now there can be a warning set on this customer ("Bad client, only accept cash", or "good client, offer discount"). In that case, clicking on tab would trigger the onchange displaying the warning, but it would also set floating to true, which means a dialog to create client "think" would appear. This happens if the onchange is delayed, and thus the call to reset the floating state is triggered only after the focusout completed, instead of before. Coauthored with @aab-odoo opw 1866619 opw 1874475
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-08-28[FIX] web: accept false value in comparisonMartin Trigaux
momentjs `isSame` method considers undefined values but not false our method _isSameValue does consider false Correct the error when running web tests Deprecation warning: value provided is not in a recognized ISO format
2018-07-24[MERGE] forward port branch saas-11.2 up to 3c521f6d05cChristophe Simonis
2018-07-23[MERGE] forward port branch 11.0 up to 219d2296d67Christophe Simonis
2018-07-19[FIX] web: format value of statinfo widgetlen-odoo
The value of the statinfo widget is rendered by the qweb after a t-esc. Say if the python rounding returned 14.0000000001 (supposed to be a two digits precision number through the magic of floats) then the statinfo widget would print it as-is. We now format the value at assignation. opw 1865426
2018-07-05[MERGE] forward port branch saas-11.2 up to 45329c0cf2cChristophe Simonis
2018-07-05[MERGE] forward port branch 11.0 up to 84210074e55Christophe Simonis
2018-07-03[FIX] web: Email attachment issueGoffin Simon
Steps to reproduce the bug: - Go on a SO and click on "Send by email" - Remove the attachment and click on "Add an attachment" - Choose an attachment A and remove it by clicking on the cross - Click on "Add an attachment" and choose the attachment A Bug: The attachment didn't appear in the modal. opw:1862482
2018-06-27[MERGE] forward port branch saas-11.2 up to 12ddec3a767Christophe Simonis
2018-06-21[MERGE] forward port branch 11.0 up to c5ed3729709Christophe Simonis
2018-06-15[FIX] web: fix ace editor when value is FalseJeremy Kersten
Avoid to crash the client web with setValue(false). false.match, false.split, false.length... will not works. Before this commit, _render call the setValue after comparing '' !== false
2018-06-15[MERGE] forward port branch saas-11.2 up to b170a753e18Christophe Simonis
2018-06-15[MERGE] forward port branch 11.0 up to b05e4d5f958Christophe Simonis
2018-06-13[IMP] web: Expose datepicker configuration to view declarationsJairo Llopis
The lower-level widget itself supports passing options to the underlying datepicker library. However this is not exposed to higher-level view declaration. With this patch, one can declare a field in a view such as: ```xml <field name="datefield" options='{"daysOfWeekDisabled": [0, 6]}'/> ``` That option would land in the widget and disable those weekdays. Documentation has been updated accordingly. Closes #25044.
2018-05-09[MERGE] forward port branch saas-11.2 up to aae54ecc159Christophe Simonis
2018-05-08[MERGE] forward port branch 11.0 up to f2e105eeca4Christophe Simonis
2018-05-08[FIX] web: use correct href in link for m2oMohammed Shekha
With a better href, many2one in readonly mode can be opened in new tab. Related to task: #32919
2018-05-04[MERGE] forward port branch 11.0 up to 8dade01e2c5Christophe Simonis
2018-05-04[FIX] web: one2many form view with action buttonAaron Bohy
Assume a one2many field inside a form, displaying field A in its list view, and a field B in its (dialog) form view. Moreover, there is an action button in the dialog, which updates the value of B. Before this rev., B wasn't correctly reloaded when the button was clicked, because the BasicModel reloaded the fields on the list view (i.e. field A), whereas it should reload the fields in both views. This fix is twofold. First, we force the viewType to 'form' when the record is reloaded, instead of the default ('list'), so that fields in the form view are correctly reloaded. Second, when we open the form view in the dialog, we add the fields of the list view to the dict of fields of the form view, so that the form is aware of those fields and can ask the model to reload them (still without displaying them). Fixes #24189
2018-05-02[FIX] web: allow focus to move to a field monetaryVincent Schippefilt
In the chart of account editor, which is an editable list with 2 contiguous monetary field, we could not change the first then move to the second using the TAB key: the focus was not set on the input of the second monetary field, and when it is, that input is destroyed and recreated so the focus was lost Before this fix, the user needed to hit TAB twice to move to the next field. After this fix, the user can navigate between fields monerary with TAB
2018-04-23[MERGE] forward port branch saas-11.2 up to 7113b70762dChristophe Simonis
2018-04-23[MERGE] forward port branch 11.0 up to 3ab25b60bc5Christophe Simonis
2018-04-19[FIX] web: use FieldText as fallback for html fieldsGéry Debongnie
Currently, the default field widget of type html is not defined in the web addon, but in the web_editor addon. It uses the summernote library and different assets. The web_editor addon is defined with auto_install=true, so it is usually not an issue. However, it could happen that there is some issue with the web_editor asset bundles. In that case, any form view with a field of type html will crash. With this commit, we define a default widget of type html in the web addon. This will render as text (so, not exactly what one might expect), but it is still better than making the web client unusable.
2018-04-18[MERGE] forward port branch saas-11.2 up to fed775bc0c2Christophe Simonis
2018-04-18[MERGE] forward port branch 11.0 up to 8c64159b884Christophe Simonis
2018-04-18[FIX] web: don't ignore required attrs on image fieldsAaron Bohy
Before this rev., falsy image fields could be saved even if they were required.
2018-04-17[FIX] web: focus select in reference widgetMartin Geubelle
In the reference widget, the focus was always on the input (many2one) even though the first select (with the model) was not set. Thanks to @kaerdsar for the original PR. Partially closes #24070
2018-04-16Revert "[FIX] web: remove &shy; when saving phone number"Christophe Simonis
This reverts commit b8b0f947bf7f7abf930a1797fa55c7f7dd33faa2.
2018-04-16[MERGE] forward port branch saas-11.2 up to 90f8f17fb4fChristophe Simonis
2018-04-16[MERGE] forward port branch 11.0 up to ad825b673b5Christophe Simonis
2018-04-16[FIX] web: allow default behavior for unmanaged keyboard navigationVincent Schippefilt
Reproduce the issue: - open the manual reconciliation (it is a client action) - add a reconciliation (using the + sign) - expand it (using the > sign) - put the focus on the first field and hit TAB --> you would expect that the focus moves to the second field --> what happens is: the focus stays on the first field Before this fix, when in a client action (or any place that contains fields) that contains fields, the keyboard navigation did not occur correctly because the default behavior of the TAB key was prevented. After this fix, if the navigation_move event was not stopped, we allow the default behavior of the TAB key.
2018-04-16[FIX] web: fix keyboard related crash in client actionsVincent Schippefilt
2018-04-13[FIX] web: remove &shy; when saving phone numberNicolas Lempereur
When Odoo display a phone number number, on phone or if VOIP is installed a invisible `&shy;` character was added from 9.0 up to saas-11.2 so an applications such as skype would not be concerned with the number. But if someone copy-pasted from this to somewhere else in Odoo, we would get incorrect number with this invisible caracter. So this change make a special case for the "FieldPhone" so the character is removed from data saved. opw-1834858 closes #24223
2018-04-12[FIX] web: one2many: add new record with 'Save & New'Aaron Bohy
Consider the following scenario involving a one2many list (non editable) inside a form view: - click on 'Add an item', a model opens, - fill the fields and click on 'Save & Close', - reopen the freshly created record, - maybe make some changes (this is optional, but makes sense), - click on 'Save & New', - fill the fields and click on 'Save & Close', -> the second created record isn't added to the list. The problem comes from the fact that when the dialog is opened for the second time (in this case by clicking on a record), the 'save' handler registers an 'UPDATE' command. While this is correct for the 'Save & New' click (as we update an existing record), this isn't for the second record which doesn't exist yet, and thus requires an 'ADD' command. This rev. ensures that the two cases are handled in the 'save' handler given to the dialog. OPW 1829723
2018-04-11[FIX] web: fix bad types in parametersMathieu Duckerts-Antoine
This fix allows the documentation to be built again.
2018-04-10[IMP] web: keyboard navigation in form viewVincent Schippefilt
The goal of this commit is to allow fast entry of the same model using the keyboard for navigating through the form once, by blocking the user from advancing in the form if there is a required field or once they went through the form once to get them to a primary action (button) This commit includes the following changes 1) Enable moving forward from field to field using the TAB key 2) Entering the one to many and many to many using the TAB key a. When entering it, set the focus on the "add new line" link or button b. When adding a new line, set the focus on the field visible editable field of the new line c. Discard adding a new line with ESC key d. If the user leaves the first field empty and uses TAB, we will cancel the adding of a new line and move to the next field of the form 3) When a field is required and not filled in, do not allow the user to move out of the field using the TAB key (the user is still allowed to use the mouse though), mark the field as invalid instead 4) After going though the form once, using the TAB key on the last field will move the focus to the first primary button of the page 5) When the focus is on a primary button (EDIT/SAVE), the user cannot move the focus forward using the TAB key. Hitting TAB again will display a tooltip telling to hit ENTER to activate the button. The mouse is still available to move the focus. 6) When the user saves, the focus is placed on the first primary button of the form renderer (like VALIDATE for a new invoice) 7) On dialogs, primary buttons should stop the users from moving out of them, and showing a popup if the user tries 8) When closing a dialog, the focus will be moved back to the widget that opened it. This commit does not include the following features 1) Navigation with the keyboard on a selection one to man 2) Navigate between tabs in a form using the keyboard 3) Cancelling the adding of a new line in a many to many using the ESC key do not set the focus correctly 4) Enhancing the focusses fields (like blue underline)