TIP: You can type at any time to perform a new search.
Sale Financial Risk
sale_financial_risk · OCA/credit-control
🛠 Migration considerations
- Raw `cr.execute()` INSERT/UPDATE/DELETE bypasses the ORM (no compute/constrains/tracking/mail): `UPDATE sale_order_line sol SET risk_partner_id = p.commercial_partner_id FROM sale_order so LEFT JOIN res_partner p ON p.id = so.partner_invoice_id WHERE so.id = sol.order_id and sol.risk_partner_id IS DISTINCT FROM p.commercial_partner_id;` - re-check the table/column names still match after upgrading. migration-raw-sql-write · source
Found by automated static analysis: patterns worth a look before/after upgrading this module to a newer Odoo version.
- Repository
- OCA/credit-control · module folder · Try on Runboat
- Module version
- Category
- Sales Management
- Folder size
- 0.31 MB
- License
- AGPL-3
- Application
- No
- Auto-installable
- No
- Website
- https://github.com/OCA/credit-control
- Last tracking update
- 2026-08-19 17:41:07
- Authors
- Odoo Community Association (OCA), Tecnativa
- Maintainers
- Odoo Community Association (OCA), Tecnativa
- Committers
- Maksym Yankin, Weblate, OCA-git-bot, oca-ci, psugne
- Odoo dependencies
- Python dependencies
- None
- System dependencies
- None
- Required by
- None
- Description
Extends Partner Financial Risk to manage sales orders. Adds a new risk amount field in sale order line to compute risk based on the difference between ordered quantity (or delivered in some cases) and invoiced quantity. If any limit is exceed the partner gets forbidden to confirm sale orders.
Code Analysis ⓘ
Views touched (3)
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
financial_risk_sale_order_line_pivot_view |
Account financial risk sale pivot view | sale.order.line | pivot | New |
res_config_settings_view_form |
res.config.settings.view.form.inherit.credit.control | res.config.settings | form | Inherits account_financial_risk.res_config_settings_view_form |
res_partner_view_risk |
res.partner.view.risk | res.partner | Inherits account_financial_risk.res_partner_view_risk |
HTTP endpoints (0)
No HTTP endpoints found for this module.
Models touched (6)
New fields (0)
No new fields.
Public methods (0)No public methods.
New fields (1)
-
allow_overrisk_sale_confirmationBooleanhelp='If is set always allow the confirmation of sale orders.'string='Allow sale order confirmation over the risk'
No public methods.
New fields (2)
-
allow_overrisk_sale_confirmationBooleanreadonly=Falserelated='company_id.allow_overrisk_sale_confirmation' -
include_risk_sale_order_doneBooleanconfig_parameter='sale_financial_risk.include_risk_sale_order_done' args: 'Include locked sale orders into risk calculation'
No public methods.
New fields (3)
-
risk_sale_orderMonetarycompute='_compute_risk_sale_order'compute_sudo=Truecurrency_field='risk_currency_id'help='Total not invoiced of sales orders in Sale Order state'string='Total Sales Orders Not Invoiced' -
risk_sale_order_includeBooleanhelp='Full risk computation'string='Include Sales Orders' -
risk_sale_order_limitMonetarycurrency_field='risk_currency_id'help='Set 0 if it is not locked'string='Limit Sales Orders'
No public methods.
New fields (0)
No new fields.
Public methods (2)-
action_confirm(self) -
evaluate_risk_message(self, partner)
New fields (3)
-
company_currency_idMany2one → res.currencycomodel_name='res.currency'readonly=Truerelated='company_id.currency_id'string='Company Currency' -
risk_amountMonetarycompute='_compute_risk_amount'compute_sudo=Truecurrency_field='company_currency_id'store=True -
risk_partner_idMany2oneindex=Truerelated='order_id.partner_invoice_id.commercial_partner_id'store=Truestring='Commercial Entity'
No public methods.
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…