summaryrefslogtreecommitdiff
path: root/doc/reference/views.rst
AgeCommit message (Collapse)Author
2019-04-02[IMP] web: editable list: table-layout: fixedAaron Bohy
This rev. changes the layout of *editable* list views to a fixed layout. This means that we are now responsible of the width of each column. To do that, we associate with each field type a factor, and the higher the factor is, the larger the column will be (w.r.t. the others). This default value can be overriden in the arch. The fixed layout allows to remove the absolute positionning of widgets inside editable lists (done in the next commit). Part of task 1915702 Co-authored-by: Martin Geubelle <mge@odoo.com>
2019-04-02[IMP] web,base: put buttons in list group headersMartin Geubelle
It is now possible to put buttons in the list view group headers. When the view is grouped by a many2one field, those buttons appear next to the header title when the group is opened. The buttons are specified in the views in a <groupby> tag in the list arch, with the following structure: <groupby name="groupedField"> <!-- must be a many2one --> <button type="object" name="my_method" string="Button1"/> </groupby> It is also possible to add `field`, inside the `groupby` which can be used for modifiers. These fields thus belong on the many2one comodel, like: <groupby name="partner_id"> <field name="name"/> <!-- name of partner_id --> <button type="object" name="my_method" string="Button1" attrs="{'invisible': [('name', '=', 'Georges')]}"/> </groupby> These extra fields are fetched in batch when grouping on the field. Part of task 1915702
2019-04-02[IMP] web,board: enable pagination in grouped listsAaron Bohy
With this rev., when there are a lot of groups in a grouped list view, groups are displayed under several pages, whereas they were all displayed in the same page before. This is especially interesting with the new 'expand' attribute, to ensure that we don't read records for a large number of groups. By default, the groups limit is set to 80 (like records), and to 10 is the 'expand' attribute is set to true. This limit can be overriden with the 'groups_limit' attribute. Part of task 1915702
2019-04-02[IMP] web: list: add expand attrsAaron Bohy
When this attribute is set to true on the <tree> root node, in a grouped list view, first level groups are automatically opened. Part of task 1915702
2019-04-02[IMP] web: list: import attrsAaron Bohy
The 'import' attrs is valid according to the rng definition of the list view. It is used in a few views in Odoo. However, it didn't actually work (in most cases, it worked by chance because it is set to "0" in addition to create="0", and create="0" already disables the import feature). With this ref, the 'import' attrs is taken into account and we can now disable the import feature even if the create one is enabled. Moreover, it is now documented.
2019-04-02[REF] base,account: list: remove deprecated attrsAaron Bohy
The 'toolbar' attribute is not referenced in the documentation, and it has no effect since at least v10. The 'on_write' attribute was referenced in the documentation, but is no longer used in Odoo and has no effect since at least v11. The 'colors' and 'fonts' attributes are deprecated since v9, and have no effect since v10. The 'string' attribute is deprecated since v8 and has no effect since v9. However, it is widely used in Odoo, so we must remove all occurrences before removing it from the rng.
2019-03-27[IMP] web: allow multiple fields in form viewsSarah Van Bogaert
This feature was already working in the actual version of Odoo but it is now tested. The following features are supported: - When the value of one widget is modified, the other ones change accordingly - The modifiers 'invisible' and 'readonly' are applied correctly if they differ between widgets. However, the modifiers 'required' must be equal for the several fields, otherwise the behavior is not guaranteed. closes odoo/odoo#32158 Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2019-02-19[IMP] base,doc: add scales attribute to gantt viewDavid Monjoie
closes odoo/odoo#31210
2019-02-19[IMP] base,doc: add offset attributeDavid Monjoie
Depending on the scale, the number of units to add to today to compute the default period. Examples: An offset of +1 in default_scale week will open the gantt view for next week, and an offset of -2 in default_scale month will open the gantt view of 2 months ago.
2019-02-18[IMP] base,doc: re-add consolidation feature to gantt viewDavid Monjoie
closes odoo/odoo#31159
2019-02-14[IMP] base, doc: adapt according to the new gantt viewMartin Geubelle
The view has been rewritten from scratch so the doc and the RNG validation needed to be adapted. Co-authored-by: dmo-odoo <dmo@odoo.com> Co-authored-by: aab-odoo <aab@odoo.com> Co-authored-by: jat-odoo <jat@odoo.com> See odoo/enterprise#3437 Task 1856235
2019-02-13[IMP] web: add kanban searchPanelAaron Bohy
This rev. defines a searchPanel widget used in Kanban views to refine search according to specific dimensions. This wigdet is displayed as a sidebar to the left of the kanban view. Part of task 1892462 Co-authored-by: Aaron Bohy <aab@odoo.com> Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com> Co-authored-by: Raphael Collet <rco@odoo.com>
2019-02-06[IMP] web: expose context in kanban templatesAaron Bohy
This rev. allows to use variable 'context' in kanban view templates. Part of task 34045 PR: #30881
2019-01-29[ADD] web: server-side-rendered qweb templates as viewsXavier Morel
2019-01-18[FIX] web, *: restore `context` key on search view fieldMartin Geubelle
Since the control panel refactoring, the `context` key on a `<field>` in the search view was ignored (like <field name='pricelist' context="{'pricelist': self}". The previous behaviour has been reintroduced and modified a little bit. For way too long, an ugly hack was used to get a numerical value in self. This ugly hack was still present but wasn't working since 8.0 (at least for the numerical value). A counter hack (see odoo/odoo@4a81e8a) was then applied to avoid really using a `selection` widget. To get even more confused, `self` was replaced by the *last* user-specified value. Well, it's time to clean this mess. Now, the `self` key is replaced by an array of user-specified values (by value, we mean the field value i.e. the `id` for a many2one, or the `key` for a selection field). Task 1902826 closes odoo/odoo#30368
2018-12-03[FIX] web: add support for string and invisible attributes in pivot viewlen-odoo
The pivot view may sum fields that are not really summable: unsigned values (e.g. in the case of refunds) values in different UOM, currencies (any different units really) Which causes confusion when these fields are displayed. We add support for the string and invisible attributes in the pivot view, so that a field can be given a more informative name or hidden altogether. opw 1909046 closes odoo/odoo#29144
2018-10-22[MERGE] forward port branch saas-11.4 up to 3c108977c1eChristophe Simonis
2018-10-19[MERGE] forward port branch saas-11.3 up to d82a9077289Christophe Simonis
2018-10-19[FIX] web: kanban quick create when grouped by selectionAaron Bohy
Rev. 42e1efded5 aimed to disable the quick create feature when grouped by date(time) fields, by only enabling it for char, boolean and many2one fields. However, the selection case is quite important and must be handled as well. This is what this rev. does. Task 1878254
2018-10-19[MERGE] forward port branch 11.0 up to 22a13073f0eChristophe Simonis
2018-10-19[FIX] web: kanban quick create properly disabledAaron Bohy
when grouped on field types for which it isn't supported. Rev. 42e1efd disabled the quick create feature when the view is grouped by date(time) fields. However, it hasn't been correctly forwardported to 11.0 (with the new views). Indeed, the check was done only once, at the initilization of the view. So if the user selected another field to group by afterwards, the quick create feature wasn't enabled/disabled accordingly. Moreover, we didn't check if it was available when the user clicked on CREATE in the control panel. So even if it wasn't (and thus if there were no '+' icon in the columns), when the user clicked on CREATE, the quick create widget was inserted in the first column. This rev. fixes both issues. Task 1878254 closes odoo/odoo#27867
2018-10-17[REF] doc: update search view documentationMathieu Duckerts-Antoine
closes odoo/odoo#27893
2018-09-26[DOC] document value_label attributesvs-odoo
Document 'value_label' attritube of dashboard aggregate and formula.
2018-09-25[IMP] web: limit number of open columns in kanban viewsvs-odoo
With this commit, we limit the kanban view to 10 open groups at the start. This is useful to prevent the web client to make too many requests at once. This limit is set in the constant 'OPEN_GROUP_LIMIT'. Note: - columns already set as folded by default aren't take into account. - the user can still open any folded column, as usual. Task #1878113 (1/2)
2018-09-24[FIX] web: graph_renderer: show graph titleAdrien Dieudonne
Since odoo/enterprise@e3b0d2a, the title wasn't set anymore. This logic is now moved in the graph renderer to be able to set a title in every graphs. For now, we only use the title attribute for pie charts embedded in dashboard views. Additional tests has been added in 'web_dashboard' (enterprise).
2018-09-21[IMP] web: add an option to hide archive option in kanban columnsThibault Delavallée
Currently kanban columns propose an Archive / Unarchive option if the records model has an active field. It allows to directly archive or restore all records belonging to that column. It is currently not possible to control whether this option is present or not as it only depends on the active field being defined on the model. In some specific cases we want to be able to hide this option even if the active field exists. For example future commits will hide this option for leads (crm.lead) as business flow goes through marking them as won or lost instead of archiving / restoring them. This commit adds support of a new archivable parameter when defining the kanban view that hides the archive buttons if it is set to False. Default value is true so that current behavior is kept as it is by default. Doc and tests are added. This commit is linked to task ID 1880051 and PR #26977.
2018-09-14[MERGE] forward port branch saas-11.4 up to 6c103589c15Christophe Simonis
2018-09-13[MERGE] forward port branch saas-11.3 up to 1e0a92c9962Christophe Simonis
2018-09-13[MERGE] forward port branch 11.0 up to 5cb9f8e9d5eChristophe Simonis
2018-09-12[FIX] doc: add documentation for widget formatter support in pivot viewlen-odoo
Commit: https://github.com/odoo/odoo/commit/8c1204954ef571e51e94ddf4070043ec2d5de3c6 put back support in v11 for formatter widgets in pivot views. We document this feature. opw 1876445
2018-09-03[FIX] mail: consider `activity` as a valid view typeMartin Geubelle
The recently introduced `activity` view (see rev. odoo/odoo@1de9496 has not received all the consideration it deserves as a real view type (no RNG, not in the valid view `type`, no doc, etc.). It was currently only working based on a `_get_default_activity_view` method. Even if the RNG is currently really basic, its grammar could evolve in the future. This was causing an issue when opening Studio with this view as a default view with an invalid type was created.
2018-08-13[IMP] doc: document `timeline` attribute on cohort viewDharmraj Jhala
Task 1854339 Closes #25576
2018-07-31[DOC] web_cohort: add context keysRomainLibert
2018-07-20[IMP] web: add option to display a banner above a vieweco-odoo
Add a banner_route attribute to AbstractView to allow fetching html from a controller route and displaying it above the view. The initial use case was the onboarding panels. Supported views are the ones inheriting both AbstractView and AbstractController.
2018-07-19[DOC] dashboard: add clickable attribute on aggregatesRomainLibert
Closes: #25710
2018-07-17[IMP] web: add control + create tags to customize "add a line"Sébastien Theys
The default "add a line" button creates a new line with the default values from the model. Sometimes we want to create a new line with different default values (or more generally a customized context), which is possible with this commit. Moreover it is possible to create multiple buttons for multiple default values/contexts. This works both for in-line creation ("editable=") and dialog creation. The new tags are: <control> defines custom controls for the current view. Does not support any attribute, but can have children: <create> adds a button to create a new element on the current list. This makes sense when the parent tree view is inside a One2many field. If any create is defined, it will overwrite the default "add a line" button. For more information and example, have a look at the Views documentation. Technically, the commit will: - parse the new XML tags (+ add appropriate validation) - display the buttons based on the XML - on button click/keyboard: pull up the additional context information from the button event up to the default_get - add unit tests - add documentation PR #25209
2018-07-13[DOC] add measure attribute to aggregateRomainLibert
Closes #25713
2018-07-11[IMP] web: add auto sorting on pivot viewRomainLibert
We add the attribute default_order on the pivot view (already present in graph view), this attribute will sort the pivot view on the given measure. Closes: #25675
2018-07-11[DOC] dashboard: add help attribute and mention count_distinctRomainLibert
Documentation needed some update
2018-07-10[DOC] pivot,graph: add documentation on alphabetical sortRomainLibert
As pivot and graph measures are now automatically alphabetically sorted, we need to update the documentation
2018-07-10[DOC] split graph and pivot documentationRomainLibert
Pivot view documentation was still inside the graph view documentation as it was previously only a mode of this graph view. As the pivot is now an entirely different view, it has the right to have it's own documentation.
2018-07-06[DOC] web: improve documentation of search viewMathieu Duckerts-Antoine
2018-07-04[DOC] web_cohort: documents mode attributeRomainLibert
Closes #25512
2018-06-04[DOC] add documentation for position='move'Martin Geubelle
Feature merged in odoo/odoo@eee245c
2018-05-31[DOC] add documentation for the new cohort viewGéry Debongnie
2018-05-09[MERGE] forward port branch saas-11.2 up to aae54ecc159Christophe Simonis
2018-05-02[MERGE] forward port branch 11.0 up to 521414b1c10Christophe Simonis
2018-05-02[FIX] web: fix form_view_id attribute in calendar view.Géry Debongnie
The way the calendar view selected its form view was broken for two reasons: - any value given in the form_view_id attribute was kept as string, which means that the string value would be sent to the server, and this is not good. - if no value was set, the calendar view then simply did a do_action with the form view id set to false, which means that the default form view is used. This is mostly ok, except when we are in the context of an action with a form view which is not the default one. In that case, we clearly prefer the form view from the action. For example, before this commit, the form view in the timesheet application (community) is not the same as the default form view on account.analytic.line. Note that this commit also adds a small tweak to the mock server to better simulate errors like the web client does (in session.js).
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