Odoo Help


"TypeError: val is null" on overriding button context params

on 11/1/13, 1:18 PM 1,172 views

I need to make a many2many relationship between leads and customers. I successfully did that and also I would like to add additional params to context for button "Meetings" only when called from Lead.

My Code is below

<record model="ir.ui.view" id="view_partner_form_custom">
    <field name="name">res.partner.form</field>
    <field name="model">res.partner</field>
    <field name="inherit_id" ref="base.view_partner_form" />
    <field name="arch" type="xml">
<xpath expr="//button[@string='Meetings']" position="attributes">
      <attribute name="context">{'search_default_partner_ids': active_id, 'default_partner_ids' : [active_id], 'search_default_lead_id': context.get('lead_id'), 'default_lead_id': context.get('lead_id')}</attribute>

The above code works fine and when clicking on meeting button in lead -> customer form -> meetings button but not working fine when clicking on customer form -> Meetings button

And i get the below error

TypeError: val is null

I could see that the below lines are problematic

'search_default_lead_id': context.get('lead_id'), 'default_lead_id': context.get('lead_id')

But the default search from lead for meetings should be based on that particular lead and customer id. Kindly clarify. Also feel free to update the post for better clarity. Thanks

(Please post your question only once. I had to delete 4 other versions of this question)

Bista Solutions US, Ray Carnes
on 11/1/13, 1:31 PM

(Hey i am really sorry, i got 404 error on posting, so just clicked on page refresh. extremely sorry about it)

on 11/1/13, 2:29 PM

About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)


Asked: 11/1/13, 1:18 PM
Seen: 1172 times
Last updated: 3/16/15, 8:10 AM