İçereği Atla
Menü
Bu soru işaretlendi
2 Cevaplar
547 Görünümler

I recently acquired an Odoo license. I'm customizing the "Product" menu within the "Inventory" module using Odoo Studio. Within the product listing, there's a default field called "Company" (i think is company.res field) that has the many2Oone type, but I'd like to change it to many2many so that the product I'm currently creating can be visible to one or more companies.


I've been trying with Odoo's AI, but the responses it gives have options that aren't actually there (it only guesses them), so I'm currently lost.



Avatar
Vazgeç
En İyi Yanıt

Just for the record, the related model is res.company.

You can not simply change a Many2one field to a Many2many. While I usually tend to not say that a task/change is impossible to perform in Odoo, I'm rather certain you've hit one of the few dead ends, especially when trying to do this in Studio - but also when doing this on source level, unless you're up for heavy customization, even heavier testing and still bug-fixing as you go.

The thing is, the way, a Many2one fields is written information to and read from, is fundamentally different from a Many2many. And since we speak Inventory, or ERP on a broader scale, "Company" and "Product" are, as you can imagine, deeply nested concepts, affecting tons of other applications/functionality within. One main concern in changing that field further down the line would be access/security rules that are based on a single company (or none) type of field globally in Odoo.

So, generally speaking, you can either have a product be relevant to just one company (by setting exactly that res.company Many2one, or have it available to all companies, by not setting that field.


Side note: When using AI, it's always important to define a strict scope and context detailing as much as possible to receive relevant and useful information. Odoo AI is no exception to that (at least for the moment).

Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
1
Mar 25
1546
1
Şub 25
2979
2
Şub 25
1960
1
Mar 24
1516
1
Nis 22
2407