Check Credit Limit before SO Approve

Registered by Mantavya Gajjar (Open ERP) on 2009-12-07

Hello.

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.

Thanks.

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

Blueprint information

Status:
Complete
Approver:
None
Priority:
Medium
Drafter:
None
Direction:
Approved
Assignee:
Mantavya Gajjar (Open ERP)
Definition:
Approved
Series goal:
None
Implementation:
Implemented
Milestone target:
milestone icon 5.0.7
Started by
Mantavya Gajjar (Open ERP) on 2009-12-08
Completed by
Mantavya Gajjar (Open ERP) on 2010-02-01

Sprints

Whiteboard

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"

Thanks..................

======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.