summaryrefslogtreecommitdiff
path: root/openerp/cli
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2015-03-02 18:19:34 +0100
committerChristophe Simonis <chs@odoo.com>2015-03-02 18:19:34 +0100
commitfefb29897272bf0fe6a6e8aca98b1e2c88ae6af5 (patch)
tree9b8f3c81f12e3562f9b2ea8f114aae717b70a4a4 /openerp/cli
parent1ae5323442bdbbf88d3387ef60b77c86d87e0c10 (diff)
parentdc41a9b645edf54121fefafe83b687a80b9de66b (diff)
[MERGE] forward port of branch 8.0 up to dc41a9b
Diffstat (limited to 'openerp/cli')
-rw-r--r--openerp/cli/scaffold.py8
-rw-r--r--openerp/cli/templates/default/__init__.py.template (renamed from openerp/cli/templates/default/__init__.py)0
-rw-r--r--openerp/cli/templates/default/__openerp__.py.template (renamed from openerp/cli/templates/default/__openerp__.py)0
-rw-r--r--openerp/cli/templates/default/controllers.py.template (renamed from openerp/cli/templates/default/controllers.py)0
-rw-r--r--openerp/cli/templates/default/demo.xml.template (renamed from openerp/cli/templates/default/demo.xml)0
-rw-r--r--openerp/cli/templates/default/models.py.template (renamed from openerp/cli/templates/default/models.py)0
-rw-r--r--openerp/cli/templates/default/security/ir.model.access.csv.template (renamed from openerp/cli/templates/default/security/ir.model.access.csv)0
-rw-r--r--openerp/cli/templates/default/templates.xml.template (renamed from openerp/cli/templates/default/templates.xml)0
-rw-r--r--openerp/cli/templates/theme/__init__.py.template (renamed from openerp/cli/templates/theme/__init__.py)0
-rw-r--r--openerp/cli/templates/theme/__openerp__.py.template (renamed from openerp/cli/templates/theme/__openerp__.py)8
-rw-r--r--openerp/cli/templates/theme/demo/pages.xml.template (renamed from openerp/cli/templates/theme/static/style/custom.less)0
-rw-r--r--openerp/cli/templates/theme/static/src/less/custom.less.template (renamed from openerp/cli/templates/theme/views/options.xml)0
-rw-r--r--openerp/cli/templates/theme/views/options.xml.template (renamed from openerp/cli/templates/theme/views/pages.xml)0
-rw-r--r--openerp/cli/templates/theme/views/snippets.xml.template (renamed from openerp/cli/templates/theme/views/snippets.xml)0
14 files changed, 11 insertions, 5 deletions
diff --git a/openerp/cli/scaffold.py b/openerp/cli/scaffold.py
index 8194aa6cbba..3f86965fb9a 100644
--- a/openerp/cli/scaffold.py
+++ b/openerp/cli/scaffold.py
@@ -112,16 +112,18 @@ class template(object):
"""
# overwrite with local
for path, content in self.files():
- _, ext = os.path.splitext(path)
-
local = os.path.relpath(path, self.path)
+ # strip .template extension
+ root, ext = os.path.splitext(local)
+ if ext == '.template':
+ local = root
dest = os.path.join(directory, modname, local)
destdir = os.path.dirname(dest)
if not os.path.exists(destdir):
os.makedirs(destdir)
with open(dest, 'wb') as f:
- if ext not in ('.py', '.xml', '.csv', '.js', '.rst', '.html'):
+ if ext not in ('.py', '.xml', '.csv', '.js', '.rst', '.html', '.template'):
f.write(content)
else:
env.from_string(content)\
diff --git a/openerp/cli/templates/default/__init__.py b/openerp/cli/templates/default/__init__.py.template
index 43dbbaa6318..43dbbaa6318 100644
--- a/openerp/cli/templates/default/__init__.py
+++ b/openerp/cli/templates/default/__init__.py.template
diff --git a/openerp/cli/templates/default/__openerp__.py b/openerp/cli/templates/default/__openerp__.py.template
index 2aae5fbdd46..2aae5fbdd46 100644
--- a/openerp/cli/templates/default/__openerp__.py
+++ b/openerp/cli/templates/default/__openerp__.py.template
diff --git a/openerp/cli/templates/default/controllers.py b/openerp/cli/templates/default/controllers.py.template
index 505208171fc..505208171fc 100644
--- a/openerp/cli/templates/default/controllers.py
+++ b/openerp/cli/templates/default/controllers.py.template
diff --git a/openerp/cli/templates/default/demo.xml b/openerp/cli/templates/default/demo.xml.template
index 5ca25672404..5ca25672404 100644
--- a/openerp/cli/templates/default/demo.xml
+++ b/openerp/cli/templates/default/demo.xml.template
diff --git a/openerp/cli/templates/default/models.py b/openerp/cli/templates/default/models.py.template
index 562aa3a851b..562aa3a851b 100644
--- a/openerp/cli/templates/default/models.py
+++ b/openerp/cli/templates/default/models.py.template
diff --git a/openerp/cli/templates/default/security/ir.model.access.csv b/openerp/cli/templates/default/security/ir.model.access.csv.template
index 71a2352fedc..71a2352fedc 100644
--- a/openerp/cli/templates/default/security/ir.model.access.csv
+++ b/openerp/cli/templates/default/security/ir.model.access.csv.template
diff --git a/openerp/cli/templates/default/templates.xml b/openerp/cli/templates/default/templates.xml.template
index b9166501678..b9166501678 100644
--- a/openerp/cli/templates/default/templates.xml
+++ b/openerp/cli/templates/default/templates.xml.template
diff --git a/openerp/cli/templates/theme/__init__.py b/openerp/cli/templates/theme/__init__.py.template
index 40a96afc6ff..40a96afc6ff 100644
--- a/openerp/cli/templates/theme/__init__.py
+++ b/openerp/cli/templates/theme/__init__.py.template
diff --git a/openerp/cli/templates/theme/__openerp__.py b/openerp/cli/templates/theme/__openerp__.py.template
index 329483fa078..9eba44581a9 100644
--- a/openerp/cli/templates/theme/__openerp__.py
+++ b/openerp/cli/templates/theme/__openerp__.py.template
@@ -7,13 +7,17 @@
'version': '1.0',
'depends': ['website'],
- # templates, pages, and snippets
+ # templates
'data': [
- 'views/pages.xml',
'views/options.xml',
'views/snippets.xml',
],
+ # demo pages
+ 'demo': [
+ 'demo/pages.xml',
+ ],
+
# Your information
'author': "Your Company",
'website': "",
diff --git a/openerp/cli/templates/theme/static/style/custom.less b/openerp/cli/templates/theme/demo/pages.xml.template
index e69de29bb2d..e69de29bb2d 100644
--- a/openerp/cli/templates/theme/static/style/custom.less
+++ b/openerp/cli/templates/theme/demo/pages.xml.template
diff --git a/openerp/cli/templates/theme/views/options.xml b/openerp/cli/templates/theme/static/src/less/custom.less.template
index e69de29bb2d..e69de29bb2d 100644
--- a/openerp/cli/templates/theme/views/options.xml
+++ b/openerp/cli/templates/theme/static/src/less/custom.less.template
diff --git a/openerp/cli/templates/theme/views/pages.xml b/openerp/cli/templates/theme/views/options.xml.template
index e69de29bb2d..e69de29bb2d 100644
--- a/openerp/cli/templates/theme/views/pages.xml
+++ b/openerp/cli/templates/theme/views/options.xml.template
diff --git a/openerp/cli/templates/theme/views/snippets.xml b/openerp/cli/templates/theme/views/snippets.xml.template
index e69de29bb2d..e69de29bb2d 100644
--- a/openerp/cli/templates/theme/views/snippets.xml
+++ b/openerp/cli/templates/theme/views/snippets.xml.template