Odoo Help

0

1
2 Answers
3
Avatar

Vasanth

--Vasanth--

3878
| 6 3 10
Pondicherry, India
--Vasanth--
Vasanth
2/12/15, 3:06 AM

hi.you try this method in your code:

    def get_update(self, cr, uid, ids, context='ship_id'):
        order_line_obj = self.pool.get('sale.order.line')
        for order in self.browse(cr, uid, ids, context=context):
            for line in order.order_line:
                order_line_obj.write(cr, uid, [line.id], {'shop_no':val})
        return True

0
Martin Pishpecki
9/19/16, 9:24 AM

Is this the only way to set value to a grid. I cannot believe that a modern framework does not have the most basic functionality on click of a button set values to tree.

I tried using the method oncahnge() set on a filed - this works, but if this method is called by a button - it does not work

Also I have tried using the defaults - again it work on create, but when I call the method by a button - it fails to fill the tree.

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 E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now