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

What controls existence of Duplicate function in OpenERP7?

Suscribirse

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

Se marcó esta pregunta
ormduplicate
1 Responder
5765 Vistas
Avatar
mike

I have created a custom module that defines several new models. Some of my custom models should not be duplicated and others should... Of all these models the More drop-down displays the Duplicate option for all the custom models except for two of them. Why not those two? They happen to be the ones I want to be able to duplicate and not any of the others...

What ORM logic determines whether or not a model can be copied and how can I override it?

As a test I decided to "force" a copy operation as follows:

{
   "jsonrpc":"2.0",
   "method":"call",
   "params":{
      "model":"dbe.application",
      "method":"copy",
      "args":[
         32,
         {

         },
         {
            "lang":"en_US",
            "tz":"America/New_York",
            "uid":1
         }
      ],
      "kwargs":{

      },
      "session_id":"3ebb612049fe4e49a760429632d865ae",
      "context":{
         "lang":"en_US",
         "tz":"America/New_York",
         "uid":1
      }
   },
   "id":"r7"
}

This test resulted in a success message and a copy of the original record. I even had an override of the copy method in this model which changes the value of the state field and that also worked. Yet OpenERP still refuses to display Duplicate in the More drop-down. I have searched through the largely undocumented javascript for the UI and found where the bottun is defined as well as it's callback, on_button_duplicate, but nothing useful here to shed light on my problem. Also of interest, looking through old screengrabs from Q/A testers I see that Duplicate used to be available but has mysteriously gone away since then. Reviewing changes to the models since then shows only very minor tweaks to their code - mainly help text on fields. So if Duplicate was there where has it gone and why? Could this have to do with permissions?

1
Avatar
Descartar
Avatar
mike
Autor Mejor respuesta

The cause of this problem eludes me. And I do not have time to spend fixing OpenERP. So to answer my own question - override CSS class with module style sheet to remove Duplicate from the menu within the scope of my module so it is not an option for models that should not be duplicated. Then modify the the views for the models I do want to be able to copy (2) with a new button for calling the copy method. Found this helpful related question for inspiration: How to create a Duplicate button. As it is Duplicate appears on all the model that should not be duplicated and not on the models that must be duplicated. Yes this solution is ugly but is faster and less painful than trying to troubleshoot and fix OpenERP. Some available add-on modules (stock, product) do very similar things so the precedent exists.

0
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 can I hide the 'duplicate' option in the 'more' button for a specific object Resuelto
duplicate
Avatar
Avatar
Avatar
Avatar
Avatar
4
oct 25
16734
How to implement custom version of "Duplicate" for products ?
duplicate
Avatar
Avatar
Avatar
2
jun 23
5050
ORM Relationship in Odoo 12
orm
Avatar
0
sept 19
98
Trace which odoo database that duplicated from
duplicate
Avatar
0
oct 17
3188
Sequence of calling any orm override method, if override is done in multiple custom module
orm
Avatar
Avatar
1
jul 17
5055
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