Skip to content
Snippets Groups Projects
Commit 9a141357 authored by Xavier Morel's avatar Xavier Morel
Browse files

[ADD] forgotten images, new patches/howto sections

parent 43523d4e
No related branches found
No related tags found
No related merge requests found
...@@ -445,6 +445,12 @@ Let us, then, create a menu and an action for our lectures: ...@@ -445,6 +445,12 @@ Let us, then, create a menu and an action for our lectures:
.. patch:: .. 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` 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 at the top-left corner, before :menuselection:`Messaging`. In it is the
submenus we defined via ``menuitem``, and within (the first submenu is 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 ...@@ -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. 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 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 .. todo:: have lectures extend events -> reuse in OpenERP?
.. improve generated views
.. create list & form views for events
.. [#taprofile] the teaching assistants profile view ends up broken for now, .. [#taprofile] the teaching assistants profile view ends up broken for now,
but don't worry we'll get around to it but don't worry we'll get around to it
......
# 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"),
}
doc/howto/howto_website/hellobootstrap.png

456 B

doc/howto/howto_website/helloworld.png

517 B

# 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>
...@@ -14,3 +14,5 @@ ta-template-biography ...@@ -14,3 +14,5 @@ ta-template-biography
lectures-model-add lectures-model-add
data-to-demo data-to-demo
lectures-action-and-menus lectures-action-and-menus
field-label
lecture-view-list
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment