《menuitem》 菜单 id 定义菜单的唯一标记,该id 应该是全局唯一的 sequence 定义菜单的排序 parent 定义菜单的父节点 name 定义菜单的名称,缺省值 groups 定义菜单绑定的权限,一个菜单可以绑定多个不同的权限 action 定义窗体的事件
《menuitem》 菜单 id 定义菜单的唯一标记,该id 应该是全局唯一的 sequence 定义菜单的排序 parent 定义菜单的父节点 name 定义菜单的名称,缺省值 groups 定义菜单绑定的权限,一个菜单可以绑定多个不同的权限 action 定义窗体的事件
Many2many 字段是一个记录集合 comodel_name 标签模块名称 user_ids = fields.Many2many('res.user','amos_sale_res_users_rel','sale_id','user_id',string='业务员')
One2many 字段在 comodel_name 里是所有记录的记录集 inverse_name 相当于当前记录 order_line = fields.One2many('sale.order.line','order_id',string='明细') 比如通过order_id 去查询订单明细表中的商品明细信息
这字段的值是一个 0 或者 1 (0 是无记录,1是单个记录) 属性: commodel_name 目标模块的名称 domain 在客户端候选值里设定一个可选的domain context 当在客户端处理字段(字典)设定可选的context ondelete 当参考数字被删除时的处理 auto_join 通过搜索产生的join 的值 (布尔和 false) delegate 设置值为true 是为了让标签模块的字段去访问当前的模块 (相当于继承) 除了在related 字段或者拓展字段里,否则 comodel_na…
一、视频 odoo开发教程之精通版(odoo视频教程,odoo教程) 昆山一百-超能学院 二、文档 odoo 开发文档 三、附件资料 Github https://github.com/odoo/odoo Github 镜像(2022-05-06) 点击下载 python3 (python 3.10.4) 安装脚本 https://mirrors.jshai…
selection 指定该字段的值,可能是列表,值,字符串,模块的办法或者方法名称 selection_add 是对selection 的延伸,它是(值、字符串)列表 在继承和延伸中,selection 是一个必备的属性 sex = fields.Selection([(1,'男'),(2,'女')],string = '性别',defaults = 1)
把时间戳转换成客户端时区,这并不是对其初始化,他只是在客户端显示,如果要初始化,需要fields.datetime.now() 来取代 时间戳(datetime),datetime 能够被转换成客户端时区 (UTC中显示) date_order = fields.Datetime(string='单据日期')
和 text 类型类型,其底层还是基于 Text ,但是比 text 类型多了一个编辑器 content = fields.Html(strip_style=True,string='')
和char 类型的字符串非常相似,但是他被用作较大的内容,不限制大小,通常显示为多行文本框 transalte 此字段是否可以被翻译 node = fields.Text(string='备注信息')
COPYRIGHT © 2025 blog.szhcloud.cn 寰智博客. ALL RIGHTS RESERVED.
Theme Kratos Made By Seaton Jiang