i am passing an account.analytic.account field from sale order to invoice. intention is to pass the field while confirming sale order.
def _prepare_invoice(s
When you get a can't adapt type 'x' error, you're usually working with an object x instead of its ID (which actually is the required one).
So if you're getting this error in order_field, you should write 'order_field': order.order.id instead.
order_field
'order_field': order.order.id