This commit restores the behavior we had before wowl :
- Having a min-height of 180px when the node-editable is a child
field (without a parent form group).
e.g: open the form view of a `crm.lead` inside the `crm` app.
- No min-height added when the note-editable is inside a form-group
e.g: the condition & terms inside the form view of a `sale.order`
inside the `sale` app.
X-original-commit: 294e8b8ad3efca2211cff61992b3cd07493eb1bb
Part-of: odoo/odoo#102205
Task Description
In some case, when trying to display the context menu on a
pivot cell (doesn't seem to impact PIVOT.HEADER), we get a
traceback caused by the arguments of the formula take into
account in the ´getFiltersMatchingPivot`, called by the
"isVisible" property evaluation of the "set as filter" action.
These errors only rise when using a pivot with "__count" as
measure and a positional argument.
Moreover, when trying to open the context menu with a filter
defined without any field, we get another traceback.
Reproducibility
The first issue can be reproduced with the following steps:
1. Go to the CRM app
2. Create a pivot view
3. Group the row by Country
4. "Ungroup" the columns (keep only the total)
5. Set "__count" as measure
6. Insert the pivot on a new spreadsheet
7. Edit the pivot formulas to use positional argument for country_id
8. Insert a new filter on the country field
9. Right click on a pivot cell
The second issue can be reproduced with the following steps:
1. Open a spreadsheet with a pivot
2. Add a filter related to the pivot but without any field matching
3. Right-click on a pivot cell
Fix Description
The first issue is coming from the fact we try to get the value related
to a field in the pivot formula using the 2nd and 3rd argument instead
of using the last two arguments of the formula. This is fixed by passing
to getPivotHeaderValue only the last two arguments of the pivot formula.
For the second issue, we simply check that the pivot field is defined
before looking at its name.
Related Task
task-2999181
closesodoo/odoo#102204
X-original-commit: 15e0c8aba57d4e0a8c58f288a4e96f0bc884736c
Related: odoo/enterprise#32303
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
Before this commit, the field terms and conditions was weardly placed
And also reducing the size of the field quick_edit_total_amount
closesodoo/odoo#102192
Task-id: 3003938
X-original-commit: 10b842da4cc641145fa672c4837b0cde1120963c
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Signed-off-by: Maximilien La Barre (malb) <malb@odoo.com>
- Make content helper more generic for programs
- Add search fields for loyalty.card
- Fix creation emails for gift cards in pos not being sent properly
- Fix validity date check on loyalty rules being inverted.
TaskId-3002190
closesodoo/odoo#102160
X-original-commit: f893fda1a40127b7510e861c96f4d4cf9d10f79d
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
The goal of this task is to review the copywriting of the tooltips
because some of them are not correct in English and others are not
valid anymore. This is also a good opportunity to make an inventory
of the tooltips we have and to add some that could be missing.
task-2860991
closesodoo/odoo#102179
X-original-commit: 5e4cf8f9f6a4372f45aa04a5965f8073bb4ea68a
Related: odoo/enterprise#32298
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Co-authored-by: Mahendra Barad <mba@odoo.com>, Prakash Prajapati <ppr@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>
Keyboard navigation was misleading, and it was adding a box around
focused which was irremovable because it was injected by the browser
closesodoo/odoo#102033
X-original-commit: 519bbe4b55c907bcd71d03e34dbc706d13a2268b
Related: odoo/enterprise#32235
Signed-off-by: Aaron Bohy (aab) <aab@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>
The `<span>` was not properly closed.
closesodoo/odoo#102162
X-original-commit: cb3b87f8fe66d11e1a96066a27eb3ef979bc3e39
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Steps :
- When the user is subscribed to the `Stage changed` subtype
but not `Task in progress` and on change of stage, the users only
subscribed to stage changed will not receive stage changed notification.
Cause :
- When the stage is changed it will also change the kanban_state to
in progress and due to that, it will track the kanban_state from
_track_subtype, and the user who subscribed only stage_changed will not
get notified.
Fix :
- So in this commit, prioritize the stage_id changed notification so that
when the stage_id is changed we use that one, and the in-progress won't
be triggered, but when we change the kanban state back to progress it
will be triggered. As in progress is implicit when changing the stage_id.
task-2818058
closesodoo/odoo#102172
X-original-commit: 4d952d679629a4a225ff208a6d018e11f14bf47e
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Before this commit the Device visibility option was on its own row
inside the options panel.
This commit moves the buttons of the Device visibility option before
the dropdown inside the main row of the Visibility option.
task-2900730
closesodoo/odoo#102154
X-original-commit: 82000acfb6f8c7884994135413dcddac5441f8b4
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before this commit, in edit mode, it was not possible to close an open
dropdown in the header anymore.
This was due to BS5 (merged at [1]). Before, the 'show' class was added
to the dropdown menu element (the element with the 'dropdown' class).
But that changed: the 'show' class is now added on the button (the
element with the 'dropdown-toggle' class). And as in edit mode the
openings/closing of the dropdowns are handled manually in the header, it
no longer worked correctly.
[1]: https://github.com/odoo/odoo/commit/971e5a91aab96d36129a823e03f1f9f1b1293968
task-3001198
closesodoo/odoo#102145
X-original-commit: f3e1dc52356164453f72827e3dc87ad903df3d0e
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before that commit, it was not possible to select some part only
of a input/textarea input in an editable list view.
closesodoo/odoo#102169
X-original-commit: e572c11ecfb994a474ce800e46895e9233fae64b
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 revision, the active sheet was not correctly set to the first
sheet.
Task-id 3002541
closesodoo/odoo#102148
X-original-commit: faf6cde43f5d092b8b053d4b6392c6641ec0a48e
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
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>
Click on the back button in the model field selector popover used to
often remove too many names in the path created via the selector. For
example, starting with "partner_id.name" and clicking on the back button
in the opened popover would give the invalid path "" instead of
"partner_id". We fix that problem.
closesodoo/odoo#102156
X-original-commit: e4a7b63c68a87d7afef987e8d036d7ba9c5b6f96
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
In a domain selector, have a selection field and the operator "is set"
selected, then change the operator to be "=". A crash occurs. This
happens because the category of operator change and thus the function
onDidTypeChange of DomainSelectorSelectionField is called with no
parameter. The same problem can happen with DomainSelectorDateTimeField.
We fix that by calling component.onDidTypeChange with the right
parameter in any case.
X-original-commit: a01c2473d93d0d123391ba0131ad505775b3c50b
Part-of: odoo/odoo#102156
Before this commit, a virtual record in form view always had the
o_form_dirty class, which is problematic when a tour ends with a virtual record.
After this commit, a virtual non-dirty record in form view doesn't have
the class o_form_dirty, and doesn't have the o_form_saved either as that doesn't make more sense.
closesodoo/odoo#102153
X-original-commit: 0041b9fd8eb75d5b680d94d491e2b9f684b2d0c1
Related: odoo/enterprise#32282
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Before this commit, the positions of the virtual pointer were not
passed to the mousemove event, preventing draggable code to correctly work.
After this commit, the Event is a proper MouseEvent, with clientX and clientY set
correctly.
X-original-commit: 2e60d1b733fd73021fb1dea490e6fa3ba2fc31d0
Part-of: odoo/odoo#102153
A new useDraggable hook is introduced and used in the various components that
use the feature.
It relies on the draggable hook builder which is a generic way to prepare
specific drag and drop features.
X-original-commit: cb1cfe5f5efe1b683d7fdffde3718bd8bf1bcd86
Part-of: odoo/odoo#102153
Have a form arch containing
```
<notebook>
<page class="myClass" />
</notebook>
```
Before this commit, "myClass" did not appear in the final DOM.
After this commit, it does.
X-original-commit: e886adcb38695bcfa8a9f741d4e496229fb199ff
Part-of: odoo/odoo#102153
In which case we just don't render any Renderer.
Useful when we want to render invisible fields.
X-original-commit: e77afa6266a66e9d126d9a0293bb3e0eb8fb0ff3
Part-of: odoo/odoo#102153
The mapping operations between the new RelationalModel API and the
BasicModel is now done in its own file
X-original-commit: 1202610ce6946ee4b2878e19e6ee6038edc9a71e
Part-of: odoo/odoo#102153
The goal of this commit is to fix the behaviour of clicking on a field
with the "many2one_avatar" widget in a list view.
Expected behaviour when clicking on a field with the "many2one_avatar" widget:
- Editable list view: switch row to edit
- Multi_edit list view with selected record: switch row to edit
- Other case: open the many2one_avatar record in a form view
Before this commit, clicking on a field with the "many2one_avatar" widget always
opens the record in a form view.
After this commit, the expected behaviour when clicking on a field with
the "many2one_avatar" widget is respected.
closesodoo/odoo#102146
X-original-commit: ad597d414c59723d3c6af5dfdc1a3a41fd4f4032
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Adds `width: 100%` on the `.o_field_widget` so the input it can take the
all width in the "Quick Create" form.
Also, this commit fixes the CSS selector for the `margin`
rule as in the "Quick Create" form view there is no `.o_group` anymore
on `.o_inner_group`.
Steps to reproduce:
* Go to project
* Select a project
* Click on the `Create` button => BUG
closesodoo/odoo#102151
X-original-commit: 774213758c7ddf7b74a9b370457f017e09d9bbcf
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: Romeo Fragomeli (rfr) <rfr@odoo.com>
Toggling an optional field was unselecting the row, but didn't correctly
copy the same bahavior than legacy when it comes to the saving and
discarding of the data being edited.
However, by simply removing the line of code unselecting the row, we get
a better ux for no cost. The user can continue the record edition after
adding or removing columns.
Note that the focus will always be reset to the first column though.
closesodoo/odoo#102142
X-original-commit: 63c87eac6173af13ec84f90a7f25f07a074197f3
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
This commit is the revert of #98703.
closesodoo/odoo#102116
X-original-commit: 64c0ed09f058cff9b3cebfe5480a7efd0caa7be6
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
Signed-off-by: Dardenne Florent (dafl) <dafl@odoo.com>
Since the split of components with their templates in dedicated file in
https://github.com/odoo/o-spreadsheet/commit/10e1a0ca, the templates were eager-loaded.
However, this had an impact on the size of the `assets_qweb` bundle.
This commit introduces the lazy-loading of the `spreadsheet.o_spreadsheet`
bundle since it is now achievable.
A followup of https://github.com/odoo/enterprise/pull/30609
task 2896049
closesodoo/odoo#102118
X-original-commit: 15af10c207d6a359a58b5778bd414ff7b543a020
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
In `--dev xml` mode,
you would like the views to be loaded from their definition
in the XML file directly.
The view caching introduced in odoo/odoo#99417 prevents that feature,
as once the view has been loaded a first time, the views are returned
directly from the cache, therefore not taking into account changes
directly done in the XML file views.
Setting a conditional decorator,
disabling the caching when in `--dev xml` mode,
solves this issue.
Solves https://github.com/odoo/odoo/pull/99417#issuecomment-1241977197closesodoo/odoo#102117
X-original-commit: 5fe1d89f4d8718df92c39a80d4b575b8d0381c19
Related: odoo/documentation#2786
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
By definition, views are useless without the web client.
The web client is in the module `web`.
Therefore, in a perfect world, the `get_views` model method
and any related method should be within the `web` module,
as without it they are useless.
Let's imagine you would like to use fully in command-line,
without web client, all those view related methods are useless.
Maybe excepted for reports, as you might still like to be
able to print reports while using odoo fully in command line.
Views related method therefore shouldn't be in `odoo/models.py`.
Also, when you think about it, `get_views` related methods do not
make sense without the model `ir.ui.view`, which is loaded after
the `get_views` related methods, which also doesn't make sense.
However, moving these methods fully in the `web` module is an harder
work. For instance, there are base models, such as res.partner,
already overriding `get_view` in the `base` module,
and therefore relying on these view related methods.
As a first step, we move view related methods direcly in the
`odoo/addons/base/models/ir_ui_view.py` file, where
the `ir.ui.view` model is loaded.
This is not only a design / cleaning change,
but a required change to be able to use content of
`odoo.tools.config`, which is loaded after `odoo/models.py`.
For instance, if you want to configure a conditional decorator based on
the config `odoo.tools.config['dev_mode']`, it is not possible
to do so in `odoo/models.py` because the config is parsed/loaded
after `odoo/models.py`.
The config is loaded here:
https://github.com/odoo/odoo/blob/31de2b0a7a0921cab3c6c54045d15da46c8e6d8a/odoo/cli/server.py#L127
While, within the same file, `odoo/models.py` gets loaded through the
`import odoo`
https://github.com/odoo/odoo/blob/31de2b0a7a0921cab3c6c54045d15da46c8e6d8a/odoo/cli/server.py#L26
And we would like to put such a decorator based on `odoo.tools.config['dev_mode']`
on `_get_view_cache`, to not cache the back-end views when `--dev xml` is
passed in the server arguments.
X-original-commit: 0901adc38a724aec75676285977f1905a84ed8ee
Part-of: odoo/odoo#102117
It seems that there is a rather frequent warning that can be added to
mail received by outlook 365 and that has the form:
```
<table border="0" cellspacing="0" cellpadding="0" align="left" width="100%" style="width:100.0%">
...Caution: This is an external email and has a suspicious subject or content...
</table>
```
The combination of `align="left" width="100%"` means that a div after
this alert will probably have a width of 0 (because the previous content
is floating to the left, and taking 100% of width so there is 0 pixel of
width remaining).
This is not an issue in general, but in Odoo this conflicts with a code
that adds scrollbar if a message content overflows (but here since width
is 0 pixel the content is just hidden).
With this commit, if we detect the code that is used in all our received
report (width=100% and float=left), we ignore the float to prevent this
issue from happening.
An alternative is to avoid Outlook 365 adding this structure in a
message (see [1]), but this is only possible if we can change the
configuration where this structure is added (eg. we can't if it is
a customer that is forwarding a mail already broken).
[1]: https://learn.microsoft.com/en-us/microsoft-365/security/office-365-security/set-up-anti-phishing-policies?view=o365-worldwide#first-contact-safety-tip
opw-2887342
opw-2925222
opw-2946587
closesodoo/odoo#102107
X-original-commit: ed7280ce8f79ff68904310ca1120cb9c5ee735ae
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Users with both "HR Officer" and "Contract Administrator" access should
be able to archive employees even without Payroll access.
closesodoo/odoo#102102
X-original-commit: 765a6ec16b0a3c1cd86f7fc217bfb795a788d9c6
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Steps to reproduce:
* setup Alipay in test mode (note that Alipay's test node only support
one currency: the USD)
* create an invoice. Make sure the invoice's total has decimal places
* generate a payment link for that invoice
* go to the generated link
* select Alipay as the payment method and click pay.
You should be met with an INVALID_PARAMETER message.
Cause:
Alipay's doc states that the parameter 'total_fee' can only have two
decimal places. Currently, this requirement is not always respected
opw-2996278
closesodoo/odoo#102088
X-original-commit: 2e6e338e8c4e042a671814673c6f3d0e4e4f50dc
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>