I have created a new Theme for Odoo 12 (in EN and AR), the theme works fine on my Environment. But when the theme is copied to live environment, the EN site loads fine, but the AR site goes Grey completely. Can any suggest how to approach this problem. There is no evident error in console.
According to your question, it is possible CSS, qweb and js can't loads.
please add your CSS Js and qweb properly.
I add an example for css or js load
<odoo>
<template id="assets_backend" name="Demo project" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<link rel="stylesheet" href="/module_name/static/src/css/custom.css"/>
<script type="text/javascript" src="/module_name/static/src/js/module_name.js"/>
</xpath>
</template>
</odoo>
Related
I am learning Tensorflow using the Tensorflow.js library for machine learning when I run my simple program getting the following warning
<html>
<head>
<!-- Load TensorFlow.js -->
<script src="https://cdn.jsdelivr.net/npm/#tensorflow/tfjs#0.12.5"> </script>
<!-- Place your code in the script tag below. You can also use an external .js file -->
<script>
tf.tensor([1,2,3,4,5]).print();
tf.tensor([[1,2,3],[4,5,6]]).print();
</script>
</head>
<body>
</body>
</html>
This browser does not support WebGL. at
createWebGLRenderingContextFromCanvas
what's the exact root cause for this?
I solve this problem in Chrome by enabling "Use hardware acceleration when available" in Chrome. So I go to "Setting", click on "Advanced", and then enable "Use hardware acceleration when available".
I everyone, i have a problem developing a custom module on odoo 10.
When i modify a js or a css, imported into the view.xml in this way
<template id="makeit.assets_common" name="makeit assets common" inherit_id="web.assets_common">
<xpath expr="." position="inside">
<!-- All links to CSS and JS files should be added in here. -->
<link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/flick/jquery-ui.css"/>
<link href="/makeit/static/src/css/jquery.tagit.css" rel="stylesheet" type="text/css"/>
<script src="https://sdk.amazonaws.com/js/aws-sdk-2.171.0.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.9-1/crypto-js.js"></script>
<script src="//cdn.jsdelivr.net/bluebird/3.5.0/bluebird.min.js"></script>
<t t-call-assets="web.assets_backend" t-css="false"/>
<link rel="stylesheet" href="/makeit/static/src/css/makeit.css"/>
<script type="text/javascript" src="/makeit/static/src/js/custom_js_v93.js"></script>
</xpath>
</template>
as you can see i have to change the name of the custom_js_v93 every time to make it work.
I've tried reloading db, odoo service, module ecc.
any idea? thank you
If your changes are in *.py files, restart the odoo service.
service odoo restart
If your changes are in existing *.xml files, re-install (upgrade) the module.
Apps > Your module > Upgrade
If your changes are in both, the do the both: restart the service then upgrade the module.
I don't think clearing browser cache is necessary, since Odoo automatically generates new *.js files (and removes the old ones) every service start:
http://odoo.example.com/web/content/6045-b6fe286/web.assets_backend.js
^
This is generated
So in your case, just reinstall the module.
Updated:
Try changing to inheritance of inherit_id="web.assets_backend" if it fixes your issue:
<template id="makeit.assets_common" name="makeit assets common" inherit_id="web.assets_common">
to
<template id="makeit.assets_backend" name="makeit assets backend" inherit_id="web.assets_backend">
Odoo Warning
Odoo Warning - Warning
You are trying to install incompatible themes:
- Add to css (To be installed)
- Default Theme (Installed)
Please uninstall your current theme before installing another one.
Warning: switching themes may significantly alter the look of your current website pages!
this code i am trying
<template id="styles_compiled" inherit_id="website.assets_frontend">
<xpath expr="link[last()]" position="after">
<link rel="stylesheet" href="/add_css_to_website/static/src/css/custom.css" />
</xpath>
</template>
</data>
I got Solution;
1. Please edit a file 'openerp.py' (main directory) and change the line:.
'category' : 'Theme/Backend', with 'category' : 'Website',
2. Next, run 'Update Apps List' from developer mode.
3. Now you can install the theme.
thanks this is working for me... thanks
I'm using Hippo CMS and trying to implement SEO plugin. I did everything by manual but I don't see any changes and meta tags in rendered results.
My basic layout is:
<#include "/WEB-INF/freemarker/include/imports.ftl">
<html lang="en">
<head>
<meta charset="utf-8"/>
<#hst.headContributions/>
<link rel="stylesheet" href="<#hst.link path="/css/bootstrap.css"/>" type="text/css"/>
<#hst.defineObjects/>
<#if hstRequest.requestContext.cmsRequest>
<link rel="stylesheet" href="<#hst.link path="/css/cms-request.css"/>" type="text/css"/>
</#if>
</head>
And I just enable plugin over Hippo Setup -> features. And sure then rebuild and run all again.
Then I'm going to Channel Editor -> Edit Page -> Add Component. The drag n drop component on page.
I did all changes by clicking on component. But anyway I don't see any changes on published page.
I didn't find any documentation about that, but maybe somebody resolve this issue and can help to me!
Thanks
I tried it out as well. It indeed does not work out of the box as you would expect. The component uses a template specific of the Setup feature, the seo.ftl. This makes it work as a draggable component in the channel manager. What it does not do is add the configured data to the html head.
If you check the seohelper.ftl [1] of the forge plugin, there you see the code that does this job. What you can do to make it work in your project is add the headcontribution tags as in [1] to seo.ftl. Also make sure you have a <#hst.headcontributions/> tag in the html head section of the base-layout.ftl of your project.
I will create a jira issue for this so.
[1] http://forge.onehippo.org/gf/project/hst-seo-support/scmsvn/?action=browse&path=%2Fcheckout%2Fhst-seo-support%2Fbranches%2Fhst-seo-support-1.01.xx%2Fsrc%2Fmain%2Fjava%2Forg%2Fonehippo%2Fforge%2Fseo%2Fsupport%2Fseohelper.ftl&revision=157
How do I set a favicon for the web/e-commerce frontend of Odoo 8?
Ideally without changing Odoo core files, i.e. I do not simply want to overwrite addons/web/static/src/img/favicon.ico.
(This is Odoo 8, August 2014. It's likely that it will be easier to change the favicon in future versions.)
You have to override the web module with your own module. You can add a line like
'data': [ 'views/website_templates.xml' ]
in your __openerp__.py.
Put your favicon at static/src/img/favicon.ico and add a template to views/website_templates:
<template id="MYSITE_layout" inherit_id="website.layout" name="MYSITE layout" priority="17">
<xpath expr="//head//link" position="after">
<link rel="shortcut icon" href="/MYSITE_web/static/src/img/favicon.ico" type="image/x-icon"/>
</xpath>
</template>
Favicon is set in <head> html section, that is stored in template, and link there is hardcoded to point to /web/static/src/img/favicon.ico (see here), so if you want to change it you have to change either icon file itself or change proper template to point to icon file you want.