Pular para o conteúdo
Odoo Menu
  • Entrar
  • Experimente grátis
  • Aplicativos
    Finanças
    • Financeiro
    • Faturamento
    • Despesas
    • Planilhas (BI)
    • Documentos
    • Assinar Documentos
    Vendas
    • CRM
    • Vendas
    • PDV Loja
    • PDV Restaurantes
    • Assinaturas
    • Locação
    Websites
    • Criador de Sites
    • e-Commerce
    • Blog
    • Fórum
    • Chat ao Vivo
    • e-Learning
    Cadeia de mantimentos
    • Inventário
    • Fabricação
    • PLM - Ciclo de Vida do Produto
    • Compras
    • Manutenção
    • Qualidade
    Recursos Humanos
    • Funcionários
    • Recrutamento
    • Folgas
    • Avaliações
    • Indicações
    • Frota
    Marketing
    • Redes Sociais
    • Marketing por E-mail
    • Marketing por SMS
    • Eventos
    • Automação de Marketing
    • Pesquisas
    Serviços
    • Projeto
    • Planilhas de Horas
    • Serviço de Campo
    • Central de Ajuda
    • Planejamento
    • Compromissos
    Produtividade
    • Mensagens
    • Aprovações
    • Internet das Coisas
    • VoIP
    • Conhecimento
    • WhatsApp
    Aplicativos de terceiros Odoo Studio Plataforma Odoo Cloud
  • Setores
    Varejo
    • Loja de livros
    • Loja de roupas
    • Loja de móveis
    • Mercearia
    • Loja de ferramentas
    • Loja de brinquedos
    Comida e hospitalidade
    • Bar e Pub
    • Restaurante
    • Fast Food
    • Hospedagem
    • Distribuidor de bebidas
    • Hotel
    Imóveis
    • Imobiliária
    • Escritório de arquitetura
    • Construção
    • Administração de propriedades
    • Jardinagem
    • Associação de proprietários de imóveis
    Consultoria
    • Escritório de Contabilidade
    • Parceiro Odoo
    • Agência de marketing
    • Escritório de advocacia
    • Aquisição de talentos
    • Auditoria e Certificação
    Fabricação
    • Têxtil
    • Metal
    • Móveis
    • Alimentação
    • Cervejaria
    • Presentes corporativos
    Saúde e Boa forma
    • Clube esportivo
    • Loja de óculos
    • Academia
    • Profissionais de bem-estar
    • Farmácia
    • Salão de cabeleireiro
    Comércio
    • Handyman
    • Hardware e Suporte de TI
    • Sistemas de energia solar
    • Sapataria
    • Serviços de limpeza
    • Serviços de climatização
    Outros
    • Organização sem fins lucrativos
    • Agência Ambiental
    • Aluguel de outdoors
    • Fotografia
    • Aluguel de bicicletas
    • Revendedor de software
    Navegar por todos os setores
  • Comunidade
    Aprenda
    • Tutoriais
    • Documentação
    • Certificações
    • Treinamento
    • Blog
    • Podcast
    Empodere a Educação
    • Programa de educação
    • Scale Up! Jogo de Negócios
    • Visite a Odoo
    Obtenha o Software
    • Baixar
    • Comparar edições
    • Releases
    Colaborar
    • Github
    • Fórum
    • Eventos
    • Traduções
    • Torne-se um parceiro
    • Serviços para parceiros
    • Cadastre seu escritório contábil
    Obtenha os serviços
    • Encontre um parceiro
    • Encontre um Contador
    • Conheça um consultor
    • Serviços de Implementação
    • Referências de Clientes
    • Suporte
    • Upgrades
    Github YouTube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Faça uma demonstração
  • Preços
  • Ajuda

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Financeiro
  • Inventário
  • PoS
  • Projeto
  • MRP
All apps
É necessário estar registrado para interagir com a comunidade.
Todas as publicações Pessoas Emblemas
Marcadores (Ver tudo)
odoo accounting v14 pos v15
Sobre este fórum
É necessário estar registrado para interagir com a comunidade.
Todas as publicações Pessoas Emblemas
Marcadores (Ver tudo)
odoo accounting v14 pos v15
Sobre este fórum
Ajuda

how to hide or disable button add a properties and button edit in field properties odoo 16?

Inscrever

Seja notificado quando houver atividade nesta publicação

Esta pergunta foi sinalizada
hidepropertiesdisableodoo16featuresrequired-field
1 Responder
6863 Visualizações
Avatar
dunghn

i want to hide or disable add a properties button, how can i do that.
By the way, I would like to ask how to hide or disable the edit properties field button (pencil icon) and how to require the field when creating the properties field.

0
Avatar
Cancelar
Avatar
shubham shiroya
Melhor resposta
  1. Create a new module or identify the existing module where you want to make the changes.

  2. Inside your module, create a new XML file, let's call it views/assets.xml, and add the following code:

  3. note: here i remove the XML tag like(< >) because when i edit the tag and save the answer the I didn't see the full code of XML,
    so please add the (<>) once you edit the XML file
odoo
data
# Override the field properties view
template id="view_field_property_form_inherit" inherit_id="base.view_field_property_form"
xpath expr="//field[@name='field_id']/form" position="attributes"
#Hide the "Add a Property" button
attribute name="create">0 /xpath
xpath expr="//field[@name='field_id']/form/group/group[1]/field[@name='fields_view_id']/form" position="attributes"
#Disable the "Edit" button
attribute name="options">{'no_edit': True} /xpath
/template
/data
/odoo


In the above code, we override the view_field_property_form template and modify the XML structure using XPath expressions.
  1. In your module's manifest file (e.g., __manifest__.py), make sure to include the XML file in the data section:


{
'name': 'Your Module',
'version': '1.0',
'summary': 'Module Summary',
'data': [
'views/assets.xml',
],
'installable': True,
'application': True,
'auto_install': False,
}
  1. Update the module list and restart the Odoo server for the changes to take effect.

After making these changes, the "Add a Property" button will be hidden, and the "Edit" button will be disabled in the field properties form.

Note that this approach overrides the existing field properties view and applies the modifications globally. If you want to apply the changes to specific models or views, you may need to adjust the XPath expressions accordingly.

Additionally, ensure that you have the necessary access rights to modify views and create a custom module in your Odoo installation.


0
Avatar
Cancelar
Está gostando da discussão? Não fique apenas lendo, participe!

Crie uma conta hoje mesmo para aproveitar os recursos exclusivos e interagir com nossa incrível comunidade!

Inscreva-se
Publicações relacionadas Respostas Visualizações Atividade
Properties field Odoo 16
properties odoo16features
Avatar
0
nov. 22
2386
Hide chatter in odoo 16 Resolvido
hide chatter odoo16features
Avatar
Avatar
1
nov. 24
3458
Odoo 16 hide shipping method if the delivery cost is ZERO
hide odoo16features shippingmethods
Avatar
Avatar
1
mai. 23
2681
How to Hide search option in many2one ,many2many
hide odoo odoo16features v17
Avatar
Avatar
1
set. 24
2430
How to upload data to the new Properties fields in Odoo 16? I'm getting this error 'NoneType' object is not callable
properties property odoo16features NoneType
Avatar
Avatar
1
fev. 23
4921
Comunidade
  • Tutoriais
  • Documentação
  • Fórum
Open Source
  • Baixar
  • Github
  • Runbot
  • Traduções
Serviços
  • Odoo.sh Hosting
  • Suporte
  • Upgrade
  • Desenvolvimentos personalizados
  • Educação
  • Encontre um Contador
  • Encontre um parceiro
  • Torne-se um parceiro
Sobre nós
  • Nossa empresa
  • Ativos da marca
  • Contato
  • Empregos
  • Eventos
  • Podcast
  • Blog
  • Clientes
  • Legal • Privacidade
  • Segurança
الْعَرَبيّة 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 é um conjunto de aplicativos de negócios em código aberto que cobre todas as necessidades de sua empresa: CRM, comércio eletrônico, contabilidade, estoque, ponto de venda, gerenciamento de projetos, etc.

A proposta de valor exclusiva Odoo é ser, ao mesmo tempo, muito fácil de usar e totalmente integrado.

Site feito com

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