Skip to content

Commit 7a0d3a7

Browse files
committed
[IMP] Added .editorconfig to standarize editors' behavior
Added `.editorconfig` and reformatted all files to conform with that configuration. This is important to facilitate the process of contributing to this project and keep the diffs at minimum.
1 parent 951fc00 commit 7a0d3a7

14 files changed

Lines changed: 1293 additions & 1320 deletions

File tree

.editorconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
tab_width = 2
7+
end_of_line = lf
8+
charset = utf-8
9+
trim_trailing_whitespace = true
10+
insert_final_newline = true
11+
12+
[*.md]
13+
trim_trailing_whitespace = false

backend_theme_v10/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
# -*- coding: utf-8 -*-
2-
from . import models
3-
from . import controllers
2+
from . import controllers, models

backend_theme_v10/__openerp__.py

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,25 @@
33
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
44

55
{
6-
"name": "Material/United Backend Theme",
7-
"summary": "Odoo 10.0 community backend theme",
8-
"version": "10.0.1.0.22",
9-
"category": "Themes/Backend",
10-
"website": "http://www.openworx.nl",
11-
"description": """
6+
"name": "Material/United Backend Theme",
7+
"summary": "Odoo 10.0 community backend theme",
8+
"version": "10.0.1.0.22",
9+
"category": "Themes/Backend",
10+
"website": "http://www.openworx.nl",
11+
"description": """
1212
Backend theme for Odoo 10.0 community edition.
1313
""",
14-
'images':[
15-
'images/screen.png'
16-
],
17-
"author": "Openworx",
18-
"license": "LGPL-3",
19-
"installable": True,
20-
"depends": [
21-
'web_responsive',
22-
],
23-
"data": [
24-
'views/assets.xml',
25-
'views/res_company_view.xml',
26-
],
14+
"author": "Openworx",
15+
"license": "LGPL-3",
16+
"installable": True,
17+
"depends": [
18+
'web_responsive',
19+
],
20+
"data": [
21+
'views/assets.xml',
22+
'views/res_company_view.xml',
23+
],
24+
'images': [
25+
'images/screen.png'
26+
],
2727
}
28-
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# -*- coding: utf-8 -*-
2-
from . import main
2+
from . import main

backend_theme_v10/controllers/main.py

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,23 @@
33
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
44

55
import base64
6+
67
from odoo.http import Controller, request, route
78
from werkzeug.utils import redirect
89

10+
911
DEFAULT_IMAGE = '/backend_theme_v10/static/src/img/material-background.jpg'
1012

11-
class DasboardBackground(Controller):
1213

13-
@route(['/dashboard'], type='http', auth='user', website=False)
14-
def dashboard(self, **post):
15-
user = request.env.user
16-
company = user.company_id
17-
if company.dashboard_background:
18-
image = base64.b64decode(company.dashboard_background)
19-
else:
20-
return redirect(DEFAULT_IMAGE)
14+
class DasboardBackground(Controller):
15+
@route(['/dashboard'], type='http', auth='user', website=False)
16+
def dashboard(self, **post):
17+
user = request.env.user
18+
company = user.company_id
19+
if company.dashboard_background:
20+
image = base64.b64decode(company.dashboard_background)
21+
else:
22+
return redirect(DEFAULT_IMAGE)
2123

22-
return request.make_response(
23-
image, [('Content-Type', 'image')])
24+
return request.make_response(
25+
image, [('Content-Type', 'image')])
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# -*- coding: utf-8 -*-
2-
from . import res_company
2+
from . import res_company

backend_theme_v10/models/res_company.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
# Copyright 2016, 2017 Openworx
33
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
44

5-
from odoo import models, fields
5+
from odoo import fields, models
66

7-
class ResCompany(models.Model):
87

9-
_inherit = 'res.company'
8+
class ResCompany(models.Model):
9+
_inherit = 'res.company'
1010

11-
dashboard_background = fields.Binary(attachment=True)
11+
dashboard_background = fields.Binary(attachment=True)
Lines changed: 53 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,53 @@
1-
<section class="oe_container">
2-
<div class="oe_row oe_spaced">
3-
<div class="oe_span12">
4-
<h1 class="oe_slogan" style="color:#337ab7;">Material/United Backend Theme</h1>
5-
<h2 class="oe_slogan">The first Odoo 10.0 community backend theme</h2>
6-
<div class="oe_screenshot" style="text-align: center;">
7-
<h3 class="oe_slogan" style="color:#337ab7;">Enterprise like backend theme</h3>
8-
<img style="max-width: 100%;" src="screen.png"/><br><br>
9-
<h3 class="oe_slogan" style="color:#337ab7;">Project Dashboard</h3>
10-
<img style="max-width: 100%;" src="project.png"/><br><br>
11-
<h3 class="oe_slogan" style="color:#337ab7;">Contact form</h3>
12-
<img style="max-width: 100%;" src="contact.png"/><br><br>
13-
<h3 class="oe_slogan" style="color:#337ab7;">Change background</h3>
14-
<img style="max-width: 100%;" src="settings.png"/><br><br>
15-
</div>
16-
</div>
17-
</div>
18-
</section>
19-
20-
<section class="oe_container oe_separator">
21-
</section>
22-
23-
<section class="oe_container" style="background-color:#E8E8E8; padding:20px 0px 90px 0px">
24-
<div class="oe_row">
25-
<div class="oe_span12">
26-
<div class="oe_centeralign">
27-
User/pass: demo/demo
28-
<a href="http://srv1.openworx.nl:8100" target="_blank" title="Demo" class="oe_button">Demo Here</a>
29-
</div>
30-
</div>
31-
<div class="oe_span12">
32-
<div class="oe_centeralign">
33-
<p>Remark: It is possible that the Odoo service needs to be restarted after install.</p>
34-
</div>
35-
</div>
36-
</div>
37-
</section>
38-
39-
<section class="oe_container oe_separator">
40-
</section>
41-
42-
<section class="oe_container oe_dark">
43-
<div class="oe_row">
44-
<div class="oe_span12 oe_centeralign">
45-
<br/>
46-
<h3>Help & Support</h3>
47-
<br/>
48-
Website: <a href="https://www.openworx.nl" target="_blank">Openworx</a><br/>
49-
Contact: <a href="mailto:info@openworx.nl" subject="Material/United Backend Theme v10">Email Support</a><br/>
50-
<br/>
51-
</div>
52-
</div>
53-
</section>
1+
<section class="oe_container">
2+
<div class="oe_row oe_spaced">
3+
<div class="oe_span12">
4+
<h1 class="oe_slogan" style="color:#337ab7;">Material/United Backend Theme</h1>
5+
<h2 class="oe_slogan">The first Odoo 10.0 community backend theme</h2>
6+
<div class="oe_screenshot" style="text-align: center;">
7+
<h3 class="oe_slogan" style="color:#337ab7;">Enterprise like backend theme</h3>
8+
<img style="max-width: 100%;" src="screen.png"/><br><br>
9+
<h3 class="oe_slogan" style="color:#337ab7;">Project Dashboard</h3>
10+
<img style="max-width: 100%;" src="project.png"/><br><br>
11+
<h3 class="oe_slogan" style="color:#337ab7;">Contact form</h3>
12+
<img style="max-width: 100%;" src="contact.png"/><br><br>
13+
<h3 class="oe_slogan" style="color:#337ab7;">Change background</h3>
14+
<img style="max-width: 100%;" src="settings.png"/><br><br>
15+
</div>
16+
</div>
17+
</div>
18+
</section>
19+
20+
<section class="oe_container oe_separator">
21+
</section>
22+
23+
<section class="oe_container" style="background-color:#e8e8e8; padding:20px 0px 90px 0px">
24+
<div class="oe_row">
25+
<div class="oe_span12">
26+
<div class="oe_centeralign">
27+
User/pass: demo/demo
28+
<a href="http://srv1.openworx.nl:8100" target="_blank" title="Demo" class="oe_button">Demo Here</a>
29+
</div>
30+
</div>
31+
<div class="oe_span12">
32+
<div class="oe_centeralign">
33+
<p>Remark: It is possible that the Odoo service needs to be restarted after install.</p>
34+
</div>
35+
</div>
36+
</div>
37+
</section>
38+
39+
<section class="oe_container oe_separator">
40+
</section>
41+
42+
<section class="oe_container oe_dark">
43+
<div class="oe_row">
44+
<div class="oe_span12 oe_centeralign">
45+
<br/>
46+
<h3>Help & Support</h3>
47+
<br/>
48+
Website: <a href="https://www.openworx.nl" target="_blank">Openworx</a><br/>
49+
Contact: <a href="mailto:info@openworx.nl" subject="Material/United Backend Theme v10">Email Support</a><br/>
50+
<br/>
51+
</div>
52+
</div>
53+
</section>
Lines changed: 59 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,59 @@
1-
// United 3.3.5
2-
// Bootswatch
3-
// -----------------------------------------------------
4-
5-
// @import url("https://fonts.googleapis.com/css?family=Roboto:300,400,500,700");
6-
7-
@font-face {
8-
font-family: Roboto;
9-
src: url(/backend_theme_v10/static/src/font/Roboto-Regular.ttf)
10-
}
11-
12-
// Navbar =====================================================================
13-
14-
.navbar {
15-
16-
&-default {
17-
18-
.badge {
19-
background-color: #fff;
20-
color: @navbar-default-bg;
21-
}
22-
}
23-
24-
&-inverse {
25-
26-
.badge {
27-
background-color: #fff;
28-
color: @navbar-inverse-bg;
29-
}
30-
}
31-
}
32-
33-
@media (max-width: @grid-float-breakpoint-max) {
34-
35-
.navbar {
36-
37-
.dropdown-menu {
38-
a {
39-
color: #fff;
40-
}
41-
}
42-
}
43-
}
44-
45-
46-
// Buttons ====================================================================
47-
48-
// Typography =================================================================
49-
50-
// Tables =====================================================================
51-
52-
// Forms ======================================================================
53-
54-
// Navs =======================================================================
55-
56-
// Indicators =================================================================
57-
58-
// Progress bars ==============================================================
59-
60-
// Containers =================================================================
1+
// United 3.3.5
2+
// Bootswatch
3+
// -----------------------------------------------------
4+
5+
// @import url("https://fonts.googleapis.com/css?family=Roboto:300,400,500,700");
6+
7+
@font-face {
8+
font-family : Roboto;
9+
src : url(/backend_theme_v10/static/src/font/Roboto-Regular.ttf)
10+
}
11+
12+
// Navbar =====================================================================
13+
14+
.navbar {
15+
16+
&-default {
17+
18+
.badge {
19+
background-color : #fff;
20+
color : @navbar-default-bg;
21+
}
22+
}
23+
24+
&-inverse {
25+
26+
.badge {
27+
background-color : #fff;
28+
color : @navbar-inverse-bg;
29+
}
30+
}
31+
}
32+
33+
@media (max-width : @grid-float-breakpoint-max) {
34+
35+
.navbar {
36+
37+
.dropdown-menu {
38+
a {
39+
color : #fff;
40+
}
41+
}
42+
}
43+
}
44+
45+
// Buttons ====================================================================
46+
47+
// Typography =================================================================
48+
49+
// Tables =====================================================================
50+
51+
// Forms ======================================================================
52+
53+
// Navs =======================================================================
54+
55+
// Indicators =================================================================
56+
57+
// Progress bars ==============================================================
58+
59+
// Containers =================================================================

0 commit comments

Comments
 (0)