summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/fields
AgeCommit message (Collapse)Author
2020-08-14[IMP] web: allow password fields to force the `autocomplete` valueOlivier Dony
Follow-up on 6edb7495346119e2ceb25f5b5b5568b4b890dd86, where default `autocomplete` values were introduced as default for password fields, according to the new autofill specs. This patch allows developers to force the "autocomplete" attribute value on password fields, in case there really is a need for a value that is not `new-password` (which BTW now triggers the password generator wizard in many browsers). It is useful for example when a backend form really needs to ask the user for their current password, so the correct `autocomplete` value is `current-password`, as on the login form.
2020-08-11[IMP] web: add smart date input on date fieldMichael Mattiello (mcm)
This commit adds smart date inputs for date and datetime fields. The goal of smart date input is to provide the user some shortcuts when setting dates. The rule is [+-]\d+[dwmy]? So we can enter inputs like: +3 to have today + 3 days -2w to have today - 2 weeks +1y to have today + 1 year +5m to have today + 5 months -4d to have today - 4 days closes odoo/odoo#55602 Task: 2270347 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-08-05[FIX] web: Fix the skiped focus on radioNidhi Patel
Currently, when form view is opened in edit mode and if you proceed through the tab(keyboard) then focus is skiped on radio field. For Ex: in project when you procceed through the tab it will skip the visibility field radio. The issue occurs because the radio is inherited from the selection field and in selection field the focus is set on 'select' while there is no method to set the focus in radio and radio does not have 'select' element it has 'input' So in this commit, override the method getFocusableElement in radio widget and set the focus on 'input' instead of 'select'. closes odoo/odoo#52073 Taskid: 2252798 Closes: #52073 Related: odoo/upgrade#1430 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-08-03[MERGE] hr_timesheet: clean durations expressed in hours if encoding unit is ↵Odoo's Mergebot
in days Purpose ======= There are several places where the duration is expressed in hours even though the encoding unit is in Days. Specifications =========== The duration should be expressed in days instead of hours in the following places: [x] Timesheet Entries [x] Portal > Tickets [x] Portal > Timesheets [x] Portal > Tasks [x] Portal > Sales Orders [x] Project Overview [x] Project task form view (in this case, the label of the field should be 'Planned Days') [x] Timesheets > HR Timesheet/Attendence Report [x] Project > All Tasks Hide the following elements if the encoding unit is in days: [x] 'Timesheet Timer' feature on the project form view [x] 'Timesheet Timer' feature on the Helpdesk team form view [x] the 'Round timesheets' feature in the settings of Timesheets (except if the 'Awesome Timesheet' feature is enabled) Bonus point: [x] Timesheet form view: 0.00 Days should be displayed in read-only if the duration = 0 Some labels need to be adapted to explicit the unit of measure (is it carrots? potatoes?): e.g. Duration (Days) or Time Spent (Hours) : [x] Timesheet entries report [x] on the portal [x] Project overview: add 'recorded' next to Hours/Days [x] Project overview: add 'Days/hours Spent' above the total by employee [x] task form view: make sure the 'sub-tasks days spent' button/label stays on one line [x] hide the 'start' button on project tasks and helpdesk tickets if the encoding unit is in days Task ID : 2152322 closes odoo/odoo#46184 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-07-23[FIX] web: display 0 for FieldFloatToggleAnh Thao Pham (pta)
The field was hidden in UI when its value was not set or equal to 0. Display the field if its value is set to 0. [IMP] web: clean code
2020-07-10[FIX] web: fix zoomodoo attachToTarget/dashboard compatiblejvm-odoo
Issue - Install Employees & Dashboard - Add employees to kanban - Dashboard - Hover an employee picture There is only the picture visible on the page, the remaining space is white. Cause I found several issues. 1. The pictures are not shown on hover in employees But they are on dashboard. 2. $attach = all `.content` and on dashboard there is 2 `.content` so the flyout is append 2 times 3. The move method is trigerred on hover too, it hides the flyout if we are not in it. But with attachToTarget we are not in it so it's hidden all time. 4. If everything above is solved, the image is shown but not at the correct position because the flyout base position is not top 0, left 0 Solution 1. Reduce the minimum required size to 128px 2. use closest instead of parents 3. Don't hide if we have the option attachToTarget 4. Calculate the flyout offset and replace it correctly and set it to position fixed to handle scrolling OPW-2291493 closes odoo/odoo#54333 X-original-commit: 2c6d692ee40c97d2ae63da64db7623702948407e Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com> Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
2020-07-07[FIX] web: properly display boolean fields in kanbanHardik Prajapati
Before this commit, boolean fields (without widget="boolean") in kanban views were displayed as [Object object], because when no widget is specified, we display the (textual) formatted value of the field. However, the boolean formatter returns by default a string encoding an html checkbox. This commit passes the correct option to force a string formatting, so it now displays "True" or "False". Moreover, this commit uniformizes formatter options for that purpose, as another option had been recently introduced for monetary field. Note that those options should not be necessary, as formatters should always return text values (no html). But this is a larger change, that we might do in the future. Task 2280394 closes odoo/odoo#53937 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-07-28[IMP] web: remove min date limitation of year 1900Harpritsinh Sisodiya
Before this commit, user could not selecta a date before year 1900. This was an historical limitation due to python < 3.2 that didn't support dates before 1900. After this commit, user can select any date, user can select any date from 01/01/0001. taskID: 2166761 Fixes #41788 Closes #43055 closes odoo/odoo#51406 Signed-off-by: Géry Debongnie (ged) <ged@openerp.com> Co-authored-by: Mohammed Shekha <msh@odoo.com> Co-authored-by: Aaron Bohy <aab@odoo.com>
2020-07-23[IMP] web: add Registry predicateJulien Mougenot
Before this commit, any value could be added to registries and the class needed to be overridden to assert that added values would answer to a certain predicate. Now, the registry can be instantiated with a given predicate function that all added value must pass to be registered (default: all values are accepted). Existing implentations have been adapted: - FieldRegistry - FieldRegistryOwl.
2020-06-23[FIX] web: daterangepicker not working in firefoxDhruv Patel
A recent commit [1] made the daterangepicker automatically close itself on scroll events. However, in firefox, a scroll event is triggered when the daterangepicker opens. This event is triggered inside the picker itself. As a consequence, the picker is closed directly. This commit solves the issue by only closing it on scroll events occurring outside the picker. [1] https://github.com/odoo/odoo/commit/e6730c6e928587cd7438340cc101c57fee34220b closes odoo/odoo#53497 Task: 2282571 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-06-22[FIX] web: kanban: format monetary w/o widgetVictor Feyens
Before this commit, monetary fields occurring in kanban views without widget="monetary" specified weren't correctly formatted: the whitespace separating the value from the currency symbol was formatted has $nbsp; (html) instead of a simple whitespace. closes odoo/odoo#52521 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com> Co-authored-by: Aaron Bohy <aab@odoo.com>
2020-02-27[IMP] web: better positionning of daterangepickerParth Choksi
Before this commit, the daterangepicker always opened below the input, even when there was not enough space to display it. Moreover, when the user scrolled while the picker was opened, it wasn't stucked to the input, so the picker was displayed at a random position after the scroll. With this commit, we compute the available space above the picker when opening it, and if there is enough space, we display it above, otherwise, we display it below. Moreover, we automatically close the picker when the user scrolls. task-2117229 closes odoo/odoo#42161 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com> Co-authored-by: Mohammed Shekha <msh@odoo.com>
2020-06-15[IMP] web: add options to formatFloatTimeMichael Mattiello (mcm)
This commit adds noLeadingZeroHour option to formatFloatTime. The noLeadingZeroHour option can be used to format the value like 1:30 instead of 01:30 This format behaviour is wanted for fields in web_grid module. Task 2261853 closes odoo/odoo#52217 Related: odoo/enterprise#10870 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com> Co-authored-by: Hardik Prajapati <hap@odoo.com> Co-authored-by: Mohammed Shekha <msh@openerp.com>
2020-06-12[IMP] *: update notifications to optional titleJulien Mougenot
closes odoo/odoo#52826 Related: odoo/enterprise#11084 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-06-10[REF] web: clean 'M2O._search'Julien Mougenot
closes odoo/odoo#52347 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-06-10[IMP] web,*: highlight quick create feature to userDhruv Patel
Generally, Users are not necessarily aware that they can quick create a most records by simply typing in their name+enter in the many2xxx field input. The exact purpose of this commit is to make sure the user discovers the quick create feature of our many2xxx fields. For that, when the input is empty, display 'Start typing to create a record...' at the bottom of the dropdown when can_create is set and no_create_edit option not set. So the user can easily understand that by typing and pressing enter will create the new record. Also "Search and Create" options in the dropdown only been shown to the user when it type anything in the input box as the same case in the "Create" option. Task : 2266557 Co-authored-by: Mohammed Shekha <msh@openerp.com> Co-authored-by: Julien Mougenot <jum@odoo.com>
2020-05-14[IMP] web_editor, *: make Colorpicker a Widgetfja-odoo
*: website, web Move the colorpicker dialog logic into a colorpicker *widget*, which the colorpicker dialog will now instantiate. Part of https://github.com/odoo/odoo/pull/46088 task-2195313
2020-05-12[FIX] web: correctly update input field after onchangeAaron Bohy
In a form view, have an x2many list with two fields A and B (e.g. A is a many2one, and B is a char). There is an onchange on the x2many that is triggered when the user sets A, and that sets B. In this scenario, let's assume that the user first writes something in B, but directly deletes it. Then, he sets A. Before this commit, in this situation, B wasn't updated with the value returned by the onchange. Indeed, B's field widget was still flagged as 'isDirty', because the user interacted with it, but it didn't commit its value, as it hasn't actually changed. Basically, it remained flagged as 'isDirty' forever, and thus couldn't be updated with the value returned by the onchange. This commit ensures that the 'isDirty' status is correctly updated when the change is actually undone. Task 1958793 closes odoo/odoo#51085 Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com> Co-authored-by: pka-odoo <pka@odoo.com> Co-authored-by: Mohammed Shekha <msh@odoo.com>
2020-05-12[FIX] web: fix statusbar option conversionjvm-odoo
Issue - Install Projects - All Tasks > Form View - Edit the view - Set statusbar clickable to '0' Still clickable Cause In relational_field.js we do `!!'0'` which returns true like `!!'anythingelse'` Solution Add a '+' which will convert the value into an integer for a better conversion. OPW-2235311 closes odoo/odoo#51083 X-original-commit: 53cc68fce32f46a0b4bc83a1e73a5d13a60fc995 Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
2020-05-12[FIX] web: select date/datetime value when tabbing inHardik Prajapati
before this commit, tabbing into the date or datetime field input it has only focus, value is not selected. after this commit, navigate through a view in edit mode with the TAB key, when focus comes into date/dateetime field input then input is focused and value of date/datetime field is also get selected. task-2246593 closes odoo/odoo#51062 X-original-commit: 962e4e18b559d90aa3456c77035659ac8017501d Signed-off-by: Aaron Bohy (aab) <aab@odoo.com> Co-authored-by: Mohammed Shekha <msh@odoo.com>
2020-05-11[FIX] web: list: multi-edition of owl fieldsAaron Bohy
Before this commit, it wasn't possible to multi-edit boolean fields in list views. Actually, it didn't work for fields rendered by Owl components. It only impacted boolean fields because it was the only editable field widget that had already been converted in Owl. It didn't work because of three issues: 1) there is some sort of an hack in basic renderers: we set the attribute '__node' on the field widgets, and this attribute is used for instance by the controller, when it has to handle a multi-edition. It tries to read it from the event's target (typically the field widget). However, with owl components, '__node' was set on the FieldWrapper (wrapping the actual Field Component). 2) the original target (the Owl Component which triggered the event) was lost when the event went through the compatibility layer (for owl Component embedded in legacy widgets). 3) the multi-edition confirm dialog didn't handle Owl field components. Task 2254717 closes odoo/odoo#51044 X-original-commit: 36d23cfcdef3cea3539004ee5bb4479b859b8137 Signed-off-by: Michaël Mattiello <mcm-odoo@users.noreply.github.com> Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-05-08[FIX] web: failing quick create in m2o inside x2mAaron Bohy
Write something in a many2one field, and click on 'Create "..."' to quick create a record with the given value (name_create). When the name_create fails (e.g. because there are mandatory fields in the model), we open a form view. Before this commit, when this happened for many2one fields inside x2many editable lists, it crashed, since [1]. [1] 50bf8309f88fb6c8d8e27b14d40450e92e5a4e4e closes odoo/odoo#50948 X-original-commit: 43c513306094444ff25ad98584b426ddb8a3b525 Signed-off-by: Julien Mougenot (jum) <jum@odoo.com> Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-05-08[FIX] web: Handle time select in modal with firefoxNasreddin (bon)
Issue - Install sale_renting - Create a rental order - Add a "rental" product - In Modal, change start or end time In Firefox, user not allowed to change the time; time select not reacting well. Cause The issue seems to be that in bootstrap when we click outside a modal, we focus on the modal: https://github.com/odoo/odoo/blob/27f67bfcb903/addons/web/static/lib/bootstrap/js/modal.js#L332-L337 and the FieldDateRange widget contains a <select/> tag and is added outside of the modal, so when we click on the select, bootstrap will focus on the modal which in firefox seems to lose the focus on the <select/> which get closed. Solution not propagating focusin event when the select of the daterange widget is focused => in my opinion this is the less risky solution, this could be done with a code such as (in the FieldDateRange._renderEdit method): opw-2240220 closes odoo/odoo#50906 X-original-commit: 5a1e9e32061996ca1770c9ae9b5a7e7f53c5048f Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-05-07[IMP] web: remove _lt from envAaron Bohy
Having _lt in the env doesn't make much sense, as it is useless at run time, and it would incite people to require 'web.env' to use it (at load time). The env should never be directly imported, it is automatically propagated from parents to children. To sum up, in Owl components: - when terms have to be translated at run time (e.g. in a function called when the user clicks on a button), the env is available and env._t must be used - when terms have to be translated at load time (e.g. a JS module defining a component with a translatable static property), one must require 'web.translation' and use function _lt it exports. closes odoo/odoo#50656 Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2020-05-05[IMP] web: FieldMany2one: reword and simplify dialogDhruv Patel
This commit improves the dialog that opens when a user clicks out of an 'un-commited' many2one. It is no longer possible to edit the value, and the sentence has been reworded. closes odoo/odoo#49528 Task: 2234212 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-05-05[IMP] web: add 'label' attribute on AbstractFieldAaron Bohy
If set, this value will be displayed as column name in list views. This attribute could be used in the future in form view for the same purpose. Part of task 2195254
2020-05-05[IMP] web: add Many2OneAvatar field widgetAaron Bohy
In readonly, this widget displays the image of the related record next to its display_name. In edit, it behaves exactly like the regular many2one. Part of task 2195254
2020-05-05[IMP] web: add RemainingDays field widgetAaron Bohy
This widget can be used on date and datetime fields. In readonly, it displays the delta (in days) between the value of the field and today. In edit, it behaves like a regular date(time) widget. Part of task 2195254
2020-05-05[IMP] web: add BadgeField componentAaron Bohy
This new field component displays the field's value inside a bootstrap pill badge. Supported field types are 'char', 'selection' and 'many2one'. The background color of the badge can be customized by using the decoration-xxx mechanism, e.g. <field name="state" decoration-danger="state == 'cancel'" widget="badge"/> Part of task 2195254
2020-05-05[REF] web: field decorationAaron Bohy
This commit refactors the way the decoration-xxx attributes are applied to field widgets/components, in a way that it can be overridden in a given field or component to generate the approriate className. By default, 'decoration-x' applies className 'text-x'. This will be necessary for the new 'FieldBadge' component, which needs to apply 'bg-x' classNames instead of 'text-x'. Part of task 2195254
2020-04-30[IMP] sales_team, web: add and improve color widget to improve UX on crm.tagvho
The color picker help the user to choose a color instead of picking it by id. The title and arial-label "no-color" default value are removed from the picker_preview because they are not accurate. Instead name of currently set color is used. Task ID 2128166 closes odoo/odoo#47474 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-04-17[IMP] web: Numeric fields can be non-formattedLucas Perais (lpe)
This commit introduces a new option in fields inheriting from type Numeric which is `format`. By default, Numeric fields are formatted according to their subtypes and locale Adding, in a view, the option format set to a falsy value will prevent the field's value from being formatted. ``` <field name="int_field" options="{\'format\': false}"/> ``` Task 2050119
2020-04-14[FIX] web,mail: many2many_tags_email: increase limitDhruv Patel
A long time ago, commit [1] increased the limit of displayed badges inside a many2many_tags widget, from 40 to 1000 (a large limit that should never been reached with such a widget). However, this solution was specific to the many2many_tags widget, and didn't apply to its extensions (like the many2many_tags_email widget). For instance, open the chatter full composer, add 40 partners in the recipients field and try to add one more: nothing happens. This commit sets the limit on the widget itself. That way, extensions automatically have the same limit, and can override it if needed. [1] d4cf4374d1baa529bb651bb3cc32e9db140963a8 Task : 2091027 closes odoo/odoo#49488 X-original-commit: 02e41f1131b4ea3ad977cc241a3d447c37195f6e Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-04-03[FIX] web: Fix the zoom image stick top on search of employee.Nisha patel
Currently, the Employee picture stays on top of the card of the employee we're looking for. The image does not disappear after a search is validated. Steps to reproduce: >> On employee kanban focus cursor on search panel, then mouse over to employee image so it will be zoomed, now without mouse leave just type in the search panel and enter, the big zoomed image stuck on screen and don't even know how to make it go away. So in this commit, We fix that on keudown hide the zoom image so when user search on search panel it will hide the zoom image. OnShow of zoom bind the generic even keydown and on that just hide the image so it should not stick on screen. TaskID : 2212808 Closes : #48253 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-03-31[REF] web: convert FieldBoolean to owlMichael Mattiello (mcm)
This commit does 4 things: - adds a file for deprecated legacy fields. - moves legacy FieldBoolean into this file. - converts FieldBoolean to owl component. - adds a new xml file for component fields' templates. task id: 2193996
2020-03-31[REF] web,*: add new field registry for componentsMichael Mattiello (mcm)
* account This commit adds a new field registry for component fields. This field registry is used to only register the new field components and the other one should register the legacy fields. Those two registries will be used together while all legacy fields are not converted to owl component. As the legacy registry now throws an error when adding a component field the existing component fields (account.ShowGroupedList and account.ShowResequenceRenderer) are moved into the new registry. This commit also refactors some field managers (form renderer, list editable renderer, calendar popover) to use the new registry and thus support the component fields. task id: 2193996
2020-03-31[REF] web: add missing features of abstract fieldMichael Mattiello (mcm)
This commit adds missing features of AbstractField written in owl. task id: 2193996
2020-03-25[FIX] web,mail: Harmful or incomplete aria-label attributesLuis González
Some elements contain superfluous `aria-label` attributes, which overrides any default useful information. For instance, some dropdown menus contain the `aria-label` "Dropdown menu" (e.g. the company switcher), which doesn't add any useful information, as dropdown menus are already labelled correctly using `aria-expanded`. This change applies on the following buttons: - Schedule an activity - View attachments - View followers - Switch company - Open user options from systray - The widget `state_selection` closes odoo/odoo#48317 X-original-commit: e3c7f66e89d7be39dfa4cc3d6b038c6f4a114aa5 Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-03-24[IMP] web: trim FieldEmail widget valueMohammed Shekha
before this commit, email widget was not trimming value and due to which space aroung email value remain as it is added by user. after this commit, email widget will trim the value and remove leading/trailing space. task-2197432 closes odoo/odoo#47470 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-03-19[FIX] web_editor: allow widget text on field html in studioJeremy Kersten
Before this commit, widget='text' was not available in web_studio since 'html' was missing from the supportedFieldTypes list of the TextField. After this commit you can use widget text (and other derivated type of text). task-sbu-feedback closes odoo/odoo#48043 X-original-commit: 34bd90e7fc2aa094eac92b6f635c2d8d933ecb86 Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-03-13[REF] web: Adapt views/actions to new control panelJulien Mougenot
Some web actions/controllers/viewsl have been adapted to properly instantiate the newly refactored control panel and update it accordingly. We needed to adapt the starting mechanism of actions and controllers to ensure that the control panel instantiation did not delay the loading of any widget. Part of task 2196029 Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2020-03-09[FIX] web: FieldMany2ManyTags: failing quick create recordAaron Bohy
The FieldMany2One allows to quick create record (name_create). However, sometimes, required fields on the co-model make the name_create crash. In this case, the FieldMany2one opens a form view in a dialog to let the user specify those fields, and create a new record with the 'create' method. This was working fine. The FieldMany2ManyTags embeds a FieldMany2One to let the user search for and select or (quick) create tags. In this case, failing quick creation didn't fallback on the dialog form view, but displayed a server error instead. This commit fixes this issue. Bug introduced by 50bf8309f88fb6c8d8e27b14d40450e92e5a4e4e Task 2192754 closes odoo/odoo#47183 X-original-commit: 63ab065f3298c13bb19ae1245d7fd2652581b254 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-03-10[FIX] web: introduce parser for `many2one_reference`Damien Bouvy
Follow-up of d0c852f The parser of `many2one_reference` was not introduced when the new field type was created and then later when the formatter was added, which leads to errors when the web client is trying to set the value of such fields. Since the value of this field is an ID, it is parsed as an integer. closes odoo/odoo#47330 X-original-commit: db1e16bc041e1d892fd1f3ac5b694e12496a32f9 Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2020-03-09[FIX] web: x2many: use correct viewTypeAaron Bohy
This commit fixes two issues that occurred in the following situation: in a form view, have a one2many field F1 displayed as a list, that contains another one2many field F2, displayed with widget many2many_tags (in the list), and with a list in the form (in the dialog). In the dialog, the list of F2 displays a field, say 'name', which has an onchange that sets 'display_name'. Moreover, there is an onchange in the (main) form view, that populates F1 and F2, for instance, it returns something like: { F1: [[5], [0, 0, { F2: [[5], [0, 0, { display_name: 'xxx', name: 'xxx', }]] }]] } 1) If the user opens a related record in F1, and adds (in the dialog) a related record in F2, then validates the dialog, the newly created record in F2 isn't correctly displayed in the many2many_tags (the display_name is `false`), i.e. the onchange hasn't been applied. 2) If field 'name' in F2 in the list is required, the new record can't be saved, even if the user enters a correct value. In both cases, the reason is that we use the incorrect viewType in datapoints: as we don't specify that we specifically want 'list', the 'default' one is taken, and we thus use the fieldsInfo of the many2many_tags, which only knows field 'display_name'. As a consequence, onchanges aren't correctly applied (issue 1), and fields aren't correctly reset (issue 2). Issue reported on task 2189529
2020-03-04[IMP] web: trim many2one search termsMohammed Shekha
This commit trims leading and trailing spaces in search terms of many2one. task-2187414 closes odoo/odoo#45282 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-02-12[FIX] web: Avoid open too fast zoomjbm-odoo
Picture of employees are maximazed directly which is annoying when you move the mouse in kanban view. Add the ability to put a waiting time before opening the zoom in option of the field in the view (default value is 0). closes odoo/odoo#45229 Taskid: 2191289 X-original-commit: a264b17d8fe18464df439d896ecb7dea106caa5a Signed-off-by: jbm-odoo <jbm-odoo@users.noreply.github.com>
2020-02-06[IMP] web: show % symbol outside the input in percentage widgetMichael Mattiello (mcm)
Before this commit the % symbol was part of the input. We could write a value with the % symbol to divide the value by 100 (50% = 0.5, 50 = 50) This commit removes the % symbol from the input and adds it in a span after the input so we do not need to write the % symbol anymore. The value from the input will be saved as $value / 100 in database. task-2065078 closes odoo/odoo#43995 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-02-06[IMP] web: many2many list editable as m2m_tagsLucas Perais (lpe)
Before this commit, there was a discrepancy between many2many_tags widget and regular many2many list That is, in tag mode, when someone had read access alone on the comodel he could modify the members of the m2m relation on the current model Which couldn't be done in m2m list After this commit, it is possible in a m2m list to add records to a relation, even if we don't have CRUD access on the comodel Task 44074 closes odoo/odoo#40194 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-02-04[IMP] web: allow background-style images for custom modelsDamien Bouvy
The `FieldBinaryImage` assumes that the image mixin is used to manage its fields - this is mostly true, until you use custom fields. This commit makes using the 'background' option of the Image widget possible by fallbacking the thumbnail field's name to the name of the field itself instead of `image_128` when we're dealing with a custom field.
2020-02-03[ADD] web: add owl AbstractFieldMichael Mattiello (mcm)
This commit adds the new AbstractField class written in owl, meant to be extended by specific Field owl implementations. Note that its API is not complete yet, but it is enough for basic usecases. This commit also adapts the BasicRenderer to instantiate the future new fields that will be written in owl. closes odoo/odoo#43759 Related: odoo/enterprise#7872 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>