Odoo Help

0

Odoo 8 Onchange query from web to form

By
Franz Bautista
on 3/21/17, 3:22 AM 227 views

Am using Odoo 8 and I am trying to edit the application webpage under hr.recruitment. The webpage code shows this:

<div t-attf-class="form-group #{error.get('email_from') and 'has-error' or ''}">
    <label class="col-md-3 col-sm-4 control-label" for="email_from">Your Email</label>
    <div class="col-md-7 col-sm-8">
        <input type="email" t-att-value="default.get('email_from')" class="form-control" name="email_from" required="True"/>
<div>
</div>

This page shows that the email address inputted is "copied" to the odoo form once submitted. I cant figure out what code does that. i found an on_change under hr.recruitment below:

def onchange_partner_id(self, cr, uid, ids, partner_id, context=None):
        
        data = {'partner_phone': False,
                'partner_mobile': False,
        'email_from': False}
if partner_id: addr = self.pool.get('res.partner').browse(cr, uid, partner_id, context)
data.update({'partner_phone': addr.phone,
'partner_mobile': addr.mobile,
'email_from': addr.email})
return {'value': data}

Any idea how I can transfer data from the webpage to odoo form? Is it using on_change? Tks


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.

Register

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

1 follower(s)

Stats

Asked: 3/21/17, 3:22 AM
Seen: 227 times
Last updated: 3/21/17, 3:24 AM