Odoo Help

0

0
1 Answer
1
Avatar

Ameera PP

--Ameera PP--
--Ameera PP--


Ameera PP
28.10.16, 03:00

1) create fields like:

'product_qty': fields.float(string='Product Qty'),

'planned_qty': fields.float(string='Planned Quantity'),

2)define in xml

<field name="planned_qty" on_change="onchange_planned_qty(planned_qty)"/>
<field name="product_qty" on_change="onchange_product_qty(product_qty)"/>

3) call onchange function

def onchange_product_qty(self, cr, uid, ids, product_qty, context=None):
        if product_qty:
            return {'value': {''planned_qty': product_qty}}  

      else:
            return {'value':{''planned_qty': ''}}


    def onchange_'planned_qty(self, cr, uid, ids, 'planned_qty, context=None):
        if planned_qty:
            return {'value': {'product_qty': planned_qty}} 

       else:
            return {'value': {'product_qty': ''}}


Ask a Question
Writer
Keep Informed
1 follower(s)
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 eLearning platform and experience all Odoo Apps through learning videos, use cases and quizzes.

Test it now