ERP-Ukraine / odoo-rpc-dart

Odoo RPC Library for Dart
MIT License
43 stars 32 forks source link

您好 如何进行关联查询呢 #23

Closed 443933773 closed 2 years ago

lem8r commented 2 years ago

Hi,

Could you please provide more details?

lem8r commented 2 years ago

Do you mean how to read related fields? The same way as Odoo's web client does it. Open network calls and you will see it.

For example, I opened sales order. At first web client reads the fields on sale.order model. image

The response has tuples (id, name) for Many2one fields, so you can show it on interface without fetching extra data. And you have id to get more details if needed. It shows Ready Mat as a link. If you click it you will get partner form with id 12 image

And for One2many fields (order lines) it gives you ids which has to be fetched with second call. image

Odoo client does exactly that: it fetches order lines with second call image

And response is image