Ir al contenido
Odoo Menú
  • Identificarse
  • Pruébalo gratis
  • Aplicaciones
    Finanzas
    • Contabilidad
    • Facturación
    • Gastos
    • Hoja de cálculo (BI)
    • Documentos
    • Firma electrónica
    Ventas
    • CRM
    • Ventas
    • TPV para tiendas
    • TPV para restaurantes
    • Suscripciones
    • Alquiler
    Sitios web
    • Creador de sitios web
    • Comercio electrónico
    • Blog
    • Foro
    • Chat en directo
    • e-learning
    Cadena de suministro
    • Inventario
    • Fabricación
    • PLM
    • Compra
    • Mantenimiento
    • Calidad
    Recursos Humanos
    • Empleados
    • Reclutamiento
    • Ausencias
    • Evaluación
    • Referencias
    • Flota
    Marketing
    • Marketing social
    • Marketing por correo electrónico
    • Marketing por SMS
    • Eventos
    • Automatización de marketing
    • Encuestas
    Servicios
    • Proyecto
    • Partes de horas
    • Servicio de campo
    • Servicio de asistencia
    • Planificación
    • Citas
    Productividad
    • Conversaciones
    • Aprobaciones
    • IoT
    • VoIP
    • Conocimientos
    • WhatsApp
    Aplicaciones de terceros Studio de Odoo Plataforma de Odoo Cloud
  • Industrias
    Comercio al por menor
    • Librería
    • Tienda de ropa
    • Tienda de muebles
    • Tienda de ultramarinos
    • Ferretería
    • Juguetería
    Alimentación y hostelería
    • Bar y pub
    • Restaurante
    • Comida rápida
    • Casa de huéspedes
    • Distribuidor de bebidas
    • Hotel
    Inmueble
    • Agencia inmobiliaria
    • Estudio de arquitectura
    • Construcción
    • Gestión inmobiliaria
    • Jardinería
    • Asociación de propietarios
    Consultoría
    • Empresa contable
    • Partner de Odoo
    • Agencia de marketing
    • Bufete de abogados
    • Adquisición de talentos
    • Auditorías y certificaciones
    Fabricación
    • Textil
    • Metal
    • Muebles
    • Alimentos
    • Cervecería
    • Regalos de empresas
    Salud y bienestar
    • Club deportivo
    • Óptica
    • Gimnasio
    • Terapeutas
    • Farmacia
    • Peluquería
    Oficios
    • Handyman
    • Hardware y soporte técnico
    • Sistemas de energía solar
    • Zapatero
    • Servicios de limpieza
    • Servicios de calefacción, ventilación y aire acondicionado
    Otros
    • Organización sin ánimo de lucro
    • Agencia de protección del medio ambiente
    • Alquiler de paneles publicitarios
    • Estudio fotográfico
    • Alquiler de bicicletas
    • Distribuidor de software
    Explorar todos los sectores
  • Comunidad
    Aprender
    • Tutoriales
    • Documentación
    • Certificaciones
    • Formación
    • Blog
    • Podcast
    Potenciar la educación
    • Programa de formación
    • Scale Up! El juego empresarial
    • Visita Odoo
    Obtener el software
    • Descargar
    • Comparar ediciones
    • Versiones
    Colaborar
    • GitHub
    • Foro
    • Eventos
    • Traducciones
    • Convertirse en partner
    • Servicios para partners
    • Registrar tu empresa contable
    Obtener servicios
    • Encontrar un partner
    • Encontrar un asesor fiscal
    • Contacta con un experto
    • Servicios de implementación
    • Referencias de clientes
    • Ayuda
    • Actualizaciones
    GitHub YouTube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Solicitar 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
  • Proyecto
  • 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
14112 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.

Inscribirse
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
8037
I cannot see custom field in lead form
fields
Avatar
Avatar
Avatar
2
dic 25
3634
trying to match fields for products
fields
Avatar
Avatar
Avatar
2
dic 25
218
Comunidad
  • Tutoriales
  • Documentación
  • Foro
Código abierto
  • Descargar
  • GitHub
  • Runbot
  • Traducciones
Servicios
  • Alojamiento Odoo.sh
  • Ayuda
  • Actualizar
  • Desarrollos personalizados
  • Educación
  • Encontrar un asesor fiscal
  • Encontrar un partner
  • Convertirse en partner
Sobre nosotros
  • Nuestra empresa
  • Activos de marca
  • Contacta con nosotros
  • Puestos de trabajo
  • Eventos
  • Podcast
  • Blog
  • Clientes
  • Información 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 empresariales de código abierto que cubre 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