Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8131641
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T09:08:47+00:00 2026-06-06T09:08:47+00:00

I have installed the built in OpenERP 6.1 module crm. As a result, I

  • 0

I have installed the built in OpenERP 6.1 module crm.

As a result, I now have res.lead active and visible at “Sales->Opportunities”.

I’d like to edit this object / view to show the partner’s billing address.

Since I want to do this on the Opporunities form, there is already a partner_id.

Copying another module, I defined my new module like this:

class crm_lead(osv.osv):
    _name = _inherit = 'crm.lead'
    _columns = {
    'billing_address_id': fields.many2one('res.partner.address', 'Partner Billing Address', domain="[('partner_id','=',partner_id),('type','in',['invoice', 'default'])]"),
    }

And I changed my update_xml to:

    <record model="ir.ui.view" id="crm_case_form_view_oppor">
        <field name="name">Opportunity form (inherit)</field>
        <field name="model">crm.lead</field>
        <field name="inherit_id" ref="crm.crm_case_form_view_oppor"/>
        <field name="arch" type="xml">
            <data>
                <separator string="Details" position="replace" />
                <field name="description" position="replace">
                    <group colspan="2" col="4">
                        <separator colspan="4" string="Billing" />
                        <field widget="one2many_list" mode="form,tree" name="billing_address_id" colspan="4" nolabel="1" />
                    </group>
                    <group colspan="2" col="4">
                        <separator colspan="4" string="Details" />
                        <field name="description" nolabel="1" colspan="4" />
                    </group>
                </field>
            </data>
        </field>
    </record>

The problem is that the related object shows all the related fields (as I’d guess would be expected). In particular, it shows the partner_id and company fields, which I’d like to hide since they should default to / inherit from this opportunity (or the linked partner).

How can I hide these fields? I can’t simply add a bunch of ‘related’ fields, as there is potentially more than one billing address.

Thanks for the help!


Edit: To be clearer, an opportunity should only have a single chosen billing address, chosen from the partner’s invoice / default addresses. It should be displayed inline to allow easy editing.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T09:08:48+00:00Added an answer on June 6, 2026 at 9:08 am

    There are a couple of ways to specify the view for related fields like this. You can use the context like this:

    <field 
        name="order_line" 
        colspan="4" 
        nolabel="1"
        context="{'form_view_ref': 'module.view_id', 'tree_view_ref': 'model.view_id'}"/>
    

    You can also specify the whole view for the child record as a subview within the parent view like this:

        <!-- <=== order_line is a one2many field -->
        <field name="order_line" colspan="4" nolabel="1">
            <form>
                <field name="qty"/>
                ...
            </form>
            <tree>
                <field name="qty"/>
                ...
            </tree>
        </field>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

hi every one i have installed qt-creator from built in ubuntu software center now
So, I have installed the pypy pre-built interpreter to my home folder in windows;
My Leopard system has dtrace built in. I also have Java 6 installed, using
I have the RC build of VS2010 installed on my computer. Now that the
I have built my liferay website in the development environment and now ready to
I have installed Cassandra on my Ubuntu VM and built the source. I was
I have installed, configured and built a site on Concrete 5.5.2.1 and it is
I have an EXE that I built that I am trying to have installed
I have installed lxml which was built using a standalone version of libxml2. Reason
I have installed the new asp:chart control on my machine and have built an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.