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

Make a field editable

Suscribirse

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

Se marcó esta pregunta
fieldseditablefields_view_get
1 Responder
14114 Vistas
Avatar
Kevin

How do I make a field editable, for example on the Delivery Order there is a Date of Delivery field (date_done which is on object stock.picking.out) which is non editable on the delivery orders form and we would like to edit this field.

I can see the modifier on the form which is {"readonly".[["state","in",["cancel","done"]]]} which I assume needs to be changed somewhere?


0
Avatar
Descartar
Ray Carnes

Curious why you want to do this. The reason fields are read-only to users is so that Odoo can use them. This field gets set by Odoo, and on if you ever need to process a delivery and set the date back, you should be using 'Date of Transfer' on the Additional Information tab. You should know that your changes to this date field may not be preserved as Odoo may edit this field after you.

Tarek Mohamed Ibrahim

Generally, I agree with you. But for our case I checked and found that the 'Date of Transfer' you mentioned is the 'date_done' Kevin cited above. This field is editable in all states except 'cancel' and 'done' states. This field has the attribute "required=False", and when the user didn't enter a date in this field the system fills it automatically with the system date. My opinion is that why don't give the user a chance to add the delivery date after the delivery in case he forgot to add it. What do you think?

OdooBot

Thanks for the message Ray,

 

The reason is that sometimes we’ll raise the invoice a few days before delivery is physically made so we would sometimes like to amend the date.

 

I could add another field to the object and use on the delivery note but thought it might be easier to edit the existing field?

 

Thanks and regards,

Kevin

 

From: Ray Carnes [mailto:rcarnes-ursainfosystems-com@mail.odoo.com]
Sent: 31 July 2015 18:54
To: Kevin Starkey <kevin@atg-equip.com>
Subject: Re: Make a field editable

 

Curious why you want to do this. The reason fields are read-only to users is so that Odoo can use them. This field gets set by Odoo, and on if you ever need to process a delivery and set the date back, you should be using 'Date of Transfer' on the Additional Information tab. You should know that your changes to this date field may not be preserved as Odoo may edit this field after you.

--
Ray Carnes
Sent by Odoo Inc. using Odoo about Forum Post Make a field editable

Avatar
Tarek Mohamed Ibrahim
Mejor respuesta

This field is originally defined in the class stock.picking. The delivery order is based on the class stock.picking.out which inherits from stock.picking

The field definition is :

'date_done': fields.datetime('Date of Transfer', help="Date of Completion", states={'done':[('readonly', True)], 'cancel':[('readonly',True)]}), 

To make this field editable while the order is delivered, i.e. state is 'done', you have to remove the 'done' key from the states dictionary. I inherited the stock.picking class and overrode this field then nothing changed in the delivery order screen. I then inherited the stock.picking.out class and added to the _columns dictionary the following key:

'date_done': fields.datetime('Date of Transfer', help="Date of Completion", states={cancel':[('readonly',True)]}),

, restarted the server and upgraded my custom module which includes the inherited class and went to the delivery order screen and found that the field 'done_date' is editable.

I hope this replies your question.

1
Avatar
Descartar
¿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
How to let a field stay editable even after save or confirm
fields editable odooV8
Avatar
Avatar
1
abr 19
5337
Problem in fields_view_get?
fields dependencies fields_view_get
Avatar
0
mar 15
203
Best way to inherit states parameter of field
fields editable readonly state
Avatar
Avatar
Avatar
3
mar 15
8038
I cannot see custom field in lead form
fields
Avatar
Avatar
Avatar
2
dic 25
3639
trying to match fields for products
fields
Avatar
Avatar
Avatar
2
dic 25
221
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.

Sitio web hecho con

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