官术网_书友最值得收藏!

The view layer

The view layer describes the user interface. Views are defined using XML, which is used by the web client framework to generate data-aware HTML views.

We have menu items that can activate actions which can render views. For example, the Users menu item processes an action also called Users, which in turn renders a series of views. There are several view types available, such as the list (sometimes called tree for historical reasons) and form views, and the filter options made available in the top-right search box are also defined by a particular type of view, the search view.

The Odoo development guidelines state that the XML files defining the user interface should be placed inside a views/ subdirectory.

Let's start creating the user interface for our To-Do application.

In the next sections, we will make gradual improvements and frequent module upgrades to make those changes available. You might also want to try the --dev=all server option, which spares us from module upgrades while developing. Using it, the view definitions are read directly from the XML files so that your changes can be immediately available to Odoo without the need for a module upgrade.

If an upgrade fails because of an XML error, don't panic! Read the error message in the server log carefully; it should point you to where the problem is. If you feel in trouble, just comment out the last edited XML portions or remove the XML file from the __manifest__.py and repeat the upgrade. The server should start correctly.
主站蜘蛛池模板: 沐川县| 蓝田县| 汨罗市| 清涧县| 奉节县| 永春县| 清水县| 宝鸡市| 信阳市| 东台市| 湾仔区| 清新县| 井陉县| 宣城市| 五峰| 清远市| 手机| 含山县| 兴海县| 茌平县| 宕昌县| 龙南县| 平谷区| 平原县| 麻江县| 星座| 浦江县| 永嘉县| 江永县| 稻城县| 吉隆县| 黔东| 积石山| 正镶白旗| 乐清市| 陵川县| 牙克石市| 台安县| 张家口市| 锡林郭勒盟| 开江县|