Odoo Help

1

0
3 Answers
0
Avatar

Jagdish Panchal

--Jagdish Panchal--

2713
| 6 4 8
Gandhinagar, India
--Jagdish Panchal--

OpenERP Developer

Jagdish Panchal
6/27/14, 5:38 AM

Hi

Try this code

def look_invoice(self,cr,uid,ids,context=None):
        context = context or {}
        invoice_id = self.read(cr,uid, ids, ['invoice_id'])
        if invoice_id:
            return {
                'type': 'ir.actions.act_window',
                'name': 'Invoice',
                'res_model': 'module',
                'res_id': invoice_id[0],
                'view_type': 'form',
                'view_mode': 'form',
                'nodestroy': True,
            }
        return False

0
Avatar

Thierry Godin

--Thierry Godin--
1591
| 8 7 10
Collegien, France
--Thierry Godin--

..

Thierry Godin
6/27/14, 8:29 AM

Hello,

 

Just add version="7.0" to the tree statement :

<tree string="Invoices" create="false" delete="false" edit="false" version="7.0">

0
Risbourg Guillaume
7/2/14, 2:43 AM

(previous answer converted as comment)

Hello Thierry Godin,

I've try your code but the error is still there...

Ask a Question
Keep Informed
3 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