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

References Field to the existing field

By
Amine
on 2/12/15, 2:09 PM 255 views

Hi

I have a new module,

in the view, i want to get the customer field list

in the code python : i want to references from customer in the DB 

Thanks

the information are not clear !

Qamar Soft
on 2/12/15, 2:28 PM
0

Vasanth

--Vasanth--
3458
| 5 3 8
Pondicherry, India
--Vasanth--
Vasanth
On 2/13/15, 3:26 AM

Hi Amine,

are you askin for many2one field ?

,if yes means use this..

In ,py,

class res_partner(orm.Model):
    _inherit = 'res.partner'

    _columns = {

                  'partner_id':fields.many2one('res.partner'.Customer'),     

                      }

In view,

        <record model="ir.ui.view" id="base_view_partner_form_view__inherit">
            <field name="name">res.partner.form.inherit</field>
            <field name="model">res.partner</field>
            <field name="inherit_id" ref="base.view_partner_form" />
            <field name="arch" type="xml">
                           <field name="partner_id"/>
            </field>
        </record>

 

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

1 follower(s)

Stats

Asked: 2/12/15, 2:09 PM
Seen: 255 times
Last updated: 3/16/15, 8:10 AM