[17.0][ADD] purchase_financial_risk: vendor credit limit control for purchases#549
Open
alan196 wants to merge 1 commit into
Open
[17.0][ADD] purchase_financial_risk: vendor credit limit control for purchases#549alan196 wants to merge 1 commit into
alan196 wants to merge 1 commit into
Conversation
99d456b to
118bcb7
Compare
628d0ab to
773149f
Compare
7668a24 to
d85cd0e
Compare
This module manages financial risk and credit limits for vendors in purchases, mirroring the functionality of `account_financial_risk` for sales. Main features: - Adds a `purchase_risk_limit` to the `res.partner` model. - Calculates total purchase risk by evaluating: - Uninvoiced Purchase Orders (`purchase_risk_po`). - Draft Vendor Bills (`purchase_risk_bill_draft`). - Open/Posted Unpaid Vendor Bills (`purchase_risk_bill_open`). - Displays clickable risk elements in the Vendor form that open pivot views detailing the contributing records (`purchase.order.line` and `account.move`). - Blocks the confirmation of Purchase Orders (`purchase.order`) AND the posting of Vendor Bills (`account.move`) when the total vendor purchase risk exceeds their limit via an explicit Exception wizard. - Ensures robust security scopes requiring `Purchase Risk Manager` privileges to bypass the risk validations manually. - Extensive test coverage evaluating memory `NewId` lookups over onchange boundaries, precise limits parsing, dynamic document validations and overrides blocks. - Contains es_MX language translation files explicitly mapped for generic wizard blocking.
d85cd0e to
61c40f3
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.
Adds a new module that replicates the financial risk control logic of
account_financial_riskandsale_financial_riskfor the purchasing flow.Features: