summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorXavier Morel <xmo@openerp.com>2014-04-11 12:09:51 +0200
committerXavier Morel <xmo@openerp.com>2014-05-19 08:32:16 +0200
commit8bcc42d4d08530801630c1ae9310369d59d1d17a (patch)
treea58445510cf373363c1d3160d483a3fbe748e0da /doc
parent729258ed9db3d6114a68bab2436084ab478f22ae (diff)
[FIX] effect name change for generated controller and model onto doc
Diffstat (limited to 'doc')
-rw-r--r--doc/howto/howto_website.rst6
-rw-r--r--doc/howto/howto_website/basic-page10
-rw-r--r--doc/howto/howto_website/lectures-model-add16
-rw-r--r--doc/howto/howto_website/manifest20
-rw-r--r--doc/howto/howto_website/ta-controller12
-rw-r--r--doc/howto/howto_website/ta-html-biography8
-rw-r--r--doc/howto/howto_website/ta-model22
-rw-r--r--doc/howto/howto_website/ta-view-fix10
-rw-r--r--doc/howto/howto_website/templates-basic10
-rw-r--r--doc/howto/howto_website/url-pattern14
-rw-r--r--doc/howto/howto_website/website-dependency10
-rw-r--r--doc/howto/howto_website/website-layoutify10
12 files changed, 74 insertions, 74 deletions
diff --git a/doc/howto/howto_website.rst b/doc/howto/howto_website.rst
index 9f0642e16c3..192f7f1b9c8 100644
--- a/doc/howto/howto_website.rst
+++ b/doc/howto/howto_website.rst
@@ -40,10 +40,10 @@ This builds a basic module for you:
├── __openerp__.py
├── controllers
│   ├── __init__.py
- │   └── my_controller.py
+ │   └── academy.py
├── models
│   ├── __init__.py
- │   └── my_model.py
+ │   └── academy.py
└── security
└── ir.model.access.csv
@@ -68,7 +68,7 @@ Let's prettify things a bit: instead of returning just a bit of text,
we can return a page, and use a tool like bootstrap_ to get a
nicer rendering than the default.
-Go to :file:`academy/controllers/my_controller.py` and change the string
+Go to :file:`academy/controllers/academy.py` and change the string
returned by the ``index`` method to get a more page-ish output:
.. patch::
diff --git a/doc/howto/howto_website/basic-page b/doc/howto/howto_website/basic-page
index 9e6c9d9abc7..765522cbbbc 100644
--- a/doc/howto/howto_website/basic-page
+++ b/doc/howto/howto_website/basic-page
@@ -1,11 +1,11 @@
# HG changeset patch
-# Parent a76a9a0e0668f4191bdc383a0d4b3173f44b39b1
+# Parent d06b1f422ac5672c4a4c34bb3a50e98df42f3e31
-diff --git a/controllers/my_controller.py b/controllers/my_controller.py
---- a/controllers/my_controller.py
-+++ b/controllers/my_controller.py
+diff --git a/controllers/academy.py b/controllers/academy.py
+--- a/controllers/academy.py
++++ b/controllers/academy.py
@@ -6,4 +6,16 @@ from openerp.addons.web.controllers impo
- class my_controller(main.Home):
+ class academy(main.Home):
@http.route('/', auth='none')
def index(self):
- return "Hello, world!"
diff --git a/doc/howto/howto_website/lectures-model-add b/doc/howto/howto_website/lectures-model-add
index a467817faad..5fc1a7c592a 100644
--- a/doc/howto/howto_website/lectures-model-add
+++ b/doc/howto/howto_website/lectures-model-add
@@ -1,5 +1,5 @@
# HG changeset patch
-# Parent 9042ace1e3e8175155d9dbed75657222a371cdb6
+# Parent fef5ecf2dad4b7bdcc9a760545c2689187bb15f9
diff --git a/__openerp__.py b/__openerp__.py
--- a/__openerp__.py
@@ -12,11 +12,11 @@ diff --git a/__openerp__.py b/__openerp__.py
],
'tests': [
],
-diff --git a/controllers/my_controller.py b/controllers/my_controller.py
---- a/controllers/my_controller.py
-+++ b/controllers/my_controller.py
+diff --git a/controllers/academy.py b/controllers/academy.py
+--- a/controllers/academy.py
++++ b/controllers/academy.py
@@ -6,10 +6,15 @@ from openerp.addons.web.controllers impo
- class my_controller(main.Home):
+ class academy(main.Home):
@http.route('/', auth='public')
def index(self):
+ cr, uid, context = http.request.cr, http.request.uid, http.request.context
@@ -60,9 +60,9 @@ new file mode 100644
+ </record>
+ </data>
+</openerp>
-diff --git a/models/my_model.py b/models/my_model.py
---- a/models/my_model.py
-+++ b/models/my_model.py
+diff --git a/models/academy.py b/models/academy.py
+--- a/models/academy.py
++++ b/models/academy.py
@@ -8,3 +8,12 @@ class TeachingAssistants(orm.Model):
'name': fields.char(),
'biography': fields.html(),
diff --git a/doc/howto/howto_website/manifest b/doc/howto/howto_website/manifest
index 3c81585b522..601c18c5106 100644
--- a/doc/howto/howto_website/manifest
+++ b/doc/howto/howto_website/manifest
@@ -43,19 +43,19 @@ new file mode 100644
+++ b/controllers/__init__.py
@@ -0,0 +1,3 @@
+# -*- coding: utf-8 -*-
-+import my_controller
++import academy
+
-diff --git a/controllers/my_controller.py b/controllers/my_controller.py
+diff --git a/controllers/academy.py b/controllers/academy.py
new file mode 100644
--- /dev/null
-+++ b/controllers/my_controller.py
++++ b/controllers/academy.py
@@ -0,0 +1,9 @@
+# -*- coding: utf-8 -*-
+
+from openerp import http
+from openerp.addons.web.controllers import main
+
-+class my_controller(main.Home):
++class academy(main.Home):
+ @http.route('/', auth='none')
+ def index(self):
+ return "Hello, world!"
@@ -65,18 +65,18 @@ new file mode 100644
+++ b/models/__init__.py
@@ -0,0 +1,3 @@
+# -*- coding: utf-8 -*-
-+import my_model
++import academy
+
-diff --git a/models/my_model.py b/models/my_model.py
+diff --git a/models/academy.py b/models/academy.py
new file mode 100644
--- /dev/null
-+++ b/models/my_model.py
++++ b/models/academy.py
@@ -0,0 +1,9 @@
+# -*- coding: utf-8 -*-
+from openerp.osv import orm, fields
+
-+class my_model(orm.Model):
-+ _name = "academy.my_model"
++class academy(orm.Model):
++ _name = "academy.academy"
+
+ _columns = {
+ 'name': fields.char(),
@@ -87,4 +87,4 @@ new file mode 100644
+++ b/security/ir.model.access.csv
@@ -0,0 +1,2 @@
+id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
-+access_academy_my_model,access_academy_my_model,model_academy_my_model,,1,0,0,0
++access_academy_academy,access_academy_academy,model_academy_academy,,1,0,0,0
diff --git a/doc/howto/howto_website/ta-controller b/doc/howto/howto_website/ta-controller
index 080111bb4d4..71a86d7311b 100644
--- a/doc/howto/howto_website/ta-controller
+++ b/doc/howto/howto_website/ta-controller
@@ -1,9 +1,9 @@
# HG changeset patch
-# Parent a615de71be483d88acca032ad5d35072c87999c0
+# Parent e95e38d7a1c75741d1f7babf1fe6590b8227888e
-diff --git a/controllers/my_controller.py b/controllers/my_controller.py
---- a/controllers/my_controller.py
-+++ b/controllers/my_controller.py
+diff --git a/controllers/academy.py b/controllers/academy.py
+--- a/controllers/academy.py
++++ b/controllers/academy.py
@@ -3,9 +3,22 @@
from openerp import http
from openerp.addons.web.controllers import main
@@ -16,7 +16,7 @@ diff --git a/controllers/my_controller.py b/controllers/my_controller.py
+ {'name': "Tanya Harris"},
+]
+
- class my_controller(main.Home):
+ class academy(main.Home):
@http.route('/', auth='none')
def index(self):
+ tas = [
@@ -27,7 +27,7 @@ diff --git a/controllers/my_controller.py b/controllers/my_controller.py
return """<!doctype html>
<html>
<head>
-@@ -16,6 +29,26 @@ class my_controller(main.Home):
+@@ -16,6 +29,26 @@ class academy(main.Home):
<h1>Introduction to a thing</h1>
<h2>Course description</h2>
<p>Course introduction</p>
diff --git a/doc/howto/howto_website/ta-html-biography b/doc/howto/howto_website/ta-html-biography
index 23da32b1e4e..a8460c3090a 100644
--- a/doc/howto/howto_website/ta-html-biography
+++ b/doc/howto/howto_website/ta-html-biography
@@ -1,9 +1,9 @@
# HG changeset patch
-# Parent 8cbdbbeaf1d89c9a4e4d03e2392ddcc79a648206
+# Parent 313d7c760558b24461a544063de061d00fdf7059
-diff --git a/models/my_model.py b/models/my_model.py
---- a/models/my_model.py
-+++ b/models/my_model.py
+diff --git a/models/academy.py b/models/academy.py
+--- a/models/academy.py
++++ b/models/academy.py
@@ -6,4 +6,5 @@ class TeachingAssistants(orm.Model):
_columns = {
diff --git a/doc/howto/howto_website/ta-model b/doc/howto/howto_website/ta-model
index 83a74c83c51..f5fd1013ec6 100644
--- a/doc/howto/howto_website/ta-model
+++ b/doc/howto/howto_website/ta-model
@@ -1,9 +1,9 @@
# HG changeset patch
-# Parent b6ba23a3c284db481f14d9ea573e0baf8d3320e8
+# Parent 21954f9743a937b8185a5e717fe6af0e92660c55
-diff --git a/controllers/my_controller.py b/controllers/my_controller.py
---- a/controllers/my_controller.py
-+++ b/controllers/my_controller.py
+diff --git a/controllers/academy.py b/controllers/academy.py
+--- a/controllers/academy.py
++++ b/controllers/academy.py
@@ -3,19 +3,13 @@
from openerp import http
from openerp.addons.web.controllers import main
@@ -16,7 +16,7 @@ diff --git a/controllers/my_controller.py b/controllers/my_controller.py
- {'name': "Tanya Harris"},
-]
-
- class my_controller(main.Home):
+ class academy(main.Home):
@http.route('/', auth='public')
def index(self):
+ tas = http.request.registry['academy.tas'].search_read(
@@ -27,15 +27,15 @@ diff --git a/controllers/my_controller.py b/controllers/my_controller.py
})
@http.route('/tas/<int:id>/', auth='public', website=True)
-diff --git a/models/my_model.py b/models/my_model.py
---- a/models/my_model.py
-+++ b/models/my_model.py
+diff --git a/models/academy.py b/models/academy.py
+--- a/models/academy.py
++++ b/models/academy.py
@@ -1,8 +1,8 @@
# -*- coding: utf-8 -*-
from openerp.osv import orm, fields
--class my_model(orm.Model):
-- _name = "academy.my_model"
+-class academy(orm.Model):
+- _name = "academy.academy"
+class TeachingAssistants(orm.Model):
+ _name = "academy.tas"
@@ -46,5 +46,5 @@ diff --git a/security/ir.model.access.csv b/security/ir.model.access.csv
+++ b/security/ir.model.access.csv
@@ -1,2 +1,2 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
--access_academy_my_model,access_academy_my_model,model_academy_my_model,,1,0,0,0
+-access_academy_academy,access_academy_academy,model_academy_academy,,1,0,0,0
+access_academy_tas,access_academy_tas,model_academy_tas,,1,0,0,0
diff --git a/doc/howto/howto_website/ta-view-fix b/doc/howto/howto_website/ta-view-fix
index c1ad0adc139..5e3f494cf3d 100644
--- a/doc/howto/howto_website/ta-view-fix
+++ b/doc/howto/howto_website/ta-view-fix
@@ -1,10 +1,10 @@
# HG changeset patch
-# Parent 548ab57454752e9575323e26d0471669c78172f6
+# Parent 466d19929560c2a60c347990ea44730ae40ec36d
-diff --git a/controllers/my_controller.py b/controllers/my_controller.py
---- a/controllers/my_controller.py
-+++ b/controllers/my_controller.py
-@@ -12,6 +12,8 @@ class my_controller(main.Home):
+diff --git a/controllers/academy.py b/controllers/academy.py
+--- a/controllers/academy.py
++++ b/controllers/academy.py
+@@ -12,6 +12,8 @@ class academy(main.Home):
'tas': tas,
})
diff --git a/doc/howto/howto_website/templates-basic b/doc/howto/howto_website/templates-basic
index 632d4b2f89f..f7c63664fef 100644
--- a/doc/howto/howto_website/templates-basic
+++ b/doc/howto/howto_website/templates-basic
@@ -1,5 +1,5 @@
# HG changeset patch
-# Parent 0792d59a4a456e1ce70d8aa4cb1784632883d714
+# Parent 5342fd2d61587d3ab2c29f88e813b9a402eaa808
diff --git a/__openerp__.py b/__openerp__.py
--- a/__openerp__.py
@@ -16,11 +16,11 @@ diff --git a/__openerp__.py b/__openerp__.py
'tests': [
],
}
-diff --git a/controllers/my_controller.py b/controllers/my_controller.py
---- a/controllers/my_controller.py
-+++ b/controllers/my_controller.py
+diff --git a/controllers/academy.py b/controllers/academy.py
+--- a/controllers/academy.py
++++ b/controllers/academy.py
@@ -14,41 +14,18 @@ teaching_assistants = [
- class my_controller(main.Home):
+ class academy(main.Home):
@http.route('/', auth='none')
def index(self):
+ cr, uid, context = http.request.cr, http.request.uid, http.request.context
diff --git a/doc/howto/howto_website/url-pattern b/doc/howto/howto_website/url-pattern
index 72be995a7b8..57f04753d74 100644
--- a/doc/howto/howto_website/url-pattern
+++ b/doc/howto/howto_website/url-pattern
@@ -1,10 +1,10 @@
# HG changeset patch
-# Parent 1d6a01fae0bb650ea0de8437b3983a29f66463ed
+# Parent f7adcd9a5a8e0dc1c7438f94dde2faefd6406a30
-diff --git a/controllers/my_controller.py b/controllers/my_controller.py
---- a/controllers/my_controller.py
-+++ b/controllers/my_controller.py
-@@ -15,7 +15,7 @@ class my_controller(main.Home):
+diff --git a/controllers/academy.py b/controllers/academy.py
+--- a/controllers/academy.py
++++ b/controllers/academy.py
+@@ -15,7 +15,7 @@ class academy(main.Home):
@http.route('/', auth='none')
def index(self):
tas = [
@@ -13,7 +13,7 @@ diff --git a/controllers/my_controller.py b/controllers/my_controller.py
for i, ta in enumerate(teaching_assistants)
]
-@@ -39,7 +39,7 @@ class my_controller(main.Home):
+@@ -39,7 +39,7 @@ class academy(main.Home):
'tas': '\n'.join(tas)
}
@@ -22,7 +22,7 @@ diff --git a/controllers/my_controller.py b/controllers/my_controller.py
def ta(self, id):
return """<!doctype html>
<html>
-@@ -51,4 +51,4 @@ class my_controller(main.Home):
+@@ -51,4 +51,4 @@ class academy(main.Home):
<h1>%(name)s</h1>
</body>
</html>
diff --git a/doc/howto/howto_website/website-dependency b/doc/howto/howto_website/website-dependency
index 5bd57a25da4..ae310ee4935 100644
--- a/doc/howto/howto_website/website-dependency
+++ b/doc/howto/howto_website/website-dependency
@@ -1,5 +1,5 @@
# HG changeset patch
-# Parent f84f5783ecf4eabd018fd27548423b5cefc1d2dc
+# Parent dce817856f7995c3220ef7261c26b83006c3627e
diff --git a/__openerp__.py b/__openerp__.py
--- a/__openerp__.py
@@ -13,11 +13,11 @@ diff --git a/__openerp__.py b/__openerp__.py
'data': [
'security/ir.model.access.csv',
'views/templates.xml',
-diff --git a/controllers/my_controller.py b/controllers/my_controller.py
---- a/controllers/my_controller.py
-+++ b/controllers/my_controller.py
+diff --git a/controllers/academy.py b/controllers/academy.py
+--- a/controllers/academy.py
++++ b/controllers/academy.py
@@ -14,18 +14,10 @@ teaching_assistants = [
- class my_controller(main.Home):
+ class academy(main.Home):
@http.route('/', auth='none')
def index(self):
- cr, uid, context = http.request.cr, http.request.uid, http.request.context
diff --git a/doc/howto/howto_website/website-layoutify b/doc/howto/howto_website/website-layoutify
index f18130493de..2d6aafbcf05 100644
--- a/doc/howto/howto_website/website-layoutify
+++ b/doc/howto/howto_website/website-layoutify
@@ -1,13 +1,13 @@
# HG changeset patch
-# Parent 341dd9480911ad71df915449944e21275a1f32c6
+# Parent 006b3182bb96e16310fd6fc4be808bd5698f1ab6
-diff --git a/controllers/my_controller.py b/controllers/my_controller.py
---- a/controllers/my_controller.py
-+++ b/controllers/my_controller.py
+diff --git a/controllers/academy.py b/controllers/academy.py
+--- a/controllers/academy.py
++++ b/controllers/academy.py
@@ -12,12 +12,12 @@ teaching_assistants = [
]
- class my_controller(main.Home):
+ class academy(main.Home):
- @http.route('/', auth='none')
+ @http.route('/', auth='public')
def index(self):