Check Credit Limit before SO Approve

Registered by Mantavya Gajjar (Open ERP)


In the basic sales workflow : sale.order.basic
No there are validation to approve a sales order if the partner is out of his payment terms for example:

Case 1.- If he has at least a minimal number of invoices "out of date" the SO could not be done at least that other level of user approve it!
Case 2.- If the amount of the order exceed the amount configured on Partner "Credit Limit" or in other words
(Total receivable - total payable + actual Sale order total) > Credit Limit APPROVE no proceed.


Developed @ lp:~openerp-commiter/openobject-addons/trunk-extra-addons/ branch with module name

Blueprint information

Mantavya Gajjar (Open ERP)
Series goal:
Milestone target:
milestone icon 5.0.7
Started by
Mantavya Gajjar (Open ERP)
Completed by
Mantavya Gajjar (Open ERP)



Hello mga.

I think that 2 thing must be configurable in this improvments, at least by codding but configurable.

1.- Customizable exception error!, at least in code directly but mentioning the line on terp file.
2.- When the exception is the _NUMBER OF INVOICE ON MATURITY _ This "Number" must be cofigured.

For Example:
Invoice 1 Maturity date 10/12/2009
Invoice 2 Maturity date 25/12/2009
Today is 26/12/2009
The _ Number Configuration_ Said "3 Invoice"
Sales Order PROCEED.
..... some time later The customer has not paid!
Today is 26/01/2010
The _ Number Configuration_ Said "3 Invoice"
Sales Order NOT PROCEED.

"Exception Mes,sage said Invoice 1 Invoice 2 Invoice 3 are out of payment maturity it aproval can not proceed"


======GG 8.12.2009 =====
1. I vote that instead number of invoice out of maturity days we should implement maximum additional time after maturity day of oldest unpaid invoice. Remember that we have quite rich functionality of overdue payment which doesn't depend of number of invoices but of time after maturity date. Such maximum time can be configured on company level as default for partners and on partner form.

2. All such limits should work in two ways to configure:
a. Warning message which allows to confirm order anyway
b. Lock of SO confirmation - with message.

I am not strong of OpenERP access rights but I have to make a remark that if such functionality is to be working we have to remember about access rules. If credit or overdue limit should work for Salesman, the Salesman cannot be authorised to change that settings. And on the other hand (I know the reality) it has to be one (fe. Sales Manager) who should be authorized to confirm SO even out of that limits. So please implement it the way that user administrator or consultant can customise SO workflow and Partner limit fields access for such access rights. - This will be Done by the Record Rules that directly working on the Workflow
=====GG end====

Implemented under trunk extra addons branch


Work Items

This blueprint contains Public information 
Everyone can see this information.