Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
9231 มุมมอง

Hi

I am traying to add warning when customer have a balance i have  used  

raise UserError("Customer has balance!")

it is working but it will block it to create SO i need some thing just a simple warning not blocking any one can help?

อวตาร
ละทิ้ง

Is it based on a button action or at the time of save or on changing any field value?

It is based on a button action 

 

From: K Ch Kumar Jagabattula <notifications@mail.odoo.com>
Sent: Monday, June 6, 2022 4:21 PM
To: sales@gyeongcc.com
Subject: Re: Raise Warning

 

Is it based on a button action or at the time of save or on changing any field value?

--
K Ch Kumar Jagabattula

Sent by Odoo S.A. using Odoo.

คำตอบที่ดีที่สุด

If you want to create a SO and after open a message with warning, you can use a simple wizard object with a form, in a field called "message" you can setup the default text to show and a button for close it. I create a module but not converted in new version, but if you need I can migrate.

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi,

Try use the following 

raise Warning(_("Customer has balance!"))

Regards 

อวตาร
ละทิ้ง
ผู้เขียน

Hi
when i using the code i will get server error
RPC_ERROR
Odoo Server Error

Related Posts ตอบกลับ มุมมอง กิจกรรม
3
ม.ค. 25
4023
Restrict Studio ,to users แก้ไขแล้ว
1
ธ.ค. 24
2338
1
ต.ค. 22
2491
0
ธ.ค. 21
2127
2
มี.ค. 24
4259