Odoo Help


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.


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 816 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 ?

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

2 follower(s)


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