中国本土应用
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

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