You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/developer_guide/best_practices.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ migration-notes: "Added during 2025 documentation reorganization"
9
9
10
10
OpenSPP follows the coding standards of the [Odoo Community Association (OCA)](https://github.com/OCA/odoo-community.org/blob/master/website/Contribution/CONTRIBUTING.rst), which are designed to ensure high-quality, maintainable, and consistent code. While the full guidelines are extensive, here are some of the most important best practices to follow:
11
11
12
-
**Enforce Coding Standards with Pre-Commit:**
12
+
## Enforce Coding Standards with Pre-Commit
13
13
- OpenSPP uses `pre-commit` to automatically enforce **PEP8** and other coding standards. This is the recommended way to ensure your code is compliant before committing.
14
14
- The configuration runs tools like `black` (formatting), `isort` (import sorting), and `flake8` (linting).
15
15
- To set it up, run these commands once in your repository:
@@ -19,21 +19,21 @@ OpenSPP follows the coding standards of the [Odoo Community Association (OCA)](h
19
19
```
20
20
- After setup, these checks will run automatically on every `git commit`. If an issue is found, the commit will be stopped, and some tools may automatically fix the files for you.
21
21
22
-
**Embrace Test-Driven Development (TDD):**
22
+
## Embrace Test-Driven Development (TDD)
23
23
- All new features and bug fixes must follow a Test-Driven Development approach. Write tests that define and validate the functionality *before* writing the implementation.
24
24
- Every module must include a comprehensive test suite to ensure its correctness and prevent future regressions.
25
25
- Tests should be placed in a `tests/` subdirectory within your module and will be automatically discovered by Odoo's test runner.
26
26
- This practice is critical for maintaining a high-quality, stable, and maintainable codebase.
27
27
28
-
**Write Clean and Readable XML:**
28
+
## Write Clean and Readable XML
29
29
- Use a consistent naming convention for record IDs. For example: `view_model_name_form`, `action_model_name_window`.
30
30
- Logically order fields in views to create an intuitive user experience.
31
31
32
-
**Prioritize Security and Extensibility:**
32
+
## Prioritize Security and Extensibility
33
33
- Always define access rights in `security/ir.model.access.csv`. Never grant universal access (`group_id:id,"",...`) without a strong reason.
34
34
- Avoid using raw SQL queries. Use the Odoo ORM to ensure security rules are respected.
35
35
- Always use `_inherit` and `xpath` to extend existing functionality. Never modify core OpenSPP or Odoo files directly.
36
36
37
-
**Adhere to Licensing Requirements:**
37
+
## Adhere to Licensing Requirements
38
38
- All custom modules for OpenSPP must be licensed under **LGPL-3**.
39
39
- Ensure that any third-party Python libraries or other dependencies you add are compatible with the LGPL-3 license.
Copy file name to clipboardExpand all lines: docs/developer_guide/module_development/index.md
-1Lines changed: 0 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,6 @@ This modular approach is the foundation for all advanced customizations. From he
35
35
- Adding more complex field types (Selection, Many2one, etc.).
36
36
- Creating entirely new models and menus.
37
37
- Adding business logic with Python methods.
38
-
- Building more advanced features documented in the {doc}`Module Development Guides <index>`.
39
38
40
39
By mastering this pattern, you can tailor OpenSPP to meet any specific program requirement while ensuring your implementation remains clean, stable, and easy to maintain.
Copy file name to clipboardExpand all lines: docs/developer_guide/troubleshooting.md
+18-18Lines changed: 18 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,30 +9,30 @@ migration-notes: "Added during 2025 documentation reorganization"
9
9
10
10
This guide offers insights and solutions for common errors encountered in Odoo application development. Understanding these errors and knowing how to address them efficiently is crucial for maintaining a smooth development process.
11
11
12
-
1.Error: Field “x” does not exist in model “y”
12
+
**Error: Field “x” does not exist in model “y”**
13
13
14
-
- Confirm the field's presence in the model.
15
-
- Ensure the Python file is listed in `models/__init__.py`.
16
-
- Verify the existence of from . import models in the `__init__.py` file.
17
-
- Consider upgrading the module.
18
-
- Double-check the field name for any spelling errors.
14
+
1. Confirm the field's presence in the model.
15
+
2. Ensure the Python file is listed in `models/__init__.py`.
16
+
3. Verify the existence of from . import models in the `__init__.py` file.
17
+
4. Consider upgrading the module.
18
+
5. Double-check the field name for any spelling errors.
19
19
20
-
2.Error: Unable to install module “x” due to an unmet external dependency: Missing Python library “y”, “z”
20
+
**Error: Unable to install module “x” due to an unmet external dependency: Missing Python library “y”, “z”**
21
21
22
-
- Execute pip install -r requirements.txt to install the module's required Python libraries.
23
-
- If specific libraries are mentioned in the error, install them individually using pip.
22
+
1. Execute pip install -r requirements.txt to install the module's required Python libraries.
23
+
2. If specific libraries are mentioned in the error, install them individually using pip.
24
24
25
-
3.Error: Invalid field “x” on model “y”
25
+
**Error: Invalid field “x” on model “y”**
26
26
27
-
- Ensure the field exists within the model.
28
-
- Restart the Odoo server and then upgrade the module.
27
+
1. Ensure the field exists within the model.
28
+
2. Restart the Odoo server and then upgrade the module.
29
29
30
-
4.Error: Some modules are not loaded, potentially due to missing dependencies or manifests: [“x”]
30
+
**Error: Some modules are not loaded, potentially due to missing dependencies or manifests: [“x”]**
31
31
32
-
- Check if the module is located in the custom/ or custom/src/ folder. If absent, add the module, restart the Odoo server, and attempt reinstallation.
33
-
- Confirm the existence of the dependency module of the missing module in either the custom/ or custom/src/ folder.
32
+
1. Check if the module is located in the custom/ or custom/src/ folder. If absent, add the module, restart the Odoo server, and attempt reinstallation.
33
+
2. Confirm the existence of the dependency module of the missing module in either the custom/ or custom/src/ folder.
34
34
35
-
5.Error: Inconsistent module states, possibly due to missing dependencies: [“x”]
35
+
**Error: Inconsistent module states, possibly due to missing dependencies: [“x”]**
36
36
37
-
- This issue often arises when a dependency of the “x” module encounters an error.
38
-
- Explore and rectify errors in other related modules.
37
+
1. This issue often arises when a dependency of the “x” module encounters an error.
38
+
2. Explore and rectify errors in other related modules.
Copy file name to clipboardExpand all lines: docs/overview/features/integrations_apis.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,6 +27,6 @@ OpenSPP is versatile regarding API communication, supporting various methods suc
27
27
28
28
With respect to API versioning management, OpenSPP currently manages this aspect manually. This approach ensures backward compatibility, allowing older API versions to continue functioning alongside newer ones. It also fosters forward innovation, facilitating the development of new API features. However, to further streamline this process, OpenSPP plans to deploy an API Manager.
29
29
30
-
OpenSPP supports sandboxing for API testing, ensuring APIs perform optimally in real-world scenarios. Invitation-only access is provided to demo.openspp.org, allowing prospective integrations to be thoroughly tested and tweaked in a controlled environment before they are deployed in production.
30
+
OpenSPP supports sandboxing for API testing, ensuring APIs perform optimally in real-world scenarios. Invitation-only access is provided to our demo instance, allowing prospective integrations to be thoroughly tested and tweaked in a controlled environment before they are deployed in production.
0 commit comments