I have tried to create an invoice for an item through n8n. However, I keep getting the error that my usage for the invoice line ids field input is invalid. In this case, I assume account_ID is 27 because I have set the Category of this item to All/Saleable, and Saleable has the field
"property_account_income_categ_id": [ 27, "400000 Product Sales" ],
.
My input was:
[ (0, 0, { 'product_id': 6, 'name': 'Product Test', 'quantity': 1, 'price_unit': 1.00, 'account_id':27, 'product_uom_id': 1, 'tax_ids': [], }).
I also tried
[ (0, 0, { 'product_id': 6, 'quantity': 1, 'price_unit': 1.00 })]
with the same error message.
Can anyone let me know what I have done wrong? Do I need to configure something else differently?
NodeApiError: Wrong value for account.move.invoice_line_ids: [ (0, 0, { 'product_id': 6, 'name': 'Product Test', 'quantity': 1, 'price_unit': 1.00, 'account_id':27, 'product_uom_id': 1, 'tax_ids': [], }) at ExecuteContext.odooJSONRPCRequest (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Odoo/GenericFunctions.js:80:19) at processTicksAndRejections (node:internal/process/task_queues:95:5) at ExecuteContext.odooCreate (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Odoo/GenericFunctions.js:136:24) at ExecuteContext.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Odoo/Odoo.node.js:324:40) at WorkflowExecute.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/execution-engine/workflow-execute.js:627:19) at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/execution-engine/workflow-execute.js:878:51 at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/execution-engine/workflow-execute.js:1211:20