Hi!
I'm trying to create a button in contact to open the opportunity (in crm.lead) and add a field inside the the form opportunity
The problem is that when I want use this table I get an error:
When I want to inherit the model get:
This Error
raise TypeError("Model %r does not exist in registry." % name)
TypeError: Model 'crm.lead' does not exist in registry. - - -
And the code is:
_inherit = 'crm.lead'status = fields.Selection(selection = [('prospect','Prospect'), ('etude','Etude'), ('accepte','Accepté'), ('chantier','Chantier'), ('cloturee','Cloturée'), ('refusee','Refusée')],string = 'Statut',default = "prospect")
When I want to inherit de form I get:
This Error:
Model not found: crm.lead Error context: View `crm_crm_case_form_view_oppor` [view_id: 1363, xml_id: n/a, model: crm.lead, parent_id: 1332] None" while parsing file:/c:/users/da-sil_t/desktop/freelance/pepitelab/di-environnement-back/custom_addons/agence/views/inherit_crm_team.xml:28, near <record id="crm_crm_case_form_view_oppor_inherit_agence" model="ir.ui.view"> <field name="name">crm_crm_case_form_view_oppor</field> <field name="model">crm.lead</field> <field name="inherit_id" ref="crm.crm_case_form_view_oppor"/> <field name="arch" type="xml"> <xpath expr="//field[@name='active']" position="after"> <field name="status"/> </xpath> </field> </record>
The crm module is well installed and I can make a create for an opportunity (its work without problem):