Các kiểm tra của Odoo 20.0 (test_base, base, test_lint) duyệt mọi model hoặc view đã cài,
mà bản Odoo này chưa có hoặc chỉ chạy khi gọi riêng (tag migration,
render_all_views), chạy trên các module của repo đang kiểm
(repo_to_check_quality, xem test_viin_pylint):
- tiền tệ của trường tiền tệ (monetary) được lưu phải biểu diễn được bằng SQL (nếu
không, trường đó không được cộng tổng trong danh sách và báo cáo)
- view mà các module định nghĩa hoặc mở rộng vẫn hợp lệ khi ghép với mọi view
mở rộng của nó
- các view đó tải được (get_views) bằng quản trị viên và bằng người dùng thường
- không gọi super() khi không có hàm cha
- write() không đọc trường dịch trong vals
- many2one mà dependency đi qua phải có index, ràng buộc và index đã khai báo phải
có trong DB
Ấn bản được Hỗ trợ
- Ấn bản Community
- Ấn bản Enterprise
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 - the currency of every stored monetary field has a SQL
representation: Odoo sums such a field in the lists, the pivots and the
graphs (read_group) per currency, and drops its sum without a word when
the currency cannot be aggregated in SQL (Monetary._description_aggregator).
- 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 - no method calls super() when no parent
defines the method: the call fails as soon as the code runs.
- test_override_translated_fields - no write override reads a translated
field from vals (it is the value in one language only).
- test_index - the many2one fields the dependencies of a stored field go
through are indexed, and every declared table object (models.Constraint,
models.Index, models.UniqueIndex) and field index exists in the
database.
This series runs some checks of Odoo 20.0 on every model already, so they are
not repeated here: the computed fields on a new record and the form of every
model opening on a new record (base, TestEveryModel), the signature of
the overrides, the ids/context parameters of the public methods and the
index of the inverse of a one2many (test_lint: TestLintOverrideSignatures,
TestNaming, TestIndex, which the runbot runs in the database where it
installs every module), the customized ORDER BY of a many2one keeping
read_group valid (test_read_group) and the removed model attributes
(base, test_deprecation).
The repository under test is the one of test_viin_pylint
(repo_to_check_quality).
Phần mềm này và các tệp liên kết ("Phần mềm")
được sử dụng (chạy, tuỳ biến, chạy sau khi được tuỳ biến)
chỉ khi bạn mua được giấy phép có hiệu lực từ tác giả,
điển hình như qua các Ứng dụng Odoo, hoặc trong trường hợp
bạn nhận được thoả thuận bằng văn bản từ tác giả của Phần mềm (chi tiết tại tệp COPYRIGHT).
Bạn có thể phát triển các phân hệ Odoo có sử dụng Phần mềm như một Thư viện (thường là phụ thuộc vào, nhập vào và sử dụng nguồn của nó)
nhưng không sao chéo bất kỳ mã nguồn hay tài liệu nào thuộc Phần mềm. Bạn có thể phân phối những phân hệ này theo giấy phép
mà bạn lựa chọn, miễn sao nội dung giấy phép đó tương tích với điều khoản của Giấy phép Phần mềm Độc quyền Odoo
(ví dụ: LGPL, MIT hay bất kỳ loại giấy phép phần mềm độc quyền nào tương tự vậy).
Nghiêm cấm phát hành, phân phối, cấp phép lại hoặc bán bản sao của Phần mềm hoặc
bản sao
Phần mềm đã được sửa đổi.
Thông báo bản quyền và chấp thuận nêu trên buộc phải được bao gồm trong tất cả các bản sao hoặc các phần quan trọng của Phần mềm.
PHẦN MỀM ĐƯỢC CUNG CẤP "NGUYÊN TRẠNG", KHÔNG BẢO ĐẢM DƯỚI BẤT KỲ HÌNH THỨC NÀO, ĐƯỢC THỂ HIỆN RÕ RÀNG HOẶC NGỤ Ý, KHÔNG GIỚI HẠN
ĐẢM BẢO VỀ CÁC BẢO ĐẢM NGỤ Ý VỀ KHẢ NĂNG THƯƠNG MẠI, PHÙ HỢP VỚI MỤC ĐÍCH CỤ THỂ VÀ KHÔNG VI PHẠM.
TRONG MỌI TRƯỜNG HỢP SẼ KHÔNG CÓ TÁC GIẢ HOẶC CHỦ SỞ HỮU BẢN QUYỀN NÀO CHỊU TRÁCH NHIỆM VỀ BẤT KỲ KHIẾU NẠI,
THIỆT HẠI HOẶC TRÁCH NHIỆM PHÁP LÝ KHÁC NÀO TRONG PHẠM VI HỢP ĐỒNG, CÁC THIỆT HẠI HOẶC CÁCH KHÁC, PHÁT SINH TỪ, NGOÀI HOẶC
CÓ LIÊN KẾT VỚI PHẦN MỀM HOẶC VIỆC SỬ DỤNG HOẶC KINH DOANH KHÁC TẠI PHẦN MỀM.