You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
493B

  1. from odoo import models, fields
  2. class DiscoveryResult(models.TransientModel):
  3. _name = 'discovery.result'
  4. channel_id = fields.Many2one('discovery.channel', '异常')
  5. id_list = fields.Char('id list')
  6. id_count = fields.Integer('记录数')
  7. def open_action(self):
  8. self.ensure_one()
  9. action = self.channel_id.action_id.read()[0]
  10. new_domain = [('id', 'in', list(eval(self.id_list)))]
  11. action.update({'domain': new_domain})
  12. return action
上海开阖软件有限公司 沪ICP备12045867号-1