Odoo Help

Welcome!

This community 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.

0

Openerp Action attributes describe.?

By
priyankahdp
on 10/3/13, 2:20 AM 1,592 views
<record model="ir.actions.act_window" id="action_hr_available_holidays_report">
    <field name="name">Leaves Analysis</field>
    <field name="res_model">hr.holidays</field>
    <field name="view_type">form</field>
    <field name="view_mode">tree,form</field>
    <field name="view_id" eval="view_holiday_simple"/>
    <field name="context">{'search_default_year':1, 'search_default_This Month':1, 'search_default_group_employee': 1, 'search_default_group_type': 1}</field>
    <field name="domain">[('holiday_type','=','employee')]</field>
    <field name="search_view_id" ref="view_hr_holidays_filter"/>
</record>

above shows the action tag for hr attendance report.its confused me what is the mean from these.?

    <field name="view_id" eval="view_holiday_simple"/>
    <field name="context">{'search_default_year':1, 'search_default_This Month':1, 'search_default_group_employee': 1, 'search_default_group_type': 1}</field>
    <field name="domain">[('holiday_type','=','employee')]</field>
    <field name="search_view_id" ref="view_hr_holidays_filter"/>

Need to clarify above segments. Reporting->Human Resources->Leave Analysis then i found those codes. its create a view called hr_holidays_remaining_leaves_user its empty when we check it from pgAdmin. but its shows data when we goes it through openerp

below added 'Year' filter and group by 'Employee' and 'Type' at on load how to given that .?

image description

please help me to sort out this issue thanks

1

Grover Menacho

--Grover Menacho--
2523
| 5 7 8
La Paz, Bolivia
--Grover Menacho--

Systems Engineer + MBA

Grover Menacho
On 10/3/13, 3:03 AM

Hello.

What you posted is giving you the way to do it:

<field name="context">{'search_default_year':1, 'search_default_This Month':1, 'search_default_group_employee': 1, 'search_default_group_type': 1}</field>

When you send by context search_default, by default those views are going to enable that filter. You can see filter names on search view of this model. You only have to send this data by context and it's applied to every view. If you are opening a tree view from a wizard you can send context and domain too so you can set filters dinamically.

About views that are not showing on PgAdmin III. I've experienced this, but it's not a problem to me.

Try this:

   SELECT * FROM  hr_holidays_remaining_leaves_user

Well I'm not sure if this is the name of the view but this should work with any view.

I hope this can help you.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 10/3/13, 2:20 AM
Seen: 1592 times
Last updated: 3/16/15, 8:10 AM