summaryrefslogtreecommitdiff
path: root/doc/reference/views.rst
AgeCommit message (Collapse)Author
2020-09-16[IMP] doc: Add example for `inherit_id` + `mode`Raf Geens
Added an example because it's non-trivial to realize why you would want to set `mode` to `primary` together with `inherit_id`. Another way to look at it is that the view matching doesn't understand delegation inheritance. If it did there would be no need to override `mode` because it would be able to see that the parent and derived views refer to related models. But since that feature might not be worth the effort, it's ok for me to just document the current situation.
2020-09-16[IMP] doc: Mention inherit_id needs a ref attributeRaf Geens
Also added an example.
2020-09-08[FIX] doc: wrong list indentationNicolas Martinelli
closes odoo/odoo#57225 Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-08-18[IMP] web: manage invisible fields in graph and pivot viewJérémy Hennecart
PURPOSE Be able to remove some measures from graph / pivot views. Currently fields are automatically added but some of them make no sense. SPECIFICATIONS Add the possibility to not display some fields in the measures dropdown for the graph and pivot views. When a field is not displayed in the measures of a pivot views we remove them also from the list of groupable fields. LINKS Task ID-2288381 Community PR #54774 Enterprise PR odoo/enterprise#11970 Upgrade PR odoo/upgrade#1519
2020-08-17[IMP] doc: add limit parameter to map viewMichael Mattiello (mcm)
This commit adds some doc for the new `limit` parameter of map view. Task id: 2150548 closes odoo/odoo#55856 Related: odoo/enterprise#10882 Signed-off-by: Vincent Schippefilt (vsc) <vsc@odoo.com>
2020-08-12[IMP] doc: update doc on view attribute 'sample'Mathieu Duckerts-Antoine
The attribute 'sample' is now also available for the reporting views (the cohort, dashboard, graph, and pivot views). Here, we simply extend the existing doc on the attribute. Task ID: 2282196
2020-08-11[FIX] web: Filter with domain disables category countersJulien Mougenot
Before this commit, the search panel was subject to some inconsistencies when dealing with a category having enabled counters and with a filter defining a "domain" attribute. Indeed, the counters could be in an incorrect state if the right filters/categories were not loaded first, with no simple way in doing so. The search panel being complex enough as it is, we decided to disable all categories' counters in the presence of a filter having a "domain" attribute regardless of said domain. closes odoo/odoo#55734 X-original-commit: e78f777bd8ccb314b85451cbc8d1dd9109997d7a Related: odoo/enterprise#12341 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-08-11[IMP] base,web: add scales param to calendarMichael Mattiello (mcm)
This commit adds the parameter `scales` in the calendar view's template. This parameter can be used to choose which mode(s) is/are allowed. This commit also refactors the way we manage calendar scales. Before scales were defined in model and renderer, now it's defined in the view and given to model, controller and renderer by params. Task: 2193921
2020-08-11[IMP] base,web: add year scale to calendarMichael Mattiello (mcm)
This commit adds a new year scale to the calendar view. It comes with a new view in the calendar, this view displays a 4x3 grid which cells are month views. Task: 2193921
2020-08-04[DOC] doc: Document "today" and "now" in contextJulien Mougenot
Documentation of the affected blocks have been updated to inform about the contents of the "today" and "now" context values. closes odoo/odoo#54438 Related: odoo/enterprise#11831 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-07-27[FIX] doc/views: header should be outside of sheet tag.Victor Feyens
Forward-Port-Of: #54984 Original commit: d5e807e47edc641c8d9d97fe59d8d9eba40bd5af closes odoo/odoo#55015 X-original-commit: e2c358adc7de11de28f18dbe36963ba71f95dd19 Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-07-27[FIX] doc/views: templates attribute isn't supported in calendar views.Victor Feyens
Since https://github.com/odoo/odoo/commit/369c20a99bd25172f72f4efde870172a4729aadc: event cards cannot be customized anymore, only the popover is adapted depending on <field> attributes inside the calendar tag. Forward-Port-Of: #54984 original commit: 920599a46e1221c03a20e005a7ad5c61fa9107a0 X-original-commit: ef18d482a58bbff24ce1217619df603ec4670002
2020-07-27[IMP] web: Drop widget support in search viewJulien Mougenot
Until now the "widget" attribute used in the search view was meant to force the type of a field regardless of its definition. This system was implemented quite a long time ago and is now useful in only one case: searching for "reference" fields (we want them considered as char fields else it is impossible to search on them). This is why this commit completely removes the "widget" attribute support in search views while consistently casting the "reference" fields as "char" fields in the search bar. Task 2061795
2020-07-20[FIX] doc: rST definition lists must be preceded by an empty lineXavier Morel
Otherwise the reStructuredText parser thinks the first definition title is part of the preceding paragraph, and the definition item is interpreted as a quote due to the indentation. closes odoo/odoo#54709 Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2020-07-02[IMP] web: form: labels of several occurrences of a fieldAaron Bohy
Before this commit, when the same field occurred multiple times in a form view, all occurrences were associated with the same id, and all occurrences of the corresponding label (if any) had the same 'for' attribute. As a consequence, besides the fact that there were warnings in the chrome console, clicking on any occurrence of the duplicated label focuses the first occurrence of the field. This commit generates a unique id for each pair label/field, when possible. However, there is a case that can't be handled automatically: when the label isn't automatically generated (field located outside a group, or with nolabel attribute set to "1"). Typically, in this case, there is a <label> node with "for" attribute referencing the associated field. In this situation, the id must be defined in the arch, and used in the "for" attribute: <form> <label for="phone"/><field name="phone"/> <label for="phone_2"/><field name="phone" id="phone_2"/> </form> Task 2261697
2020-06-22[IMP] web: add support of "sample" attribute in viewsJérémy Hennecart
With this commit, it is now possible to display sample (fake) data in empty views, in the hope of easing user onboarding. This can be enabled (in list and kanban views) with attribute sample="1" on the arch root element. In this case, if there is no data to display, sample data will be generated based on heuristics (depending on field types and names). This can be used in addition to the no content helper. Task 2232801 X-original-commit: 7c8e627ff5029cb539d702705e5ce53d658c76ed Co-authored-by: Aaron Bohy <aab@odoo.com> Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com> Co-authored-by: Jérémy Hennecart <jeh@odoo.com> Co-authored-by: Julien Mougenot <jum@odoo.com>
2020-06-12[IMP] *: limit in search panelMathieu Duckerts-Antoine
This commit introduces a new attribute 'limit' for search panel fields that allows to avoid performance issues. That integer attribute (with default 200) allows to fix a maximal number of values to display for the fields. When the number of field values to display reaches the limit, no values will be displayed. Instead, a warning message will be shown in the corresponding search panel section. Note it is possible to have no limit using limit="0" on a field. This commit reintroduces in a better way the principle brought by the fix 8d57153b34c04952a85f6642951cb2697016da84. Task ID: 2154749
2020-06-12[IMP] *: expand and hierarchize in search panelMathieu Duckerts-Antoine
The commit introduces two new attributes for search panel fields: - hierarchize: boolean attribute (default True) available for many2one fields with select="one". It allows to choose whether to hierarchize the field values using the _parent_name (if set) on the field comodel. Note that a sanitization of the parent hierarchy takes place. Basically, it ensures that parent chains are completely in the domain (on comodel) accessible by the user. See _search_panel_sanitized_parent_hierarchy documentation for more information. - expand: boolean attribute (default False) available for many2one and many2many fields. If set to true, all field values are fetched and displayed in the search panel. If set to false, only the values that have at least one corresponding value in the field model (and in some domain) are fetched. An exception in the case of an hierarchized field (hierarchize=True and _parent_name set): more/less values can be displayed in order to have a good representation of the parent hierarchy. That means we complete and sanitize the set of initial field image values. Note that the fix 8d57153b34c04952a85f6642951cb2697016da84 bringing the notion of limit in search panel has been reverted in the present commit. An upcomming commit will reintroduce the limit principle in a better way. Task ID: 2154749 Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com> Co-authored-by: Julien Mougenot <jum@odoo.com>
2020-06-12[IMP] *: enable_counters with false as defaultJulien Mougenot
In the search panel, the attribute disable_counters with default False has been changed to enable_counters with default False.
2020-06-04[IMP] web: add nolabel to list viewMichael Mattiello (mcm)
This commit adds the support of nolabel attribute on fields in list view. This attribute can be used to empty the column header. Example of use: <record id="module_example_tree_view" model="ir.ui.view"> <field name="name">module.example.tree.opportunity</field> <field name="model">module.example</field> <field name="arch" type="xml"> <tree> <field name="name"/> <field name="tag_ids" widget="many2many_tags" nolabel="1"/> </tree> </field> </record> Result: This will create a tree view with 2 columns. The second column will have an empty header and won't be sortable. Name | --------+-------------- Record1 | [tag1] Record2 | [tag1][tag2] Record3 | [tag2] closes odoo/odoo#52302 Task: 2269315 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-05-19[IMP] web: graph: add bar/line chart sortingPriyanka Kakadiya
PURPOSE Currently, reporting views such as the bar and line charts have their x-axis sorted either alphabetically or according to a sequence. When reporting, the user would be interested in sorting the x-axis values by their measure. SPECIFICATIONS Add 'ascending' and 'descending' options in graph view for bar and line charts Task 2070103 closes odoo/odoo#49970 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com> Co-authored-by: Mohammed Shekha <msh@odoo.com>
2020-05-07[FIX] doc: confirm attribute isn't supported in list buttonsVictor Feyens
Closes #37036 Forward-port of #50831 closes odoo/odoo#50872 X-original-commit: 27f67bfcb9033ceffc1f781bc3785113c82d4c9c Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-05-05[IMP] web: search panel counter changesMathieu Duckerts-Antoine
This commit introduces several changes in the search panel with respect to record counts: - the record counts are now also available for the fields with select="one" attribute (if not disabled explicitely). - the record counts are better computed using the idea that selected values within a group should not impact the counts for the group values but only the counts for the other group values. On the way we have changed two keys in the values returned by the server: - 'count' becomes '__count'. It has been done to avoid a possible clash in case a model would have a field named 'count' and that the field values would be wanted for some reason. - 'name' (multi case) becomes 'display_name'. It has been done in order to make the select one and multi cases more similar and factorize some code. TASK-ID: 2166814 Co-authored-by: Raphaël Collet <rco@openerp.com> Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com> Co-authored-by: Alexis Lacroix <laa@odoo.com> Co-authored-by: Julien Mougenot <jum@odoo.com>
2020-05-05[IMP] web: list: allow to add decorations on field nodesAaron Bohy
In list views, one can specify decoration-XXX attributes on the arch root node. Those decorations are evaluated for each record, and the corresponding style is applied on rows for which the condition is true. This commit allows to specify those decoration-XXX attributes on field nodes as well. In this case, when the condition is met by a record, only the field on which the attribute is set will be impacted. Part of task 2195254
2020-03-31[IMP] web: graph: drill down to records in bar/pie chartsDhruv Patel
After this commit, in the graph view, when the user clicks on parts of the bar and pie charts, it opens the list view of the concerned records (like what was already done in the pivot view). This is the default behavior, but it can be deactivated by setting the attribute 'disable_linking' to true in the view. Task 2198461 closes odoo/odoo#47796 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com> Co-authored-by: Aaron Bohy <aab@odoo.com>
2020-03-31[IMP] various: Replace incorrect use of "edition"Tiffany Chang (tic)
"Edition" is a French-English false friend word. "Edition" in English means "version" whereas "edition" in French means "editing". This commit updates user facing strings/documents that incorrectly use "edition" instead of "edit" or "editing". Attempts were made to clean up English around "edition" usage so please excuse any errors from lack of context knowledge. Code comments and names incorrectly using "edition" were NOT updated.
2020-02-25[ADD] doc: gantt view cell_create attribute.Siddarth Gajjar
closes odoo/odoo#46205 Related: odoo/enterprise#6327 Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2020-02-05[REF] doc: views documentation reworkVictor Feyens
closes odoo/odoo#44530 Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com> Co-authored-by: Antoine Vandevenne (anv) <anv@odoo.com>
2020-01-29[REF] web: gantt documentation: delete attributeSimon Lejeune
Enteprrise pr 6836 will allow disabling the delete button on gantt views. Document it is possible. task-2088954 closes odoo/odoo#40716 Related: odoo/enterprise#6836 Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-01-29[REF] web: calendar: allow disabling the delete buttonAnkita Raval
In this commit, we add a new attribute "Delete" for user conveniency if he don't want 'Delete' button on popover card they easily achive by "delete=false" attribute and also add a testcase for it. task-id:2088954
2020-01-27[IMP] calendar: Improve color and filtersjbm-odoo
Now in a calendar view, if we use the color, attribute, it will use the same color as Gantt views and the color picker widget. The attribute color isn't more set as default in filter because it make, in most situation, no sense to filter by color. Now, we can add new filters in the right panel. To do that, we must add the attribute "filter='1'" in the corresponding field line. And if the filter has no direct link with the color of the model, we can specify an attribute 'color' for this filter line block. (for example color='color', and the color of the related model will be used) TaskID: 2153249
2020-01-21[IMP] web_gantt: add documentationDebauche Stéphane
Add documentation about the new gantt parameter, `dynamic_range`, The parameters were added in enterprise (odoo/enterprise#7640). Task #2168740 closes odoo/odoo#43052 Related: odoo/enterprise#7640 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-01-09[FIX] doc: clarity issue for gantt view precision fieldjerome hanke (jhk)
self-explanatory opw-2161939 closes odoo/odoo#43059 X-original-commit: 05a198bc59e7c51bbdf566d5ed99d57cf6542c20 Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-01-08[FIX] doc: correct erroneous installation instructionsAntoine Vandevenne (anv)
This commit corrects erroneous instructions in the documentation page for the installation of Odoo. Additionally, the following changes are made: - Add new instructions where the steps were not clear or complete enough. - Replace some installation flows for an easier onboarding. - Rework some parts of the page structure and display. - Add a "running odoo" section for Mac OS. - Fix display error in views.rst task-2072822 closes odoo/odoo#42900 X-original-commit: 82471da5d63f07796c6df1639aa30cc4894d5891 Signed-off-by: Antoine Vandevenne (anv) <AntoineVDV@users.noreply.github.com>
2020-01-03[IMP] doc: add missing kanban attributesTiffany Chang (tic)
Adding missing attribute values of 'create', 'edit', 'delete' to kanban view documentation. closes odoo/odoo#42456 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-01-03[IMP] web: add 'create' attribute to calendar viewTiffany Chang (tic)
Previously it was always possible to create within the calendar view. For some modules this did not make sense and lead to confusing behavior, for example: a new model instance created in the calendar view that was not viewable in the calendar view, but was viewable in other views. By adding a 'create' attribute (to be used in view xml), we allow users to choose whether or not they want a calendar view to be able to create. Note that this change does not affect the edit ability of calendar views for existing instances. Part of Task: 2126530
2019-12-10[IMP] doc: remove deprecated class oe_no_buttonObay Abdelgadir
Related to issue: #41517 The class has no effect but was still referenced in the documenation closes odoo/odoo#41629 X-original-commit: 063098bdf3414ffa1db12d3bfc5999506c109329 Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-12-03[IMP] doc: form view documentation improvementshreya thakrar
Using studio odoo doesn't let user drop notebook in a group since it generates issues with the notebook. (See https://github.com/odoo/enterprise/commit/ea5ccd548bb6781e5ccdf76cf11255c6fd6aa3cb ) For better understanding, a note for 'notebook' tag is added by this commit. task - 2060330 closes odoo/odoo#41264 X-original-commit: a2d331af0df859fd29e84bfa30a9086c3d2e0fa8 Related: odoo/enterprise#7009 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-10-25[IMP] doc: controllers organisation + minor correctionVictor Feyens
X-original-commit: c58751f21b49173cb51afd9ff2f01077f7610fb5
2019-10-25[IMP] doc: views column_invisible infoVictor Feyens
X-original-commit: 82a90aa23c3d64b2d2e0cfa9d545b34fb33ec337
2019-10-25[REM] doc: views business guidelinesVictor Feyens
Old outdated Odoo screenshots, and UI guidelines have no worth in the doc... X-original-commit: c260f4af275d2b5b745f97274a7571bd1211eb0e
2019-10-10[IMP] doc: update documentation of map viewJigar Patel
For simplicity marker popup fields are declared as a direct child of the root element. consistency in the name of marker popup fields added new 'hide_name' and 'hide_address' option in the calendar view task-2009017 closes odoo/odoo#37433 Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-10-09[MERGE] forward port branch 13.0 up to f4105eb9c70Christophe Simonis
2019-09-30[FIX] web: multi-hell-ditable listVincent Schippefilt
only activate multi-edit on list with specific attribute. When the attribute multi_edit="1" is set on the tree view the user can select a/some records and it will activate the multi-edit with confirmation dialog (even for a single record). Also, on-change are not applied when using multi-edit closes odoo/odoo#37525 Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-09-20[IMP] web: add capability to disable records drag/drop on kanban viewsAurélien Warnon
This commit adds a recordsDraggable option on the kanban view that allows to completly disable the drag and drop feature. This is a preliminary work for the social 'Feeds' kanban where the user should not be able to drag and drop posts.
2019-09-20[MERGE] web: Re-implement the XLS grouped exportOdoo's Mergebot
Purpose ======= The commit 2849b5c introduces a new export mechanism of grouped list views to xls files. The issue with this development is mainly that the displayed records are exported, instead of all the records that match the search parameters. To export all the records we cannot rely on the data from the web client. This implies to revert 2849b5c, and implement it in a better way. Functional Spec =============== Add the support of grouped exports. Allow the user to export all records in one click from the listview, without having to go through the export modal, taking into account the domain, groupbys, and visible fields. Technical Spec ============== When exporting (whether it is from the modal or from the shortcut), any groupby(s) set on the listview should be taken into account (all unfolded) - UNLESS the export is import-compatible - each subgroup header has an indentation compared to its parent - the 'group headers' in the exported file should contain the same info (label, field aggregates) as it has in the listview. New secondary button on the tree view with label 'EXPORT' (to be confirmed...) - the export shortcut disregard the selected records, it exports all records according to the domain. - the button is visible even if there is no selected records. - essentially the export shortcut does the same thing as the following: - select all records - hit 'action' then 'export' - hit 'export' Define a boolean attribute on <tree> to specify whether or not the export shortcut should be displayed Task 2072910 closes odoo/odoo#37087 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-09-20[IMP] web: Export grouped list view in xls fileLucas Lefèvre
PURPOSE ======= Add the support of grouped exports. Allow the user to export all records in one click from the listview, without having to go through the export modal, taking into account the domain, groupbys, and visible fields. SPECIFICATION ============= When exporting (whether it is from the modal or from the shortcut), any groupby(s) set on the listview should be taken into account (all unfolded) - UNLESS the export is import-compatible - each subgroup header has an indentation compared to its parent - the 'group headers' in the exported file should contain the same info (label, field aggregates) as it has in the listview. New secondary button on the tree view with label 'EXPORT' (to be confirmed...) - the export shortcut disregard the selected records, it exports all records according to the domain. - the button is visible even if there is no selected records. - essentially the export shortcut does the same thing as the following: - select all records - hit 'action' then 'export' - hit 'export' Define a boolean attribute on <tree> to specify whether or not the export shortcut should be displayed Task 2072910
2019-09-19[IMP] *: remove image_64 and clean viewsSébastien Theys
There are too many image sizes. Since they are stored resized this takes time to generate when saving a new image, it's more rows on the attachment table, more files on the disk, ... 64px is close enough to 128px that it can be removed without a big impact on download size. It will even reduce download and number of requests when both images are displayed because now only one has to be downloaded and then benefit from cache. The difference between the two is typically around 1.5kB which is negligible these days, especially when the request overhead is around 0.5kB already, not even taking into account other factors such as latency. If a 64px image must absolutely be returned, it is still possible to pass the size parameters to the image route. But the current guideline is to handle resizing in the views when necessary. Views ===== - remove width and height attributes when existing CSS rules are overriding them (eg. `.oe_kanban_avatar` in the right context) - add CSS rules instead of width and height attributes when possible - use `object-fit: cover;` where width and height are forced to avoid distortion of non-square images - for products, use `object-fit: contain;` instead, keep ratio but without crop - add new CSS rules where the expected size was max 64px*64px before due to the image size itself - remove `img-fluid` where using size classes to avoid conflicting rules task-2060865 closes odoo/odoo#36147 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2019-09-20[MERGE] forward port branch saas-12.5 up to 58a83d12228Christophe Simonis
2019-09-13[MERGE] forward port branch saas-12.5 up to 197474e5b9aChristophe Simonis