This question has been flagged

It seems that we can't define javascript function on xml file;

I wan to know whether we can and how to?

Avatar
Discard
Best Answer
<template id="assets_backend" inherit_id="web.assets_backend">
     <xpath expr="." position="inside">
         <script type="text/javascript">
                 function your_function(args......)
                 {
                             //statements
                  }
         </script>
       </xpath>
 </template>
Avatar
Discard
Author

thank you very much