i want to inherit CRM Pipeline (Leads) view and add a page in notebook ( where already 2 are exists ) want to add 3rd page (tab), so please help for how to achieve this?
screenshot of CRM Pipeline view:
regards
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
i want to inherit CRM Pipeline (Leads) view and add a page in notebook ( where already 2 are exists ) want to add 3rd page (tab), so please help for how to achieve this?
screenshot of CRM Pipeline view:
regards
Hello @SmithJohn45,
Hope you are doing well.
For you to add page in the crm pipeline view. you will need to inherit the form view and add the page(tab) and then the custom fields.
Here is how you could achieve it.
Please find code in comment.
Feel free to contact us for further assistance
Hope this answer helps you.
Thanks & Regards,
Email: odoo@aktivsoftware.com
Skype: kalpeshmaheshwari
Please find code in comment :-
Code :-
<record id="crm_lead_view_form_inherit" model="ir.ui.view">
<field name="name">crm.lead.oppor.inherited</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="">
Add your custom fields
</page>
</xpath>
</field>
</record>
thank you, will check this and confirm.
when Upgrading module i am getting error that as below:
<form class="o_lead_opportunity_form" js_class="crm_form">
<header>
<button name="action_set_won_rainbowman" string="Won" type="object" class="oe_highlight" data-hotkey="w" title="Mark as won" attrs="{'invisible': ['|','|', ('active','=',False), ('probability', '=', 100), ('type', '=', 'lead')]}"/>
Field `stage_id` does not exist
View error context:
{'file': 'd:\\program files\\odoo '
'16.0e.20230607\\server\\odoo\\custom_addons\\crm_customz\\views\\crm_leads_custom_inquiry.xml',
'line': 1,
'name': 'crm.leads.inherit',
'view': ir.ui.view(2407,),
'view.model': 'crm.inquiry',
'view.parent': ir.ui.view(2318,),
'xmlid': 'view_crm_lead_form_inherit01'}
My view code as per your advised code:
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<record id="view_crm_lead_form_inherit01" model="ir.ui.view">
<field name="name">crm.leads.inherit</field>
<field name="model">crm.inquiry</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="">
<group>
<field name="product_id"/>
<field name="qty"/>
</group>
</page>
</xpath>
</field>
</record>
</odoo>
please help.
regards
My Model Code:
from odoo import models, fields
class CRMInquiry(models.Model):
_name = 'crm.inquiry'
_description = 'CRM Lead Inquiry'
product_id = fields.Many2one('product.product', string='Product Name', required=True)
qty = fields.Integer(string='Quantity', default=1)
Hello @SmithJohn45
Hope you are doing well.
As I could see from your code you have created a new model hence you can't inherit another model's view and add the fields there but instead.
You need to add the fields on the same model you want them to be on or use the new model and create a new many2one field on the model related to the new model.
I hope this could help you.
Crie uma conta hoje mesmo para aproveitar os recursos exclusivos e interagir com nossa incrível comunidade!
Inscreva-se