Visualizações
Visualizações são a interface que permite a exibição dos dados contidos em um modelo <models_modules_apps>". Um modelo pode ter várias visualizações, que são simplesmente maneiras diferentes de mostrar os mesmos dados. No Estúdio, as visualizações são organizadas em quatro categorias: :ref:`geral, múltiplos registros <studio/views/multiple-records>, linha do tempo <studio/views/timeline> e relatórios <studio/views/reporting>.
Visualizações gerais
Formulário
A visualização de Formulário fa-address-card é usada para criar e editar registros, como contatos, pedidos de vendas, produtos etc.
To structure a form, drag and drop the Tabs and Columns element found under the + Add tab.
To prevent users from creating, editing, deleting or duplicating records, untick Can Create, Can Edit, Can Delete or Can Duplicate.
To add a button, click Add a button at the top of the form, enter a Label, and select the button's action:
Run a Server Action: select the server action <reference/actions/server> to be executed from the dropdown list;
Call a method: specify an existing Python method already defined in Odoo.
To change a button's label or style, click the button and edit its Label or Class (either btn-primary for a primary button or btn-secondary for a secondary button) in the Properties tab.
To add a smart button, click the fa-plus-square (plus) icon in the top-right corner of the form. Enter a Label, choose an Icon, and select a related field <studio/fields/relational-fields-related-field>.
Atividade
A visualização Atividades fa-clock-o é usada para agendar e ter uma visão geral das atividades (e-mails, chamadas etc.) vinculadas aos registros.
Buscar
A visualização Pesquisar oi-search é adicionada a outras visualizações para filtrar, agrupar e pesquisar registros.
To add custom Filters and structure them using Separators, go to the + Add tab and drag and drop them under Filters.
To add an existing field under the search dropdown menu, go to the + Add tab and drag and drop it under Autocompletion Fields.
Múltiplas visões de registros
Kanban
A visualização Kanban oi-view-kanban é frequentemente usada para dar suporte a fluxos de negócios, movendo registros entre estágios ou como uma forma alternativa de exibir registros dentro de cartões.
To prevent users from creating new records, untick Can Create.
To create records directly within the view, in a minimalistic form, enable Quick Create.
To set a default grouping for records, select a field under Default Group By.
Lista
A visualização de Lista oi-view-list é usada para ter uma visão geral de muitos registros de uma só vez, procurar registros e editar registros simples.
To prevent users from creating, editing, deleting or duplicating records, untick Can Create, Can Edit, Can Delete, or Can Duplicate.
To create and edit records directly within the view, select either Add record at the bottom, Add record on top or Open form view under When Creating Record.
To edit several records at once, tick Enable Mass Editing.
To change the way records are sorted by default, select a field under Sort By.
To set a default grouping for records, select a field under Default Group By.
To add a button, click Add a button at the top of the list, enter a Label, and select the button's action:
Run a Server Action: select the server action <reference/actions/server> to be executed from the dropdown list;
Call a method: specify an existing Python method already defined in Odoo.
As larguras das colunas em uma visualização Lista oi-view-list são calculadas automaticamente para proporcionar a experiência ideal do usuário. Porém, também é possível definir uma largura de coluna fixa por campo. Para fazer isso, clique na coluna relevante para abrir a aba fa-server Propriedades do campo, depois digite o número desejado de pixels no campo Largura da Coluna (px).
Mapa ---
A visualização de Mapa fa-map-marker é usada para exibir registros em um mapa. Por exemplo, ela é usada no aplicativo Serviço de Campo para planejar um itinerário entre diferentes tarefas.
To select which kind of contact should be used on the map, select it under Contact Field.
To hide the name or the address of the record, tick Hide Name or Hide Address.
To add information from other fields, select them under Additional Fields.
To have a route suggested between the different records, tick Enable Routing and select which field should be used to sort records for the routing.
Visões da linha do tempo
Calendário
A visualização Calendário fa-calendar é usada para visualizar e gerenciar registros dentro de um calendário.
To create records directly within the view instead of opening the Form view <studio/views/general/form>, enable Quick Create.
To color records on the calendar, select a field under Color. All the records sharing the same value for that field are displayed using the same color.
To display events lasting the whole day at the top of the calendar, select a Checkbox field <studio/fields/simple-fields-checkbox> that specifies if the event lasts the whole day.
To choose the default time scale used to display events, select Day, Week, Month, or Year under Default Display Mode.
Coorte
A visualização Coorte oi-view-cohort é usada para examinar o ciclo de vida dos registros durante um período de tempo. Por exemplo, ela é usada no aplicativo Assinaturas para visualizar a taxa de retenção das assinaturas.
To display a measure (i.e., the aggregated value of a given field) by default on the view, select a Measure Field.
To choose which time interval is used by default to group results, select Day, Week, Month, or Year under Interval.
To change the cohort Mode, select either Retention the percentage of records staying over a period of time, it starts at 100% and decreases with time or Churn the percentage of records moving out over a period of time - it starts at 0% and increases with time.
To change the way the Timeline (i.e., the columns) progresses, select either Forward (from 0 to +15) or Backward (from -15 to 0). For most purposes, the Forward timeline is used.
Gantt
A visualização Gantt fa-tasks é usada para prever e examinar o progresso geral dos registros. Os registros são representados por uma barra em uma escala de tempo.
To prevent users from creating or editing records, untick Can Create or Can Edit.
To fill cells in gray whenever a record should not be created there (e.g., on weekends for employees), tick Display Unavailability.
To show a total row at the bottom, tick Display Total row.
To collapse multiple records in a single row, tick Collapse First Level.
To choose which way records are grouped by default on rows (e.g., per employee or project), select a field under Default Group by.
To define a default time scale to view records, select Day, Week, Month, or Year under Default Scale.
To color records on the view, select a field under Color. All the records sharing the same value for that field are displayed using the same color.
To specify with which degree of precision each time scale should be divided by, select Quarter Hour, Half Hour, or Hour under Day Precision, Half Day or Day under Week Precision, and Month Precision.
Visualizações de relatórios
Pivô
A visualização Pivô oi-view-pivot é usada para explorar e analisar os dados contidos nos registros de forma interativa. Ela é especialmente útil para agregar dados numéricos, criar categorias e detalhar os dados expandindo e recolhendo diferentes níveis de dados.
To access all records whose data is aggregated under a cell, tick Access records from cell.
To divide the data into different categories, select field(s) under Column grouping, Row grouping - First level, or Row grouping - Second level.
To add different types of data to be measured using the view, select a field under Measures.
To display a count of records that made up the aggregated data in a cell, tick Display count.
Gráfico
A visualização de Gráfico fa-area-chart é usada para exibir dados de registros em um gráfico de barras, linhas ou pizza.
To change the default chart, select Bar, Line, or Pie under Type.
To choose a default data dimension (category), select a field under First dimension and, if needed, another under Second dimension.
To select a default type of data to be measured using the view, select a field under Measure.
For Bar and Line charts only: To sort the different data categories by their value, select Ascending (from lowest to highest value) or Descending (from highest to lowest) under Sorting.
For Bar and Pie charts only: To access all records whose data is aggregated under a data category on the chart, tick Access records from graph.
For Bar charts only: When using two data dimensions (categories), display the two columns on top of each other by default by ticking Stacked graph.