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

I create custom model and it has one2many field like sale order line .But I don't know how to create add a section and add a note in this one2many field.How can I add this like sale order line.My custom order line has the same field with sale order line ,so I try to use sale order line in my custom model.But everything is working fine before save.When save, get order_id problem because order_id is required field and connect with sale order.So,how can I solve my problem?Please guide me how to add (add a section and add a note) in my one2many field.

อวตาร
ละทิ้ง

Hi,

add widget="section_and_note_one2many"

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

Hello Please Use widget="section_and_note_one2many" in your One2many field in XML,

To Get Section and Note in Your Custom Model

Thanks

For more information Contact us: -  https://kanakinfosystems.com/odoo-development-services

อวตาร
ละทิ้ง
ผู้เขียน

How can I know section or normal order line?

Don't forget to define "display_type" field in your model/view.
See sale.order.line for example.

@FarFarAway: yeah you're right, I didn't do that before, hence it wasn't working as it should've been

Related Posts ตอบกลับ มุมมอง กิจกรรม
3
ก.ค. 25
21996
1
ธ.ค. 24
2370
1
เม.ย. 25
2573
0
ก.ย. 23
144
2
ม.ค. 24
16138