Odoo Help

Welcome!

This community 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.

0

OnChange Message for Field

By
Peter
on 3/6/15, 8:51 AM 648 views

Let's say, someone changed the state of a product from "Normal" to "Obsolete". Is it possible to send a message to all followers of this product for this event? (automated action?)

Update: Thank you, Alby Antony, can i write a own module for this or change the existing code?

you just need to update your existing code.

Alby Antony
on 4/10/15, 2:08 AM
2
Alby Antony
On 3/9/15, 3:15 AM

in xml view

<field name="amount_paid" placeholder="Amount Paid" on_change="onchange_amount_paid(amount_paid)"/>

 

function defenition can be

def onchange_amount_paid(self, cr, uid, ids, amount_paid, context=None): res = {'value':{}}

if amount_paid:

if fee_type==1 and amount_paid<70:

warning = { 'title': ("Warning"), 'message': ('registration account minimum payment is 70'), }

return {'value': res.get('value',{}), 'warning':warning} 

return {'value': res.get('value',{})}

 

this will validate the amount paid in onchange function. if the amount is less than 70 it will show an error

0
Nathan
On 3/6/15, 10:28 AM

This can be done with OpenChatter and track_visibility='onchange' on specific fields.
 

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 3/6/15, 8:51 AM
Seen: 648 times
Last updated: 4/10/15, 2:08 AM