高级用例:创建模型和添加字段¶
高级用例:创建模型和添加字段

Contacts --> Configuration --> Countries
,选择法国(例如),并在 URL 上检查其 ID。
Case scenario 2: create a model called ‘Properties’ and add fields called: company, value, name, address, active, image.
从仪表板(可选)启动新模块。然后,单击 Edit Menu and start a New Menu (model). 设置菜单名称和 Confirm.现在,在其窗体上,拖放必要的字段。

Case scenario 2.a: now, you would like to have a model called ‘Regions’ to which each property must be linked. And, on ‘Regions’, you would like to see the properties for each region.


小技巧
搜索关系时,单击 Search more*并按*Custom 筛选它。这样,您就避免了创建重复项。

Case scenario 2.b: in the model ‘Properties’, show all the tags as checkboxes instead of tags.
将字段 Tags 添加到窗体后,选择它,下其 Properties > Widgets,选择*Checkboxes*。

Case scenario 3: on the leads’ form, add a selection field with the values:’Tags’ & ‘List’ & ‘Checkboxes’. According to the value of the field, show tags as many2many_tags, many2many_radio, or many2many(_list).
在表单视图中,添加*Tags* 字段并将其与 Partners Tag.关联。在 Properties 下,将其*Widget* 定义为 Many2many 。对*Checkboxes* 和 *Tags*再执行 2 次相同的过程。


Case scenario 4: on a quotation’s form, add a selection field called ‘Manager Validation’ with the values: ‘Accepted’ and ‘Refused’. Only a sales manager can see it, and the field should be set as mandatory if the untaxed amount is higher than 500€.
在报价单上添加一个*Selection* 字段,该字段的值为*Accepted*和*Refused*。将其 *Required*条件设置为 *Untaxed Amount > 500*和 *Limit visibility to groups*作为 *Sales / Administrator*或经理的可见性。

Case scenario 5: change the tooltip of a field for all views.

参见