[16.0][ADD] project_purchase_budget: add new module - #24
Open
marcelsavegnago wants to merge 2 commits into
Open
Conversation
marcelsavegnago
marked this pull request as ready for review
July 15, 2026 17:18
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## 16.0 #24 +/- ##
==========================================
+ Coverage 92.85% 97.63% +4.77%
==========================================
Files 9 15 +6
Lines 112 423 +311
Branches 6 31 +25
==========================================
+ Hits 104 413 +309
Misses 5 5
- Partials 3 5 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
marcelsavegnago
force-pushed
the
16.0-add-project_purchase_budget
branch
2 times, most recently
from
July 15, 2026 18:02
62bf850 to
de97be0
Compare
marcelsavegnago
force-pushed
the
16.0-add-project_purchase_budget
branch
from
July 15, 2026 18:43
de97be0 to
8ed20ba
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new Odoo module,
project_purchase_budget, which enforces purchase budget controls at the project level. The module allows project managers to set a maximum percentage of the sale value that can be spent on purchases for a project. When purchase orders exceed this budget, a tier validation process is triggered. The implementation includes models, security rules, tier validation definitions, and comprehensive documentation.The most important changes are:
Core Functionality Implementation:
__manifest__.py) declaring dependencies, data files, and metadata forproject_purchase_budget.ProjectProjectmodel extension inproject_project.pyto track and compute purchase budget KPIs (budget, spent, remaining, consumed %, and contribution), and to determine if the current user is a purchase budget manager.PurchaseOrdermodel inpurchase_order.pyto compute if a purchase order exceeds any linked project's budget, trigger tier validation, and ensure correct recalculation and invalidation of related KPIs.Tier Validation and Security:
tier_definition_data.xmlto require approval when a purchase order exceeds the project budget, and defined the necessary security group.Documentation:
README.rstand additional documentation files (INSTALL.rst,CONFIGURE.rst,USAGE.rst,DESCRIPTION.rst,CONTRIBUTORS.rst) describing the module's purpose, installation, configuration, usage, and credits. [1] [2] [3] [4] [5] [6]These changes collectively provide a robust framework for project purchase budget management with validation and clear user guidance.