Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
4 Odgovori
3674 Prikazi

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

 

Avatar
Opusti
Best Answer

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

 

Avatar
Opusti
Best Answer

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

Avatar
Opusti
Avtor Best Answer

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

Avatar
Opusti
Best Answer

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

Avatar
Opusti