hi when i use many2one function in odoo 12, and i have many2one relation between them (class) why i am getting a table name and id (that generate automatically looks like by odoo ORM)? and the other odoo example is not? how do i change this value?
here is how my code looked like, below is my model :
# -*- coding: utf-8 -*-
from odoo import models, fields, api
class SalesorderSalesorder(models.Model):
_name = 'salesorder.salesorder'
no_faktur = fields.Char(String='No Faktur', required=True)
kd_sales = fields.Many2one('res.users', string='Kode Sales')
details = fields.One2many('salesorderdetails','no_faktur','List Item')
class SalesOrderDetails(models.Model):
_name = 'salesorderdetails'
no_faktur = fields.Many2one('salesorder.salesorder')
kd_produk = fields.Many2one('ms_produk.ms_produk','Kode Product',required=True)
and here is how it looked like :
and i have these column in my database :
i want to show kd_produk instead of table name and id, how do i change this?