Odoo Help

1

0
3 Answers
0
Avatar

Jagdish Panchal

--Jagdish Panchal--

2711
| 6 4 8
Gandhinagar, الهند
--Jagdish Panchal--

OpenERP Developer

Jagdish Panchal
27‏/6‏/2014 5:38 ص

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, فرنسا
--Thierry Godin--

..

Thierry Godin
27‏/6‏/2014 8:29 ص

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
2‏/7‏/2014 2:43 ص

(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 eLearning platform and experience all Odoo Apps through learning videos, use cases and quizzes.

Test it now