According to Wiktionary, French spacing is "the archaic practice (though
still current in French) of inserting a space around colons, semicolons,
question marks, and exclamation marks". This is not standard practice in
English and most languages of the world.
The purpose of this commit is to start purging the code from this typo,
as it may reflect poorly on the software for some people.
closesodoo/odoo#114533
Related: odoo/enterprise#37853
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
The redirect function in the router exists only for the wait option.
This option is only used in one case (client action home). We have
therefore decided to remove the redirect function and to call
browser.location.assign(...) directly.
We will also remove the "wait" param for the "reload" and "home"
client actions. Because no call to "reload" needs it (1) and all calls to
"home" want it wait=True. So we will move the code that was executed
if wait=true to the "home" action client.
(1) In the POS, wait=true is used for a "reload" but this has no impact.
Wait=true was intended to wait for the server to restart before reloading
the page. In the case of the POS, there is no restart of the server, so
wait=True is useless.
closesodoo/odoo#112621
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
- base.view_base_module_uninstall
- base.base_module_install_review_view_form
- base.base_module_install_review_view_form
were the only 3 views in which a node was set outside the
<form>, <tree>, <kanban>, ... node.
```sql
master-all=# SELECT name FROM ir_ui_view WHERE type != 'qweb' AND inherit_id IS NULL AND arch_db ->> 'en_US' not ilike '<' || type || '%';
name
---------------------------------------
Uninstall module
base.module.install.request.view.form
base.module.install.review.view.form
(3 rows)
```
These were introduced by odoo/odoo#99438.
The goal was to set these warnings on top of the form view,
with no margins for a better UI.
While this serves an understandable purpose,
not having <form> as the root node causes issues:
- First, as seen in the above revision,
it requires to have to specify the view type in the XML data file,
because the view type is guessed from the root node of the view
```diff
<record id="view_base_module_uninstall" model="ir.ui.view">
<field name="name">Uninstall module</field>
<field name="model">base.module.uninstall</field>
+ <field name="type">form</field>
```
- Second, in the view post-processing, some implementations
are based on the root node of the view,
and not having `<form>` as the root node for instance makes
the view not editable, or not pass the `readonly`, `required`
attributes from the Python model.
https://github.com/odoo/odoo/blob/7b9bd9d37731fae724dc5d91da656dab70aa9ad4/odoo/addons/base/models/ir_ui_view.py#L1146-L1147https://github.com/odoo/odoo/blob/7b9bd9d37731fae724dc5d91da656dab70aa9ad4/odoo/addons/base/models/ir_ui_view.py#L1375-L1379
We could use the view type from the model itself,
instead of the root node, to determine the type of the view,
but then you wouldn't be able to use attributes set on the view node,
such as `editable="1"`, to determine if the root/view node is editable
or not.
https://github.com/odoo/odoo/blob/7b9bd9d37731fae724dc5d91da656dab70aa9ad4/odoo/addons/base/models/ir_ui_view.py#L1352
Because the `<form>` node wasn't the root node in the uninstall form view,
the modifiers attributes (`readonly`, `required`) were not passed
from the field python model to the view,
and the Studio fields
`custom_views`, `custom_reports`, `custom_models`, `custom_fields`
were editable in the view, while they shouldn't as those
are readonly computed fields.
A constraint will be added in master, to prevent developers
to create views with as root node something else than the view type.
The constraint is not added in stable 16.0 to avoid to suddenly
raise a constraint exception for modules from the community
and customers in production databases.
closes#107947closesodoo/odoo#108319
X-original-commit: c9dd160242c55dc824d4300635528dc82309f599
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
**Issue**
Login as an ordinary user (demo) and open Apps to make a request
access to a module. A wizard will appear asking for the admin users
to request to and the reason for request. Input elements are not
properly shown.
This is because inside an inner group, as we remove the label (cf.
nolabel=1), the input field is put in the first column which is supposed
to be the location of the (non-existing) label.
**Solution**
Make the field take both columns (label + field) as it has no label.
closesodoo/odoo#105314
X-original-commit: 5ab8b9fb6273ebed3f89e8f7a20b8238ea1963ab
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>