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

Hi there,

I am trying to get a field "client_order_ref" which exists in the form "sale.order" to appear in a "Delivery Order" report for "stock.picking.out"

Can anyone advise what I need to do.

Many thanks in advance,

Jon

 

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

Hi, you can declare a related field like this:

'other_object_id': fields.many2one('object.my.object', 'my object'),

'other_object_field': fields.related('other_object_id', 'other_object_field', string='My other object field', type='integer', readonly=True),

After that you can use it in your report.

Cheers,

Diego

 

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

if i understand your question you can use "related field" for this case

อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

Hi,

Thanks - so does that mean I need to make a new module or can I just create the related field someother way?

Regards Jon

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

is not necessary at all, you can create a new module in python, you can create it as custom field, x_campo = reference or something like that

อวตาร
ละทิ้ง