Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
4 Ответы
3662 Представления

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

Аватар
Отменить