Ir al contenido
Odoo Menú
  • Iniciar sesión
  • Pruébalo gratis
  • Aplicaciones
    Finanzas
    • Contabilidad
    • Facturación
    • Gastos
    • Hoja de cálculo (BI)
    • Documentos
    • Firma electrónica
    Ventas
    • CRM
    • Ventas
    • PdV para tiendas
    • PdV para restaurantes
    • Suscripciones
    • Alquiler
    Sitios web
    • Creador de sitios web
    • Comercio electrónico
    • Blog
    • Foro
    • Chat en vivo
    • eLearning
    Cadena de suministro
    • Inventario
    • Manufactura
    • PLM
    • Compras
    • Mantenimiento
    • Calidad
    Recursos humanos
    • Empleados
    • Reclutamiento
    • Vacaciones
    • Evaluaciones
    • Referencias
    • Flotilla
    Marketing
    • Redes sociales
    • Marketing por correo
    • Marketing por SMS
    • Eventos
    • Automatización de marketing
    • Encuestas
    Servicios
    • Proyectos
    • Registro de horas
    • Servicio externo
    • Soporte al cliente
    • Planeación
    • Citas
    Productividad
    • Conversaciones
    • Aprobaciones
    • IoT
    • VoIP
    • Artículos
    • WhatsApp
    Aplicaciones externas Studio de Odoo Plataforma de Odoo en la nube
  • Industrias
    Venta minorista
    • Librería
    • Tienda de ropa
    • Mueblería
    • Tienda de abarrotes
    • Ferretería
    • Juguetería
    Alimentos y hospitalidad
    • Bar y pub
    • Restaurante
    • Comida rápida
    • Casa de huéspedes
    • Distribuidora de bebidas
    • Hotel
    Bienes inmuebles
    • Agencia inmobiliaria
    • Estudio de arquitectura
    • Construcción
    • Gestión de bienes inmuebles
    • Jardinería
    • Asociación de propietarios
    Consultoría
    • Firma contable
    • Partner de Odoo
    • Agencia de marketing
    • Bufete de abogados
    • Adquisición de talentos
    • Auditorías y certificaciones
    Manufactura
    • Textil
    • Metal
    • Muebles
    • Comida
    • Cervecería
    • Regalos corporativos
    Salud y ejercicio
    • Club deportivo
    • Óptica
    • Gimnasio
    • Especialistas en bienestar
    • Farmacia
    • Peluquería
    Trades
    • Personal de mantenimiento
    • Hardware y soporte de TI
    • Sistemas de energía solar
    • Zapateros y fabricantes de calzado
    • Servicios de limpieza
    • Servicios de calefacción, ventilación y aire acondicionado
    Otros
    • Organización sin fines de lucro
    • Agencia para la protección del medio ambiente
    • Alquiler de anuncios publicitarios
    • Fotografía
    • Alquiler de bicicletas
    • Distribuidor de software
    Descubre todas las industrias
  • Odoo Community
    Aprende
    • Tutoriales
    • Documentación
    • Certificaciones
    • Capacitación
    • Blog
    • Podcast
    Fortalece la educación
    • Programa educativo
    • Scale Up! El juego empresarial
    • Visita Odoo
    Obtén el software
    • Descargar
    • Compara ediciones
    • Versiones
    Colabora
    • GitHub
    • Foro
    • Eventos
    • Traducciones
    • Conviértete en partner
    • Servicios para partners
    • Registra tu firma contable
    Obtén servicios
    • Encuentra un partner
    • Encuentra un contador
    • Contacta a un consultor
    • Servicios de implementación
    • Referencias de clientes
    • Soporte
    • Actualizaciones
    GitHub YouTube Twitter LinkedIn Instagram Facebook Spotify
    +1 (650) 691-3277
    Solicita una demostración
  • Precios
  • Ayuda

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

  • CRM
  • e-Commerce
  • Contabilidad
  • Inventario
  • PoS
  • Proyectos
  • MRP
All apps
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Acerca de este foro
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Acerca de este foro
Ayuda

hide the create option at customer_id field

Suscribirse

Reciba una notificación cuando haya actividad en esta publicación

Se marcó esta pregunta
fieldscustomoptionsodoo13.0
3 Respuestas
5538 Vistas
Avatar
Computadoras y Redes Locales de Michoacán S. A. de C.V.

i read about hidding the create, and the create and Edit options at the many2one fields and i try this solution by creating a custom addon and tested adding other fields at sales:


<record id="view_crm_lead_form" model="ir.ui.view">
<field name="name">view.crm.lead.form</field>
<field name="model">crm.lead</field>
<field name="inherit_id" ref="crm.crm_lead_view_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='partner_id']" position="replace">
<field name="partner_id" options="{'no_quick_create':True}" string="Customer" context="{'res_partner_search_mode': type == 'opportunity' and 'customer' or False, 'default_name': contact_name or partner_name,.... etc />
</xpath>
</field>
</record>

just take the original field and add the option 'no_quick_create' and replace it, where is my mistake?

0
Avatar
Descartar
Avatar
Sunny Sheth
Mejor respuesta

Hi,

also add 'no_create_edit': True in your options list to prevent create contact/partner from Lead Form View.

{'no_open':True,'no_create':True,'no_edit':True, no_create_edit': True, 'no_quick_create': True}

and add crm, base Module in the depends 


Thanks & Regards,

Sunny Sheth


0
Avatar
Descartar
Computadoras y Redes Locales de Michoacán S. A. de C.V.
Autor

hi, i add the drm to the depends, and the custom addon its working because i copy and pase your options and warning me about the missing ' in no_create_edit, after that i update and upgrade and still showing the create, maybe for testing i try to change the string attribute for changing the name and dont work either. Im pointing to the wrong location?, the wrong form?, the wrong field?.

im doing this because in the main crm page, when the user create a new oportunity by the "create" button force it to select a valid customer

Sunny Sheth

try with widget="selection"

Computadoras y Redes Locales de Michoacán S. A. de C.V.
Autor

yes, changin it like i was trying, but if i cant change my options or the string atributes this will not work too, thanks for all.

Avatar
Kode Kracker
Mejor respuesta
<record id="crm_lead_inherit_tree_view" model="ir.ui.view">
<field name="name">crm.lead.inherit</field>
<field name="model">crm.lead</field>
<field name="inherit_id" ref="crm.crm_lead_view_form"/>
<field name="arch" type="xml">
<xpath expr="/form/sheet/group/group[@name='opportunity_partner']/field[@name='partner_id']" position="attributes">
<attribute name="options">{'no_create_edit': True, 'no_create':True}</attribute>
</xpath>
</field>
</record>
0
Avatar
Descartar
Avatar
Niyas Raphy (Walnut Software Solutions)
Mejor respuesta

Hi,

instead of replacing and adding field again, try using position attributes and set the option attributes as this.


{'no_open':True,'no_create':True,'no_edit':True}

0
Avatar
Descartar
Computadoras y Redes Locales de Michoacán S. A. de C.V.
Autor

&#60;record id="view_crm_lead_form_c" model="ir.ui.view"&#62;

&#60;field name="name"&#62;view.crm.lead.form.c&#60;/field&#62;

&#60;field name="model"&#62;crm.lead&#60;/field&#62;

&#60;field name="inherit_id" ref="crm.crm_lead_view_form"/&#62;

&#60;field name="arch" type="xml"&#62;

&#60;xpath expr="//field[@name='partner_id']" position="attributes"&#62;

&#60;attribute name="options"&#62;{'no_open':True,'no_create':True,'no_edit':True}&#60;/attribute&#62;

&#60;/xpath&#62;

&#60;/field&#62;

&#60;/record

here my try, and after upgrade my custom addon still dont working, i need to add some to depends in my manifest like the sale_management for apply the changes?

¿Le interesa esta conversación? ¡Participe en ella!

Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.

Registrarse
Publicaciones relacionadas Respuestas Vistas Actividad
Fixing a custom field and database implications?
fields custom
Avatar
Avatar
1
may 16
6927
Adding custom fields by GUI?
fields custom
Avatar
Avatar
2
mar 15
9633
Custom field to base field
fields custom base
Avatar
Avatar
Avatar
3
ene 25
13995
Odoo 15 Community: Use Inherited Views to show Custom Field from sale.order in account.move.form
fields models custom
Avatar
0
jul 22
3401
Add custom fields to product page on e-commerce website in an odoo.sh cloud setup
fields custom e-commerce
Avatar
Avatar
1
ene 24
7250
Comunidad
  • Tutoriales
  • Documentación
  • Foro
Código abierto
  • Descargar
  • GitHub
  • Runbot
  • Traducciones
Servicios
  • Alojamiento en Odoo.sh
  • Soporte
  • Actualizaciones del software
  • Desarrollos personalizados
  • Educación
  • Encuentra un contador
  • Encuentra un partner
  • Conviértete en partner
Sobre nosotros
  • Nuestra empresa
  • Activos de marca
  • Contáctanos
  • Empleos
  • Eventos
  • Podcast
  • Blog
  • Clientes
  • Legal • Privacidad
  • Seguridad
الْعَرَبيّة 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 es un conjunto de aplicaciones de código abierto que cubren todas las necesidades de tu empresa: CRM, comercio electrónico, contabilidad, inventario, punto de venta, gestión de proyectos, etc.

La propuesta única de valor de Odoo es ser muy fácil de usar y estar totalmente integrado.

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