This commit does 2 things for the draggable hook builder:
- the scrollable feature will apply on the nearest scrollable parent if
the current element cannot be scrolled (removes the need to pass a
parent ref which is not the target container);
- the dragged element is now strictly bound to the current viewport or
the container ref, whichever is the smallest.
closesodoo/odoo#103137
X-original-commit: 70bdf940cc1491fd0cdbae0240d930e8a1d5b25e
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
Before this commit the attribute default_order was not taken into
consideration by the kanban view.
closesodoo/odoo#103127
X-original-commit: 0116b590a47c8c12354877498e576ad28e42c1f2
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
Before this commit, a list header with no label and associated with a
first orderBy field would be highlighted (i.e. would have the class
table-active). Since this is visually weird, we remove that class from
such a header.
closesodoo/odoo#103108
X-original-commit: 36fb5a0d170d9f5692485d0b2fc374951794cd69
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
This commit adds an implementation of the UserMenu item's type 'switch'
for the BurgerMenu (used in smaller screen).
Note: this commit also adds unit tests for the BurgerUserMenu ; the
asserts are largely inspired by the regular UserMenu tests.
closesodoo/odoo#103102
X-original-commit: 0653ec8672e5878e40c804ea569dfccbd6105edc
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Due to a previous fix, attachments uploaded through media dialog would appear in the attachments of mail marketting.
That fix prevents attachments from 'dangling' and being garbage collected later.
That fix is now limited to the mail composer in this commit as attachments are only garbage collected for that model, for now.
related commit: c112361bf9e2f5e7b087c5e5b9a31879856b1da4
task 3003939
closesodoo/odoo#103038
X-original-commit: 69fdca133b06eb66443635bc52d380233580ef51
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Since o_form_view class was not placed on the right element, as the
form is displayed in a dialog, some styles were not applied in x2Many
dialogs using a form view. Now, the selector matches all cases and
dialogs will be stylized as expected, since the class is placed on the
dialog container instead of the first div.
Now, we are consistent both for dialogs and standard form views.
Tests have been adapted to work as expected.
closesodoo/odoo#102953
X-original-commit: af67305b43d51e1669df19d376d9bda7418ba863
Signed-off-by: Michaël Mattiello <mcm@odoo.com>
Signed-off-by: Luca Vitali <luvi@odoo.com>
This commit adapts several components in order to correctly handle
color-scheme variations.
It also allows user_menu to handle switch entries
task-2710677
Part-of: odoo/odoo#102868
Before this commit, the user was not notified when he
closed the tab or the browser while modifying a record.
Now, the user will be asked to confirm the close if there
is at least one invalid field.
task id: 2994132
closesodoo/odoo#102990
X-original-commit: 3fcc36786453f3006974f5fd0fa395ad5d07d9a2
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Before this commit, in a grouped list view with at least one
group_operator and optional fields, the aggregated values in the header
are shifted one column to the right.
Why is this?
Adding the +1 to the colspan in the group header for optional fields
is always added on the left side (group name).
Solution:
The +1 should be added on the left side (group name) if there is
no aggregated value otherwise on the right side (pager).
Before:
TH TH TH TH TH AGG AGG TH AGG AGG TH TH TH OP
0 1 2 3 4 5 6 7 8 9 10 11 12 13
[ TH 6 ][TH][TH][TH][TH][TH][ TH 3 ]
[ group name ][ aggregate cells ][ pager]
After
TH TH TH TH TH AGG AGG TH AGG AGG TH TH TH OP
0 1 2 3 4 5 6 7 8 9 10 11 12 13
[ TH 5 ][TH][TH][TH][TH][TH][ TH 4 ]
[ group name ][ aggregate cells ][ pager ]
closesodoo/odoo#102754
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Georis François (fge) <fge@odoo.com>
In legacy, an m2x autocomplete would not display extra lines
received from the server inside the dropdown menu.
This commit reintroduce that behavior as it was lost in the
wowl conversion.
closesodoo/odoo#102954
X-original-commit: 1b2686aeadfac97f060a07de86e5a0eb2051eee2
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Purpose
=======
Convert the remaining legacy views in OWL. Before this PR, the list and form views are still in legacy in Project Sharing feature. The goal of this PR is to convert those views to have all views in OWL in Project Sharing.
Details implementation
----------------------
- Convert the list view in OWL
- Convert the chatter portal in OWL to be able to convert the form view in OWL
- Convert the form view in OWL and integrate the chatter into it.
- Review the assets used in Project Sharing to reduce the size of the assets since all components and views existing in the backend are not used (only the list, kanban and form views are used)
- Review the rows attribute set on `textarea` HTML element in`TextField` to be able to altered it with a props.
- Change the `FileInput` component to be able to override it to be able to use it when the route is different than the one set by default.
- Fix the `useInputField` hook to be able to use the `TextField` component without any `record` set on its props (since this prop could be optional).
task-2947516
closesodoo/odoo#102932
Forward-port-of: odoo/odoo#102130
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Signed-off-by: Xavier <xbo@odoo.com>
Before this commit, the rows attribute given on the TextField component
was always 2, it is not possible to alter it without overriding the
component.
This commit adds a props to be able to update the rows with a prop
called `rowCount` and this prop can be set via `rows` attribute set on
the field.
task-2947516
X-original-commit: 110915c80c2a2578563283b1744e0e88d80ac4bb
Before this commit when list view is in multi edit mode and there is a field
with required and readonly modifiers, the field is underlined, which is not
intended as the field is in readonly mode.
task-3000817
closesodoo/odoo#102871
X-original-commit: fa6e2bb566f05e064ff8f4df40f1f01b048ade60
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Rationales:
- having a textual display "Unsaved changes" implied to the user that they
had to save
- having buttons "hiding" behind a hover effect on a span of text was
very unintuitive
- since we don't want an hover anymore, having text buttons would draw a
lot of attentions => use icons + tootltip instead
closes odoo/odoo#102757
Forward-port-of: #102605
Related: odoo/enterprise#32570
Signed-off-by: Bouvy Damien (dbo) <dbo@odoo.com>
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
`activeActions` is a set of boolean values determining what actions
(i.e. 'create', 'delete', etc.) can be performed on the current view or
subview (x2many).
Before this commit, the x2many fields used a different naming convention
than the one set on the views (e.g. 'canCreate' instead of 'create').
This caused mismatches when subviews would try to rely on the parent
view `activeActions` to define their own. This also introduced a bad
design where the "type" of `activeActions` would be determined by that
same mismatch.
Another issue was that the list renderer did not always check for the
existence of activeFields in its props, despite defining them as
optional.
This commit unifies the names of the active actions accross views and
x2many fields, while adding a "type" property to it s.t. its owner
can determine what context it finds itself in.
closesodoo/odoo#102115
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Before this commit, when the day of the month was smaller than 10,
multiple days were highlighted as today on the datepicker.
Now, only the correct day is highlighted.
closesodoo/odoo#102296
X-original-commit: 0545178d5d09f659d5309069ebcae9d7162356a0
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
Only kanban, tree and form implements onchanges.
Therefore, on calendar, graph, pivot, ..., putting `on_change="1"`
is useless and is a waste of resources and KB.
e.g. CRM lead pivot view
Before:
```xml
<pivot string="Pipeline Analysis" sample="1">
<field name="create_date" interval="month" type="row"/>
<field name="stage_id" type="col" on_change="1"/>
<field name="expected_revenue" type="measure"/>
<field name="color" modifiers="{"invisible": true}"/>
<field name="automated_probability" modifiers="{"invisible": true}"/>
<field name="message_bounce" modifiers="{"invisible": true}"/>
<field name="probability" on_change="1" modifiers="{"invisible": true}"/>
</pivot>
```
After:
```xml
<pivot string="Pipeline Analysis" sample="1">
<field name="create_date" interval="month" type="row"/>
<field name="stage_id" type="col"/>
<field name="expected_revenue" type="measure"/>
<field name="color" modifiers="{"invisible": true}"/>
<field name="automated_probability" modifiers="{"invisible": true}"/>
<field name="message_bounce" modifiers="{"invisible": true}"/>
<field name="probability" modifiers="{"invisible": true}"/>
</pivot>
```
I would have like something smarter, like using the `editable` concept
for instance, but it's not that easy.
e.g. kanban is not considered as editable, while it does support
onchanges when grouping record by a field and drag and dropping
record from one column to another.
However, if we change the kanban view to make it editable,
the view validation will start validating the fields domain:
https://github.com/odoo/odoo/blob/45d4ac14f65c53dcde56592715d50169bde116ad/odoo/addons/base/models/ir_ui_view.py#L1439-L1442
causing issues:
- If a field used in the domain is not in the view, it will need to be
added in the view,
- while it will not be used, as you cannot do a search in related fields
in kanban views anyway.
e.g.
```
odoo.tools.convert.ParseError: while parsing /data/build/odoo/addons/analytic/views/analytic_line_views.xml:120
Error while validating view near:
<kanban class="o_kanban_mobile" __validate__="1">
<field name="date"/>
<field name="name"/>
Field 'company_id' used in domain of field 'account_id' ([('company_id', 'in', [company_id, False])]) must be present in view but is missing.
```
In addition, the kanban doesn't need the readonly and required
attributes on the field nodes, as other editable views (tree and forms)
do.
In addition, the tree list is currently considered as "editable" only
when it has `editable="bottom" or `editable="top"`, while
a tree without this editable attribute can still trigger onchange,
for instance when using `widget="handle"` or `widget="boolean_toggle"`.
We should therefore making the tree list editable whatever the case,
leading to the same issues than listed for the kanban above,
or make an exception for field in non-editable tree views using a
widget..
So, as the smarter way seems difficult and risky, for a limited gain
I choose the easy way by separating the concept "editable" and
"onchange-able" and to not set `on_change="1"` on views not considered
as "onchange-able".
closesodoo/odoo#102788
X-original-commit: aeb65ee536b1611c1cb829c91906f327f8e331c7
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
Have a form view in a dialog (action in target=new)
The create/write of that model throws an error.
Before this commit, the "Oh snap!" dialog was displayed, but makes little sense
in a dialog.
After this commit, the old UserError dialog is displayed.
closesodoo/odoo#102764
X-original-commit: d36f1708219f63fae5a86b6c1e81b328ca96b347
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Before this commit, in a list view, if you clicked the discard button
for an invalid row, it would not be discarded and the discard button
would disappear.
Why did this happen?
Invalid fields in the record were not deleted.
How to reproduce?
- Go to a list view with a required char field
- Edit the char field of a record with an empty string
- Click outside the record (it becomes invalid)
- Click on the discard button
Before this commit:
The record is not discarded (its values do not change and it remains
in edit mode) and the discard button disappears
After this commit:
The record is correctly discarded and the discard button disappears
closesodoo/odoo#102763
X-original-commit: 73ba2217ec56819ff979020a43d0c13f8ff0b697
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
In house implementation of automatic scoll when dragging an element to
the edges of its container.
closesodoo/odoo#102756
X-original-commit: 290a6213a6e36fc2e5d11216b59a6aaf79554196
Related: odoo/enterprise#32568
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
Co-authored-by: Julien Mougenot (jum) <jum@odoo.com>
Co-authored-by: Simon Genin (ges) <ges@odoo.com>
This commit fixes the number of cells created in the ListView's footer
when the optional field's button is present.
Steps to reproduce:
- Open Accounting > Customer Invoices
- Switch to ListView
=> the footer (containing totals) has one less cell
closesodoo/odoo#102222
Forward-port-of: odoo/odoo#101954
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
This commit fixes the pager's position in a grouped ListView when the
optional field's button is present.
Steps to reproduce:
- Open Account > Intrastat Code list
- Unfold "Commodity" group
=> The group's pager is misplaced
Forward-port-of: odoo/odoo#101954
Part-of: odoo/odoo#102222
Have an InnerGroup which has a first div visible all the time
and a second div conditionally invisible.
Before this commit, when the second div was invisible, the first was not
displayed.
After this commit, the two divs are displayed correctly.
X-original-commit: c69836e3c53e1efb61f66612c266a31aa9b54816
Part-of: odoo/odoo#102578
Before this commit, editing a domain field with an invalid value
for the field type will display a parsing error.
The purpose of the commit is to reintroduce the old behaviour of the
field, it should not display an error.
How to reproduce?
- Go to a form view with a domain field (in_dialog=True)
- Click on the "Edit Domain" button
- Add a domain comparing a field of type int with "01/01/2000"
Before this commit:
An error is displayed.
After this commit:
The domain is applied with the wrong value.
If the server considers the domain to be false, then "Invalid domain"
is displayed.
closesodoo/odoo#102753
X-original-commit: 7f22512149f5d634306cf0b280d055a60ba9e356
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit fixes the behavior of date, datetime and daterange
fields. It was no longer possible to open the date/datetime picker
by clicking on the corresponding label, since the inputs were
missing the id attribute associated with the label.
Now, it is possible again, and hovering the label will correctly
highlight the input border of the field.
Tests have been added too, to make sure this works properly.
closesodoo/odoo#102742
X-original-commit: 0e35d2b995165cfcb50db7eaec44cce7547eb4e4
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Luca Vitali <luvi@odoo.com>
When a m2m field add a context in its arch, it's passed through to the
rpcs made to the server. In a m2m situation, while the name_search
worked properly, the read operation on a dropdown item select did not
provide this context.
This PR fixes that.
closesodoo/odoo#102741
X-original-commit: 5c7066fc064ecc175104603d524b52991678a2cd
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit removes legacy views that are not used anymore as they
have been converted to owl. They could actually have been removed
in the commit that converted them, as we never needed to have a
double implementation of views, unlike we need to (field) widgets.
The LazyColumnList is a special case. This view hasn't been
converted. Instead, it has been decided not to use it anymore.
So it was dead code, and this commit removes it.
The form/list/kanban views are no longer necessary in the view
registry, since their owl version exists. However, we kept them
in the test asset, as they are massively used in legacy tests
(in field tests for instance).
closesodoo/odoo#102634
X-original-commit: 186a8b31161fc8c75b346ff97f9403dca1ae677e
Related: odoo/enterprise#32501
Signed-off-by: Géry Debongnie <ged@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Add missing feature of the ModelFieldSelector popover :
* keyboard navigation
* additional debug value
* add default value page ( for dynamic placeholder)
* add validate callback
Migrate dynamic placeholder to be compatible with new OWL field.
task-2978722
X-original-commit: 929108e29168058fad5da85e0ff9c66d2c5b2525
Part-of: odoo/odoo#102603
The purpose of this commit is to allow the restoration of open pages
in notebooks of a form view when switching view.
How to reproduce?
- Go to a form view with a notebook.
- Select a page in the notebook
- Go to another view
- Use the breadcrumb to go back to the previous form view
Before this commit:
The page opened in the notebook is the default one (the first one
or the autofocus one)
After this commit:
The page opened in the notebook is the one previously selected
closesodoo/odoo#102468
X-original-commit: 160c0347526612b6e6f93b8079eeb868d37d48f4
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Signed-off-by: Georis François (fge) <fge@odoo.com>
Before this commit, in new views, it is no longer possible to click
on buttons with barcode_trigger="..." using a barcode scanner.
Why:
New views no longer propagate all attributes to the button.
How to reproduce:
- Go to a form view with a button with barcode_trigger="doit"
- Scan "O-BTN.doit", "Enter".
Before this commit:
Nothing happens.
After this commit:
An event click is applied to the button.
closesodoo/odoo#102423
X-original-commit: b4cb2ee2662173e08f671eb736130f8332265de7
Signed-off-by: Georis François (fge) <fge@odoo.com>
Before this commit, in a list view, it is possible to have two records
in edit mode at the same time if an error is thrown when saving
the editedRecord.
The editedRecord is the only list record that can be in edit mode.
Why:
If a server error is returned when saving the editedRecord, then it
stays in edit mode but is no longer considered the editedRecord of the
list. It is therefore possible to switch another record to edit mode.
Solution:
The record that fails its save due to the error should stay the
editedRecord of the list.
How to reproduce:
- Go to a list view
- Edit a record
- Click on another record (the "write" operation returns an error)
- Close the error dialog
- Click again on the other record
Before this commit:
Both records are in edit mode
After this commit:
Only the edited commit is in edit mode.
closesodoo/odoo#102560
X-original-commit: 77092167cf8f8fca11a39005d720fa82abeec0ae
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
- Before this commit
Suppose that in a form view, there is an x2many list view
that would open a form view dialog when edited.
For the dialog to open, the concerned record is duplicated and
passed in props to a FormRenderer.
Now suppose that this form view dialog also has an x2many list
view rendered somewhere: the StaticList datapoint attached to
this list will have the same context as its parent.
This is not what we want because some of the keys of the context
does not make sense with the list's model.
In fact, it has led to tracebacks to be displayed in case of we want
to open a record of this list in another form view dialog.
- After this commit
When those lists are created, their context are cleared from
their parents' keys starting with "default_" or ending with "_view_ref".
closesodoo/odoo#102557
X-original-commit: 1ba468706295f651105ca3fc8aae477b4f05c28e
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
This commit fixes the behavior of the FormView in a dialog. Since the
view is only visible in edition, it is no longer necessary to keep the
dialog open after the save has been processed. If the save has been
successful, the dialog now closes as expected.
A test has been added to assert this behavior.
X-original-commit: 86f68fe072a50baf49b9a8cf06f9c1e2541756e3
Part-of: odoo/odoo#102522
This reverts commit 8d7bcc8eee7a333e8e463469177a1a86f9928254.
The fix also impact a lot of form views without a <sheet> node
(o_form_nosheet), e.g. Settings, Knowledge articles, Mass Mailing, Bank
Reconciliation, widget, etc.
Not the correct solution.
X-original-commit: 00e71f3ebad40d32f74f945475fb474e89b6cf4a
Part-of: odoo/odoo#102511
Even if the `StateSelectionField` is readonly we doesn't want visual
difference and we remove the `disabled` class.
This behavior is the same as in 15.
We also remove `btn-link` as it's not appear as a link and we had to set
`p-0` to avoid the growing of the cell.
Steps to reproduce:
> Open the helpdesk app
> Click on VIP Support tickets
> Go to the list view
> Add kanban_state column => visual bug
closesodoo/odoo#102504
X-original-commit: 26d6942ed1b0c328d94e7dfd5e50c18a68c8c2f3
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Signed-off-by: Romain Estievenart (res) <res@odoo.com>
Before this commit, it was not possible to edit the path via the
model field selector popover input (visible in debug mode). We fix that.
closesodoo/odoo#102462
X-original-commit: 084af201f1f4f4cb3476ab34d3dcd649a71a4254
Signed-off-by: Luca Vitali <luvi@odoo.com>
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Previously, in form views without a sheet (eg in wizards), there would
be a scrollbar on the content. This is caused by the fact that
outer groups have gutters of size 5 in desktop which creates negative
margins on the row of 1.5rem which is 18px with the default size, but
the nosheet form view only has 16px of padding on the sides, causing the
groups to be 4 pixels too wide.
This commit fixes this by adding the correct padding classes on the
form view when it doesn't have a sheet.
closesodoo/odoo#102357
X-original-commit: 8d7bcc8eee7a333e8e463469177a1a86f9928254
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Samuel Degueldre <sad@odoo.com>
This commit fix the following issues :
- When an event don't have a color provided, the first color was used.
The issue with this, is that that color can be used with another
filter. Now, a neutral color is used to avoid confusion.
- The filter that don't provided a color, will also use a neutral color,
to keep harmonization with the color of the event.
- The color of the current user, was missing on the user filters.
- The color attribute set on the view was taken instead of the color
attribute set on a field when the field is set as filter, which
leads to a traceback.
closesodoo/odoo#102307
X-original-commit: c83379f68f395004e1750336ced8a4a4132f67fe
Signed-off-by: Michaël Mattiello <mcm@odoo.com>
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Co-authored-by: Bruno Boi <boi@odoo.com>
Co-authored-by: Jorge Pinna Puissant <jpp@odoo.com>
When converting the list view to owl, the support for view widgets was
overlooked as this feature is not used very extensively and was not
tested.
This commit adds support for them and adds a test for it.
closesodoo/odoo#102193
X-original-commit: 9098c1d3cd4af8f324b5b09668e92822575f932d
Signed-off-by: Géry Debongnie <ged@odoo.com>
Signed-off-by: Samuel Degueldre <sad@odoo.com>
There was an option in the legacy ModelFieldSelector
that could be used to prevent following the relations.
This option was lost since the widget has been
converted. This commit simply reintroduces the option.
closesodoo/odoo#102308
X-original-commit: 673faab4dec7a0df434cf0575303df97a36db0f1
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Purpose
=======
Allow to add the properties field in the kanban view.
An option has been added in the property definition, "View In Kanban",
to decide which field must be visible in the kanban view.
We need an option because in practice we might have a lot of
properties, and it might break the view.
Task-2980121
X-original-commit: 3af5a59c23183dd43341c1952a04354acbf3a60d
Part-of: odoo/odoo#102243
pivot, graph, cohort views do not care to know whether a field
is readonly or required, as you cannot edit records in these views.
Even kanban is readonly in most cases:
- you can drag and drop records from one column to another,
which is prevented if the group by field is readonly
but this shouldn't rely on the fact the field is
within the architecture, as you can group by on any fields
from the search views / control panel.
Hence, this shouldn't rely entirely on the modifiers passed on the field
nodes in the view architecture alone.
- you can create new record inside the kanban,
with a simplified form, thanks to the `quick_create`,
but this uses an independant form view, in which the readonly and
required modifiers are correctly passed.
So, `modifiers="{'readonly': true, 'required': true}"` can be dropped
for kanban views as well.
This allow to spare some KB by not setting useless modifiers in views.
e.g. CRM > My pipeline pivot
Before
```xml
<pivot string="Pipeline Analysis" sample="1">
<field name="create_date" interval="month" type="row" modifiers="{"readonly": true}"/>
<field name="stage_id" type="col" on_change="1" can_create="true" can_write="true"/>
<field name="expected_revenue" type="measure"/>
<field name="color" modifiers="{"invisible": true}"/>
<field name="automated_probability" modifiers="{"invisible": true, "readonly": true}"/>
<field name="message_bounce" modifiers="{"invisible": true}"/>
<field name="probability" on_change="1" modifiers="{"invisible": true}"/>
</pivot>
```
After
```xml
<pivot string="Pipeline Analysis" sample="1">
<field name="create_date" interval="month" type="row"/>
<field name="stage_id" type="col" on_change="1"/>
<field name="expected_revenue" type="measure"/>
<field name="color" modifiers="{"invisible": true}"/>
<field name="automated_probability" modifiers="{"invisible": true}"/>
<field name="message_bounce" modifiers="{"invisible": true}"/>
<field name="probability" on_change="1" modifiers="{"invisible": true}"/>
</pivot>
```
Regarding the change of behavior shown in `addons/web/static/tests/views/kanban_view_tests.js`.
It was introduced very recently, by myself, in
odoo/odoo#100806
I revert this possibility to set readonly="0" on a field node in a
kanban view, because:
- First, this is not used anywhere in both odoo/odoo and
odoo/enterprise.
- Second, this really makes things harder if we want to do so:
- as readonly="0" is passed, the "readonly" gets removed from the node
modifiers, as they are simplified by removing falsy value:
modifiers="{'invisible: True, 'readonly': False}" becomes modifiers="{'invisible': True}"
- as readonly in not amongst the modifiers, it fallbacks on the model
field property, in the javascript code, which is readonly: True.
- the thing to do would be to still transfer "readonly"
from the field attributes to the node modifiers.
- which either mean to consider a kanban view as editable
- this will cause issues because the validation mechanism
will suddenly check the domain attribute property
https://github.com/odoo/odoo/blob/d4a92b112d0554a2624f7768feb7d54e0484469f/odoo/addons/base/models/ir_ui_view.py#L1443
and there will be plenty of views where some field used in the
domains will be missing. Besides it is pointless to validate these
domains as they are completely unused in kanban views
- either mean to find another mechanism than "editable" to decide
wheter to transfer the modifiers "readonly"/"required" or not,
which over-complicates things.
- besides only "readonly" would need to be passed, not "required.
So, to keep the code stupid simple, I remove this possibility added only
a few days ago, which is actually not used anywhere in standard for the
moment.
closesodoo/odoo#102221
X-original-commit: 69c3d5aa25655173ed66a52570559322c650c7df
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
This commit solves two bugs:
1. In a grouped empty list view, if you click on a sortable column,
then a crash is displayed.
How to reproduce:
- Go to a grouped empty list view with at least one sortable column
- Click on the sortable column
Before this commit :
A crash is displayed
After this commit:
Nothing happens.
2. In a grouped view with at least one open group, columns that do not
have an aggregates value cannot be sorted.
How to reproduce:
- Go to a grouped list view with at least one open group.
- Click on a sortable column that does not have an aggregates value
Before this commit:
Nothing happens
After this commit:
The records are sorted by the clicked column.
closesodoo/odoo#102143
X-original-commit: 537bbc79fe0ce34fe8b4746bf4cc86f9ebfc8a12
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Signed-off-by: Georis François (fge) <fge@odoo.com>
Before this commit, in a list view, html fields in readonly mode were
not rendered correctly. It displayed unprocessed HTML.
For the value :
<div>Hello</div>
Before this commit, it was displaying:
<div>Hello</div>
After this commit, we display:
Hello
closesodoo/odoo#101253
X-original-commit: a6292c17b886996c82c797e562b725d63d4a5b7e
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
In the conversion of the FormViewDialog from legacy to wowl, we
forgot the feature allowing to display a "Remove" button in the
footer, and to execute a custom callback when this button is
clicked. This is used for instance by the Gantt view.
This commit restores the feature.
closesodoo/odoo#102149
X-original-commit: 3eb126d0297a7e3db0cb98cd1ad9555eefaa0cfa
Related: odoo/enterprise#32281
Signed-off-by: Géry Debongnie <ged@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Before this commit, clicking on view buttons with attribute
`close="1"` in FormViewDialog didn't close the dialog once the
button action was performed. This commit fixes that issue, and
ensures we do not reload the record if we're about to close the
dialog.
X-original-commit: 32d211a6fd5c121fa5f556f1d78b79421edc6f68
Part-of: odoo/odoo#102149
Before this commit, creating a new record with the "many2many" widget
did not allow to use a context containing a default value
for the parentID (id of the Record containing the many2many).
This value is ignored.
How to reproduce?
- Go to a form view with a field using the "many2many" widget
with context = {"default_parentID" = ...}
- Click on "Add a new line"
- Click on "Create" (The form view should display the parentID field)
Before this commit:
The parentID field is empty.
After this commit:
The parentID field contains the record corresponding
to "default_parentID".
closesodoo/odoo#102157
X-original-commit: a52eacc5397dc2f98eb052f4cd1e362a97621074
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>