Files
odoo_source/addons/purchase
Goffin Simon 0fd773a486 [IMP] Cleanup and refactoring of exception handling
Unify and refactor exception handling in framework and addons.

The generic `except_osv` is now deprecated, and replaced by more specialized exception subtypes:
 - `UserError` (renamed from Warning, as it conflicts with the built-in `Warning`) raised when a non-technical error occurs during a business operation. It could be a missing information in the data provided by the user, or a misconfiguration.
 - `AccessError`: raised when any operation is denied because the user conducting it does not have the required access rights.
 - `AccessDenied`: raised when an operation that requires authenticated access is attempted via an unauthenticated request.
 - `MissingError`: raised when an operation is attempted on a record that does not exist.
 - `ValidationError`: raised when an operation violates a SQL or Python constraint.
 - All other exceptions are internal errors due to a system problem or bug, and raised untouched to the client-side, which should display a traceback.

All exceptions take a single message argument.

The `test_exceptions` module has been updated to showcase both new and old (deprecated) exceptions.

A great many old `except_osv` had a useless title with "Error!" or "Warning", those have been removed, as this is handled by the client-side widget that displays the messages.

This commit introduces a more consistent policy for logging errors and warnings:
 - All messages that do not require administrator attention should be logged at INFO level or lower. This includes all errors that are notified to the user in a friendly manner, even for access right problems or validation errors during business operations.
 - All messages that indicate a likely misconfiguration or malicious use by the users should be logged at WARNING level, as they typically require administrator attention.
 - All other unhandled internal errors cannot typically be handled by the user and should be logged at ERROR or higher level, as they require immediate administrator attention.
2015-01-16 17:15:18 +01:00
..
…
2015-01-07 18:01:58 +01:00
…

Odoo Supply Chain

Automate requisition-to-pay, control invoicing with the Odoo Open Source Supply Chain.

Automate procurement propositions, launch request for quotations, track purchase orders, manage suppliers' information, control products reception and check suppliers' invoices.

Automated Procurement Propositions

Reduce inventory level with procurement rules. Get the right purchase proposition at the right time to reduce your inventory level. Improve your purchase and inventory performance with procurement rules depending on stock levels, logistic rules, sales orders, forecasted manufacturing orders, etc.

Send requests for quotations or purchase orders to your supplier in one click. Get access to product receptions and invoices from your purchase order.

Purchase Tenders

Launch purchase tenders, integrate supplier's answers in the process and compare propositions. Choose the best offer and send purchase orders easily. Use reporting to analyse the quality of your suppliers afterwards.

Email integrations

Integrate all supplier's communications on the purchase orders (or RfQs) to get a strong traceability on the negotiation or after sales service issues. Use the claim management module to track issues related to suppliers.

Standard Price, Average Price, FIFO

Use the costing method that reflects your business: standard price, average price, fifo or lifo. Get your accounting entries and the right inventory valuation in real-time; Odoo manages everything for you, transparently.

Import Supplier Pricelists

Take smart purchase decisions using the best prices. Easily import supplier's pricelists to make smarter purchase decisions based on promotions, prices depending on quantities and special contract conditions. You can even base your sales price depending on your supplier's prices.

Control Products and Invoices

No product or order is left behind, the inventory control allows you to manage back orders, refunds, product reception and quality control. Choose the right control method according to your need.

Control supplier invoices with no effort. Choose the right method according to your need: pre-generate draft invoices based on purchase orders, on products receptions, create invoices manually and import lines from purchase orders, etc.