测验

阅读(28) 最后更新: 2019年2月15日 06:01

上一页 再读 |

翻译进度 100%

自助翻译

编辑待办事项表单视图以添加新字段:name=“x_class_id”/>。
Edit the To-do item form view to add the new field: name="x_category_id" />.

将ACL添加到待办用户组中.
Add the ACL to the To-do User group.

如何扩展待办事项类别模型,使类别列表为10。
How can you extend the To-do Category model so that the list of Categories is10.

为每个用户创建一个记录规则就足够了。要使用的域是[(‘create_uid’,‘=’,user.id)]。
specific for each user?It is enough to create a record rule on the To-do category for the To-do User Group.The domain to use is [('create_uid', '=', user.id)].

还可以重新组织“待办事项”菜单,使其有两个子菜单项、项和类别.
You could also reorganize the To-do menu to have two child menu items, Items and Categories.

待办事项顶部菜单项不应定义操作,项目菜单项应重用现有操作以打开待办事项列表,并在类别菜单项上使用新操作,打开待办事项类别列表。
The To-do top menu item should have no action defined, the Items menu item should reuse the existing Action to open the to-do list, and a new Action should be used on the Categories menu item, opening the To-do Category list.

在设计Odoo应用程序时,需要考虑哪些相关层?
chapter-1What are the relevant layers to consider when designing an Odoo application?1.

首先关注数据层,构造数据模型、所需的模型以及它们之间的关系,实体-关系图(ERD)是实现这一目标的有用工具。
First focus on the Data layer, structuring the data model, the models needed and their relations.Entity-relationship diagrams (ERDs) can be a useful tool for this.

然后考虑表示层-如何组织用户界面以适应要支持的用例。
Then think about the Presentation layer—how the user interface will be organized to fit the use cases to be supported.

最后,考虑逻辑层,支持所需的业务规则,这些可以是验证、自动化或辅助功能。
Finally, think about the Logic layer, supporting the required business rules.These can be validations, automation, or helper features.

如何启用开发人员模式?
How is Developer mode enabled?2.

开发者模式,提供设置技术菜单和调试上下文菜单,可以在主设置屏幕上启用,使用右下角的链接。在Odo9.0和之前的版本中,它是从“关于”对话框中启用的,从右上角的“用户”菜单访问,也可以通过更改./web#.在页面URL上直接启用。网址:./web?调试#.
Developer Mode, making available the Settings | Technical menu and the Debug contextual menu, can be enabled in the main Settings screen, using a link in the bottom-right.This has been so since Odoo 10.0; in Odoo 9.0 and before, it is enabled from the About dialog, accessed from the user menu in the top-right.It can also be enabled directly on the page URL, by changing the .../web?#... URL to .../web?debug#....

您在哪里创建新的数据模型?
Where do you create a new Data model?3.

数据模型可以在“设置”应用程序中创建和修改,在“技术”的“技术”-数据库结构-“模型”菜单中,“技术”菜单必须有可用的“技术”菜单,必须有“开发人员模式”启用。新模型必须具有x_前缀,而新字段也必须具有相同的x_前缀。
Data Models can be created and modified in the Settings app, in the Technical | Database Structure | Models menu option.To have the Technical menu available, you must have Developer Mode enabled.New models must have an x_ prefix, and new fields must also have this same x_ prefix.

如何使新的数据模型可供最终用户创建和使用。
How do you make a new data model available for the end users to create and4.

编辑记录?您应该为此创建一个菜单项,在大多数情况下,您还需要设计适当的列表和表单视图。您还需要将ACL添加到用户所属的组中,否则他们将无法看到菜单和视图。
edit records?You should create a menu item for this, and in most cases, you will also want to design proper List and Form Views.You also need to add the ACLs to a group the user belongs to, or they won't be able to see the menu and views.

如何将字段添加到现有表单中?
How do you add a field to an existing form?5.

首先编辑模型以添加新字段,然后为表单找到基本视图(例如,使用Debug菜单),然后为该基本视图创建扩展视图,添加新字段。
You first edit the model to add the new field, then find the base View for the form (for example, using the Debug menu).Then create an extension view for that base view, adding the new field.

什么是域,什么时候可以使用?
What is a Domain, and when can it be used?6.

它是在从数据库查询记录时应用的筛选器。
It is a filter to apply when querying records from the database.

如何在要导航到的窗体上设置默认值?
How can you set default values on the form you're navigating to?7.

要做到这一点,可以使用默认前缀设置上下文键,例如{‘Default_x_name:’}。此上下文键可以设置在窗口操作上,用于菜单项,关系字段可以在视图的字段定义中设置。
You do this by setting a context key with the default_ prefix, for example, {'default_x_name': ' '}.This context key can be set on Window Actions, used in Menu items, and for relational fields can be set on the View's field definition.

如何让用户访问模型?
How do you give a user access to a Model?8.

首先将ACL分配给一个组,用于创建、读取、更新和删除,然后确保用户直接或间接地属于该组(间接属于继承该组的另一个组,例如Manager组,后者通常从用户组继承)。
You first assign the ACL, for create, read, update, and delete, to a Group, and then make sure that the user belongs to that Group, directly or indirectly (indirectly belonging to another Group that inherits that one, such as Manager groups, which usually inherit from user groups).

如何将“类别”字段添加到“待办事项”项中,并具有可能的值9。
How can you add a Category field to the To-do items, with possible values9.

可从选项列表中选择?(选项列表是可编辑的,可以由用户进行扩展。)创建一个名为x_todo_class 1的新模型。不需要额外的字段。
selectable from an options list?(The options list is editable and can be expanded by users.)Create a new Model called x_todo_category.No additional fields needed.

编辑x_todo_Item模型,并添加一个具有相关x_todo_品类模型的多到一类型的x_todo_id字段。
Edit the x_todo_item Model and add a x_category_id field, of the many-to- one type, with a related x_todo_category Model.

odoo技术交流2 群号 625337975

http://www.odoogo.com/post/58/Odoo开发视频教程

文档不断更新中,添加微信odoogo,获取最新视频课程和模块

留言提问