Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
2 Risposte
326 Visualizzazioni

Hello :)


I don't want users to see existing products. They should be forced to create a new product when a package arrives.

18version


How can I do this?


THANK YOU

Avatar
Abbandona
Risposta migliore

Hi,


In Odoo 18, by default, users can see and select all existing products when recording receipts, purchase orders, or stock moves, because the product field (product_id) is a Many2one field pointing to all products. If you want to prevent this and force users to always create a new product when a package arrives, you need to restrict product visibility. There are a few ways to achieve this. The simplest is to customize the product field in the relevant views so that existing products cannot be searched or opened, while the create option remains enabled; this can be done by adjusting the field options in XML (e.g., no_open="True" and disabling search defaults) so users are pushed to create new records. Another approach is to use record rules to hide all products from certain user groups by setting a domain that always evaluates to false, which prevents those users from reading or selecting existing products but still allows them to create new ones. For stricter control, you can also override the model to set a domain on the product field ([(0, '=', 1)]), ensuring that no existing products are displayed. In practice, many businesses prefer a compromise, where warehouse staff or basic users can create new draft products during receiving, but only managers or admins can see, validate, and reuse existing products to keep inventory consistent. For your use case, the most effective solution is to either customize the product field in the stock picking or purchase views so only “create new” is available, or to enforce record rules that hide products from normal users while still letting them create new ones.


Hope it helps

Avatar
Abbandona
Risposta migliore

in total : you need to develop an access right team for both users that can and cant create products or see/not see products or something like that , and give that access to users that you need. also in reverse you can use access rights of product models and restricts users from seeing/using certain products or creating the product model. see access odoo rights documentation/studio course for more information.

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
1
ago 25
379
0
lug 25
354
2
giu 25
1514
1
mag 25
1509
0
mar 25
1297