Odoo Help

3

0
2 Answers
6
Avatar

Eric United States

--Eric--

754
| 6 2 9
Fresno, United States
--Eric--

Software Developer at Mertechdata

Eric United States
9/8/14, 1:26 PM

I finally got the answer right.  Thanks to Maniganda's answer found on this link: 

https://www.odoo.com/forum/help-1/question/call-function-from-the-more-dropdown-list-61330

 

All I needed to do was change this line:

<field name="code">self.renew_license(cr, uid, context.get('active_ids', []), context=context)</field>

 

To this:

<field name="code">action = self.renew_license(cr, uid, context.get('active_ids', []), context=context)</field>

 

Thank you Maniganda!

1 Comment
Ubaid ur Rehman Pakistan
5/11/17, 3:18 AM

Thanks @Eric and @Maniganda your answer save my time.

0
Avatar

Ben Bernard Indonesia

--Ben Bernard--

1106
| 4 3 9
Jakarta, Indonesia
--Ben Bernard--
Ben Bernard Indonesia
9/5/14, 2:06 AM

This is my guessing (I never do this). I think the problem is that new sale order, new_order_id, record hasn't been commited. As far as I know odoo commit transaction at the end of request. So when the method return an action, odoo makes the action void because new_order_id is not available yet.

1 Comment
Eric United States
9/8/14, 11:37 AM

Hello Ben, I tried testing this by using an ID of another sale order, but it still didn't open the form view. Thanks for your reply

Ask a Question
Writer
754
Eric
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