中国本土应用
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

18 行
499B

  1. # -*- coding: utf-8 -*-
  2. from odoo import api, models, tools, _
  3. class WecomApiToolsDictionary(models.AbstractModel):
  4. _name = "wecomapi.tools.dictionary"
  5. _description = "Wecom API Tools - Dictionary"
  6. def check_dictionary_keywords(self, dictionary, key):
  7. """
  8. 检查字典中是否存在key
  9. """
  10. # dictionary, key = (self.value[0], self.value[1])
  11. if key in dictionary.keys():
  12. return dictionary[key]
  13. else:
  14. return None
上海开阖软件有限公司 沪ICP备12045867号-1