Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
22011 Lượt xem

I don't want to modify the original one because I will lose the changes every time I update the module. Is that possible?

I cannot getting it works. Some explanation for dummies? :)

Thank you.

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Thanks to Jigar at Odoo,SA. In v8 you have to register the assets (css) in v8 with an xml file.

'name': 'Web Form Sheet Width',

'category': 'Hidden',

'version': '8.0.1.0',

'description':

"""

OpenERP Web core module.

========================

This module provides increase the sheet width in form

""",

'depends': [],

'auto_install': True,

'data' : ['ccoffee_page_view_width.xml'],

'js' : [

],

'qweb' : [

],

'test': [

],

}

xml file:

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

<openerp>

<data>

<template id="assets_backend" name="ccoffee_page_view_width assets" inherit_id="web.assets_backend">

<xpath expr="." position="inside">

<link rel="stylesheet" href="/ccoffee_page_view_width/static/src/css/web_form_sheet_width.css"/>

</xpath>

</template>

</data>

</openerp>

Ảnh đại diện
Huỷ bỏ

THANKS!!!!!

Câu trả lời hay nhất

Create a new module.

In your module's __openerp__.py file, you add a line:

'css': ['static/src/css/web_example.css'],

The trick is making sure you have the correct path matching the path where the existing CSS files are located.

Full documentation at https://doc.openerp.com/trunk/web/module/

Ảnh đại diện
Huỷ bỏ
Tác giả

Ok, no problem with openerp 7 but I can't change nothing in trunk version, so I think the problem is the new version. I was testing trunk version because I am interested in new POS. Do you know why?

Tác giả

Look an example: __openerp__.py

'depends': ['web'] 'css': ['static/src/css/web_example.css'],

OPENERP 7

web_example.css

.openerp .oe_menu &gt; li &gt; a {
    color: red;    
}

Change text menu color to red without problem

OPENERP 8 (TRUNK)

.openerp .navbar-nav &gt; li &gt; a {
    color: red;    
}

Nothing changes.

I am not a programmer and I am learning on the go but this is very disconcerting for me. I can't understand why. I have tried several css labels and I can't change nothing in trunk.

And what to do after changing these files? Odoo is not straightforward in this respect.

I am migrating v7 module that will increase web form width, the new file is under addons/web/static/src/css but it still will not update the form. The original file is base.css. Need to make the module change to this:.openerp .oe_form_sheet_width { min-width: 75%; max-width: 93%; margin: 0 auto; But I cannot get the path for v8 correct, anyone?

Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 7 24
1535
1
thg 7 24
1532
1
thg 12 22
2345
2
thg 8 22
24331
2
thg 3 18
19612