Injector JS/XML/CSS

by
Odoo

27.11

v 13.0 Third Party 11
Availability
Odoo Online
Odoo.sh
On Premise
Lines of code 620
Technical Name mb_injector
LicenseOPL-1
Websitehttps://majorbird.com/
Versions 14.0 13.0
You bought this module and need support? Click here!
Availability
Odoo Online
Odoo.sh
On Premise
Lines of code 620
Technical Name mb_injector
LicenseOPL-1
Websitehttps://majorbird.com/
Versions 14.0 13.0

JS Injector

Inject JS/CSS/XML sources at page load for certain user groups.

This module allows you to inject JS/CSS/XML sources at page load for certain user groups. The code you inject is not cached nor compressed with Odoo scripts, which allows you to quickly add features on top of Odoo without developing a hard-coded module.
Example of usage: quickly modify the look of Odoo for certain users, add shortcut menus.


While you can browse snippets to help you use this module faster, nothing will be installed without your confirmation.
Please make sure you double-check the code you plan to run.
No data is collected from this module.

Credits: Using Prism for code syntax highlighting
Inspired from the JS Injector module from Debasish Dash, extended/improved for our needs.

How to use

  • Give a name to your script, and a group of user it will apply to.
  • Set the script to be active if you want it to be effective
  • JS code: will be executed "as-is" at page-load. You can use "odoo.require(...)" to register a module, similar to static JS files of traditional modules. You can use jQuery with "$".
  • CSS Code: will be applied on top of Odoo CSS, so you can override it.
  • XML Code: will be registered as a XML static resource which you can call from your JS code for example to render it.

Example: set a JS alert at load and change the background color of menu

Result of this example: we get an alert and the menu bar has changed color

Examples and snippets

You can search for existing snippets online. Just search, and copy paste the code where needed.
BE CAREFUL and read the code you are about to install as it uses your user account to execute it.
We do not take responsability.

Example: search for existing snippets, quickly use it

Help & Support

Please send your feedbacks for quick support at the links below.

In case your script is generating a bug which blocks you: add "disable_mb_injector" in the url of your Odoo (anywhere), it will disable any execution.

About Majorbird

Majorbird is an ERP and CRM integrator specialized in System. We provide services in Germany and Asia. We aim to provide cost efficient tailored solutions for SMEs.


Our target is to bring enterprise grade business software and training, which is made possible by System and our experience. We are a young company with highly qualified consultants, developers and software architects who worked on such systems for the last 8 years either on operations side or as consultants in other integrators. We are currently growing our customer base aggressively.


Email Contact Us
Odoo Proprietary License v1.0

This software and associated files (the "Software") may only be used (executed,
modified, executed after modifications) if you have purchased a valid license
from the authors, typically via Odoo Apps, or if you have received a written
agreement from the authors of the Software (see the COPYRIGHT file).

You may develop Odoo modules that use the Software as a library (typically
by depending on it, importing it and using its resources), but without copying
any source code or material from the Software. You may distribute those
modules under the license of your choice, provided that this license is
compatible with the terms of the Odoo Proprietary License (For example:
LGPL, MIT, or proprietary licenses similar to this one).

It is forbidden to publish, distribute, sublicense, or sell copies of the Software
or modified copies of the Software.

The above copyright notice and this permission notice must be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

Please log in to comment on this module

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author or have a question related to your purchase, please use the support page.