第八章-QWeb创建公告栏视图和报告


QWeb is a template engine used by Odoo. It is XML based and is used to generate HTML fragments and pages. QWeb was rst introduced in version 7.0 to enable richer kanban views, and with version 8.0, is also used for report generation and CMS website pages.

Qweb是一个用于Odoo的模板引擎。它基础XML用来生成HTML片段和页面。Qweb首先在7.0版本中引入,用来启用富公告栏视图,在8.0版本中用左生成报告以及CMS网站的页面。

Here you will learn about the QWeb syntax and how to use it to create your own kanban views and custom reports.

这里和你会学到QWeb语法,以及如何使用它来创建自己的公告栏视图和自定义报告。

To understand kanban boards, kanban is a word of Japanese origin that is used to represent a work queue management method. It takes inspiration from the Toyota Production System and Lean Manufacturing, and has become popular in the software industry with its adoption in Agile methodologies.

你需要理解kanban board,kanban是一个源自日本的用来表现工作队列管理方法的单词。它从Toyota的生产-高效制造管理系统中启发而来,而且它日益在软件工业中流行开来,以便适应敏捷开发。

The kanban board is a tool to visualize the work queue. Work items are represented by cards that are organized in columns representing the stages of the work process. New work items start on the left-most column and travel through the board until they reach the right-most column, representing completed work.

公告板是一个用来形象化工作队列的工具。

Getting started with kanban board

The simplicity and visual impact of kanban board make them excellent to support simple business processes. A basic example of a kanban board can have three columns, as shown in the following image: “To Do,” “Doing,” and “Done,” but it can of course be extended to whatever speci c process steps we may need:

img:omit
Photo credits: A Scrum board suggesting using kanban by Jeff.lasovski. Courtesy of Wikipedia.

Kanban views are a distinctive Odoo feature, making it easy to implement these boards. Let’s learn how to use them.

Kanban views

In form views, we use mostly speci c XML elements, such as and , and few HTML elements, such as

or
. With kanban views, it’s quite the opposite; they are HTML-based templates and support only two Odoo-speci c elements, and