Thanks for anyone who can contribute.
I am trying to use a bootstrap toggle checkbox widget in odoo 8 backend. I kind of cheated and just added the links to the /web/views/webclient_templates.xml file at the end of all the links and script references. Unfortunately its not working. My checkbox simply looks like a regular old checkbox. I have used the exact code and had it work in the odoo website frontend however the backend is refusing to cooperate. Any hints?
I have tried
- Adding to /web/views/webclient_templates.xml
-Adding directly to my view.xml file
-Overriding the backend template like this
<?xml version="1.0" encoding="utf-8"?>
<template id="assets_backend" name="myModule assets" inherit_id="web.assets_backend">
<xpath expr="link[last()]" position="after">
<link rel="stylesheet" href="/myModule/static/src/css/bootstrap-toggle.css" t-ignore="true"/>
<xpath expr="script[last()]" position="after">
Here is your solution :
<template id="custom_assets_backend" name="custom assets" inherit_id="web.assets_backend">Hope this will help you ..
<xpath expr="." position="inside">
<link rel="stylesheet" href="/myModule/static/src/css/bootstrap-toggle.css"/>
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
|Asked: 9/4/15, 6:00 PM|
|Seen: 1272 times|
|Last updated: 9/16/15, 10:43 AM|