Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

How to add custom field in res.partner kanban view for my custom module....

By
Odoo
on 7/4/14, 12:35 AM 3,340 views

Hi,

Please expalin how to add a custom field in my kanban view of res.partner field....need a help  ..


class res_partner(osv.osv):
   
    _name='res.partner'
    
    _columns={
            
             'marital_status':fields.boolean('status'),
           
             }

       
        <record id="res_partner_info_tree" model="ir.ui.view">
                <field name="name">res.partner</field>
                <field name="model">res.partner</field>
                <field name="arch" type="xml">
                    <tree string="Information">                                    
                        <field name="marital_status"/>                
                     
                        
                    </tree>
                </field>                
        </record>

 

Then how to write this marital_status field add into kanban view of res.partner form(Customer form)

EDIT---

  'marital_status':fields.selection([('single','Single'),
                       ('married','Married'),
                                   ('divorced','Divorced'), ('engaged','Engaged')

1
Turkesh Patel (tpa)
On 7/4/14, 3:05 AM

        <!-- Partner kanban view inherte -->
        <record model="ir.ui.view" id="new_partner_kanban_view">
            <field name="name">res.partner.kanban.inherit</field>
            <field name="model">res.partner</field>
            <field name="inherit_id" ref="base.res_partner_kanban_view"/>
            <field name="arch" type="xml">
                <field name="mobile" position="after">
                    <field name="marital_status"/>
                </field>
                <xpath expr="//div[@class='oe_kanban_partner_links']" position="after">
                    <li t-if="record.marital_status.raw_value">Married</li>

                    <li t-if="not record.marital_status.raw_value">Unmarried</li>

                </xpath>

            </field>
        </record>

Thanks Turkesh Patel (tpa)

Odoo
on 7/7/14, 4:23 AM
1
Allen Walker
On 7/7/14, 2:55 AM

  <!-- Partner kanban view inherte -->
        <record model="ir.ui.view" id="new_partner_kanban_view">
            <field name="name">res.partner.kanban.inherit</field>
            <field name="model">res.partner</field>
            <field name="inherit_id" ref="base.res_partner_kanban_view"/>
            <field name="arch" type="xml">
                <field name="mobile" position="after">
                    <field name="marital_status"/>
                </field>
                <xpath expr="//div[@class='oe_kanban_partner_links']" position="after">
                    <li t-if="record.marital_status.raw_value">Married</li>

                    <li t-if="not record.marital_status.raw_value">Unmarried</li>

                </xpath>

            </field>
        </record>

Thanks Allen.....

Allen Walker
on 7/9/14, 9:54 PM

welcome

Allen Walker
on 7/9/14, 9:54 PM
0

Jagdish Panchal

--Jagdish Panchal--
2674
| 5 3 6
Gandhinagar, India
--Jagdish Panchal--

OpenERP Developer

Jagdish Panchal
On 7/4/14, 12:58 AM

Hi

Refer below link may help you

http://stackoverflow.com/questions/20885861/openerp-how-to-modify-kanban-element-via-inheritance

https://www.odoo.com/forum/Help-1/question/Kanban-Inherit-projectproject-24041

http://stackoverflow.com/questions/22396906/how-to-locate-the-new-added-field-in-openerp-when-two-of-parent-views-fields-ar

Thanks ...Jagadish

Odoo
on 7/7/14, 12:53 AM

Welcome

Jagdish Panchal
on 7/7/14, 2:44 AM

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!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)

Stats

Asked: 7/4/14, 12:35 AM
Seen: 3340 times
Last updated: 3/16/15, 8:10 AM