vettloffah / odoo-await

Odoo API client featuring async await.
74 stars 29 forks source link

How to fetch invoice line nested fields? #36

Open valentindoulcier opened 9 months ago

valentindoulcier commented 9 months ago

Hello,

I need to request invoices including lines with all default detail (quantity, price_subtotal, price_total, price_unit, tax, etc.).

When I fetch account.move model, I only get invoice_line_ids and also string_to_hash properties including (when I parse the string) only a few fields (name, debit, credit, account_id, partner_id).

As the fields param is a string[], how can I specify the expected nested properties? I took a look at the methods's implementations, but can't see how it can work.

Thank's for your help! Cheers

fernandoslim commented 5 months ago
  1. odoo.read('sale.order', salesorder_id, defaultSalesOrderFields)
  2. odoo.read('sale.order.line', salesorder_lines, defaultSalesOrderLineFields)