Skip to Content
Odoo Menú
  • Registra entrada
  • Prova-ho gratis
  • Aplicacions
    Finances
    • Comptabilitat
    • Facturació
    • Despeses
    • Full de càlcul (IA)
    • Documents
    • Signatura
    Vendes
    • CRM
    • Vendes
    • Punt de venda per a botigues
    • Punt de venda per a restaurants
    • Subscripcions
    • Lloguer
    Imatges de llocs web
    • Creació de llocs web
    • Comerç electrònic
    • Blog
    • Fòrum
    • Xat en directe
    • Aprenentatge en línia
    Cadena de subministrament
    • Inventari
    • Fabricació
    • PLM
    • Compres
    • Manteniment
    • Qualitat
    Recursos humans
    • Empleats
    • Reclutament
    • Absències
    • Avaluacions
    • Recomanacions
    • Flota
    Màrqueting
    • Màrqueting Social
    • Màrqueting per correu electrònic
    • Màrqueting per SMS
    • Esdeveniments
    • Automatització del màrqueting
    • Enquestes
    Serveis
    • Projectes
    • Fulls d'hores
    • Servei de camp
    • Suport
    • Planificació
    • Cites
    Productivitat
    • Converses
    • Validacions
    • IoT
    • VoIP
    • Coneixements
    • WhatsApp
    Aplicacions de tercers Odoo Studio Plataforma d'Odoo al núvol
  • Sectors
    Comerç al detall
    • Llibreria
    • Botiga de roba
    • Botiga de mobles
    • Botiga d'ultramarins
    • Ferreteria
    • Botiga de joguines
    Food & Hospitality
    • Bar i pub
    • Restaurant
    • Menjar ràpid
    • Guest House
    • Distribuïdor de begudes
    • Hotel
    Immobiliari
    • Agència immobiliària
    • Estudi d'arquitectura
    • Construcció
    • Gestió immobiliària
    • Jardineria
    • Associació de propietaris de béns immobles
    Consultoria
    • Empresa comptable
    • Partner d'Odoo
    • Agència de màrqueting
    • Bufet d'advocats
    • Captació de talent
    • Auditoria i certificació
    Fabricació
    • Textile
    • Metal
    • Mobles
    • Menjar
    • Brewery
    • Regals corporatius
    Salut i fitness
    • Club d'esport
    • Òptica
    • Centre de fitness
    • Especialistes en benestar
    • Farmàcia
    • Perruqueria
    Trades
    • Servei de manteniment
    • Hardware i suport informàtic
    • Sistemes d'energia solar
    • Shoe Maker
    • Serveis de neteja
    • Instal·lacions HVAC
    Altres
    • Nonprofit Organization
    • Agència del medi ambient
    • Lloguer de panells publicitaris
    • Fotografia
    • Lloguer de bicicletes
    • Distribuïdors de programari
    Browse all Industries
  • Comunitat
    Aprèn
    • Tutorials
    • Documentació
    • Certificacions
    • Formació
    • Blog
    • Pòdcast
    Potenciar l'educació
    • Programa educatiu
    • Scale-Up! El joc empresarial
    • Visita Odoo
    Obtindre el programari
    • Descarregar
    • Comparar edicions
    • Novetats de les versions
    Col·laborar
    • GitHub
    • Fòrum
    • Esdeveniments
    • Traduccions
    • Converteix-te en partner
    • Services for Partners
    • Registra la teva empresa comptable
    Obtindre els serveis
    • Troba un partner
    • Troba un comptable
    • Contacta amb un expert
    • Serveis d'implementació
    • Referències del client
    • Suport
    • Actualitzacions
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Programar una demo
  • Preus
  • Ajuda

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Comptabilitat
  • Inventari
  • PoS
  • Projectes
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
Ajuda

Too Many Products Get Accidentally Created

Subscriure's

Get notified when there's activity on this post

This question has been flagged
creationquotationproducts
15 Respostes
12170 Vistes
Avatar
Michael C

I've found that my users are accidentally creating way too many garbage product records directly from the sales order/quote form. I'd like to curb this.

Odoo makes it pretty easy to create a new product record from the quotation/sales order form. If you start searching for a product and don't find it, the default option is to create it if you press "enter". Many users are in a hurry and just press "enter" mindlessly, creating the new product record. This leaves a lot of cleanup to be done later. I can usually find the products because they are "Consumables" by default, with a $1.00 price, no internal reference, no description, etc.

I've tried marking the Internal Reference field as required. I thought this would help because you can't enter the internal reference from the product form, so therefore users wouldn't be able to create records mindlessly. This didn't work. It seems that products created from sales orders/quotes completely skip model validation (!). As long as there is something in the product field Odoo will blindly create the product.

Does anybody have a solution to prevent users from blindly creating product records from the sales order/quotes form?

1
Avatar
Descartar
Thomas Guénard

The question remains whatever bypass or blocking rules are: why do the users "accidentally" create new products instead of refering to approprite existing ones?

I can imagine 2 causes

1 the users do not well know the way the products are named into the system (name or reference or any other form of index) >>> make sure the naming conventions are the cleanest possible and train users

2 the searching function is using "brute force" i.e not accepting alternative orthograph, or not refering to additional fields >>> allow developpers to improve the searching function.

Avatar
Ray Carnes
Best Answer

Remove the ability to create products on the sale.order form view:

<field name="product_id" options="{'no_create': True}"/>
1
Avatar
Descartar
Michael C
Autor

This ended up being the simplest solution. Thank you.

Lima Saudara

Where is the path for the sales.order?

I tried it on odoo13/addons/sale/view/sale_views.xml

but it does not have any effect.

Avatar
Chris TRINGHAM
Best Answer

It turns out to be not quite so straightforward to do this in Odoo Studio (Odoo 13):

  1. The widget is product_configurator
  2. No checkboxes for “Disable creation” and “Disable opening”

The workaround is to change the widget

Now those two checkboxes are visible, so:

  1. Click on both checkboxes
  2. Exit Studio
  3. Now there’s no option to add a product:

This is the Extension View:

This is the XML

<data>
   <xpath expr="//field[@name='product_template_id']" position="attributes">
    <attribute name="options">{"no_open":true,"no_create":true}</attribute>
<attribute name="widget">many2one</attribute>
</xpath>
</data>

If you don’t have Odoo Studio you could achieve the same effect by creating an Extension View manually.

I think you can remove the line that changes the widget

https://odootricks.tips/prevent-users-create-products-on-the-fly/

1
Avatar
Descartar
Avatar
Seth
Best Answer

Is there any way this solution (<field name="product_id" options="{'no_create': True}"/>) can be implemented through the "Studio" app?  I've tried various ways of entering this option in both the "domain" and "context" fields, to no avail.

If not possible, can someone please walk me through where to enter the <field name="product_id" options="{'no_create': True}"/>? ...preferably starting from the odoo dashboard.

1
Avatar
Descartar
Lima Saudara

I also tried it on odoo13/addons/sale/view/sale_views.xml

but it does not have any effect.

so, someone please give us information where should we put that code?

Chris TRINGHAM

I added information about doing this in Studio (https://www.odoo.com/forum/help-1/question/re-too-many-products-get-accidentally-created-170519/#answer-170519

Avatar
Raaj Mishra
Best Answer

HI Michael, you can use the below syntax at sale.order.line view for product_id field to prevent users to create the product from Sale Order/Quote form view.

<field name="product_id" options="{'no_quick_create': True,'no_create_edit':True}"/>
1
Avatar
Descartar
Avatar
Arnaud ATIR
Best Answer

Thanks ray Carnes,

it helped me so much

i did it for sale.order.form, purchase.order.form and stock.picking.form

the difficulty is to find the right line to add this option but after several trials, i got it and it was a different line for each form

0
Avatar
Descartar
Lima Saudara

Where is the path for the sales.order?

I tried it on odoo13/addons/sale/view/sale_views.xml

but it does not have any effect.

Arnaud ATIR

Hi LIma

the simple way i found is to modify it by the web interface

It is surely not the right way but it worked for me. You can do as below :

1/ connection in developper mode

2/ open a sale order

3/ cilck on develpment tools ( top right corner )

4/ select the item ' modify the view : form '

and then you can modifiy the model form

hope it will help

kind regards

Ermin Trevisan

@Arnaud You will loose these amendments as soon as you update Odoo or the corresponding module.

Arnaud ATIR

Hi Ermin,

I know the risk yes but as i'm not a programer, it was a simple way.

We don't plan any upgrade and it is the lonely one amendment done so it is noticed in our software guide

Avatar
Mohammed Amal N
Best Answer

You can set some validation on create function of the product

example:

def create(self, vals):

     if not description: # get description value from vals

         #some warning code

0
Avatar
Descartar
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Registrar-se
Related Posts Respostes Vistes Activitat
Difficulty in Product Creation
project creation products
Avatar
0
d’ag. 23
1820
Create Date / Date Order option not available in Quotation 9.0c
creation quotation 9.0c
Avatar
Avatar
2
de maig 16
6170
V16: "show more" choice on product line is not visible in the quotation
selection quotation products show-more
Avatar
1
de nov. 22
2244
Creating Products From POS Interface?
pos creation products odoo
Avatar
Avatar
1
de maig 21
4358
Ask for a Product Category on Sales Orders and restrict products that can be added to that Category? Solved
quotation category products restrict
Avatar
Avatar
1
de jul. 20
5717
Community
  • Tutorials
  • Documentació
  • Fòrum
Codi obert
  • Descarregar
  • GitHub
  • Runbot
  • Traduccions
Serveis
  • Allotjament a Odoo.sh
  • Suport
  • Actualització
  • Desenvolupaments personalitzats
  • Educació
  • Troba un comptable
  • Troba un partner
  • Converteix-te en partner
Sobre nosaltres
  • La nostra empresa
  • Actius de marca
  • Contacta amb nosaltres
  • Llocs de treball
  • Esdeveniments
  • Pòdcast
  • Blog
  • Clients
  • Informació legal • Privacitat
  • Seguretat
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo és un conjunt d'aplicacions empresarials de codi obert que cobreix totes les necessitats de la teva empresa: CRM, comerç electrònic, comptabilitat, inventari, punt de venda, gestió de projectes, etc.

La proposta única de valor d'Odoo és ser molt fàcil d'utilitzar i estar totalment integrat, ambdues alhora.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now