Odoo Help


Assistance with XML file : button calling javascript function passing parameters and returning an answer then display it

Billiard R Made
on 12/4/14, 7:22 AM 2,275 views

Please help with very simple JavaScript logic.  I want a my xml button to call a javascript function passing parameters then calculate and return an answer for display. Below is the relavant part of my XML file

<field name="x" />
<field name="y" />                
<field name="z" />                
<script language="JavaScript">
     function findWriter() {                        
         //user to enter numeric values x and y
         //this script to calculate z = x + y and update <field name="z" />  
<input type="button" value="Display Writer" onClick="findWriter()"/> 

About This Community

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


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 12/4/14, 7:22 AM
Seen: 2275 times
Last updated: 3/16/15, 8:10 AM