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
    • eLearning
    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
    • Información
    • 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 taberna
    • 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
    • Brewery
    • Regalos de empresas
    Salud y bienestar
    • Club deportivo
    • Óptica
    • Gimnasio
    • Terapeutas
    • Farmacia
    • Peluquería
    Oficios
    • Handyman
    • Hardware y asistencia informática
    • 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
    Browse all Industries
  • 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
    • Services for 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

how to change name of Archive and Unarchive to Delete and Restore in odoo10.?

Suscribirse

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

Se marcó esta pregunta
archive
2 Respuestas
12708 Vistas
Avatar
kundan

Actually i added active field for my custom table to achieve  Archive and Unarchive menu after export menu now i want to change string name Archive and Unarchive to Delete and Restore but field name is active only for Archive and Unachive and i m passing string inside active field but nothing is happening....How to achieve this solution.

2
Avatar
Descartar
Avatar
Sudhir Arya (ERP Harbor Consulting Services)
Mejor respuesta

Hi Kundan,

There are some values for options "terminology" you can use to show different labels on button.

<field name="active" widget="boolean_button" options="{'terminology': 'archive'/'active'}"

For the options terminology, you can use either archive or active.

active: It will show "Active" or "Inactive" on a click of a button. On mouse hover, it will show "Deactivate" or "Activate" string on button.

archive: It will show "Active" or "Archived" on a click of a button. On mouse hover, it will show "Archive" or "Unarchive" string on button.

If you don't use "options" attribute, by default it shows, "On" or "Off" (mouse hover : "Switch Off" or "Switch On")

If you want to change the labels as per your requirement, then you have to override the JS (web/static/src/js/views/form_widgets.js : common.AbstractField.extend) function in your custom module.

Hope this will help you a bit.


Sudhir Arya
ERP Harbor Consulting Services
skype: sudhir@erpharbor.com  website: http://www.erpharbor.com
6
Avatar
Descartar
LaLibreRie

Hi, are 'active' and 'archive' the only terminology options available ?

Avatar
Amarildo Golloshi
Mejor respuesta

You can create new widget :

In js file:

/module/static/src/js/views/form_widget.js

odoo.define('your_module.form_widgets', function (require) {

"use strict";

var core = require('web.core');

var common = require('web.form_common');

var _t = core._t;

var QWeb = core.qweb;var Field_YourName_BooleanButton = common.AbstractField.extend({     

    className: 'o_stat_info',     

    init: function() {     

            this._super.apply(this, arguments);

            switch (this.options["terminology"]) {

                case "your_case":

                    this.string_true = _t("your_value");

                    this.hover_true = _t("your_value");

                    this.string_false = _t("your_value");

                    this.hover_false = _t("your");

                    break;

                default:

                    this.string_true = _t("On");

     this.hover_true = _t("Switch Off");

                    this.string_false = _t("Off");

                    this.hover_false = _t("Switch On");

        }

    },

    render_value: function() {

        this._super();

        this.$el.html(QWeb.render("BooleanButton", {widget: this})); },

    is_false: function() {

        return false;

    },

});

core.form_widget_registry

.add('your_name_boolean_button', Field_YourName_BooleanButton);

});

in xml file:

<button name="toggle_active" type="object" class="oe_stat_button" icon="fa-archive">    
        <field         
            name="active"         
            widget="your_name_boolean_button"        
            options='{"terminology": "your_case"}'/>
</button>
0
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 hide the entries from previous fiscal year
archive
Avatar
Avatar
1
may 22
3809
Archived emails are automatically sent for unknown reasons
archive
Avatar
Avatar
1
feb 22
2694
Where to find Maintenance Equipment Archive button view and function?
maintenance archive
Avatar
0
dic 21
2398
How to view invoices on an archived contact Resuelto
invoices archive
Avatar
Avatar
1
oct 21
4355
how archive unarchive with odoo studio
archive studio
Avatar
Avatar
1
oct 21
4340
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 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 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