The checks of Odoo 20.0 (test_base, base, test_lint) that look at every installed model
or view, which this series of Odoo does not have yet or only runs on demand
(tags migration, render_all_views), run on the modules of the repository under
test (repo_to_check_quality, see test_viin_pylint):
- the computed fields shown on a form view compute on a new record
- the models customizing the ORDER BY of a many2one keep read_group valid
- the views the modules define or extend are valid once combined with all
their extensions
- these views load (get_views) as the administrator and as a regular user
- overrides keep the signature of the method, no super() without a parent method
- write() overrides do not read translated fields from vals
- no removed model attribute (name_get...), no ids/context parameter in public methods
- the many2one fields dependencies go through are indexed, the declared constraints
and indexes exist in the database
Editions Supported
- Community Edition
- Enterprise Edition
Test Base Viin
test_base_viin runs, on the modules of the repository under test, the
checks of Odoo 20.0 (test_base, base, test_lint) that look at every
installed model or view, which this series of Odoo does not have yet or only
runs on demand (tags migration, render_all_views). The checks of
test_lint reading the registry run here, not in test_viin_pylint: the
runbot runs the tests of test_viin_pylint in a database where it installs
nothing else. It ships no user interface: it is
driven by running its tests, after the installation of every module
(post_install).
What it checks
- test_all_models - every computed field without dependencies that a form
view shows computes on a new record (clicking New).
- test_read_group_override - a model that customizes the ORDER BY of a
many2one (_order_field_to_sql, _order_to_sql,
_read_group_orderby) keeps read_group grouped by that many2one valid.
- test_ir_ui_view (TestAllViews) - every primary view a module of the
repository defines or extends is valid once combined with all its
extensions. Installing a module only validates the nodes of its own views,
not the nodes of the other modules whose context it changes: a field used in
a modifier that another module restricts to some groups... The warnings of
the validation fail too.
- test_ir_ui_view (TestRenderAllViews) - these views load as the web
client loads them (get_views: the view, the description of its fields,
its toolbar, its filters), as the administrator and as an internal user with
the lowest group of every application: a view override, a selection
function or a toolbar action reading what a regular user cannot read only
fails for that user.
- test_override_signatures - every override is compatible with the original
definition of the method (parameters, defaults, @api.model), on every
method of every model, and no method calls super() when there is no parent
method to call.
- test_override_translated_fields - no write override reads a translated
field from vals (it is the value in one language only).
- test_model_attributes - no model still defines name_get (no effect
since 17.0) or another removed attribute, no public method has an ids or
context parameter.
- test_index - the many2one fields the inverse of a one2many or the
dependencies of a stored field go through are indexed, and every declared
SQL constraint and field index exists in the database.
The repository under test is the one of test_viin_pylint
(repo_to_check_quality).
This software and associated files (the "Software") may only be
used
(executed, modified, executed after modifications) if you have
purchased a
valid license from the authors, typically via Odoo Apps,
or if you
have
received a written agreement from the authors of the
Software (see the
COPYRIGHT file).
You may develop Odoo modules that use the Software as a library
(typically
by depending on it, importing it and using its
resources), but
without
copying any source code or material from the
Software. You may distribute
those modules under the license of your
choice, provided that this
license
is compatible with the terms of
the Odoo Proprietary License (For
example:
LGPL, MIT, or proprietary
licenses similar to this one).
It is forbidden to publish, distribute, sublicense, or sell
copies of the
Software or modified copies of the Software.
The above copyright notice and this permission notice must be
included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT
SHALL THE
AUTHORS OR COPYRIGHT HOLDERS
BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN
ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING
FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE
SOFTWARE.