Bem vindo!
This community is for professionals and enthusiasts of our products and services.
Share and discuss the best content and new marketing ideas, build your professional profile and become a better marketer together.
Adicionar cor ao widget | color to the widget
Para que a cor do Widget apareça e seja selecionável, é necessário a criação de um campo color para armazenar esse valor. Neste caso, o campo meu_type é uma lista de valores.
no xml:
<field name = "meu_type" widget = "many2many_tags" options="{'color_field': 'color'}"/>
no modelo py:
class MeuModelo(models.Model):
_name = 'modelo.type'
...
color = fields.Integer( )
class MeuModelo2(models.Model):
meu_type = fields.Many2many( 'modelo.type' , string='Type' )
Your Answer
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
Fique Informado
Sobre esta Comunidade
Moderation Tools
Ferramentas de Pergunta
Estatísticas
Perguntada: 11/02/21 21:10 |
Visto: 843 vezes |
Última atualização: 09/04/21 19:11 |