Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
1811 Lượt xem

Currently, Odoo displays a warning when a sale is attempted for a contact who has exceeded their credit limit. However, the system does not block the sale automatically.


When using the following configuration:

​1. Activate Sales Credit Limit

2. Set Credit Limit on Contact Form:

      1. Navigate to the Accounting tab in the contact form.
      2. Set the desired credit limit for the contact.




Ảnh đại diện
Huỷ bỏ

Hi

could I ask you from a newbie point, when I try enter " [("partner_credit_warning", "!=", False)] I get a Domain is not valid error, could you point me in a direction please

Tác giả Câu trả lời hay nhất

This request is an update from the previous ticket: link to previous ticket. The previous ticket was made for V15 and suggested a solution that in the current version (V18) involved custom code, which would require ongoing maintenance. With this new approach, we aim to eliminate the need for code, which would impact your subscription.

Settings​

​4. Go to the Studio in the form view of the Sale Order model.

​5. Enable the option "Show Invisible Elements" so that the "Confirm" buttons are visible.

​6. Add Approval for Sale Order Confirmation:

  • On each Confirm button, add an approval step.
  • Set the approval role to Sales / Administrator.

​7. Add the following domain to the approval configuration:

[("partner_credit_warning", "!=", False)]

Important: Make sure you are in debug mode. The field Partner Credit Warning will not appear unless typed directly into the code editor.

Demo

Access with a user with Sales / User Rights

Then try to make a sell to any client who has reached his credit limit. It will require an approval.

Ảnh đại diện
Huỷ bỏ

This solution works perfectly!

Bài viết liên quan Trả lời Lượt xem Hoạt động
4
thg 2 25
8034
0
thg 5 25
634
3
thg 7 25
16321
0
thg 11 24
1030
3
thg 6 25
6141