Odoo14 中的小部件列表

们有不同类型的小部件用于不同的目的,帮助我们简化操作。小部件用于使代码变得简单且用户友好,这将有助于软件的编码和编程方面。在 Odoo 14 开发中,我们可以利用不同的小部件,这些小部件可用于编程操作的某些特定方面。这些简化工具将为简化编程操作铺平道路。

在这篇文章中,我们将讨论可以在 Odoo 领域应用的不同小部件。

所有可在 Odoo 中使用的 Widget 工具均与其相关的索引一起定义。在本博客中,我们总共介绍了 Odoo 中使用的 30 种小部件工具。此外,还定义了 Odoo 平台中各个小部件操作的字段类型以及各个小部件操作的插画截图,以便更清晰地了解操作。

现在让我们继续一一了解每个小部件。

1.badge

Field Type: Many2one, Selection

<field name="state_id" widget="badge" />

2.remaining_days

Field Type: Datetime

<field name="expiration_date" widget="remaining_days"/>
 


 

  1. color_picker

Field Type: Integer

<field name="color" widget="color_picker"/>


 

  1. char_emojis / text_emojis

Field Type: Char, Text
<field name="subject" string="Subject" widget="char_emojis"/>
 


 

  1. forecast_widget

Field Type: Float
<field name="forecast_availability" string="Reserved" widget="forecast_widget"/>
 


 

  1. many2one_avatar_employee

Field Type: Many2one
<field name="employee_id" widget="many2one_avatar_employee"/>
 


 

  1. many2one_avatar_employee

Field Type: Many2one
<field name="user_id" widget="many2one_avatar_user"/>
 


 

  1. priority

Field Type: Selection

priority = fields.Selection([('0', 'Normal'),('1', 'Good'),('2', 'Very Good'),('3', 'Excellent')], "Appreciation", default='0')
<field name="priority" widget="priority"/>


 


 

  1. product_discount

Field Type: Float
<field name="discount" string="Disc.%" widget="product_discount"/>
 


 

  1. list_activity

Field Type: One2many
<field name="activity_ids" widget="list_activity"/>
 


 

  1. kanban_activity

Field Type: One2many
<field name="activity_ids" widget="kanban_activity"/>


 

  1. account_resequence_widget

Field Type: Text
<field name="preview_moves" widget="account_resequence_widget"/>
 


 

  1. stock_rescheduling_popover

Field Type: Char
<field string=" " name="json_popover" widget="stock_rescheduling_popover"/>
 


 

  1. mrp_should_consume

Field Type: Float
<field name="product_uom_qty" widget="mrp_should_consume" string="To Consume" width="1"/>
 


 

  1. mrp_workorder_popover

Field Type: Char
<field name="json_popover" widget="mrp_workorder_popover" string=" " width="0.1" attrs="{'invisible': [('show_json_popover', '=', False)]}"/>
 


 

  1. popover_widget

Field Type: Char
<field name="json_lead_days_popover" optional="show" nolabel="1" string="Forecast Description" width="10px" widget="popover_widget"/>
 


 

  1. kanban_vat_activity

Field Type: Boolean
<field name="json_activity_data" widget="kanban_vat_activity"/>
 


 

  1. many2one_barcode

Field Type: Many2one
<field name="product_id"context="{'partner_id': parent.partner_id}" widget="many2one_barcode"domain="[('purchase_ok', '=', True), '|', ('company_id', '=', False), ('company_id', '=', parent.company_id)]"/>
 


 

  1. text

Field Type: Text, Char
<field name="description" widget="text"/>
 


 

  1. many2manyattendee

Field Type: Many2many
<field name="partner_ids" widget="many2manyattendee" placeholder="Select attendees..." context="{'force_email':True}" class="oe_inline"/>
 


 

  1. many2many_tags_avatar

Field Type: Many2many
<field name="partner_ids" widget="many2many_tags_avatar" placeholder="Select attendees..." context="{'force_email':True}" class="oe_inline"/>
 


 

  1. website_urls

Field Type: Char
<field name="regex_url" widget="website_urls" placeholder="e.g. /page"/>
 


 

  1. domain
  2. Fied Type: Char

<field name="filter_domain" widget="domain"/>
 


 

  1. boolean_favorite

Field Type: Boolean
<field name="is_favorite" widget="boolean_favorite" nolabel="1"/>
 


 

  1. account_hierarchy_selection

Field Type: Many2one
<field name="user_type_id" widget="account_hierarchy_selection"/>
 


 

  1. percentage

Field Type: Float
<field name="percentage" widget="percentage" />


 

  1. task_with_hours

Field Type: Many2one
<field name="task_id" widget="task_with_hours" domain="[('project_id', '=', project_id)]"/>


 

  1. timesheet_uom_no_toggle

Float Type: Float
<field name="planned_hours" widget="timesheet_uom_no_toggle" sum="Initially Planned Hours" optional="hide"/>
 


 

  1. CopyClipboardChar

Float Type: Char
<field name="link" readonly="1" widget="CopyClipboardChar"/>
 


 

  1. boolean_toggle

Float Type: Boolean
<field name="active" widget="boolean_toggle"/>


 

  1. sms_widget

Float Type: Char, Text
<field name="body" widget="sms_widget"/>
 


 

  1. selection_badge

Float Type: Selection
<field name="progression" widget="selection_badge"/>
 


 

  1. timesheet_uom_timer

Float Type: Float
<field name="unit_amount" string="Time Spent" widget="timesheet_uom_timer"/>


 

  1. daterange

Float Type: Datetime
<field name="date_end" widget="daterange" nolabel="1" class="oe_inline" options="{'related_start_date': 'date_begin'}"/>
 


timesheet_uom

Filed Type: timesheet_uom
<field name="unit_amount" widget="timesheet_uom"/>


 

  1. pad

Float Type: Char
<field name="description_pad" widget="pad" nolabel="1"/>
 


 

  1. tate_selection

Field Type: Selection
<field name="kanban_state" widget="state_selection"/>


 

  1. many2many_checkboxes

Float Type: Many2many
<field name="inbound_payment_method_ids" string="Methods" widget="many2many_checkboxes" attrs="{'invisible': [('type', 'not in', ['bank', 'cash'])]}"/>
 


 

  1. video_preview

Float Type: Char
<field name="embed_code" class="mt-2" widget="video_preview"/>
 


 

  1. res_partner_many2one

Field type: many2one


 

<field name="partner_id"  widget="res_partner_many2one"
 context="{'default_name': contact_name,'default_title': title,
       'default_street': street,'default_street2': street2,
       'default_city': city,'default_state_id': state_id,
       'default_zip': zip,'default_country_id': country_id,
        'default_function': function,'default_phone': phone,
      'default_mobile': mobile,'default_email': email_from,
      'default_user_id': user_id,'default_team_id': team_id,
      'default_website': website,'show_vat': True}" />

这些是 Odoo 平台开发过程中使用的各种类型的小部件工具,通过简化开发和编程方面为平台引入高级操作功能。

总之,本文章中描述的所有 40 种小部件工具都将对平台的操作方面有所帮助。您可以阅读以下博客,以清楚地了解其他已使用且可在 Odoo 中使用的小部件工具: Odoo 中的小部件
 

相关推荐

  1. odoo15odoo16一个更新add_sign

    2024-01-27 00:10:04       32 阅读
  2. Odoo17 不再支持视图attrs和states

    2024-01-27 00:10:04       52 阅读
  3. odoo16 档案管理视频档案上传与播放

    2024-01-27 00:10:04       22 阅读
  4. Odoo管理网站站点地图

    2024-01-27 00:10:04       38 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-01-27 00:10:04       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-01-27 00:10:04       100 阅读
  3. 在Django里面运行非项目文件

    2024-01-27 00:10:04       82 阅读
  4. Python语言-面向对象

    2024-01-27 00:10:04       91 阅读

热门阅读

  1. 云安全中常见的云漏洞

    2024-01-27 00:10:04       44 阅读
  2. 第一章 基础算法(二)(高精度加减乘除)

    2024-01-27 00:10:04       56 阅读
  3. LeetCode-题目整理【10】:单词搜索

    2024-01-27 00:10:04       55 阅读
  4. SpringBoot中从HikariCP迁移到Oracle UCP指南

    2024-01-27 00:10:04       42 阅读
  5. Tcp实现聊天

    2024-01-27 00:10:04       47 阅读
  6. 2024.1.23力扣每日一题——最长交替子数组

    2024-01-27 00:10:04       60 阅读
  7. 整数反转算法(leetcode第7题)

    2024-01-27 00:10:04       53 阅读
  8. vue3常用代码

    2024-01-27 00:10:04       58 阅读
  9. Oracle中如何把整个表作为参数传递

    2024-01-27 00:10:04       49 阅读