Odoo Warning - Warning You are trying to install incompatible themes - odoo

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

Related

Odoo 12 - New Theme - Arabic - Greys Out Site

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>

Vuejs vue-truncate-filter package showing ReferenceError

I've installed npm install vue-truncate-filter --save for VueJs to cut extra strings for UI purpose. According to package documentation I've implemented the package step by step in my application but it's showing me error. I'm writing same steps here please guide me where I'm wrong:
1- Install vue-trauncate-filter package using npm
npm install vue-truncate-filter --save
2- include vue-trancate-filter in application
var VueTruncate = require('./node_modules/vue-truncate-filter');
Vue.use(VueTruncate)
3- Used it in my template using this code
{{ text | truncate 100 '....' }}
after implementation when I hit the url in browser it showing following error
ReferenceError: require is not defined
I tried to find solution but I'm unable to solve the issue. Thanks in advance for help.
One way is just include the file like traditional javascript in your html file. Don't add require i'm placing path what I understand from your code. Please make it according to your directory if path is wrong
<script src="./node_modules/vue-truncate-filter/vue-truncate.js"></script>
After including this file just remove code bellow from your code
var VueTruncate = require('./node_modules/vue-truncate-filter');
Vue.use(VueTruncate)
The code you are using to hide extra string is only for vuejs 1 not for vuejs 2 so please replace your code
{{ text | truncate 100 '....' }}
with this code, it's for vuejs 2
{{ text | truncate(100)}}
hopefully it will work.

How to install plugins in CKEditor 5?

I install CKEditor 5 in my project by npm:
npm install --save #ckeditor/ckeditor5-build-classic
Then i follow the Doc to install some plugins eg : alignment
See the Alignment plugins install Doc
npm install --save #ckeditor/ckeditor5-alignment
And i change my code like this:
import Alignment from '#ckeditor/ckeditor5-alignment/src/alignment';
ClassicEditor
.create( document.querySelector( '#editor' ), {
plugins: [ Alignment],
toolbar: [ 'alignmentDropdown']
} )
.then( ... )
.catch( ... );
Then something went wrong:
Failed to compile.
./node_modules/#ckeditor/ckeditor5-alignment/src/alignmentui.js
Module not found: Error: Can't resolve '#ckeditor/ckeditor5-ui/src/dropdown/button/createbuttondropdown' in '/Users/wangyao/project/katabat-demo/ckeditor5/node_modules/#ckeditor/ckeditor5-alignment/src'
I think it is because of the version,
On the official website,i saw the ckeditor5-build-classic version info :
And the the plugin Alignment version info :
Am I doing this wrong?
is CKEditor 5 incomplete because of the alpha version ?
It is appropriate to use CKEditor 5 in alpha version ?
EDIT (19.09.2018): The text alignment, table, highlight and font size/family features are all available for installation. The situation about which #KingOfSocket asked was a temporary situation when some of these plugins were under development. Check out those feature guides to learn how to install them.
OUTDATED: You were unfortunate to find the alignment feature before its first official release. It doesn't work because the 0.0.1 version is published only to satisfy our development environment's requirement that a package we work on is on npm (actually, this is Lerna's requirement).
The first working version of the alignment feature will be released together with CKEditor 5's 1.0.0-beta (within a ~month). For now, you can find its demo in the nightly docs (see Text alignment). You can also try to build the editor with it, but you will need to set up the CKEditor 5's development environemnt.

Odoo 10 js cache

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">

How do I set favicon in Odoo / OpenERP?

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.