This question has been flagged
2 Replies
20821 Views

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.

Avatar
Discard
Best Answer

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>

Avatar
Discard

THANKS!!!!!

Best Answer

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/

Avatar
Discard
Author

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?

Author

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?