This question has been flagged
2 Replies
5029 Views

I am showing a wizard. Based on the wizard inputs i am  changing database view content. But i unable to render to that tree view of that veiw. How can i do this in odoo-7? For example to render  rml report i can use a return statment like

return {
                    'type':'ir.actions.report.xml',
                    'report_name':'models.webkit.report',
                    'datas':datas,
                    'context':context

            }

Now i want to render to tree view how can i do this?

Avatar
Discard
Thank you Ivan..
But it is giving just data.. basic functionality of tree view is not there.. Any this is helping me some what better. I am facing the problem with passing wizard data to a database view method. I am showing a wizard. That wizard calls an action, it is a view action. That action calls the init(self,cr) method. Does it possible to send wizard data to this method as an extra parameter. For example i am showing date in the wizard i want to pass that date to this init(self,cr,date).

On Fri, Dec 12, 2014 at 4:09 PM, Ivan <niecw@mail.odoo.com> wrote:

A new answer for How can i render to tree view from function? has been posted. Click here to access the post.

--
Ivan
Sent by Odoo Inc. using Odoo about Forum Post How can i render to tree view from function?


--
--

Thanks and Regards,

Sambasiva rao,

Cell: +91.9676622023

Skype: samba.guduru2(skype)

You can create the wizard first (using create method) and then pass the return of the create method as a domain when you call the action. This way you can set whatever data beforehand. But I don't quite get what you want from passing the information to init. Maybe if you explain the end result that you want, I can help you better. Sample for creating the wizard first and displaying it can be found in the open_invoice method of addons/stock/wizard/stock_invoice_onshipping.py (the sample creates invoice first and display it. The same concept can be used).

Best Answer

Technically you can't render a tree view.  What you can do is to call ir.actions.windows and let configure the action to call a tree view.  Sample for this can be found in odoo/addons/account_voucher/invoice.py.

Avatar
Discard
Best Answer

make our button to do this..

  return  {
                    'type':'ir.actions.act_window',
                    'id':'models_models_actions',
                    'view_mode':'tree',
                    'view_type':'from',
                    'res_model':'models.models',
               }

Avatar
Discard