can't adapt type 'account.analytic.account

后端 未结 1 641
南旧
南旧 2021-01-20 02:05

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         


        
相关标签:
1条回答
  • 2021-01-20 02:26

    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.

    0 讨论(0)
提交回复
热议问题