Odoo13_多选下拉框

1.models.py

    mood = fields.Many2many('mood', string='主要基调')

class mood(models.Model):
    _name = 'mood'
    _description = '主要基调'

    name = fields.Char('基调', required=True)  # 必填
    ext = fields.Char(string='扩展id', default='0')

2.views.xml

                            <field name="mood" widget="many2many_tags"/>

 

posted @ 2020-09-19 15:58  手可摘星辰。  阅读(844)  评论(0编辑  收藏  举报