mercredi 1 juillet 2009

New Action for ‘Submenu’, fields_view_get API change

Hello,

There is new feature added on gtk client (will available in etiny soon) for submenu.

Now user can have submenus on the top of the form view (inside the tab).For this there is one new action type (ir.actions.submenu) defined on ir.actions.act_window, which allow user to make different submenus on one form:

As shown in below example in form view for project, user can manage all information (Tasks,Timesheet,Bugs,…Dashboard) of project from a single point of view and navigate easily for each links available for the project!



You can define your submenu action like this:

<record model=”ir.actions.act_window” id=”view_project_project_portal”>

<field name=”name”>Project Form</field>
<field name=”res_model”>project.project</field>
<field name=”type”>ir.actions.submenu</field>
<field name=”view_type”>form</field>
<field name=”context” eval=”{’action_portal’:'project’}”/>
<field name=”menus”>

[{'name':'Tasks','action_id':'action_portal_project_task','icon':'terp- project'}, {'name':'Timesheets','action_id':'act_hr_timesheet_sheet_portal_form','icon':'terp-hr'},.........
{'name':'Dashboard','action_id':'view_project_project_portal','icon':'terp-graph'}]

</field>

</record>

Server side improvement

New attribute added on fields_view_get method (trunk)

Old definition: def fields_view_get(self, cr, user, view_id=None, view_type=’form’, context=None, toolbar=False)

New definition: def fields_view_get(self, cr, user, view_id=None, view_type=’form’, context=None, toolbar=False, submenu=False)

You can have latest client/server to use this functioanality from launchpad.. lp:openobject-server, lp:openobject-client

Enjoy new feature!

Thanks,

6 commentaires:

  1. Why not used the relate functionnality that already exists?

    RépondreSupprimer
  2. Great post! I’m searching for this information for long time and I have found it here. I’m a lucky man and honestly It’ really important to me. Very smart, thanks for kindly sharing it with us. Very well done indeed. If you do not mind, please visit my article related to pandeglang district in Banten, Indonesia at Kenali dan Kunjungi Objek Wisata di Pandeglang or Kenali dan Kunjungi Objek Wisata di Pandeglang and information about district Banten Indonesia Banten dan Kabupaten Pandeglang

    RépondreSupprimer
  3. Interesting post. I have been wondering about this issue,so thanks for posting. I’ll likely be coming back to your blog. Keep up great writing.

    Travel News | Free Song Lyric | A Love to Kill | Learn Indonesia Language | cari rumah | jual rumah | rumah dijual | Laptop Price List | New Blackberry | Health & Jewerly

    RépondreSupprimer
  4. This is a very interesting perspective, however I think judging someone's ability to do a job solely based upon their handwriting is a little unfair. I know my handwriting changes depending on what I am writing. I also think the fact that pretty much nothing is written by hand today; from a college to an email, that this can affect people's handwriting for the worse.
    thermal bags

    RépondreSupprimer
  5. Hello it was already implemented ?

    Can you explain better context eval ?

    RépondreSupprimer