[IMP]improve and clean hr_timesheet_sheet

bzr revid: sgo@tinyerp.com-20120621095646-t6dv93hfv8x1jkww
This commit is contained in:
Sanjay Gohel (Open ERP) 2012-06-21 15:26:46 +05:30
parent 5b6c2985f7
commit 33473284a3
2 changed files with 29 additions and 27 deletions

View File

@ -73,23 +73,21 @@
<field name="state" widget="statusbar" statusbar_visible="draft,confirm,validate" statusbar_colors='{"confirm":"blue","validate1":"blue","refuse":"red"}'/>
</header>
<sheet string="Leave Request" layout="auto">
<group col="8" colspan="4">
<group col="4" colspan="4">
<field name="name" attrs="{'readonly':[('state','!=','draft'),('state','!=','confirm')]}"/>
<field name="category_id" attrs="{'required':[('holiday_type','=','category')], 'readonly':[('state','!=','draft'), ('state','!=','confirm')],'invisible':[('holiday_type','=','employee')]}"/>
<field name="holiday_type" on_change="onchange_type(holiday_type)" attrs="{'readonly':[('state','!=','draft')]}" width="130" string="Mode" groups="base.group_hr_user"/>
<group attrs="{'invisible':[('holiday_type','=','employee')]}">
<field name="category_id" attrs="{'required':[('holiday_type','=','category')], 'readonly':[('state','!=','draft'), ('state','!=','confirm')]}"/>
</group>
<group attrs="{'invisible':[('holiday_type','=','category')]}">
<field name="employee_id" attrs="{'required':[('holiday_type','=','employee')]}" groups="base.group_hr_user"/>
</group>
<group>
<field name="date_from" on_change="onchange_date_from(date_to, date_from)" required="1"/>
<field name="date_to" on_change="onchange_date_from(date_to, date_from)" required="1"/>
<field name="number_of_days_temp"/>
</group>
<field name="employee_id" attrs="{'required':[('holiday_type','=','employee')],'invisible':[('holiday_type','=','category')]}" groups="base.group_hr_user"/>
</group>
<notebook colspan="4">
<page string="General">
<field name="holiday_status_id" on_change="onchange_sec_id(holiday_status_id)" context="{'employee_id':employee_id}"/>
<field name="department_id" attrs="{'readonly':[('holiday_type','=','category')]}" groups="base.group_hr_user"/>
<field name="date_from" on_change="onchange_date_from(date_to, date_from)" required="1"/>
<field name="date_to" on_change="onchange_date_from(date_to, date_from)" required="1"/>
<field name="number_of_days_temp"/>
<field name="double_validation" invisible="1"/>
<newline/>
<field name="manager_id" groups="base.group_no_one"/>

View File

@ -78,11 +78,11 @@
From <field name="date_from" />
to <field name="date_to"/>
</h2>
<group col="4">
<field name="name" class="oe_edit_only"/>
<field name="department_id" class="oe_edit_only"/>
<field name="company_id" groups="base.group_multi_company" class="oe_edit_only"/>
<field name="user_id" invisible="1" class="oe_edit_only"/>
<group col="4" class="oe_edit_only">
<field name="name"/>
<field name="department_id"/>
<field name="company_id" groups="base.group_multi_company"/>
<field name="user_id" invisible="1"/>
</group>
<notebook>
<page string="Daily">
@ -94,19 +94,23 @@
<button name="date_today" string="Today" type="object" icon="terp-go-today"/>
<button icon="terp-gtk-go-back-rtl" name="date_next" string="" type="object"/>
</group>
<field colspan="3" context="{'name':date_current,'user_id':user_id}" height="100" name="attendances_ids" nolabel="1">
<tree string="Attendances" editable="bottom">
<field name="name"/>
<field name="action"/>
<field invisible="1" name="employee_id"/>
</tree>
</field>
<group col="4" colspan="1">
<group colspan="4" col="3">
<field context="{'name':date_current,'user_id':user_id}" name="attendances_ids" nolabel="1">
<tree string="Attendances" editable="bottom">
<field name="name"/>
<field name="action"/>
<field invisible="1" name="employee_id"/>
</tree>
</field>
<group colspan="2" col="2">
<button name="sign_in" string="Sign In" type="object" icon="terp-gtk-jump-to-ltr"/>
<button name="sign_out" string="Sign Out" type="object" icon="terp-gtk-jump-to-rtl"/>
</group>
</group>
<group col="4">
<field name="state_attendance"/>
<button name="sign_in" string="Sign In" type="object" icon="terp-gtk-jump-to-ltr"/>
<button name="sign_out" string="Sign Out" type="object" icon="terp-gtk-jump-to-rtl"/>
<field name="total_attendance_day" widget="float_time" colspan="4"/>
<field name="total_attendance_day" widget="float_time"/>
</group>
<field colspan="4" context="{'date':date_current,'user_id':user_id}" domain="[('name','=',date_current)]" name="timesheet_ids" nolabel="1">
<tree editable="top" string="Timesheet Lines">