This question has been flagged
3633 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"?>
<modification>
<file name="addons/web/static/src/js/view_form.js">
<operation>
<search position="before"><![CDATA[ ....  code i'm looking for .... ]]></search>
            <add><![CDATA[ ...  my code i want add or replace ...  ]]></add>
</operation>
</file>
</modification>
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 ?

Avatar
Discard