Filling Many2many field (odoo 8)

前端 未结 4 396
梦毁少年i
梦毁少年i 2020-12-02 18:00

What I\'ve done:

I have a module with

myfield = fields.Many2one(\'res.partner\', string=\"Graduate\", domain=[(\'is_graduated\', \'         


        
4条回答
  •  Happy的楠姐
    2020-12-02 18:18

    You need to use an onchange method for myfield, then inside it you need to fill the graduations field, something like this:

    @api.onchange('myfield'):
    def _onchange_myfield(self):
        #fill graduations field here...
        ...
    

提交回复
热议问题