-
Notifications
You must be signed in to change notification settings - Fork 30
4.4 step4 correction
The missing rec_name
would be on library.book.exemplary
:
_rec_name = 'identifier'
Other than that, there is not really a correction for this step. You should make sure that all your entry points appears in the menu, and that they behave as expected.
You may now compare the contents of your files and those of the
step4-homework
branch for the library.xml
file. The layout of the file
should be identical:
- The
menu_libray_configuration
entry should be at the top, below themenu_library
entry. The namemenu_libray_configuration
is logical, thoughmenu_configuration
would have been too. However, with 10 installed modules, there would be 10menu_configuration
which could make it a little more difficult to read - The
ir.action.act_window
,ir.action.act_window.view
and menu entries for the different models should be defined right before the associated views. This helps the readability of the xml file by putting everything related to a model at the same place in the file
You will notice that we did not add an entry point for book exemplaries. This is because exemplaries will rarely be looked for in the application, except from the book they correspond to. We will talk about this later. For now, you should have displayed the exemplaries of a book in the book's form view, so you will be able to create / view them this way.
Regarding the different views, compare what you did with what is proposed in the correction. Some things may be better the way you did it, others not so.
Note: you may notice in some views that there are missing fields. For
instance, if you open an author's book from the books
field of the author's
form view, the author
field will be hidden. This is because tryton
automatically hides the Many2One
field associated to a One2Many
when
displaying this One2Many
When going on to the next step, please refresh your code with the correction, so that everything is in sync.