From 9a1413576a1601b004234413efd62c30d99d3822 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Mon, 14 Apr 2014 17:05:41 +0200 Subject: [PATCH] [ADD] forgotten images, new patches/howto sections --- doc/howto/howto_website.rst | 22 ++++++++++++++++----- doc/howto/howto_website/field-label | 14 +++++++++++++ doc/howto/howto_website/hellobootstrap.png | Bin 0 -> 456 bytes doc/howto/howto_website/helloworld.png | Bin 0 -> 517 bytes doc/howto/howto_website/lecture-view-list | 21 ++++++++++++++++++++ doc/howto/howto_website/series | 2 ++ 6 files changed, 54 insertions(+), 5 deletions(-) create mode 100644 doc/howto/howto_website/field-label create mode 100644 doc/howto/howto_website/hellobootstrap.png create mode 100644 doc/howto/howto_website/helloworld.png create mode 100644 doc/howto/howto_website/lecture-view-list 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 0000000000000000000000000000000000000000..f96966afbd9e72e08a68c06f582ea223a4b9b1d4 GIT binary patch literal 456 zcmV;(0XP1MP)nntd)g!!uql20003~ zNklU#k}?3f@F`dtowf%`xXR=IVX4(J}ZN1DTO^(dbjb)Eoj z0XI_yma9kk)To>h`!5JpJ7G1}P3L+;6##91tUJxvzQjq3t=%1tG|7>!$ y-KmDvXx(>va3BBx0002w|Jn$us;a80s;Vjgyls#`_1Y`|0000tCRfrPJjMt_{IL~ z*e`Z4YD>Hgj>wG_?2S~Dfh{@&TpcPuwQ z`*+HOz=i)+&+H;bkxFPx@b3=>Pwn$3Ul>w~aGtChN!#9i#q&6{weo>(auGw}~ z%`bd?^u;+<^S(cBoA+XIs+jrri?3=U^Z#-zD*v=K@{8|I*66>6+4+tphXt4T@fU5Y ziJw?K!R}>pZ|U`$aV7jg>lD(8CTuRWZ`yKi%jJzKlWslS`l`}((Pf3Kckey2H{OWJ zoBj9B;af{i9S?8Flf8c5_?ySnN88L+e^mRw>3iV$#rIvr#5dVgh411xHSO^Q{oAU) zCamuYSX$Ym5ZwCw_4lbC(j>nBn-g;;n}ZD)Z}1LY*K + ++ ++ 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