How to popup a message when i press the CheckAvailability button

Asked by Bushair

Hi,
if there is no product available ,I would like to pop up a message saying that
"Product is out of stock " when i press the "Check Availability" button available in
 Packing list located in Stock Management ->Outgoing Products ->Confirmed Packing Waiting Availability

how can i achieve this?
what is the modification required for this? and in which file?

Thanks

Question information

Language:
English Edit question
Status:
Answered
For:
Odoo Server (MOVED TO GITHUB) Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Quentin THEURET @Amaris (qtheuret) said :
#1

You should add a line with :

raise osv.except_osv(_('Warning'), _('Product is out of stock'))

in the file which contains the code of the 'Check availabilty' button. You should create a new module which overload the 'check_availability' function.

The more simple way to learn how modify a module in OpenERP is to follow an OpenERP technical training.

Revision history for this message
Ferdinand (office-chricar) said :
#2

Hm!

IMHO this message should go into trunk as it is a usability issue - either the state should change or an approprioate message should pop up

Can you help with this problem?

Provide an answer of your own, or ask Bushair for more information if necessary.

To post a message you must log in.