تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
3 الردود
22312 أدوات العرض

As the title is explaining ,i want to change the color theme of odoo 15 ,any help of how to do so ?!

الصورة الرمزية
إهمال
أفضل إجابة

In Odoo15, you need to define assets in the manifest file instead of XML like we used to do till v14.

Here is a detailed document on this: https://www.odoo.com/documentation/15.0/developer/reference/javascript/javascript_reference.html#assets-management

الصورة الرمزية
إهمال
أفضل إجابة

Hi,

In odoo 15 scss link and js script can be added in manifest itself, instead of adding in  xml file like in older versions. Below is an example.

'assets': {
        'web.assets_backend' [
            'module_name/static/src/scss/file_name.scss',
            'module_name/static/src/js/file_name.js',
        ],}

Regards

الصورة الرمزية
إهمال

There is a missing : after 'web.assets_backend' and the , should be after the }

Should be:
'assets': {
'web.assets_backend': [
'module_name/static/src/scss/file_name.scss',
'module_name/static/src/js/file_name.js',
]},

Otherwise THANK YOU SO MUCH!

أفضل إجابة

Hi everyone,

Anyone has any idea why it works with a snippet inside of a theme_module and not with a snippet as a module itself?

manifest file of the theme module:

{
'name': '',
'description': '',
'version': '1.0',
'author': '',
'category': 'Theme/Creative',

'depends': ['theme_common'],

'data': [
'views/snippets/s_image_text.xml',
],

'assets': {
'web.assets_frontend': [
'/theme_bbw/static/src/scss/style.scss',

]
},}

xml of snippet inside theme module:

xml version="1.0" encoding="utf-8"?>
<odoo>

<template id="s_image_text" inherit_id="website.s_image_text" name="test">

<xpath expr="//section" position="replace" mode="inner">
**CONTENT**
xpath>

template>

odoo>

This works perfectly fine. But then this not

manifest and xml of snippet module:

# -*- coding: utf-8 -*-
{
'name': "",



'description': """
Long description of module's purpose
"""
,

'author': "",
'category': 'Uncategorized',
'version': '0.1',

# any module necessary for this one to work correctly
'depends': ['base'],

# always loaded
'data': [
# 'security/ir.model.access.csv',
'views/snippet.xml'
],
# only loaded in demonstration mode


'assets': {
'web.assets_frontend': [
'/medaille_snippet/static/src/scss/style.scss',

]

},
}
<odoo>
<template id="medaille_snippet" name="Medailles">
<section class="medaille_snippet">

**CONTENT**

section>
template>

<template id="place_into_bar" inherit_id="website.snippets" name="new snippets">
<xpath expr="//div[@id='snippet_structure']/div[@class='o_panel_body']" position="inside">
<t t-snippet="medaille_snippet.medaille_snippet"
t-thumbnail="/medaille_snippet/static/img/logo.png"/>
xpath>
    template>
odoo>


Any help is much appreciated,

Thanks you

Neal

الصورة الرمزية
إهمال

omg.. stupid, forgot a <div> in my **content** part
anyways, hope someone learns from this :)

المنشورات ذات الصلة الردود أدوات العرض النشاط
1
مايو 25
189
0
مايو 25
220
1
مايو 25
574
4
مايو 25
1867
2
مايو 25
2034