How can i get a warning pop up before saving if a the state value == "done"?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
2
Replies
1129
Views
Hello,
Thanks it works,
but can I get only the message when i click on save?
Hi,
Please try the below code.
@api.onchange('state')
def onchange_state_warning(self):
if self.state == 'done':
warning_mess = {
'title': _('Your Warning Title!'),
'message': _(
'Your Custom Warning message.'),
}
return {'warning': warning_mess}
return {}
Regards
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
1
Nov 24
|
1485 | ||
|
1
Nov 24
|
1193 | ||
|
2
Sep 24
|
1047 | ||
Update stock quantity
Solved
|
|
1
Aug 24
|
2454 | |
|
3
Aug 24
|
2687 |
onchange api