Steps to reproduce
==================
- Create two new storable products tracked by USN
- Create a new RFQ with one of the created product
- Confirm the order
- Open the receipt
- Add a new line with the other product
- Click on the open move button in the new line
- Add a new SN
- Save & close
=> Cannot read properties of undefined (reading 'resId')
Cause of the issue
==================
When calling openRecord, if the record is dirty, it is saved before
proceeding.
After saving, we call super.openRecord with the old record.
Since that record is no longer linked to the root record (the
stock.picking), when we try to save it, it won't match an existing id.
Solution
========
If the record is new, we don't save as there would be no way of knowing
which of the returned line would come from this one.
If we are opening an existing record, we find the new datapoint by
matching it's ID.
opw-3777615
closesodoo/odoo#162425
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Steps to reproduce
==================
- Go to Field Service
- Group by "start date: week"
- Archive every record in a column until there is only one left
- Go back to the kanban view
- Click on the single record from the column
- Archive it
- Using the breadcrumbs, go back to the kanban view
=> The group order is not preserverd and the empty one is the last one
Cause of the issue
==================
Before archiving the record, we have the following data:
`{group1: [1], group2: [2, 3]}`
After archiving the record, we have `{group2: [2, 3], group1: []}`
A new group is recreated from the old one, but it is always added at the
end.
Solution
========
We can insert the old group at his previous index.
The same solution was used in previous versions
opw-3816409
closesodoo/odoo#160121
X-original-commit: 0d44e931c40fbca005b8d1864cf2d07485ed84f8
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Steps to reproduce
==================
In 17:
- Install hr_holidays,project
- Switch the language to dutch
- Go to project > three dots > Projectupdates
We can see `x/y Genomen`, it should be `x/y Taken`
Cause of the issue
==================
The original term is Tasks.
When loading the views, python translates them and changes Tasks to Taken.
Owl then translates the template and transforms Taken to Genomen.
Solution
========
Since the views are already translated, we don't need to translate them with owl.
We can simply set the attribute t-translation to off on the view root node.
opw-3787336
closesodoo/odoo#158627
X-original-commit: 454760e12145f8987e443d7776a614a5eb441feb
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Steps to reproduce
==================
- Go to Accounting > Customer Invoices
- Open any record with no attachments
- Drag & drop a pdf attachment on the chatter
=> The PDF viewer is empty
Cause of the issue
==================
When uploading an attachment from the FileUploader, the parent view is
reloaded.
This is not the case when uploading an attachment from the dropzone.
opw-3748853
closesodoo/odoo#157232
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Steps to reproduce
==================
In 16.4:
- Go to Accounting > Reconcile 8 items
- Click on the first line on the right
- Edit the label and then press Enter
- Switch to another line
=> Odoo Server Error
Cause of the issue
==================
When pressing Enter, two events are triggered: keydown and change.
In the useInputField hook, there is a listener for both of those events,
and they both end up calling `record.update` with the current value from
the input.
In the relational model, the update is locked inside a mutex.
So the first update (triggered by the keydown) does an onchange.
This onchange deletes the current records (Command.CLEAR) and returns
new records.
Once this is done, the mutex is released. The second update (triggered
by the change event) then tries the same update. Since the value was
obtained when queuing for the mutex, it uses the old (now deleted)
record.
Solution
========
This adds a test for https://github.com/odoo/odoo/pull/154991
as part of the fix got lost in a conflict resolution for previous versions.
opw-3726818
closesodoo/odoo#157155
X-original-commit: fbebffe446de9dd80db2dbe5ca7bd2746dc2a54f
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Steps to reproduce
==================
- Install Expense (hr_expense)
- Use a small viewport
- Go to Expense
=> The status bar overflows
opw-3704233
closesodoo/odoo#156114
X-original-commit: b1c91dded0a11c870f1618869a7810317ea05643
Signed-off-by: Romain Estievenart (res) <res@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Steps to reproduce
==================
- Install Timesheets
- Login as Admin
- Edit the access rights of Mark Demo:
* Timesheets: "User: all timesheets"
* Employees: "None"
- Logout and login as Demo
- Go to a project task
- Switch to the Timesheets notebook
- Add a new line
- Click on the employee field > Search More
=> An error occurred
Cause of the issue
==================
The hr.employee.public model is an SQL view of the hr.employee table
with differents permissions.
Since the user doesn't have the hr.group_hr_user group, the model
hr.employee.public should be used and not hr.employee.
Since [0], the model is switched depending on whether the user has the
appropriate group.
The EmployeeFieldRelationMixin is used and defines a getter for the
relation. That relation was not propagated to the Many2OneField.
Solution
========
Pass the relation to the many2OneProps.
---
[0]: https://github.com/odoo/odoo/pull/136786
opw-3765393
closesodoo/odoo#155743
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
Steps to reproduce
==================
- Install account_accountant
- Go to settings
- Enable Budget Management
- Go to Accounting > Reporting > Management > Budgets Analysis
- Switch to the graph view
- Change the measure to "Planned amount" and then back to
"Practical amount"
=> The practical_amount measure is undefined,
The theoritical_amount measure is missing.
Cause of the issue
==================
The view is defined as follows:
```xml
<graph string="Budget Lines" sample="1">
<field name="crossovered_budget_id" type="row"/>
<field name="planned_amount" type="measure" string="Planned amount"/>
<field name="theoritical_amount" type="measure" string="Theoretical amount"/>
<field name="practical_amount" type="measure" string="Practical amount"/>
</graph>
```
The theoritical_amount and practical_amount are non stored fields and
thus are skipped inside `computeReportMeasures` unless they are passed
in `activeMeasures | additionalMeasures`. [0]
When parsing the graph view, the last field of type measure is
passed to the graph model and is the one that will be used initially. [1]
This is why the practical_amount is initially defined.
Solution
========
We simply need to keep track of fields of type measure.
This was the case in 14.0 but got lost in the conversion.
---
[0]: https://github.com/odoo/odoo/blob/e7a9ebec3176c37485643fcda2381e489a1df86f/addons/web/static/src/views/helpers/utils.js#L49-L60
[1]: https://github.com/odoo/odoo/blob/0fb64bef16914937cf4a1d1618fb58ade6d16f14/addons/web/static/src/views/graph/graph_arch_parser.js#L63
opw-3713613
closesodoo/odoo#153967
X-original-commit: 76178cd61ba10ff29b24183edb550c54b319a230
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Steps to reproduce
==================
- Use a laptop with touch or apply the following patch
```diff
diff --git a/addons/web/static/src/core/browser/feature_detection.js b/addons/web/static/src/core/browser/feature_detection.js
index 21c6294b1b0e..64c4bc9b899c 100644
--- a/addons/web/static/src/core/browser/feature_detection.js
+++ b/addons/web/static/src/core/browser/feature_detection.js
@@ -62,6 +62,7 @@ export function isDisplayStandalone() {
}
export function hasTouch() {
+ return true;
return browser.ontouchstart !== undefined || browser.matchMedia("(pointer:coarse)").matches;
}
```
- Enable debug mode
- Go to contacts
- Hover the mouse over a question mark next to a field
=> Nothing happens
Cause of the issue
==================
The function `shouldCleanup` returns true when the device has touch and
the popover has been triggerd with the mouse
opw-3694156
closesodoo/odoo#152629
X-original-commit: 27242a0f1070b6b16c16e479e22dc0ccad0d9659
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Steps to reproduce
==================
- Use a mobile viewport / device (small window)
- Go to Dashboard
- Double click on a chart
=> `this.env.openSidePanel is not a function`
Cause of the issue
==================
On mobile, the MobileFigureContainer is used instead of the Spreadsheet component.
The both use `useSubEnv` but the mobile one was missing the
openSidePanel function.
Solution
========
Add an empty `openSidePanel` function that does nothing.
opw-3677552
closesodoo/odoo#150702
X-original-commit: 990452ad985b1515ba565ff1fe8c6bbaa14fb031
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
Steps to reproduce
==================
- Enable analytic accounting
- Go to customer invoices
- Open a record
- Open studio
- Click on the Invoice lines > Edit list view
- Set the analytic field as required
- Close studio
- Create a new record
- Add a new line
- Click on the analytic field
- Close the popup
- Save the record
=> Even though we didn't set a value for the field, it is saved
Cause of the issue
==================
The actual field value is an empty object.
The validity of a field is checked here [0].
An empty object is considered a truthy value.
When setting the required attribute directly on the python field
declaration, an empty object does not pass the check
Solution
========
Add a specific check for json fields. When the value is either false
(not set) or an empty object, the field is considered invalid.
---
[0]: https://github.com/odoo/odoo/blob/23f01c533512cbfb33e90509e22cd3c3c4f99d40/addons/web/static/src/views/basic_relational_model.js#L284
opw-3659763
closesodoo/odoo#150677
X-original-commit: 51b538b3f678298f27bbbf458de5696706c18349
Signed-off-by: Francois Georis (fge) <fge@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Steps to reproduce
==================
1. Install event
2. Go to Events
3. Configuration > Event Templates
4. Click on any event
5. Click on Communication
6. Add a line, change type to SMS
7. Type anything in Template
8. Click on Create "..."
9. The operation cannot be completed
Cause of the issue
==================
For many2one and many2many editable fields, the server sets the
can_create and can_write attributes on the field nodes. [1][2]
In some cases [3], those attributes are missing even though the fields
are actually editable. They are also absent for reference fields.
The `canQuickCreate` props was set to the following value:
`canCreate && !noQuickCreate`. When canCreate was absent, this was
evaluated to undefined, thus ignoring the noQuickCreate option.
Solution
========
When the permission attributes are missing, we have to assume that the
user has the appropriate permissions.
We also have to cast the extracted props to booleans as if you have an
props with a value of undefined, it will fall back to the default value.
In the test `no_quick_create option on a many2one when can_create is absent`,
we set the field as readonly and then cancel the readonly on the view.
This reproduces one of the bug of [3] which causes the permission
attributes to be missing.
-----
[1]: https://github.com/odoo/odoo/blob/fa6da3d63a3a4cce4e8ca788a49772925d318764/odoo/addons/base/models/ir_ui_view.py#L1296-L1297
[2]: https://github.com/odoo/odoo/blob/fa6da3d63a3a4cce4e8ca788a49772925d318764/odoo/addons/base/models/ir_ui_view.py#L1080-L1086
[3]: https://github.com/odoo/odoo/pull/138032
opw-3609799
closesodoo/odoo#148163
X-original-commit: efcb2a820bb57f1fae809725e799b3145fbbe599
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Antoine Demany (ande) <ande@odoo.com>
The digits option was of type string, but it needs to be an array of two
integers.
We introduce a new digits type to handle that case.
This is used in studio, more info in the enterprise PR.
opw-3614919
closesodoo/odoo#148571
X-original-commit: 6dbf59a9db1a68069df7e922fcab673ce7f7ae5a
Related: odoo/enterprise#53865
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Steps to reproduce
==================
- Set the zoom option on an image field (You can do it with studio
starting from 16.3)
- Go to a record and hover over the image
=> Nothing happens
Cause of the issue
==================
The tooltip is only displayed in readonly,
but with https://github.com/odoo/odoo/pull/100570 ,
the readonly mode has been removed.
So it only applies for views with the readonly attribute.
Solution
========
Always display the tooltip
opw-3646005
closesodoo/odoo#148534
X-original-commit: e0f9a7eedfb91ea46969490cf261548835844907
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Signed-off-by: Francois Georis (fge) <fge@odoo.com>
Steps to reproduce
==================
Go to Maintenance > Studio > Website > New Form
Click on the website editor
Click on the name field
UncaughtPromiseError > KeyNotFoundError
Cause of the issue
==================
Starting from 17, the FormEditorRegistry is not the legacy one.
If the key is not present in the registry, it will fail, unless we pass
a default value.
In this case, the key `website_form_key` is false.
Solution
========
Pass null as the default value.
opw-3652423
closesodoo/odoo#147840
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Steps to reproduce
==================
- Go to users
- Open the export dialog
- Expand the Groups field
- Add the Groups > Groups/Access Controls field
- Check the import compatibility option
- Expand the Groups field again
=> `TypeError: this.knownFields[id] is undefined`
Solution
========
The expandedFields were not reset. We also need to update the t-key to
take the compatibility state into account.
opw-3378834
closesodoo/odoo#146116
X-original-commit: d2f52abb8ce1b7e5291e0de7d4ea7788f39115bd
Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com>
Steps to reproduce
==================
- Enable the debug mode
- Use an odoo instance with the design-themes
- Click on the debug menu
- Click on Start tour
`OwlError: Got duplicate key in t-foreach: homepage`
Cause of the issue
==================
Website theme tours are registered here :
https://github.com/odoo/odoo/blob/5c01439cf20b2c0ca08d618df6f249617127e6d1/addons/website/static/src/js/tours/tour_utils.js#L348-L358
The saveAs option is used but since the owl refactor, it doesn't
override the previous tour.
There is a default homepage tour in the website addon and then one for
each theme.
There should only be one available at a time (same as in 16.2).
When selecting a new theme, the action button_choose_theme is called and
that ensures that only one theme can be installed at the same time.
opw-3595512
closesodoo/odoo#142350
X-original-commit: 69a361681c909cee5bf73a588dd4263bd49f1d5a
Related: odoo/design-themes#745
Signed-off-by: Francois Georis (fge) <fge@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Steps to reproduce
==================
- Go to budget analysis
- Switch to the pivot view
- Unselect the first three measures
- Save the current search and set it as default
- In the measures dropdown, there is only two measures remaining
Cause of the issue
==================
- When `context.pivot_measures` is used, the measures are computed from
it and those that comes from the metaData are missing.
opw-3544823
closesodoo/odoo#139315
X-original-commit: b11266cc377fa4753a0ee609258d9919f1ba5496
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Steps to reproduce
==================
- Install purchase_product_matrix,web_studio
- Go to purchase
- Click on a record
- Open studio
- Click on the "Products" tab > Edit List view
- Edit the product field
- Widget: Many2one
- Disable creation: enabled
- Close studio
- Create a new record
- Add a new line
- Type some random text in the product field
-> The option create is available
Cause of the issue
==================
When the can_create attribute is not passed, the `canCreate` ends up
undefined. This means the default value of true is used and the
`no_create` option is ignored.
The can_create attribute should actually be passed and there is a bug in
python in the `_editable_tag_field` function, but it is not something we
can change in stable due to the fact it it requires an explicit change
in some views to pass the validation and thus, this requires an addon
upgrade (`-u ...`).
See https://github.com/odoo/odoo/pull/138032
opw-3432903
closesodoo/odoo#139068
X-original-commit: 4b6756e1775488e230bc25767adf5744f0ea9149
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Steps to reproduce
==================
- Use a mobile viewport
- Create a quotation
- Add an order line
- Set a packaging
-> The Packaging Quantity field is missing
The same happens on purchase orders
---
opw-3504829
closesodoo/odoo#136213
X-original-commit: c5d665cc2b43a0040c3f5644265e74048c3d5ded
Signed-off-by: Tiffany Chang (tic) <tic@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
When adding a view to the dashboard, we already save the domain.
We don't want to save the default filters as they can have an opposite
domain as the one selected, meaning no records will be matched when
going to the dashboard.
---
opw-3385248
closesodoo/odoo#134610
X-original-commit: 16ab99eece9b36b1bb2958bb0f8ec45cbf8b83d3
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Steps to reproduce
==================
- Remove the Accounting/Billing permission from Marc Demo
- Login as Marc Demo
- Start a POS session
- Click on "Cash In/Out"
An error occurs because the user doesn't have the appropriate
permission
Solution
========
Add a key `has_cash_move_permission` in the pos config.
Set it to the presence/absence of the group `account.group_account_invoice`.
If the permission is missing, hide the "Cash In/Out" button.
opw-3333622
closesodoo/odoo#133444
X-original-commit: 62ea247953e5d8e81b3af7d4bbde3ec2ffb49f19
Signed-off-by: Robin Heinz (rhe) <rhe@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Steps to reproduce
==================
- Login as a user with no rights
- Use a mobile viewport
- Create a new Maintenance Request
- Edit the Created By field
-> A traceback occurs because the user has no rights
Solution
========
We extend the Many2OneField to accept a relation option and Depending on
whether the user has the rights, use the correct one.
This is similar to 41eaff0f4c17
opw-3430105
closesodoo/odoo#133261
X-original-commit: e78998c2951ec906fbccbe24e3fa454711a37c2b
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
First bug
=========
Steps to reproduce
------------------
- Go to A project task
- Upload an pdf
- Preview the pdf
- Press on the "+" key
```
TypeError: Cannot read properties of null (reading 'offsetWidth')
at AttachmentViewer.updateZoomerStyle
```
Cause of the issue
------------------
Some operations should only be called when the current attachment is an
image.
Second bug
==========
Steps to reproduce
------------------
- Go to documents
- Click on an image document
- Edit the "Tags" field and type +
The image is resized
Cause of the issue
------------------
In the documents app, the viewer is not fullscreen.
The keyboard actions should only be used when the attachment viewer is
focused. The onKeyDown was bound to the document.
Solution
--------
We can bind the `onKeyDown` to the AttachmentViewer.
Since we now need the viewer focused, we can use the autofocus hook.
opw-3456439
closesodoo/odoo#133126
X-original-commit: 7fa95127e55e21bcaf28191c872cd0a1b8a0a6a6
Related: odoo/enterprise#46270
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Steps to reproduce
==================
- Create a blanket order
- Choose a vendor
- Add a product P
- Set a price
- Save and Confirm
- Click on the RFQs/Orders smart button
- Create a new RFQ
- Delete the line
- Add a new line with the same product P
- Save
-> A validation error appears because the date_planned is not set
Cause of the issue
==================
`_compute_price_unit_and_date_planned_and_name` is overriden and passes
an empty recordset to the super method.
Solution
========
We can compute the `date_planned` using the selected seller
opw-3416573
closesodoo/odoo#132428
X-original-commit: d7db1d799fe042ef248968c6dee53eaf6e0ed3db
Signed-off-by: Tiffany Chang (tic) <tic@odoo.com>
When editing a Many2One field with studio, and toggling "Disable
opening" with studio, it doesn't do anything because it's the wrong
option.
opw-3434895
closesodoo/odoo#132102
X-original-commit: 0ec5a45f1633ffaff91aba6808cf50ad1c58c60b
Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Steps to reproduce
==================
- Go to Payroll > Payslips > All Payslips
- Click on any line
- Click on the cog > Edit Payslip Lines
- Change an amount
- Press Tab
```
Cannot read properties of null (reading 'value')
at commitChanges (/web/static/src/views/fields/input_field_hook.js:163)
...
```
Cause of the issue
==================
A custom Field is used: PayslipLineField.
It is used to override the record.update to trigger an action.
https://github.com/odoo/enterprise/blob/f8c027685a49fca519fd6ac2f41dd5f30b243934/hr_payroll/static/src/js/payslip_line_one2many.js#L63-L80
This causes the view to be destroyed -> `inputRef.el` becomes undefined.
Solution
========
Use the field value before the update.
opw-3434835
closesodoo/odoo#131971
X-original-commit: 546978c70f5bee59b9985246977585ef59d761cd
Signed-off-by: Francois Georis (fge) <fge@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Steps to reproduce
==================
- Go to project
- Switch to the list view
- Remove some optional fields
- Click on the export all button next to the "New Button"
The optional fields configuration are ignored and all fields are
exported.
Cause of the issue
==================
The `optionalActiveFields` are not taken into account when computing the
`defaultExportList`.
This was the case in 15.0
opw-3452459
closesodoo/odoo#131594
X-original-commit: 2a397cb5bb89d1a10e7ac765ff9035c102fbb436
Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Steps to reproduce
==================
- Enter studio
- Create a new app
- Create a new model with "pipeline stages" enabled
- Close studio
- Switch to the kanban view
- Add a new stage
`ValueError: Invalid field 'name' on model 'x_test_stage'`
Cause of the issue
==================
A model _rec_name is not always name. This is the case for example with
studio stages. In that case, `_rec_name == 'x_name'`.
Since [commit], we do a create instead of a name_create.
Solution
========
First do a name_create to handle custom _rec_name. Then if there is
still some field to be written, do a simple write.
[commit]: 4e974e5
opw-3432017
closesodoo/odoo#130921
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Steps to reproduce
==================
- Enable debug mode
- Go to Settings / Technical / Automation / Automated Actions
- Set "Action To Do" to "Execute Python Code"
- In the code editor, type really quickly
The code is briefly focused and when the next input is processed,
everything is erased.
Cause of the issue
==================
The AceField makes a debounced commit with the current editor value.
This triggers an onChange event, and upon receiving the results,
we update the editor value with the resolved value.
Although the editor value may have changed in the meantime,
we still revert it to the previous value.
Solution
========
There is no need to update the record every 10ms. We can simply to that
on blur. This is also what was done in 16.2.
opw-3379740
closesodoo/odoo#129694
X-original-commit: 4047ed03117fbcd5634843e29dc82e7ffb71b910
Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com>
Steps to reproduce
==================
- Go to documents
- Click on a document
- Add a tag
-> Nothing happens
Cause of the issue
==================
Since https://github.com/odoo/enterprise/commit/e35017719d0996279f362423a7b4b1c6e30b9766 ,
the documents app uses the _multiSave method from the relational_model.
If the selection is of only one record, the changes passed to the method
are ignored.
opw-3393862
closesodoo/odoo#128515
X-original-commit: 7e361761d20ddc64c62b85f3496e1596dc42987b
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Steps to reproduce
==================
- Open studio
- Go to reports
- Click on invoices
- Try do drag a text block at the end of the page after the table with
the total
Studio doesn't place a drop hook after the table.
Cause of the issue
==================
Studio only adds hooks before and after each direct child of the element
with a 'page' class.
Since [commit], the `#right-elements` and `#payment_term` elements are
outside the page and thus we can't place an element after.
Solution
========
- Move the `#right-elements` and `#payment_term` inside a new div since
they are part of the same line and we don't want to put an element
between them.
- Move that div inside the page.
- Add a clearfix class in order to have it's height correctly computed.
[commit]: https://github.com/odoo/odoo/pull/107714/commits/66373a538e123b29b983a8e02f302e7e258e084d
opw-3345430
closesodoo/odoo#127771
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Steps to reproduce
==================
- Install purchase_stock
- Use a mobile viewport
- Go to Purchase
- Click on a record
- Try to set the "Deliver To" field
- Click on a record
-> An action is triggered and the record is not selected
Cause of the issue
==================
[commit] removed the only use of `forceGlobalClick`.
When it is set, KanbanRecord.selection_mode evaluates to true.
Solution
========
forceGlobalClick should be set when selecting a record from the
SelectCreateDialog.
[commit]: https://github.com/odoo/odoo/commit/6e18fb3c35281bdba26d9616150141298975bb40
opw-3337018
closesodoo/odoo#127632
X-original-commit: 7a1db9fade48d231a71084624fa0063989afd2b9
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Steps to reproduce
==================
- Go into sign-in > Don't have an account
- Enter a password starting with a special character (ie: $)
Uncaught Javascript Error > Failed to set the 'value' property on 'HTMLMeterElement': The provided double value is non-finite.
Cause of the issue
==================
`(password.split(/[^\W_]+/).length - 1)` -> 0
`0 / 0` -> NaN
`Math.min(NaN, 1.0)` -> NaN
opw-3397932
closesodoo/odoo#127337
X-original-commit: e377aae101477b414d5391036477280a0c18445c
Signed-off-by: Vranckx Florian (flvr) <flvr@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Steps to reproduce
==================
- Go to Accounting > Vendor Bills
- Create a new record
- Click on the Auto-Complete field > Search more
- In the search bar, search for a reference
-> str is not a function
Cause of the issue
==================
The search filter is declared as such:
```xml
<
field name="name"
string="Reference"
filter_domain="['|', ('name','ilike',self), ('reference','=like',str(self)+'%')]"
/>
```
This domain is evaluated in javascript by basic python interpreter.
Going from 15 to 16, it has been rewritten. The str function isn't
present anymore in `py_builtin.js`.
Solution
========
Since this is the last remaining usage of this function and `self` is
already a string, we can simply replace `str(self)` by `self`
opw-3383708
closesodoo/odoo#126593
X-original-commit: 4485d1ca6d1dfe33f4fca6d2cc140296ce4058a5
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Steps to reproduce
==================
- With studio, create a model
- In the form view, add a many2many pointing to res.partner
- Close studio
- Create a record
- Add a line by selecting a partner
-> `Cannot read properties of undefined (reading 'find')`
Cause of the issue
==================
The res.partner uses a custom widget for the activity field `ListActivity`.
The fieldDependencies selection fields are not properly defined.
opw-3360436
closesodoo/odoo#125907
X-original-commit: 69019fd51aa4d157b95dd44c9f359b967c67a23d
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Since [0], when a cell is already focused, we do not refocus again.
But we forgot to set the lastEditedCell to the current one.
The test "editable list view, should refocus date field" has also been
fixed to reflect the actual behaviour. We set the focus on the picker
cell. Before, in the test, it was on the body. This means that in [1],
`this.activeRowId` would be set to null, thus, the test was not failing.
[0]: 437edce313
[1]: https://github.com/odoo/odoo/blob/1ecfd4ee9529a3cd21a925c1e850e10fe05f2097/addons/web/static/src/views/list/list_renderer.js#L116-L117
opw-3332809
closesodoo/odoo#125301
X-original-commit: 5ee1532bdbdde0062a13e75d85f7342eb2447415
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Signed-off-by: Abdelouahab Laaroussi (abla) <abla@odoo.com>
Steps to reproduce
==================
- Go to Accounting > Accounting > Journal Entries
The total at the bottom is not displayed and there is a `-` instead.
Cause of the issue
==================
The `amount_total_signed` field uses the currency_field
`company_currency_id`.
It should be present in the view for the web client to be aware of it's
value.
opw-3316448
closesodoo/odoo#125639
X-original-commit: eaec9f7c3c28e2ee9d42597052a21e6b2695cd60
Signed-off-by: William André (wan) <wan@odoo.com>
Steps to reproduce
==================
- Switch to arabic
- Open a datepicker
- Select the month
The month are displayed twice in two different arabic namings.
Cause of the issue
==================
There is an issue in the moment locale files since [0]. It has been made
apparent since [1].
Solution
========
Cherry pick a fix from the moment repo [2].
Revert the ar.js locale from before [0]
[0]: 11f3e7351a899848ec4df0107c3f6e2a627807ba
[1]: 6a1183f4c93ad068524a3242cd7b4e37f68fbf95
[2]: https://github.com/moment/moment/commit/251fba65cca5d5b2cf79f1f51a9d413c5e0cb161
opw-3349560
closesodoo/odoo#125381
X-original-commit: bfdf5baf4017058d7aff7c93fd504e684ed6783a
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Apply the same solution used in other tests with "test:hashchange":
```js
await testUtils.nextTick();
await legacyExtraNextTick();
```
closesodoo/odoo#124041
X-original-commit: 8bd9809bc4700637ffb26bbcfbd00c62b0dbd220
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Steps to reproduce
==================
- Have at least two warehouses
- Go to products -> Acoustic Bloc Screens -> Forecast
- Switch warehouses
- Refresh the page
Cause of the issue
==================
When reloading the page, the action is restored from the router state
(the URL). This means that the context isn't restored. In that case,
`originalContextAction.active_model` won't be defined. We then try to
use `originalContextAction` as if it was a string. But in this case,
it's an object `{active_id: ...}`.
opw-3301164
closesodoo/odoo#123812
X-original-commit: 6205a3b85b6551393c9ed33d0213cff9bc693ba3
Signed-off-by: Tiffany Chang <tic@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Steps to reproduce
==================
- Use a mobile (xs) viewport
- Go to sign
- Click on "Action"
-> InvalidButtonParamsError
Cause of the issue
==================
The bootstrap button should not be compiled as an action button
Solution
========
Don't call compileButton for button with the data-bs-toggle attribute
We also need to cancel the global click to let bootstrap handle the
action
opw-3278906
closesodoo/odoo#123579
X-original-commit: 5f569eedf9ed4e19b1fab1c83f7d315684097a7f
Related: odoo/enterprise#41906
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Steps to reproduce
==================
- Enable debug mode
- Go to Settings / Technical / Database Structure / Decimal Accuracy
- Set the "Product Unit of Measure" to 3 digits
- Go to Inventory / Reporting / Locations
- Group by company
-> The "On Hand Quantity" is formatted with 2 digits
Cause of the issue
==================
The field is declared as follows
```py
inventory_quantity_auto_apply = fields.Float(
'Inventoried Quantity', digits='Product Unit of Measure',
compute='_compute_inventory_quantity_auto_apply',
inverse='_set_inventory_quantity', groups='stock.group_stock_manager'
)
```
Solution
========
We should fallback to the field digits if the digits are not set on the
arch, such as this
https://github.com/odoo/odoo/blob/1cd49304ef118e667bd14fd5fa78a0baba47bb4a/addons/web/static/src/views/utils.js#L152
opw-3328657
closesodoo/odoo#123543
X-original-commit: f4ecb7ff0c166c7e58ea99711868a30ea3a7fda7
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Steps to reproduce
==================
- Open a product form view
- Enter .5 in the Cost field
It is parsed as 5 but it should be 0.5
Cause of the issue
==================
When trying to strip the currency symbol from the input, the leading
decimal separator was also removed
Solution
========
The decimalPoint can have multiple characters.
This means that we can't simply add the decimal separator inside the negated
character class.
Instead, what we can do is skip everything until we find a interesting
substring. (more details in the comment)
We then remove everything that is not a digit at the end.
Finally, we can pass that to `parseFloat`
closesodoo/odoo#123358
X-original-commit: fa466d75da3b30ac1e512a95436075ef1461a95c
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Steps to reproduce
==================
- Enter debug mode
- Go to "Settings / Technical / User Interface / Views"
- Click on the "View Type" column header
- Click on any record
- Use the breadcrumbs to go back
Issue: the list is not sorted anymore by "View Type"
Cause of the issue
==================
When there is an `orderBy` param passed to `DynamicList`, it takes
precedence over the previous exported state.
We should only use the params.orderBy if it is not the initial one.
Solution
========
In order to know if we are using the initial order by, we need to export
it. With that, we can check if the `params.orderBy` is the initial one.
If it is the same, use the `state.orderBy`
If not, use the `params.orderBy`
opw-3202088
closesodoo/odoo#120839
X-original-commit: 81dba0c1746ba579a01dead8e4712cf83cbaad28
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Steps to reproduce
==================
- Use an android phone
- Go to Timesheets
- Click on Add a line
- Click on the Hours Spent input
The keyboard is missing the colon `:` symbol
It is then only possible the enter a time in the float format.
Cause of the issue
==================
The inputmode=decimal attribute prevents a user from entering a `:`
symbol
Note that this doesn't happen on IOS, since the inputmode is ignored for
other reasons.
opw-3278089
closesodoo/odoo#120824
X-original-commit: 8b919ae51d7deb34169b7c6970964056ef2eb632
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Steps to reproduce
==================
- Go to a kanban view with lots of records, for example products
- Remove any filter and group by name
There is only 80 groups, and there is no way to get the next ones
Cause of the issue
==================
The `web_read_group` uses a limit, by default of 80
Solution
========
For kanban grouped views, we don't want to set a limit on the groups
opw-3283004
closesodoo/odoo#120758
X-original-commit: bf772181933ce5334da35c8368455963b2478399
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Steps to reproduce
==================
- Go to /web/signup
- In the password field, type something
- Clear the input
Cause of the issue
==================
A bunch of conditions evaluates to NaN inside
`ConcretePolicy.score(password)` when passing en empty string as a
parameter.
Solution
========
An empty password should always have a score of 0 anyway, so we can
do an early return. (The lengthscore would be 0, and we multiply by it
at the end)
opw-3269555
closesodoo/odoo#120711
X-original-commit: 6aa16bb740af14fcebd8f05bdc19c9e8879d77ed
Signed-off-by: Vranckx Florian (flvr) <flvr@odoo.com>
Steps to reproduce
==================
- Open a product form view
- Enter .5 in the Cost field
It is parsed as 5 but it should be 0.5
Cause of the issue
==================
When trying to strip the currency symbol from the input, the leading
decimal separator was also removed
Solution
========
Adapt the regex by adding the decimal separator in the list of
characters to not exclude
For that, we first need to replace the decimal by a dot as it could be multiple
characters long. (The same is done in `parseNumber`)
opw-3270039
closesodoo/odoo#120693
X-original-commit: 59dcd17c2d389d52365a2e2975de800284cd271f
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Steps to reproduce
==================
- Use an IOS device
- Open a view with a float field
- Try to edit it
The virtual keyboard displayed is missing a dot, so you can only input
integers
Cause of the issue
==================
For fields that should accept a float value, the inputmode attribute
should be decimal.
Also, specifically on IOS, even with the inputmode set to decimal, it
isn't possible to enter a negative value.
> decimal:
> Fractional numeric input keyboard containing the digits and decimal separator
> Devices may or may not show a minus key (-)
Source: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inputmode
Solution
========
For IOS, remove the inputmode attribute so that the default keyboard
shows. For other devices, use the decimal/numeric value depending on
whether a float should be accepted.
opw-3269275
closesodoo/odoo#120129
X-original-commit: fb37550715034e7a1fbe751889cd8ea2bd6e4128
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Steps to reproduce
==================
- In the settings, check the "Reception Report" option
- Create a new quotation
- Add a line
- Do not select a product
- Press tab a few times
The focus doesn't go past the Quantity widget
Cause of the issue
==================
The next item to be focused when pressing tab is selecting with the
following selector
https://github.com/odoo/odoo/blob/13745d597d03b552fe5f73ca81143a49efb8aa9f/addons/web/static/src/core/utils/ui.js#L159-L161
Since there is a tabindex of 0, the focus will try to go to the
QtyAtDateWidget
Solution
========
Set the tabindex to -1 when no value has been set
opw-3266063
closesodoo/odoo#120005
X-original-commit: 30fcb2e60fed17a473353b21bac4916e9ab77b10
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Steps to reproduce
==================
This only seem to happen on Firefox
- Go to Email Marketing
- Open a campaign
- Go back to the homepage by using the topleft square button
-> `$(...).offset() is undefined`
Cause of the issue
==================
The ResizeObserver used in MassMailingFullWidthViewController is still
triggered, even though it shoudln't.
Solution
========
Disconnect the observer when the component is unmounted.
opw-3271101
closesodoo/odoo#118785
X-original-commit: d5f6bc2b33c3b83520ed2ed710610b69dbe67b75
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Steps to reproduce
==================
- With the Chrome devtools, add a network delay of 1 second
- Go to Purchase
- Create RFQ
- Add vendor
- Add products and navigate by using the 'TAB' key
- Add another product line
- Repeat process quickly
`this.list.editedRecord is null`
Cause of the issue
==================
Order of events:
- First tab pressed
- onchange_1 triggered
- Second tab pressed
- onchange_2 triggered
- onchange_1 resolves
- The editedRecord is switched to readonly
- onchange_2 resolves
- There is no more editedRecord
opw-3115650
closesodoo/odoo#118760
X-original-commit: af5cedf078b439710e8801374ace524de54f3b66
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Co-authored-by: FrancoisGe <fge@odoo.com>
Steps to reproduce
==================
- Register two events listener on the same target
- Unregister them
Only the first one is unregistered
Cause of the issue
==================
`cbs` is used instead of `listeners`. This means that after any `.off`
call, the target is removed from the Map and it is not possible anymore
to unregister any events for it
closesodoo/odoo#118739
X-original-commit: 345dd30fdc627ada212a8eaa6f9817bbdaf5d3a3
Signed-off-by: Samuel Degueldre <sad@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Steps to reproduce
==================
- Go to elearning
- On the "Trees, Wood and Gardens" card, click on "view course"
- Click on Main Trees Categories
The slide name is outside the view
Also, the XP badge is cropped
opw-3225999
closesodoo/odoo#117595
X-original-commit: 1d5a92a04ba8e52099715cf782cecbb2c73feb14
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Steps to reproduce
==================
- Go to the product page
- Open studio
- Click on the picture and set the size to large
- Save and quit studio
- -> The size doesn't change
Port of https://github.com/odoo/odoo/pull/87087
opw-3217741
closesodoo/odoo#117423
X-original-commit: 63a3466c805c09989e5e022519e1ba450ecb1053
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Steps to reproduce
==================
- Go to the products list view
- Remove every filter/group by
- Search for "bolt"
- Group by > Add Custom Group > Active
- Remove the bold filter
- Expand the group
Cause of the issue
==================
The group pager is not displayed because the condition was incorrect
A group pager should only be displayed when the group limit is less than the
group count. The list count was used instead, meaning the total count
was the number of groups and not the number of item in the group.
opw-3221226
closesodoo/odoo#117267
X-original-commit: 4caab25d182bc2b5d1a2c315795a79d286a4491e
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
Steps to reproduce
==================
- Access a company with no records in transfer model (IT Company, SE Company, etc.)
- Go to transfers menu
- Click Studio
- Click form view button
- Click view tab on the left
- Click Show invisible elements
- Error "The requested change caused an error in the view. It could be because a field was deleted, but still used somewhere else"
Cause of the issue
==================
Since we are not editing an existing record, the PopoverWidgetField
component is loaded without a field value (it is an empty string).
This means that JSON.parse will fail
opw-3249161
closesodoo/odoo#117148
X-original-commit: ddb36467b401ec401b813182d172f5aab329baa7
Signed-off-by: Tiffany Chang <tic@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Steps to reproduce
==================
- Go to a form view with a binary field, or add one with studio
- Upload a file a.txt to a record
- Upload a file b.txt to another record
- Switch between both records with the pager
- The filename is not updated
opw-3208810
closesodoo/odoo#116323
X-original-commit: 90515916e8adb3edb560d73ec8889ad52319cc1d
Signed-off-by: Luca Vitali <luvi@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Steps to reproduce
==================
- Make sure the "Work Orders" setting is enabled
- Manufacturing > Products > Bills of Materials > New
- Select a random product
- In the Operations tab, add a line
- Type something in the Operation field
- Set the workcenter to Assembly line 1
- Save and close
- Click on the "Show Instructions" action button
```
Traceback (most recent call last):
File "/home/hubert/src/16.0/odoo/odoo/models.py", line 5108, in ensure_one
_id, = self._ids
^^^^
ValueError: not enough values to unpack (expected 1, got 0)
```
Cause of the issue
==================
The action is called without in id because the record is not yet created
Solution
========
The button should display a warning in x2manys when the record is virtual.
This was actually the case before Odoo 16 but there was an option on the
button `options='{"warn": true}'`. With this commit, it will be the
default behavior.
We also remove this option from the xml since it isn't used.
sentry-3950549982
closesodoo/odoo#114505
X-original-commit: 9fc0424a4450923aa8582bdb6766e1b19cb68546
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Steps to reproduce
==================
- Go to a kanban view
- Drag a card by the title to another column
-> The record is opened instead of being moved
Cause of the issue
==================
The `.o_kanban_record_headings` elements have a `overflow: hidden` rule
There is a bug [0][1] in firefox from 17 years ago were the
mouse{enter,leave} events are not fired in that case.
Solution
========
The previous attempt [2] to fix the issue is not working (anymore ?)
Thanks to a comment in the issue, we know that we can call
`.preventDefault` on the mousedown event.
[0]: https://bugzilla.mozilla.org/show_bug.cgi?id=339293
[1]: https://bugzilla.mozilla.org/show_bug.cgi?id=1352061
[2]: https://github.com/odoo/odoo/pull/104128
opw-3120973
opw-3121312
closesodoo/odoo#110282
X-original-commit: 713026806fa712afd85cb2530006f0f880dfa240
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Steps to reproduce
==================
- Install mrp_product_expiry
- Go to Inventory > Products > Lots/Serial Numbers
- Add the column "Expiration date"
- Remove the groupby if any
- Select 2 records, set an expiration date
- Confirm
- Select the same records, remove the expiration date
-> TypeError: value.setZone is not a function
Cause of the issue
==================
When entering the readonly mode after changing the date, the function
`formattedValue` is called. But `this.props.value` is equal to `""`.
`formatDateTime` only handles `DateTime | false`
The field is rendered from this template https://github.com/odoo/odoo/blob/1d8f6359bbf55983a9582282d12a187c67cdf509/addons/web/static/src/views/list/list_renderer.xml#L233-L236
When `canUseFormatter` returns true, formatDateTime is called with
false, coming from `record.data[fieldName]`
opw-3111869
closesodoo/odoo#109436
X-original-commit: 5b26a080ae28fab2a78e92a838472578591eef17
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Steps to reproduce
==================
- Use a mobile viewport
- Go to Expenses
- Create a record
- Enter a description and a category
- Click on Action
- Click on Attach Receipt
-> Nothing happens
Cause of the issue
==================
When the button is clicked, the dropdown is closed. This means that the
AttachDocumentWidget and FileInput Components are both destroyed.
Solution
========
Instead of using the FileInput Component, use an input element outside
the DOM.
We also use `this.env.services.orm` instead of `useService("orm")`
because the last one does nothing when the widget is destroyed
opw-3065590
closesodoo/odoo#108897
X-original-commit: 84d50b40f150f251a81e128fa9645d7fcc729dab
Signed-off-by: Samuel Degueldre <sad@odoo.com>
Steps to reproduce
==================
- Go to Expense
- Type some random string in the search bar in order to have no match
- Click on one off the app button
-> An error occurs
Cause of the issue
==================
The QRModal was not ported to owl
opw-3070434
closesodoo/odoo#108898
X-original-commit: d3b3e6ebb228453938aeac8286f7e3a916b6a027
Signed-off-by: Kevin Baptiste <kba@odoo.com>
closesodoo/odoo#107856
X-original-commit: 409fc809bafec2507342534bcdf4810ebffe9228
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
In the QUnit type definitions, there is a QUnit namespace and a QUnit
interface. When using a jetbrains IDE, it is confused between the two
and thinks the global QUnit is the namespace.
This means that it can't resolve QUnit.test, QUnit.module, etc
This fixes this issue by disambiguating between the two.
X-original-commit: 26dc799f841e51a6d57d427e095b662a45bc7e5a
Part-of: odoo/odoo#107856
Steps to reproduce
==================
- Create an invoice
- Add a line
- Type storage in the product field
- Ctrl+A then press backspace
- Press escape to close the autocomplete dropdown
- Click elsewhere
-> The first suggestion is now selected
opw-3055185
closesodoo/odoo#107302
X-original-commit: e0613bc06ba9f2653dd0cfc4057ba93abf8513f7
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Steps to reproduce
==================
- Install website_slides
- Go to eLearning > Basics of Gardening
- Enter edit mode
- Drop the tabs section from the right to the purple header
- Save
-> We can't switch tabs
Cause of the issue
==================
The `description` and `description_short` were converted from Text
field to Html fields in 6d914c005183aa5ae69650e3002a5a85ca83b4a6
Solution
========
Set the `sanitize_form` and `sanitize_attributes` to False
See odoo/odoo#47318
opw-2950825
closesodoo/odoo#107314
X-original-commit: e7f0f0a33bdee8520838a128e42cd4bdbd75267d
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Use case:
in the reconciliation widget, we need to know when the pager
is updated before the next render because we need to select the
appropriate id to use.
cf the following PR: https://github.com/odoo/enterprise/pull/33631
opw-3031131
closesodoo/odoo#106581
X-original-commit: 19523b511d54278613a3d3e7389a51665dcc3fc1
Related: odoo/enterprise#34408
Signed-off-by: Georis François (fge) <fge@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Steps to reproduce
==================
- Use a mobile phone / mobile view in devtools
- Go to Accounting > Customer invoices
- Click on one item
-> A traceback occurs, the uom is missing
Cause of the issue
==================
The field is declared as
`<field name="product_uom" groups="uom.group_uom"/>`
The raw value is accessed with
`<t t-esc="record.product_uom.value"/>`
Solution
========
Add the missing group
opw-3070671
closesodoo/odoo#106066
X-original-commit: 6563e7b077ade8da333b710578a23ee8ac23a025
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Steps to reproduce:
- Switch to `?debug=assets`
- Change the user language to Arabic and back to English
-> The page is still displayed in rtl mode
Cause of the issue:
The css is retrieved like this
```py
>>> self.env['ir.attachment'].sudo().search([('url', '=like', '/web/assets/%/web.assets_common.css')])
ir.attachment(212, 189)
>>> self.env['ir.attachment'].sudo().search([('url', '=like', '/web/assets/%/web.assets_common.css')]).mapped('url')
['/web/assets/212-5d47380/rtl/web.assets_common.css', '/web/assets/189-5d47380/web.assets_common.css']
```
Only the second one should be matched.
Solution:
Check for the absence of an extra parameter in the url
opw-2892012
closesodoo/odoo#105127
X-original-commit: 539427fa2a099b29adf099c2b48d4f1d2fd4ebd2
Signed-off-by: Julien Castiaux <juc@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Steps to reproduce
==================
- Use a mobile phone / mobile view in devtools
- Go to Purchase > Purchase Orders
- Click on one item
-> A traceback occurs, the uom is missing
Cause of the issue
==================
The field is declared as
`<field name="product_uom" groups="uom.group_uom"/>`
The raw value is accessed with
`<t t-esc="record.product_uom.value"/>`
Solution
========
Add the missing group
opw-3033650
closesodoo/odoo#105487
X-original-commit: bc6c2d8d15e22f6af720db6a28e21739defede94
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
This is a port of https://github.com/odoo/enterprise/pull/30046 for wowl
Steps to reproduce:
On a mobile device:
- Go to Inventory > Product Variants
- Switch to the list view
- Long press on a record
-> We can't scroll to select records below the current screen
closesodoo/odoo#105545
X-original-commit: cd874593b2390efba8e92228f85e9cf07c0e1a8c
Related: odoo/enterprise#33861
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Steps to reproduce
==================
- Go to project > My tasks
- Click on load More on the first column
- Nothing is loaded
Cause of the issue
==================
The orm groups by stages for each stage where the user is
the current one or null
-> This returns a null stage when the left join has not match
But we only want stages linked to the current user
Solution
========
When loading project kanban groups and isGroupedByPersonalStages is true:
Add the user_id to the domain
This is the same solution applied in saas-15.3
https://github.com/odoo/odoo/blob/f463d9a6ba95c0df64268b1c577f1b9d1c5bcb25/addons/project/static/src/js/project_kanban.js#L342
opw-3033943
closesodoo/odoo#105367
X-original-commit: 1294ff85aa54aa195e2f1554c6ef426869b90c75
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Steps to reproduce
==================
- Create a BOM
- Add a line with a product of type product
- Set the quantity to 0
- Save and click on overview
-> ServerError: Division by 0
Cause of the issue
==================
Lines with a quantity of 0 should be excluded from the computation
opw-3053167
closesodoo/odoo#104980
X-original-commit: b0f5170252ed73d31543b8d1dcf114ae6f0b65bc
Signed-off-by: Adrien Widart <awt@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Steps to reproduce
==================
- Go to Project > My tasks
- Drag a card to another column
-> An error occurs
Cause of the issue
==================
`personal_stage_type_ids` was not changed to `personal_stage_type_id`
opw-3036820
closesodoo/odoo#104442
X-original-commit: 3afc32af953556227dc07f8c65b5301d10fa92fe
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Steps to reproduce:
- Go to a list view with multiple items
- Click on an item
- Delete it
- Go back in history twice (Using the browser navigation) to return to the list view
-> We can't click on another record
opw-2854113
closesodoo/odoo#103808
X-original-commit: 92c90823139b413c8289d1c323ad694fc8220a61
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Steps to reproduce:
- Switch to debug mode
- Go to calendar
- Create an allday event in the future named test
- Add an attendee with an email address
- Save
- Go to Settings > Technical > Email > Emails
Two emails have been sent:
* Invitation to test
* test: Date updated
Cause of the issue:
The method `_inverse_dates` is called when creating an event,
triggering a write on the start field.
This then causes an update email to be sent
Solution:
Add a context key and don't send the update email if it is present
opw-2841276
closesodoo/odoo#100925
X-original-commit: d1e55727d010de2cd05bd2871b60d0e95caaaebf
Signed-off-by: Arnaud Joset <arj@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Steps to reproduce:
- Go to settings
- Click on discard
-> the breadcrumbs contains twice the "Settings" entry.
This commit fixes the issue by restoring the legacy behavior in
the "Discard" button handler, that is, calling doActionButton with
the special="cancel" param. This had been changed by mistake during
the conversion of the settings form view.
To make the fix work, a slight changed has been done in the model
as well, as reloading a datapoint could lead to the creation of
a new datapoint (typically when it's a new record), so the handle
must be updated in this case.
closesodoo/odoo#99904
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Steps to reproduce:
- Go to Accounting > Configuration > Chart of account
- Click on the setup button on the "Current Assets" line
- items are not correctly aligned
Cause of the issue:
`<separator/>` should take an entire row
The separator was on the same row as the field label.
closesodoo/odoo#99641
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Steps to reproduce:
- Go to reconciliation models
- Click on Line with Bank Fees
- Click on a x2many line
-> The popup is missing some padding
closesodoo/odoo#99539
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Steps to reproduce:
- Load odoo on a mobile view
- Go to Inventory > Products > Products Variants
- Switch to the list view
- Long press a record to enter the selection mode
-> The selected records should be highlighted in blue
closesodoo/odoo#98186
Related: odoo/enterprise#30465
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Steps to reproduce:
- Switch language to french
- Refresh the page
- Create a new payment
- Select a partner
- Enter an amount of 100000,00
- Save the record
-> The following field is incorrect: amount
Cause of the issue:
Since https://github.com/odoo/odoo/pull/97425 ,
`parseMonetary` wrongly assumed that a currency was always passed in
the parameters
opw-2937403
closesodoo/odoo#97861
X-original-commit: 9d518f847d2204fc5159a92bc4e4de655acf88fa
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Steps to reproduce:
- Switch odoo language to french
- Create a client bill for Azure Interior of $1 000 000
- Confirm it
- Go to the accounting dashboard
- On the bank, click on reconcile
- Select Azure interior
- Click on the correct bill
- Switch to Manual operations
-> $1 000 000 is not a correct monetary field
Cause of the issue:
Recently in https://github.com/odoo/odoo/pull/94126 , `formatMonetary`
switched from joining the currency and symbol from ` ` to a non
breaking space, NBSP.
To parse monetary values, the behavior was to split around NBSP to
get the symbol on one side and the value on the other which is then
passed to `parseFloat`.
For the following examples, NBSP is replaced with an underscore.
So `$_1000` becomes `$, 1000`
But some languages such as french uses the same char as thousands
separator.
In that case, `$_1_000` becomes `$, 1, 000` and then the parse fails.
opw-2937403
closesodoo/odoo#97513
X-original-commit: 9d36722797669498dfd1ad4659e5f29347ba30f3
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Steps to reproduce:
- Install Studio, Contacts, l10n_in
- Go to Contacts, open studio on the form view
- Edit the GST Treatment field name
-> No changes are made
Cause of the issue:
When combinings views to generate the final arch, extensions are
ordered by priority. Studio edits have a priority of 99 but in this
case, there is an override with a priority of 100.
opw-2899654
closesodoo/odoo#96713
X-original-commit: b97daa993347acd763c080eb8f5f4157a3359ab8
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Steps to reproduce:
- Go to stock > Replenishment
- Click on a forecast report widget
- Go back using the browser arrows
-> The page is redirected to another forecast report and the
breadcrumbs are cleared
Cause of the issue:
The forecast report action uses the `window.history.pushState` to
add the active model in the url.
When going back, the new url is the same one but without the active
model.
We can get the correct behavior by doing `window.history.go(-2)` in
the console.
Solution:
Use `history.replaceState` instead
opw-2917725
closesodoo/odoo#96487
X-original-commit: b39dc5488bacb704aaa60f1a502bf005d57f3276
Signed-off-by: Steve Van Essche <svs@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Steps to reproduce:
- Load odoo on a small screen / mobile phone
- Go to accounting > Miscellaneous Operations
- Click on create
-> The button to add a line in Journal Items is missing
Cause of the issue:
On mobile, the kanban view is used for Journal Items
The kanban view used [0] has an attribute `create="false"`
Solution:
Override the `create` attribute when the kanban view is a subview
[0]: https://github.com/odoo/odoo/blob/93520cc291ffb76dd1425e413f29653df37b4062/addons/account/views/account_move_views.xml#L94
opw-2870637
closesodoo/odoo#96484
X-original-commit: 31ac34816e61d66479dbd11ebb9c5348c3f12886
Signed-off-by: Christophe Simonis <chs@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Steps to follow:
- Set your timezone to New York
In linux for example with: `timedatectl set-timezone America/New_York`
- Verify that the user timezone is also set to NY
- Create a reccurent event the 6 july 2022 (a wednesday)
- In options, check the recurrent box
- Set repeat to once every week
- Thursday is the only day checked
-> It should be Wednesday
Cause of the issue:
When `_compute_recurrence` is called, `event.recurrence_id` has not
yet been set
-> `event.recurrence_id.event_tz` is False
=> Copy the defaults before computing the start date and check the
timezone of the event itself
opw-2886253
closesodoo/odoo#96049
X-original-commit: 7186dbad38ef1f05919c398f3c0c5f5d8f8b2219
Signed-off-by: Arnaud Joset <arj@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Steps to follow:
- Go to a crm.lead
- Schedule an activity
- Click on edit
- Click on mark as done in the popup
- Move the lead to a new stage
-> A missing record error is displayed for the activity
Cause of the issue:
Once the activity has been mark as done (deleted),
The crm.lead record is not updated. The old activity is then
passed to the server where an error is thrown
Solution:
Update the main view after editing an activity
opw-2878984
closesodoo/odoo#95748
X-original-commit: 0a740e819b7f2aa7feb527bb3223b272e4c9f967
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Steps to follow:
On a runbot,
- Login as Mitchell Admin
- Set the Administration permission of Marc Demo to Access Rights
- Login as Mark Demo
- Go to the Discuss App
- Edit a message from someone else by clicking on the pencil
-> A Traceback occurs
Cause of the issue:
- The pencil button is only displayed for another user if the logged in user
is admin. This is done by checking if the user is superUser or if he
has the group `base.group_erp_manager`
This is the case here
- When editing the message, the `base.group_system` is checked.
In this case, it is not present.
Solution:
Check the `base.group_erp_manager` in both cases
opw-2892740
closesodoo/odoo#95502
X-original-commit: bd8ed439d1d9342b24926eee332e8c26c6f0cd7c
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
When a widget is detached form the DOM, we manually set the owl status of
the corresponding node to 0 (new), but we before this commit, we didn't reset it
to 1 (mounted) when the widget was re-attached. As a consequence, event handlers
were not bound anymore.
Steps to reproduce:
- Open Inventory
- Click on Products > Lots/Serial Numbers
- Open a product
- Click on the Traceability smart button
- Click on a reference (eg: Inventory Adjustment)
- Click on the Traceability Report breadcrumb
-> Breadcrumbs are not working anymore
opw-2838994
closesodoo/odoo#95375
X-original-commit: 7945f7c40045def5e46e8a2f91bdfcc3a42d9f78
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Steps to follow:
- Use a mobile view in the browser dev tools
- Open the POS app
- Perform a Sale
- Close the session
opw-2788751
closesodoo/odoo#94587
X-original-commit: 654cdb5b8a46c9b44d432f05bcaf29d20fe3e306
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Steps to follow
- Use chrome
- Connect to a runbot with the demo account
- After a couple refreshes, the mail.MessagingMenu isn't displayed
Cause of the issue
The navbar should be updated when there is a new item added to the systray registry.
For that, the navbar listen to the update event with the `useBus` function.
`useBus` itself uses `useEffect` which only starts listening after a component has been mounted/patched.
-> The update callback is never called in this case because new items are added before the callback is registered.
opw-2801467
closesodoo/odoo#92768
X-original-commit: c2fd26881ceae95417e2a0afc71fdf8567e3b8c0
Signed-off-by: Samuel Degueldre <sad@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>