diff --git a/doc/howto/howto_website.rst b/doc/howto/howto_website.rst index f467c1261bf..aa15236fed7 100644 --- a/doc/howto/howto_website.rst +++ b/doc/howto/howto_website.rst @@ -445,6 +445,12 @@ Let us, then, create a menu and an action for our lectures: .. patch:: +.. note:: + + if a requested view does not exist, OpenERP will automatically generate a + very basic one on-the-fly. That is the case here as we have not yet + created a list and a form view for the lectures. + If you reload the backend, you should see a new menu :menuselection:`Academy` at the top-left corner, before :menuselection:`Messaging`. In it is the submenus we defined via ``menuitem``, and within (the first submenu is @@ -455,13 +461,19 @@ single record). The :guilabel:`Create` button above the list lets you create new record, you can select records to delete them. There's one big issue to fix right now, the labeling of the column in the list -and the fields in the form view, which are all currently :guilabel:`unknown`: +and the fields in the form view, which are all currently :guilabel:`unknown`. +We can fix that by adding a ``string`` attribute to the model field: -.. FIXME fix labels +.. patch:: -.. create menu, action - .. improve generated views -.. create list & form views for events +The second problem is that the list view only displays the ``name`` field. To +fix this, we have to create an explicit list view for lectures: + +.. patch:: + +.. todo:: link to list view documentation + +.. todo:: have lectures extend events -> reuse in OpenERP? .. [#taprofile] the teaching assistants profile view ends up broken for now, but don't worry we'll get around to it diff --git a/doc/howto/howto_website/field-label b/doc/howto/howto_website/field-label new file mode 100644 index 00000000000..2589e8f872a --- /dev/null +++ b/doc/howto/howto_website/field-label @@ -0,0 +1,14 @@ +# HG changeset patch +# Parent fe4edbcd9e98db81ec6321c58e8ac508a686f45b +diff -r fe4edbcd9e98 -r 72a099819e5b models/academy.py +--- a/models/academy.py Mon Apr 14 16:38:10 2014 +0200 ++++ b/models/academy.py Mon Apr 14 16:59:01 2014 +0200 +@@ -14,6 +14,6 @@ class Lectures(orm.Model): + _order = 'date ASC' + + _columns = { +- 'name': fields.char(required=True), +- 'date': fields.date(required=True), ++ 'name': fields.char(required=True, string="Name"), ++ 'date': fields.date(required=True, string="Date"), + } diff --git a/doc/howto/howto_website/hellobootstrap.png b/doc/howto/howto_website/hellobootstrap.png new file mode 100644 index 00000000000..f96966afbd9 Binary files /dev/null and b/doc/howto/howto_website/hellobootstrap.png differ diff --git a/doc/howto/howto_website/helloworld.png b/doc/howto/howto_website/helloworld.png new file mode 100644 index 00000000000..ab1e28486ef Binary files /dev/null and b/doc/howto/howto_website/helloworld.png differ diff --git a/doc/howto/howto_website/lecture-view-list b/doc/howto/howto_website/lecture-view-list new file mode 100644 index 00000000000..d9bf766411b --- /dev/null +++ b/doc/howto/howto_website/lecture-view-list @@ -0,0 +1,21 @@ +# HG changeset patch +# Parent 72a099819e5b352314124dd03841a9f4c3b5b7c1 +diff -r 72a099819e5b -r 6a562e55935f data/views.xml +--- a/data/views.xml Mon Apr 14 16:59:01 2014 +0200 ++++ b/data/views.xml Mon Apr 14 17:04:36 2014 +0200 +@@ -1,5 +1,15 @@ + + ++ ++ academy.lectures ++ ++ ++ ++ ++ ++ ++ ++ + + Academy lectures + academy.lectures diff --git a/doc/howto/howto_website/series b/doc/howto/howto_website/series index d34c6476bb7..30efad5d7b5 100644 --- a/doc/howto/howto_website/series +++ b/doc/howto/howto_website/series @@ -14,3 +14,5 @@ ta-template-biography lectures-model-add data-to-demo lectures-action-and-menus +field-label +lecture-view-list