[REF] hr,hr_attendance,hr_expense,hr_holidays,hr_timesheets,stock: Review some layouts
bzr revid: stephane@openerp.com-20100318173933-5mdevsd8oeon8vu7
This commit is contained in:
parent
56244b68f7
commit
b748958082
|
@ -38,20 +38,6 @@
|
|||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Personal Information">
|
||||
<group col="2" colspan="2">
|
||||
<separator colspan="2" string="Social IDs"/>
|
||||
<field name="ssnid"/>
|
||||
<field name="sinid" groups="base.group_extended"/>
|
||||
<field name="otherid"/>
|
||||
</group>
|
||||
<group col="2" colspan="2">
|
||||
<separator string="Status" colspan="2"/>
|
||||
<field name="gender"/>
|
||||
<field name="marital"/>
|
||||
<field name="country_id"/>
|
||||
<field name="birthday"/>
|
||||
</group>
|
||||
|
||||
<group col="2" colspan="2">
|
||||
<separator string="Contact Information" colspan="2"/>
|
||||
<field name="address_home_id" colspan="2"/>
|
||||
|
@ -62,6 +48,13 @@
|
|||
<field name="work_location"/>
|
||||
</group>
|
||||
|
||||
<group col="2" colspan="2">
|
||||
<separator colspan="2" string="Social IDs"/>
|
||||
<field name="ssnid"/>
|
||||
<field name="sinid" groups="base.group_extended"/>
|
||||
<field name="otherid"/>
|
||||
</group>
|
||||
|
||||
<group col="2" colspan="2">
|
||||
<separator string="Position" colspan="2"/>
|
||||
<field name="job_id" widget="selection"/>
|
||||
|
@ -70,6 +63,14 @@
|
|||
<field name="parent_id" select="1"/>
|
||||
<field name="coach_id" select="1"/>
|
||||
</group>
|
||||
|
||||
<group col="2" colspan="2">
|
||||
<separator string="Status" colspan="2"/>
|
||||
<field name="gender"/>
|
||||
<field name="marital"/>
|
||||
<field name="country_id"/>
|
||||
<field name="birthday"/>
|
||||
</group>
|
||||
</page>
|
||||
<page string="Notes">
|
||||
<field colspan="4" nolabel="1" name="notes"/>
|
||||
|
@ -87,10 +88,11 @@
|
|||
<field name="arch" type="xml">
|
||||
<tree string="Employees">
|
||||
<field name="name"/>
|
||||
<field name="job_id"/>
|
||||
<field name="ssnid"/>
|
||||
<field name="work_phone"/>
|
||||
<field name="work_email"/>
|
||||
<field name="department_id"/>
|
||||
<field name="job_id"/>
|
||||
<field name="parent_id"/>
|
||||
</tree>
|
||||
</field>
|
||||
|
@ -101,18 +103,18 @@
|
|||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Employees">
|
||||
<group col='6' colspan='2'>
|
||||
<field name="name"/>
|
||||
<field name="job_id" widget="selection"/>
|
||||
<field name="department_id" widget="selection"/>
|
||||
<field name="parent_id">
|
||||
<filter icon="terp-partner" domain="[('parent_id','child_of',uid),('id', '!=', uid)]" help="Employees under me"/>
|
||||
</field>
|
||||
</group>
|
||||
<filter icon="terp-partner" domain="[('parent_id','child_of',uid),('id', '!=', uid)]" string ="My Employees"/>
|
||||
<separator orientation="vertical" />
|
||||
<field name="name"/>
|
||||
<field name="ssnid"/>
|
||||
<field name="department_id" widget="selection"/>
|
||||
<field name="job_id" widget="selection"/>
|
||||
<field name="parent_id" widget="selection" />
|
||||
<newline />
|
||||
|
||||
<group expand="1" string="Group By..." colspan="11" col="11">
|
||||
<filter string="Manager" icon="terp-sale" domain="[]" context="{'group_by':'parent_id'}"/>
|
||||
<filter string="Department" icon="terp-sale" domain="[]" context="{'group_by':'department_id'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
|
@ -152,6 +154,7 @@
|
|||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="domain">[]</field>
|
||||
<field name="view_id" ref="view_employee_tree"/>
|
||||
<field name="search_view_id" ref="view_employee_filter"/>
|
||||
</record>
|
||||
<!--<menuitem
|
||||
|
@ -206,6 +209,7 @@
|
|||
<field name="arch" type="xml">
|
||||
<tree string="Employees">
|
||||
<field name="name"/>
|
||||
<field name="ssnid"/>
|
||||
<field name="user_id"/>
|
||||
<field name="address_id"/>
|
||||
|
||||
|
|
|
@ -46,11 +46,19 @@ def _employee_get(obj,cr,uid,context={}):
|
|||
class hr_attendance(osv.osv):
|
||||
_name = "hr.attendance"
|
||||
_description = "Attendance"
|
||||
|
||||
def _day_compute(self, cr, uid, ids, fieldnames, args, context=None):
|
||||
res = dict.fromkeys(ids, '')
|
||||
for obj in self.browse(cr, uid, ids, context=context):
|
||||
res[obj.id] = time.strftime('%Y-%m-%d', time.strptime(obj.name, '%Y-%m-%d %H:%M:%S'))
|
||||
|
||||
return res
|
||||
_columns = {
|
||||
'name' : fields.datetime('Date', required=True),
|
||||
'action' : fields.selection([('sign_in', 'Sign In'), ('sign_out', 'Sign Out'),('action','Action')], 'Action', required=True),
|
||||
'action_desc' : fields.many2one("hr.action.reason", "Action reason", domain="[('action_type', '=', action)]", help='Specifies the reason for Signing In/Signing Out in case of extra hours.'),
|
||||
'employee_id' : fields.many2one('hr.employee', "Employee's Name", required=True, select=True),
|
||||
'day' : fields.function(_day_compute, method=True, type='char', string='Day', store=True, select=1, size=32),
|
||||
}
|
||||
_defaults = {
|
||||
'name' : lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'),
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<field name="arch" type="xml">
|
||||
<form string="Employee attendance">
|
||||
<field name="employee_id" select="1"/>
|
||||
<field colspan="4" name="name" select="1"/>
|
||||
<field name="name" select="1"/>
|
||||
<field name="action" select="1"/>
|
||||
<field name="action_desc" select="1"/>
|
||||
</form>
|
||||
|
@ -48,9 +48,17 @@
|
|||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Hr Attendance Search">
|
||||
<filter icon="terp-sale" string="My Attendances" domain="[('employee_id.user_id.id', '=', uid)]" />
|
||||
<filter icon="terp-sale" string="Today" domain="[('name::date','=',current_date)]" />
|
||||
<separator orientation="vertical"/>
|
||||
<field name="employee_id" select="1" />
|
||||
<field name="name" select="1" />
|
||||
<field name="action" select="1" />
|
||||
<newline/>
|
||||
<group expand="1" string="Group By..." colspan="11" col="11">
|
||||
<filter string="Employee" icon="terp-sale" domain="[]" context="{'group_by':'employee_id'}"/>
|
||||
<filter string="Day" icon="terp-sale" domain="[]" context="{'group_by':'day'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -26,7 +26,8 @@
|
|||
<field name="model">hr.expense.expense</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Expenses">
|
||||
<tree string="Expenses"
|
||||
colors="blue:state == 'draft'">
|
||||
<field name="date"/>
|
||||
<field name="employee_id"/>
|
||||
<field name="department_id"/>
|
||||
|
@ -66,8 +67,8 @@
|
|||
<field name="arch" type="xml">
|
||||
<form string="Expenses Sheet">
|
||||
<group colspan="4" col="6">
|
||||
<field name="name" select="1"/>
|
||||
<field name="employee_id" select="1"/>
|
||||
<field name="name" select="1"/>
|
||||
<field name="id" select="2"/>
|
||||
<field name="date" select="1"/>
|
||||
<field name="amount"/>
|
||||
|
@ -127,39 +128,42 @@
|
|||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Expense">
|
||||
<group col="20" colspan="4">
|
||||
<filter
|
||||
icon="terp-hr"
|
||||
domain="[('state','=','draft')]"
|
||||
string="Draft"
|
||||
help="Draft Expense"/>
|
||||
<filter
|
||||
icon="terp-hr"
|
||||
domain="[('state','=','confirm')]"
|
||||
string="To Validate"
|
||||
help="Confirmed Expense"/>
|
||||
<filter
|
||||
icon="terp-hr"
|
||||
domain="[('state','=','accepted')]"
|
||||
string="To Pay"
|
||||
help="Expenses to Invoice"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="name" select='1'/>
|
||||
<field name="user_id" select="1" widget="selection">
|
||||
<filter
|
||||
icon="gtk-execute"
|
||||
help="My Expenses"
|
||||
<group col="20" colspan="4">
|
||||
<filter
|
||||
icon="terp-hr"
|
||||
string="My Expenses"
|
||||
default="1"
|
||||
domain="[('user_id','=',uid)]"/>
|
||||
</field>
|
||||
<field name="state" select="1"/>
|
||||
<field name="department_id" widget="selection">
|
||||
<filter icon="terp-crm"
|
||||
domain="[('department_id','=',context.get('department_id',False))]"
|
||||
help="Expenses of My Department"/>
|
||||
</field>
|
||||
</group>
|
||||
</search>
|
||||
<filter icon="terp-hr"
|
||||
domain="[('department_id','=',context.get('department_id',False))]"
|
||||
string="Expenses of My Department"/>
|
||||
<separator orientation="vertical" />
|
||||
<filter
|
||||
icon="terp-hr"
|
||||
domain="[('state','=','draft')]"
|
||||
string="Draft"
|
||||
help="Draft Expense"/>
|
||||
<filter
|
||||
icon="terp-hr"
|
||||
domain="[('state','=','confirm')]"
|
||||
string="To Validate"
|
||||
help="Confirmed Expense"/>
|
||||
<filter
|
||||
icon="terp-hr"
|
||||
domain="[('state','=','accepted')]"
|
||||
string="To Pay"
|
||||
help="Expenses to Invoice"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="user_id" select="1" widget="selection" />
|
||||
<field name="name" select='1'/>
|
||||
<field name="department_id" widget="selection" />
|
||||
<field name="state" select="1"/>
|
||||
</group>
|
||||
<newline />
|
||||
<group expand="1" string="Group By..." colspan="11" col="11">
|
||||
<filter string="Department" icon="terp-sale" domain="[]" context="{'group_by':'department_id'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
|
|
@ -7,24 +7,26 @@
|
|||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Leave">
|
||||
<group col='8' colspan='4'>
|
||||
<filter icon="terp-hr" domain="[('state','=','draft')]" string="To Confirm"/>
|
||||
<filter icon="terp-hr" domain="[('state','=','confirm')]" string="To Validate"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="name" select='1'/>
|
||||
<field name="state" select="1">
|
||||
<filter icon="terp-hr" domain="[('state','=','refuse')]" help="Refused Holidays"/>
|
||||
<filter icon="terp-hr" domain="[('state','=','validate')]" help="Validated Holidays"/>
|
||||
</field>
|
||||
<field name="user_id" select="1" widget="selection">
|
||||
<filter icon="gtk-execute" help="My Leaves" domain="[('user_id','=',uid)]" />
|
||||
</field>
|
||||
<field name="department_id" select="1" widget="selection">
|
||||
<filter icon="gtk-execute" domain="[('department_id','=',context.get('department_id',False))]"
|
||||
help="My Departments Leaves"/>
|
||||
</field>
|
||||
</group>
|
||||
</search>
|
||||
<group col='8' colspan='4'>
|
||||
<filter icon="terp-hr" domain="[('state','=','draft')]" string="To Confirm"/>
|
||||
<filter icon="terp-hr" domain="[('state','=','confirm')]" string="To Validate"/>
|
||||
<filter icon="terp-hr" domain="[('department_id','=',context.get('department_id',False))]"
|
||||
string="My Departments Leaves"/>
|
||||
<filter icon="terp-hr" help="My Leaves" domain="[('user_id','=',uid)]" string="My Leaves"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="user_id" select="1" widget="selection" />
|
||||
<field name="department_id" select="1" widget="selection" />
|
||||
<field name="name" select='1'/>
|
||||
<field name="state" select="1">
|
||||
<filter icon="terp-hr" domain="[('state','=','refuse')]" help="Refused Holidays"/>
|
||||
<filter icon="terp-hr" domain="[('state','=','validate')]" help="Validated Holidays"/>
|
||||
</field>
|
||||
</group>
|
||||
<newline />
|
||||
<group expand="1" string="Group By..." colspan="11" col="11">
|
||||
<filter string="Department" icon="terp-sale" domain="[]" context="{'group_by':'department_id'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
@ -134,16 +136,17 @@
|
|||
<field name="model">hr.holidays</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Leaves">
|
||||
<field name="name"/>
|
||||
<tree string="Leaves"
|
||||
colors="red:state == 'refuse';grey:state == 'cancel'">
|
||||
<field name="employee_id"/>
|
||||
<field name="department_id"/>
|
||||
<field name="number_of_days" string="Number of Days" sum='Remaining Days'/>
|
||||
<field name="date_from"/>
|
||||
<field name="date_to"/>
|
||||
<field name="name"/>
|
||||
<field name="holiday_status_id"/>
|
||||
<field name="state"/>
|
||||
<field name="type"/>
|
||||
<field name="state"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -77,7 +77,7 @@ class wizard_report(wizard.interface):
|
|||
states={
|
||||
'init':{
|
||||
'actions':[_check],
|
||||
'result':{'type':'form', 'arch':form, 'fields':fields, 'state':[('end', 'Cancel'), ('checkdept', 'Print')]}
|
||||
'result':{'type':'form', 'arch':form, 'fields':fields, 'state':[('end', 'Cancel', 'gtk-cancel'), ('checkdept', 'Print', 'gtk-print')]}
|
||||
},
|
||||
'checkdept': {
|
||||
'actions': [],
|
||||
|
@ -85,7 +85,7 @@ class wizard_report(wizard.interface):
|
|||
},
|
||||
'notify': {
|
||||
'actions': [],
|
||||
'result': {'type':'form','arch':zero_form,'fields':zero_fields,'state':[('end','Ok')]}
|
||||
'result': {'type':'form','arch':zero_form,'fields':zero_fields,'state':[('end','Ok', 'gtk-ok')]}
|
||||
},
|
||||
'report':{
|
||||
'actions':[],
|
||||
|
|
|
@ -67,7 +67,7 @@ class wizard_report(wizard.interface):
|
|||
states={
|
||||
'init':{
|
||||
'actions':[_check],
|
||||
'result':{'type':'form', 'arch':form, 'fields':fields, 'state':[('end', 'Cancel'), ('checkemp', 'Print')]}
|
||||
'result':{'type':'form', 'arch':form, 'fields':fields, 'state':[('end', 'Cancel','gtk-cancel'), ('checkemp', 'Print', 'gtk-print')]}
|
||||
},
|
||||
'checkemp': {
|
||||
'actions': [],
|
||||
|
@ -75,7 +75,7 @@ class wizard_report(wizard.interface):
|
|||
},
|
||||
'notify': {
|
||||
'actions': [],
|
||||
'result': {'type':'form','arch':zero_form,'fields':zero_fields,'state':[('end','Ok')]}
|
||||
'result': {'type':'form','arch':zero_form,'fields':zero_fields,'state':[('end','Ok', 'gtk-ok')]}
|
||||
},
|
||||
'report':{
|
||||
'actions':[],
|
||||
|
|
|
@ -7,7 +7,8 @@
|
|||
<field name="model">hr_timesheet_sheet.sheet</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Timesheets">
|
||||
<tree string="Timesheets"
|
||||
colors="blue:state == 'draft';grey:state == 'done'">
|
||||
<field name="user_id"/>
|
||||
<field name="department_id"/>
|
||||
<field name="date_from"/>
|
||||
|
@ -156,9 +157,11 @@
|
|||
<field name="total_difference" widget="float_time" groups="hr_attendance.group_hr_attendance"/>
|
||||
</tree>
|
||||
</field>
|
||||
<field name="total_attendance" widget="float_time"/>
|
||||
<field name="total_timesheet" widget="float_time"/>
|
||||
<field name="total_difference" widget="float_time"/>
|
||||
<group colspan="4" col="6">
|
||||
<field name="total_attendance" widget="float_time"/>
|
||||
<field name="total_timesheet" widget="float_time"/>
|
||||
<field name="total_difference" widget="float_time"/>
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
<field name="state"/>
|
||||
|
@ -182,10 +185,7 @@
|
|||
<filter icon="terp-crm" string="Unvalidated" domain="[('state','in',('draft', 'new'))]" help="Unvalidated Timesheets"/>
|
||||
<filter icon="terp-crm" string="Confirmed" domain="[('state','=','confirmed')]" help="Confirmed Timesheets"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="state">
|
||||
<filter icon="terp-hr" domain="[('state','=','draft')]" help="Draft Timesheets"/>
|
||||
<filter icon="terp-hr" domain="[('state','=','confirm')]" help="Confirmed Timesheets"/>
|
||||
</field>
|
||||
<field name="state" />
|
||||
<field name="name" select="1"/>
|
||||
<field name="user_id" select="1" widget="selection">
|
||||
<filter icon="terp-partner" domain="[('user_id','=',uid)]" help="My Timesheet"/>
|
||||
|
|
|
@ -61,8 +61,8 @@
|
|||
<filter string="This Month" icon="terp-hr" domain="[('month','=',time.strftime('%%m'))]" default="1"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Current" icon="terp-hr" domain="[('state','in',('open','draft'))]"/>
|
||||
<filter string="Order Date" icon="terp-stock" domain="[('order_date',=,time.strftime('%%m/%%d/%%Y'))]" />
|
||||
<filter string="Expected Date" icon="terp-hr" domain="[('expected_date',=,time.strftime('%%m/%%d/%%Y'))]"/>
|
||||
<filter string="Order Date" icon="terp-stock" domain="[('order_date',=,time.strftime('%%Y-%%m-%%d'))]" />
|
||||
<filter string="Expected Date" icon="terp-hr" domain="[('expected_date',=,time.strftime('%%Y-%%m-%%d'))]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="reference" />
|
||||
<field name="origin" />
|
||||
|
|
Loading…
Reference in New Issue