Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

236
Visualizações
Odoo14 action_set_won_rainbowman is not a valid action on crm.lead.result

I'm building a custom module to include tree view inside crm.lead that can insert few data inside, but when i try to install it i got the following issue.

action_set_won_rainbowman is not a valid action on crm.lead.result

View name: lead.result.form
Error context:
 view: ir.ui.view(1405,)
 xmlid: lead_result_form
 view.model: crm.lead.result
 view.parent: ir.ui.view(536,)
 file: c:\users\rami\appdata\local\openerp s.a\odoo\addons\14.0\crm_lead_results\views\crm_lead_result.xml

as my view looks like

<record id="lead_result_form" model="ir.ui.view">
            <field name="name">lead.result.form</field>
            <field name="model">crm.lead.result</field>
            <field name="inherit_id" ref="crm.crm_lead_view_form" />
            <field name="arch" type="xml">
                <xpath expr="//page[@name='lead']" position="after">
                    <field name="results_ids">
                        <tree>
                            <field name="vendor_sort" />
                            <field name="vendor_name" />
                            <field name="vendor_amount" />
                        </tree>
                        <form>
                            <group col="4">
                                <field name="vendor_sort" />
                                <field name="vendor_name" required="1" />
                                <field name="vendor_amount" />
                            </group>
                        </form>
                    </field>
                </xpath>
            </field>
        </record>

and my module looks like

class LeadResults(models.Model):
    _name = "crm.lead.result"
    _description = "Lead Results"

    opp_id = fields.Many2one("crm.lead", "Oppurtunity")
    vendor_name = fields.Many2one('res.partner', string="Vendor", required=True, ondelete='cascade', index=True)
    vendor_amount = fields.Float(string='Amount', help="Vendor Amount")
    vendor_sort =  fields.Integer(string='Sort', help="Vendor Sort")



class CrmLead(models.Model):
    _inherit = "crm.lead"
    results_ids = fields.One2many("crm.lead.result", "opp_id", "Education")

can anyone help me what i missed in that? "i need only to view results for same lead id"...

Thanks in advance

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

You are inheriting form view of crm.lead and given model id of crm.lead.result. So, change model id to crm.lead in view. Also if you want to add page view inside notebook then you need to add your one2many field inside page .see below example.

<record id="lead_result_form" model="ir.ui.view">
        <field name="name">lead.result.form</field>
        <field name="model">crm.lead</field>
        <field name="inherit_id" ref="crm.crm_lead_view_form" />
        <field name="arch" type="xml">
            <xpath expr="//page[@name='lead']" position="after">
                <page name="results" string="Results"> 
                    <field name="results_ids">
                        <tree>
                            <field name="vendor_sort" />
                            <field name="vendor_name" />
                            <field name="vendor_amount" />
                        </tree>
                        <form>
                            <group col="4">
                                <field name="vendor_sort" />
                                <field name="vendor_name" required="1" />
                                <field name="vendor_amount" />
                            </group>
                        </form>
                    </field>
                </page>
            </xpath>
        </field>
    </record>
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda