Odoo node ecommerce category, pricelist and image/attachment issues


Thank you for building this great product. You just did a great job with the newest Odoo node as well.

We started to use it and we are able to create/update (new) product with some data. Extra custom fields also work. :slight_smile:

But we stuck with something:

  • We can create e-commerce category, but we cannot use it on product. (Internal categories works). As you can see in the attachment, if I set some ecommerce category at Odoo side and try to get in n8n it is empty.
  • We have the same issue with pricelist. How can we add price to product on particular pricelist?

And the last one is about upload image, extra images and attachment. We tried base64 format and it does not work.

Any idea is very very welcome.

Thank you and keep it the good work!

Hey @Lunoba, welcome to the community :tada:

I am very sorry to hear you’re encountering this behaviour. Unfortunately I have never used Odoo (and don’t quite know what it is to be fully honest). So please accept my apologies if my questions sound a bit stupid.

Could you elaborate a bit on the problem? When creating the e-commerce category, what does the response data look like? What does the full response data look like you’re getting when fetching a product with the respective category? Could you describe the steps necessary to reproduce this problem?

Dear @MutedJam

Sorry for my late reply and thank you for your support.

I grouped some issues because I taught they are the same, but let’s focus on Odoo Ecommerce Category (product.public.category).

And we can start with the reading operation.

As you can see we have one e-commerce category: Brands:

This does not contain the product that to belongs, but I think it’s okay because it can belong to multiple products.

Then if I read our only one existing product with Brands e-commerce category we can see that eCommerce category ID is 5:

And the issue is that, if I try to create/update a product with the same eCommerce category (5). I does not work and I got this error:

How can we create/update products with e-commerce category?

Thank you for your help.

I have cheked the odoo log, and there is not so much, just the same error message, like:

2022-03-16 12:38:33,596 6 ERROR db_hs22020716550886 odoo.http: Wrong value for product.template.public_categ_ids: 5;

Any idea?

Hey @Lunoba, apologies I couldn’t reply yet. It’s quite busy at the moment and I have yet to set up an Odoo test instance to try this out.

@MutedJam no problem, how can I help you? Can I give you access to our test instance to take a look? (in pm?)

Oh, or the easiest way, maybe its good for other people as well who wants to try Odoo and n8n:

There is a runbot where you can test Odoo versions, so you dont have to install it :slight_smile:
Just go for one of the v15 community (non enterprise) version:

I hope this helps. Thank you in advance.
user/pass: admin

Hi @Lunoba, thanks so much for the runbot link, this is quite helpful.

It seems this value has to been an array from the looks of it. Could you try adding a new expression for your field like so:

Then, in the expression editor, enter a value like {{[1]}}:

This will result in an array including a single value of 1. Now the node can be executed without errors:

Fetching the first 5 “Product Templates” would suggest these have been updated as expected:

Thank you @MutedJam It seems okay now. Sorry for the late respons.

1 Like

Awesome, glad to hear this works for you! I’m sorry this took me a bit, Odoo has been completely uncharted territory for me before this forum topic appeared.