Odoo Help

1

0
3 Answers
0
Avatar

Jagdish Panchal

--Jagdish Panchal--

2711
| 6 4 8
Gandhinagar, 印度
--Jagdish Panchal--

OpenERP Developer

Jagdish Panchal
2014/6/27 上午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
2014/6/27 上午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
2014/7/2 上午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