Odoo Help

6
15 Answers
13
Avatar

Frédéric Gilson (fgi)

--Frédéric Gilson (fgi)--

1153
| 6 5 6
Grand-Rosière, Belgium
--Frédéric Gilson (fgi)--
Frédéric Gilson (fgi)
2/7/13, 6:59 AM

You need to add a condition in the first transitions of the sales workflow: i.e. Credit limit > Total receivable (the amount the customer owes you) + Amount of the new SO.

So open the sales workflow (either from the developer drop-down menu, or from Settings > Technical > Workflows > Workflows). Then, add the following condition in the two order_confirm transitions (between draft & sent to router nodes): partner_id.credit_limit > partner_id.credit + amount_total (replacing True). Use the Diagram view to find them in an easier way.

From now on, everytime you try to validate a sales order, the SO status remains on "Quotation" if the sum of the amount the customer owes you and the new SO amount is higher than his credit limit.

5 Comments
my
2/9/13, 10:17 AM

Thank you, it works fine. However, I have another question, where you can help me one probably again. Is it possible, if so allow, show how a notification, if the credit limit is not sufficient for the job? Something like: The credit limit is not enough.

Thank you again.

Houssine BAKKALI
7/29/13, 9:47 AM

another way to do it if you do want to modify your workflow through the interface is to override the function action_button_confirm cause this is this function that is raising the signal defined in the transitions

Josh Stover
10/23/13, 5:55 PM

To take this further, I would like the ability to override the credit hold with management approval. So if a customer was over their limit and the order was blocked, the system would throw a warning rather than just blocking it from being confirmed all-together. There are circumstances where a check was lost in the mail, or an invoice was missed being sent, etc, where it is not entirely the customers fault that they are over the limit and in those circumstances, with management approval, orders are still filled that are over a customer's credit limit.

Elephante, Sean Samborski
6/11/14, 11:54 PM

Is it possible to have an alert or popup display a message to the user? This method works to block the progression of the sales order when a user presses "Confirm Sale" but it just refreshes the page without any message. The user will probably just click the button and then not notice nothing actually happened.

Marcio Valenzuela P
9/8/15, 11:04 AM

Great, works for us. How do I add the popup message that Josh asked about?

1
Robert Klüsener
5/19/13, 5:43 PM

In the "Getting Started with OpenERP" chapter of the V7 documentation I found the following statement:

"if one of your accountants puts a customer on credit hold, then that will immediately block any other action related to that company’s credit (such as sales or delivery)."

To test that I putted a credit limit of "0" to a customer. But I still can create and confirm a sales order, deliver goods and create and validate an invoice for this customer. Why is that?

1 Comment
my
5/20/13, 11:29 PM

Hi Robert. Have you added the code of Fredeic Gilson? This code works fine. Make sure you that you have the code correctly. Greeting.

0
Mustufa Rangwala
10/13/17, 3:57 AM

Hello,

Please see this video https://youtu.be/mkwVzN9NQrE

Regards,

Probuse Consulting Service Pvt Ltd


0
zen.star12@yahoo.com
4/11/17, 12:00 AM

Hi i have try it, it's work, but nothing reminder dialog open, so how to add it ?

Odoo 8

0
Avatar

Cameron

--Cameron--

1167
| 6 5 8
United Kingdom
--Cameron--
Cameron
5/16/13, 11:39 AM

Many thanks Frederic, however I changed the formula slightly to

"partner_invoice_id.credit_limit > partner_invoice_id.credit + amount_total"

Reason is we give give credit to the company not each employee of that company! We use OpenERP this way - Sales>Sales>Quotations> Create

The customer is "Fred Blogs" who works for "Smiths Industries" this person has 0 Credit The Invoice Address is "Smiths Industries" who has a credit of XXX GBP

This way we track who placed the order and can communicate with that individual, but all invoices go the company

2 Comments
Cameron
5/24/13, 8:37 AM

Just improved the formula (now allows for a path to create a proforma invoice - ie "create invoice = before delivery") new formula including brackets is (order_policy=='prepaid') or (partner_invoice_id.credit_limit > partner_invoice_id.credit + amount_total)

Marcio Valenzuela P
9/8/15, 11:05 AM

Im not sure I follow why you made the change from partner_id.credit_limit to partner_invoice_id.credit_limit

0
my
2/7/13, 8:33 AM

Sorry, but where can I find these two 'orderconfirm' transitions? I mean, what name they have exactly? I'm unfortunately not quite sure what these are.

Thank you.

1 Comment
Marcio Valenzuela P
9/8/15, 11:02 AM

Settings > Workflows > Transitions > draft - router - order_confirm sent - router - order_confirm

Ask a Question
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register
Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now