Is there a specific way to input integer values in n8n?

Describe the problem/error/question

so I want to input the partner_id value in the form of an integer. when the test node is successful. but the partner_id data is not saved as integer and when I search, the data stored in partner_id instead changes to boolean.

partner_id: false.

It is possible that the input provided does not match the format or data type expected by Odoo.
What I want to ask is whether I am doing the input wrong?
is there a better way?

What is the error message (if any)?

there is no error. because node is success.

Please share your workflow

expected result
image

reality result
image

input to node

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your n8n setup

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hi @Dinia_Kurnia_Pratiwi ,

I’m currently not able to fully recreate as I don’t have a fully set up Odoo account.
But from a first look at your parameters, I would think you should be able to get an interger if you input the “New Value” as a fixed value and just type the number.

Could you try that and let me know how you get on?
If this fails, could you share the rest of the parameters in your node and I can set up a more solid testing account to recreate :dizzy:

Hi @mariana-na
Thank you for reply

I’ve tried your suggestion, and still no change

image

Of course, this is a parameter that must be filled in.
Sorry, there are some values ​​that I have to censor

[
  {
    "id": 4672,
    "name": "Google Cloud - Periode Feb 24",
    "origin": "---",
    "sequence": 10,
    "invoice_id": [
      2871,
      "---"
    ],
    "uom_id": [
      1,
      "Unit(s)"
    ],
    "product_id": [
      45,
      "Down payment"
    ],
    "account_id": [
      36,
      "4010101 Pendapatan Penjualan"
    ],
    "price_unit": 2111644,
    "price_subtotal": 2111644,
    "price_total": 2343924.84,
    "price_subtotal_signed": 2111644,
    "quantity": 1,
    "discount": 0,
    "invoice_line_tax_ids": [
      1
    ],
    "account_analytic_id": false,
    "analytic_tag_ids": [],
    "company_id": [
      1,
      "GITS Indonesia"
    ],
    "partner_id": [
      1536,
      "PT Urban Fashion Digital"
    ],
    "currency_id": [
      12,
      "IDR"
    ],
    "is_rounding_line": false,
    "display_type": false,
    "asset_category_id": false,
    "asset_start_date": false,
    "asset_end_date": false,
    "asset_mrr": 0,
    "purchase_line_id": false,
    "sale_line_ids": [
      3792
    ],
    "create_uid": [
      485,
      "Neng Junianti"
    ],
    "create_date": "2024-03-13 12:40:59",
    "write_uid": [
      484,
      "Ibnu Sina Wardy"
    ],
    "write_date": "2024-06-03 06:26:08",
    "invoice_type": "out_invoice",
    "product_image": false,
    "price_tax": 232280.84,
    "company_currency_id": [
      12,
      "IDR"
    ],
    "purchase_id": false,
    "display_name": "Google Cloud - Periode Feb 24",
    "__last_update": "2024-06-03 06:26:08"
  }
]

Supposedly, I only have to input each ID in the form of an integer, Odoo will automatically take and store the value in the form of a string.

Hiya,

Thanks for getting back with more details!

From a second look, it seems like the intergers might be outputting correctly and that the issue lies in the Field Names passing correctly along with their values. This might be due to how Odoo configures their variables.

In the meanwhile, where are you getting this output?
image

And could you please share what option you are selecting for in the Custom Resource Name or ID parameter?

To facilitate debugging, if you feel comfortable, you could also share your workflow json (please remember to remove any sensitive information)

I got it from when I did the get invoice line

this is option i select for custom resource name

I want to share my workflow but don’t know how. can you show it?

Hi @Dinia_Kurnia_Pratiwi ,

Apologies for the wait.

You can share your workflow my selecting your nodes in the editor screen and pressing ctrl+c

After that you can select the </> option here in the post editor and paste the nodes inside :slight_smile:

Hi there,

Just a quick reply, didnt read the whole topic.
But what could be going wrong is you have all the fields as expressions. I think this will make it think it is an ID not the name, so it will break. You need to put the ID of those fields there or change it to a fixed value for n8n to see the values correctly.

image