跳至内容
菜单
此问题已终结
4 回复
3697 查看

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

形象
丢弃