Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
3254 มุมมอง

Good Evening All,


ii have create a custom moduel in odoo 16 named product master and have created a tree and form views.once created the products in the form view it shows the like this 

Product Master/product.master,1


what is the problem and how can i remove the moduel name and the number in odoo 16 

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hey Vignesh,

Hope you are doing well.

When you are creating new model you should define '_rec_name'. 
_rec_name: It is intended to define the record value used to display. By default it is assumed by convention that you have a field named 'name' in your model.

Please find code in comment. 

hope this can help you.

Thanks & Regards,
Email: odoo@aktivsoftware.com
Skype: kalpeshmaheshwari

อวตาร
ละทิ้ง

Here is sample code:

class CustomClass(models.Model):
_name = 'cutsom.model'
_description = 'Custom Module'
_rec_name = 'field_name'

คำตอบที่ดีที่สุด

Please refer this video for better understanding rec_name concept

https://www.youtube.com/watch?v=d_cyPsVc7vg

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
2
ธ.ค. 24
2716
1
ก.พ. 24
2476
3
พ.ย. 23
3820
1
ก.ย. 23
3317
3
ส.ค. 25
2350