Take a look at this method of ir.model.data
:
@api.model
def _get_id(self, module, xml_id):
"""Returns the id of the ir.model.data record corresponding to a given module and xml_id (cached) or raise a ValueError if not found"""
return self.xmlid_lookup("%s.%s" % (module, xml_id))[0]
It can be used to replace the functionality of self.env.ref
.
Call it from XMLRPC (send the module name and the XML ID as parameters), and it will return the ID in database of the record with that XML ID. Store that ID in a variable and use this variable to populate team_id
.
The XMLRPC code will vary depending on the programming language you're using (Pyhon, PHP, Ruby or Java).
EDIT
As @Naglis said, the method I suggested you is not going to work, as it's a private method. Use the public one, xmlid_to_res_id
, to achieve what you need.