Odoo Help


Is not possible to inject code into view_form.js using XML file in Odoo8.0?

Dr Obx
on 4/12/15, 8:23 AM 1,388 views

Of course i can do it manually but if it's possible using xml ... I would like to insert code into the "view_form.js" using XML commands whilst Custom Module installation, is it possible in Odoo ?
Here is an example:
<?xml version="1.0" encoding="utf-8"?>
<file name="addons/web/static/src/js/view_form.js">
<search position="before"><![CDATA[ ....  code i'm looking for .... ]]></search>
            <add><![CDATA[ ...  my code i want add or replace ...  ]]></add>
It won't work like that, gives me an error.
If I add <openerp><data> .... </data></openerp> got the same error.
Is there any other way how can i insert my code into this file ?
Why I would like to do it that way:

Once I'll click install on my module i would like to make a changes in this file without involving "special forces", just install and all updates will be done for me.

Is it really impossible ?

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

2 follower(s)


Asked: 4/12/15, 8:23 AM
Seen: 1388 times
Last updated: 4/16/15, 5:10 AM