Odoo Help

0

0
1 Answer
1
Avatar

Hilar AK Switzerland

--Hilar AK--
15752
| 7 6 11
Switzerland
--Hilar AK--
Experienced Odoo / Python Developer with a demonstrated history of working in the information technology and services industry with 3.5+years of experience. Skilled in Python, PostgreSQL, SQL, HTML, JavaScript. Strong engineering professional with a Bachelor of Technology (BTech) focused on Computer Science from the College of Engineering Munnar.

 Blogs:-

https://medium.com/@hilarak
        https://hilarlive.wordpress.com/
 StackOverflow:
       https://stackoverflow.com/users/7561347/burmese-pythis-hilar-ak

Quora:
    

            https://www.quora.com/profile/Hilar-Ak-1

Github:


https://github.com/hilarak



Hilar AK Switzerland
8/13/19, 11:32 AM

Okay I am going to change your function.

@api.multi
def action_crear_documento(self):
    if self.type=="sale": 
        if self.invoice_type_code_id=="11":
            return self.env['account.journal'].tipo11()
        elif self.invoice_type_code_id=="12": 
            return self.env['account.journal'].tipo12()

Just returning the results. You consfused in scope of function and result. 

1 Comment
giancarlo Peru
8/13/19, 12:47 PM

thanks.

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