In v8, it was not allowed to create a DB with a name containing a space.
This should still be the case from v9 since it causes issuesfor backup
scripts, for example.
Reintroduces 1a0e9063d4
opw-727613
The notification mail template of a SO and an Invoice displays the logo
of the company. However, the logo is always the logo of the superuser's
company.
When accessing the logo from an email client, the UID is not defined.
Therefore, we fall back on the superuser, and display the logo of his
company.
We add the support of a `company` key in the kwargs, so we can force the
company from which we retrieve the logo. Note that this key was used
elsewhere, such as:
addons/web/static/src/js/web_client.js
opw-705420
Proxy.load is required by the livechat when it is embedded in an
external page, so that it is able to get the static xml files
(with the correct base_url).
opw-706497
With 003d85b instead of getting the name of the relation
field_relation we get field_relation/id.
But the data about the related fields are not gotten all at once when
opening the export modal. They are gotten by clicking on the arrow of
the related record.
So we need to have these /id information saved in the export list,
otherwise for example the related records can be missing when exporting
from an export list, whilst everything was OK without using the saved
export list.
With the previous change, an export list could contain an id and .id
fields for the same relational field, so a change must also be done in
fields_info method used when getting a saved list.
opw-665994
opw-693535
note: adapted forward-port of 8.0's 29be9ae80 which was lost when
merging web enterprise onto web community.
Explicitly remove the cursor of the request. Dropping a database
is not transactional and if overrides of ir_http's dispatch worked
with the database (for example, utm), we are not able to commit
the changes at the end of the request.
It worked nice before rev 40561b0fb6 that changed the use of self.pool
by request.env. Note: a cursor is always attached to an environment. Since
the call to super possibly broke the cursor (for example by dropping the
database), the end of the dispatch operation that try to commit and/or close
the cursor could possibly result in the traceback 'unable to close a closed
cursor' with request.env. With self.pool, it didn't happen because the
code actually called in the utm's dispatch override doesn't use a cr
and so there's nothing to close.
Until 9.0 our psycopg2 DSN connection strings do not allow having
spaces within the db name, and passing some can cause duplicate
registries to be loaded.
Stripping spaces is a simple workaround until we actually support
spaces within db names.
Fixes#13078
When a database is created, we are not auto-logged in to the new
database anymore because the login passed to the authentication request
is 'admin' instead of the one set in the creation form.
To fix this issue, we used the login parameter from the creation form
in the authentication request. We also set the login field to
required in the create database form view.
This bug comes from rev https://github.com/odoo/odoo/commit/903733a32
The API of `Registry` has been modified as follows:
- `Registry(name)` returns the registry of the given database
- `Registry.new(name)` forces the creation of a new `Registry` object
- `Registry.delete(name)` discards the given registry
- `Registry.delete_all()` discards all registries
- `registry.setup_signaling()` initializes the signaling for `registry`
- `registry.check_signaling()` returns an up-to-date `registry`
- `registry.signal_registry_change()` notifies that `registry` has changed
- `registry.signal_caches_change()` notifies potential cache invalidation
Since the commit odoo/odoo@36e875e which disable the second-guess from browser,
IE cannot display picture from Odoo where mimetype is wrong.
Before this commit, IE and probably other browser which one respect the header
'nosniff' don't display picture not_found and resized picutre via controller if
the original was not of type 'png'.
Eg: when we return the placholder 'not_found' if you don't have permission,
or when your resize the picture, ... we need to force the mime-type with the
new one and not keep the original mimetype.
This commit closes#13193
When a user connect to /web/database/manager directly without the
login page before, the request don't have registry.
When the user click to backup a db, a traceback was raised:
return request.registry['ir.http'].content_disposition(filename)
TypeError: 'NoneType' object has no attribute 'getitem'
Because it was impossible to call content_diposable from ir_http
without registry.
Now content disposable has been moved in http.py and is callable from
anywhere.
This commit closes#13192
This commit closes#11583