odoo16 front-end framework source code reading – startup, menu, action

odoo16 front-end framework source code reading – startup, menu, action Directory: addons/web/static/src 1.main.js Odoo is actually a single-page application. Judging from the name, this is the entry file for the front end, and the file content is also very simple. /** @odoo-module **/ import {<!– –> startWebClient } from “./start”; import {<!– –> WebClient } […]

odoo16 front-end framework source code reading–rpc_service.js

odoo16 front-end framework source code reading–rpc_service.js Let me first introduce some background knowledge to make it easier to read the code. 1. JSONRPC specification https://www.jsonrpc.org/specification Chinese translation version: https://wiki.geekdream.com/Specification/json-rpc_2.0.html JSON-RPC is a stateless and lightweight remote procedure call (RPC) protocol. This specification mainly defines some data structures and their related processing rules. It allows running […]

odoo16 front-end framework source code reading – ormService.js

odoo16 front-end framework source code reading–ormService.js Path: addons\web\static\src\core\orm_service.js Briefly translate the comments in the code: ORM service is a standard method for communication between js code and python’s ORM layer. Then I talked about the instruction format of One2many and Many2many envoys. Each instruction is a 3-tuple, among which: The first parameter is a fixed […]

Odoo writes Python code test cases

Odoo writes Python code test cases Odoo writes Python code test cases Odoo.test writing test cases Directory Structure Mainly test base classes and tool classes SavepointCase class Introduction to `from odoo.tests import tagged`: Write test cases assertion Execute test cases Coverage parameter description: Generate test report Summarize Odoo writes Python code test cases The odoo.test […]

Ubuntu installation odoo16 installation and files

1. Refer to the system information command for ubuntu View information to determine the source of the system uname command: The uname command is used to display basic information about the system, such as kernel version and system architecture. Here are some commonly used uname command examples: Check the kernel version: uname -r Check the […]

odoo16 AttributeError: type object ‘BaseModel’ has no attribute ‘fields_view_get’

odoo16 AttributeError: type object ‘BaseModel’ has no attribute ‘fields_view_get’ The Odoo 15 module uses many methods fields_views_get to inject domains and contexts and render components, for example: dynamically adjust the domian, dynamically increase the display of field fields, modify the attributes of field fields, etc. 1. Dynamically increase or adjust domain 2. Dynamically increase field […]

odoo16-python framework-action

Summary 1 The Beauty of Model and View Design The ultimate goal of view_ids, view_id, and view_mode is to generate views, that is, views. Models are dead, like men, immutable Vision is like a woman, ever-changing, with myriad gestures One yin and one yang are called Tao, and the beauty of design is reflected here […]

Odoo16views-1 Tree view

Odoo16views-1 Tree view Issues to be resolved: 1 What is the concept of context? 2 if the list view is editable, any field attribute from the form view is also valid and will be used when setting up the inline form view. What the hell, I didn’t understand A root element tree attribute The root […]

Odoo16howto-6 Multicompany Guide

Odoo16howto-6 Multi-Company Guide Starting from version 13.0, users can log in to multiple companies at the same time. This allows users to access information from multiple companies and also create/edit records in a multi-company environment If not managed properly, it can be the source of many inconsistent multi-company behaviors. For example, a user who logs […]