How do i create an inner join between two fields
class DRS(models.Model):
_inherit = "product.template"
# BASIC INFORMATION
supplier = fields.Char()
product_name_eng = fields.Char()
product_name_chi = fields.Char()
product_category = fields.Char()
brand_name_eng = fields.Char()
brand_name_chi = fields.Char()
sup_product_code = fields.Char()
drs_product_code = fields.Char()
mlt = fields.Integer()
allergy_warning = fields.Boolean()
product_material_percentage = fields.Char()
product_link = fields.Char()
# COMPLIANCE INFORMATION
countryoforigin = fields.Char()
medicaldevice = fields.Boolean()
wireless = fields.Char()
otherwireless = fields.Char()
hscode = fields.Char()
importexport = fields.Char()
containmaterial = fields.Char()
potentialhazards = fields.Char()
# OTHER
notes = fields.Text()
# REFERENCE INFORMATION
refinfo_id = fields.One2many('drs_product_views.refinfo',
'drs_product_code', string="Reference Info")
class refinfo(models.Model):
_name = 'drs_product_views.refinfo'
drs_product_code = fields.Many2one('product.template',
ondelete='cascade', string="Product")
file = fields.Char()
link = fields.Char()
type = fields.Char()
appliedVariationProduct = fields.Char()
applicableRegion = fields.Char()
description = fields.Text()