中国本土应用
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.

11 lines
394B

  1. # -*- coding: utf-8 -*-
  2. from odoo import api, fields, models, tools, _
  3. class IrModelData(models.Model):
  4. _inherit = "ir.model.data"
  5. @api.model
  6. def get_object_reference(self, module, xml_id):
  7. """Returns (model, res_id) corresponding to a given module and xml_id (cached) or raise ValueError if not found"""
  8. return self._xmlid_lookup("%s.%s" % (module, xml_id))[1:3]
上海开阖软件有限公司 沪ICP备12045867号-1