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

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
12783 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.

Registrarse
Publicaciones relacionadas Respuestas Vistas Actividad
How to hide the entries from previous fiscal year
archive
Avatar
Avatar
1
may 22
3818
Archived emails are automatically sent for unknown reasons
archive
Avatar
Avatar
1
feb 22
2705
Where to find Maintenance Equipment Archive button view and function?
maintenance archive
Avatar
0
dic 21
2413
How to view invoices on an archived contact Resuelto
invoices archive
Avatar
Avatar
1
oct 21
4368
how archive unarchive with odoo studio
archive studio
Avatar
Avatar
1
oct 21
4354
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