From 9a1413576a1601b004234413efd62c30d99d3822 Mon Sep 17 00:00:00 2001 From: Xavier Morel <xmo@openerp.com> 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 f467c1261bf6..aa15236fed76 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: + +.. patch:: + +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:: -.. FIXME fix labels +.. todo:: link to list view documentation -.. create menu, action - .. improve generated views -.. create list & form views for events +.. 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 000000000000..2589e8f872ab --- /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)<h;3K|Lk000e1NJLTq0077U003kJ0{{R3F{olV0000mP)t-s|Ns9q zGc@q~`%;t4)1O^8NS5-`p8oUFXE!x8H(t;2{hn1c%hJ=E(C>nntd)g!!uql20003~ zNkl<ZcmeFuu}i~16vy$09PbTv2_Zv;ltT&*F2PloARW3MPU4b5u%m;JHDq=#M=3YC zI7xAEE8<Yp;RgQ#ad6Ep>U#k}?3f@F`dtowf%`xXR=IVX4(J}ZN1DTO^(dbjb)Eoj z0XI_yma9kk)To>h`!5JpJ<T^^G1WZbF<rvpP8GR}rz1nvv^lc3-M4wKO8BO1dXoqe zV?-ryHVfVipJ8Jp2m+gWWf{41N}h*G)xC;Sk6~t%;j=k%@cdxY@i=B=1{ec3*nNL7 z15IV-l^HrJv5hwwetmxYLPm@0{bZnFHgc-QFlhlv9lbJgt5sZYQ9tmhr%(|2T{Le2 z$tMdV4}X%HECEm<b{%h4kbH6$c5Dj>7G1}P3L+;6##91tUJxvzQjq3t=%1tG|7>!$ y-KmDvXx(>va3BBx0002w|Jn$us;a80s;Vjgyls#`_1Y`|0000<MNUMnLSTYj2*W7= literal 0 HcmV?d00001 diff --git a/doc/howto/howto_website/helloworld.png b/doc/howto/howto_website/helloworld.png new file mode 100644 index 0000000000000000000000000000000000000000..ab1e28486ef81de9362f5b05d2d61792bb3e12c9 GIT binary patch literal 517 zcmeAS@N?(olHy`uVBq!ia0vp^CxAGGgBeJEiRiZkQU(D&A+G=b|4&FvWMgEAjfr`C zZqC^^Kc<{|_50HmZVvbGnP-9eF3pLZ8^X%qHpQrX<C2QV<cF(r85kHRc)B=-RNQ)d z^>tCRf<Rm1rlOFR-}`SL$~t;-zFhi@W$%rrYNXBn%jS9JQ-+xA*Ee>rPJjMt_{IL~ z*<bPhBY=+h*ZttvhpSwrA?E^Imq_gHa!H>e`Z4YD>Hgj>wG_?2S~Dfh{@&TpcPuwQ z`*+HOz=i)+&+<Il+In|SzyvMByUjUDyXD^=GrhS(B=$(aVv+P5-_Si_H%z_G3xwIf zzF2fFGShL>H;bkxFPx@b3=>Pwn$3Ul>w~aGtChN!#9i#q&6{we<IAy0>o>(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<yf6Li3aY{w>}1LY*K<Pgg&ebxsLQ E0N1Yfo&W#< literal 0 HcmV?d00001 diff --git a/doc/howto/howto_website/lecture-view-list b/doc/howto/howto_website/lecture-view-list new file mode 100644 index 000000000000..d9bf766411bf --- /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 @@ + <openerp> + <data> ++ <record id="list_academy_lecture" model="ir.ui.view"> ++ <field name="model">academy.lectures</field> ++ <field name="arch" type="xml"> ++ <tree string="Lectures"> ++ <field name="name"/> ++ <field name="date"/> ++ </tree> ++ </field> ++ </record> ++ + <record id="action_academy_lecture" model="ir.actions.act_window"> + <field name="name">Academy lectures</field> + <field name="res_model">academy.lectures</field> diff --git a/doc/howto/howto_website/series b/doc/howto/howto_website/series index d34c6476bb78..30efad5d7b55 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 -- GitLab