[IMP] HR modules: Usebility, on employee add contract field (latest)
bzr revid: mra@mra-laptop-20100819093802-9z5a0t6rn4f17i5j
This commit is contained in:
parent
4359aaefcd
commit
04e5144b2d
|
@ -99,6 +99,7 @@
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<search string="Employees">
|
<search string="Employees">
|
||||||
<filter icon="terp-personal-" domain="[('active','=',False)]" string="Unactive" groups="base.group_extended"/>
|
<filter icon="terp-personal-" domain="[('active','=',False)]" string="Unactive" groups="base.group_extended"/>
|
||||||
|
<separator orientation="vertical" />
|
||||||
<field name="name"/>
|
<field name="name"/>
|
||||||
<field name="department_id" widget="selection">
|
<field name="department_id" widget="selection">
|
||||||
<filter icon="terp-personal+" domain="[('department_id','=',context.get('department_id',False))]" help="My Departments Employee"/>
|
<filter icon="terp-personal+" domain="[('department_id','=',context.get('department_id',False))]" help="My Departments Employee"/>
|
||||||
|
@ -154,7 +155,7 @@
|
||||||
=======================
|
=======================
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<record id="hr_hr_employee_marital_status_tree" model="ir.ui.view">
|
<record id="hr_hr_employee_marital_status_tree" model="ir.ui.view">
|
||||||
<field name="name">hr.hr.employee.marital.status.tree</field>
|
<field name="name">hr.hr.employee.marital.status.tree</field>
|
||||||
<field name="model">hr.employee.marital.status</field>
|
<field name="model">hr.employee.marital.status</field>
|
||||||
<field name="type">tree</field>
|
<field name="type">tree</field>
|
||||||
|
@ -338,9 +339,9 @@
|
||||||
</page>
|
</page>
|
||||||
</notebook>
|
</notebook>
|
||||||
<group col="6" colspan="4">
|
<group col="6" colspan="4">
|
||||||
<field name="state"/>
|
<field name="state"/>
|
||||||
<button name="job_recruitement" string="In Recruitement" states="open" type="object" icon="gtk-go-forward"/>
|
<button name="job_recruitement" string="In Recruitement" states="open" type="object" icon="gtk-go-forward"/>
|
||||||
<button name="job_open" string="Open" states="old,recruit" type="object" icon="terp-camera_test"/>
|
<button name="job_open" string="Open" states="old,recruit" type="object" icon="terp-camera_test"/>
|
||||||
<button name="job_old" string="Old" states="open,recruit" type="object" icon="gtk-cancel"/>
|
<button name="job_old" string="Old" states="open,recruit" type="object" icon="gtk-cancel"/>
|
||||||
</group>
|
</group>
|
||||||
</form>
|
</form>
|
||||||
|
@ -369,16 +370,21 @@
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<search string="Jobs">
|
<search string="Jobs">
|
||||||
<filter icon="terp-check" domain="[('state','in',('open','recruit'))]" string="Current"
|
<filter icon="terp-check" domain="[('state','in',('open','recruit'))]" string="Current"
|
||||||
help="Open and in recruitment positions"/>
|
name="Current" help="Open and in recruitment positions"/>
|
||||||
<filter icon="terp-personal+" domain="[('state','=','recruit')]" string="Recruitment"
|
|
||||||
help="In Recruitment"/>
|
|
||||||
<filter icon="terp-camera_test" domain="[('state','=','open')]" string="Open"
|
<filter icon="terp-camera_test" domain="[('state','=','open')]" string="Open"
|
||||||
help="Open Positions"/>
|
help="Open Positions"/>
|
||||||
<separator orientation="vertical"/>
|
<separator orientation="vertical"/>
|
||||||
|
<filter icon="terp-personal+" domain="[('state','=','recruit')]" string="Recruitment"
|
||||||
|
help="In Recruitment"/>
|
||||||
|
<separator orientation="vertical"/>
|
||||||
<field name="name"/>
|
<field name="name"/>
|
||||||
<field name="department_id" widget="selection">
|
<field name="department_id" widget="selection">
|
||||||
<filter icon="terp-gtk-select-all" domain="[('department_id', '=', context.get('department_id', False))]" help="My Departments Jobs"/>
|
<filter icon="terp-personal+" domain="[('department_id', '=', context.get('department_id', False))]" help="My Departments Jobs"/>
|
||||||
</field>
|
</field>
|
||||||
|
<newline />
|
||||||
|
<group expand="0" string="Group By...">
|
||||||
|
<filter string="Department" icon="terp-personal+" domain="[]" context="{'group_by':'department_id'}"/>
|
||||||
|
</group>
|
||||||
</search>
|
</search>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
@ -388,6 +394,8 @@
|
||||||
<field name="res_model">hr.job</field>
|
<field name="res_model">hr.job</field>
|
||||||
<field name="view_type">form</field>
|
<field name="view_type">form</field>
|
||||||
<field name="view_mode">tree,form</field>
|
<field name="view_mode">tree,form</field>
|
||||||
|
<field name="search_view_id" ref="view_job_filter"/>
|
||||||
|
<field name="context">{'search_default_Current':1}</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<menuitem name="Recruitment" id="base.menu_crm_case_job_req_main" parent="menu_hr_root" groups="base.group_hr_manager,base.group_system"/>
|
<menuitem name="Recruitment" id="base.menu_crm_case_job_req_main" parent="menu_hr_root" groups="base.group_hr_manager,base.group_system"/>
|
||||||
|
|
|
@ -35,7 +35,6 @@
|
||||||
'security/hr_security.xml',
|
'security/hr_security.xml',
|
||||||
'security/ir.model.access.csv',
|
'security/ir.model.access.csv',
|
||||||
'hr_attendance_view.xml',
|
'hr_attendance_view.xml',
|
||||||
'hr_attendance_wizard.xml',
|
|
||||||
'hr_attendance_report.xml',
|
'hr_attendance_report.xml',
|
||||||
'security/ir.model.access.csv',
|
'security/ir.model.access.csv',
|
||||||
'wizard/hr_attendance_bymonth_view.xml',
|
'wizard/hr_attendance_bymonth_view.xml',
|
||||||
|
|
|
@ -1,21 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<openerp>
|
|
||||||
<data>
|
|
||||||
|
|
||||||
<!--<wizard multi="1" menu="False" id="si_so" model="hr.employee" name="hr.si_so" string="Sign in / Sign out"/>-->
|
|
||||||
<!--<wizard id="wizard_attendance_error" keyword="client_print_multi" model="hr.employee" name="hr.attendance.report" string="Print Attendance Error Report"/>
|
|
||||||
|
|
||||||
<wizard id="print_week" keyword="client_print_multi" model="hr.employee" name="hr.attendance.print_week" string="Print Timesheet by week"/>-->
|
|
||||||
<!--<wizard id="print_month" keyword="client_print_multi" model="hr.employee" name="hr.attendance.print_month" string="Print Timesheet by month"/>-->
|
|
||||||
|
|
||||||
|
|
||||||
<!-- <menuitem action="si_so" id="menu_si_so" parent="menu_hr_time_tracking" type="wizard" sequence="1"
|
|
||||||
groups="group_hr_attendance"/>-->
|
|
||||||
<!--Time Tracking menu for Project Management-->
|
|
||||||
<menuitem icon="terp-project" id="base.menu_main_pm" name="Project" sequence="10"/>
|
|
||||||
<menuitem id="base.menu_project_management_time_tracking" name="Time Tracking"
|
|
||||||
parent="base.menu_main_pm" sequence="3"/>
|
|
||||||
<!--<menuitem action="hr_attendance.si_so" id="menu_project_management_si_so" parent="base.menu_project_management_time_tracking" type="wizard" sequence="9"/>
|
|
||||||
-->
|
|
||||||
</data>
|
|
||||||
</openerp>
|
|
|
@ -26,6 +26,18 @@ class hr_employee(osv.osv):
|
||||||
_name = "hr.employee"
|
_name = "hr.employee"
|
||||||
_description = "Employee"
|
_description = "Employee"
|
||||||
_inherit = "hr.employee"
|
_inherit = "hr.employee"
|
||||||
|
|
||||||
|
def _get_latest_contract(self, cr, uid, ids, field_name, args, context=None):
|
||||||
|
res = {}
|
||||||
|
obj_contract = self.pool.get('hr.contract')
|
||||||
|
for emp in self.browse(cr, uid, ids, context=context):
|
||||||
|
contract_ids = obj_contract.search(cr, uid, [('employee_id','=',emp.id),], order='date_start', context=context)
|
||||||
|
if contract_ids:
|
||||||
|
res[emp.id] = contract_ids[-1:][0]
|
||||||
|
else:
|
||||||
|
res[emp.id] = False
|
||||||
|
return res
|
||||||
|
|
||||||
_columns = {
|
_columns = {
|
||||||
'manager': fields.boolean('Is a Manager'),
|
'manager': fields.boolean('Is a Manager'),
|
||||||
'medic_exam': fields.date('Medical Examination Date'),
|
'medic_exam': fields.date('Medical Examination Date'),
|
||||||
|
@ -34,7 +46,9 @@ class hr_employee(osv.osv):
|
||||||
'vehicle': fields.char('Company Vehicle', size=64),
|
'vehicle': fields.char('Company Vehicle', size=64),
|
||||||
'vehicle_distance': fields.integer('Home-Work Distance', help="In kilometers"),
|
'vehicle_distance': fields.integer('Home-Work Distance', help="In kilometers"),
|
||||||
'contract_ids': fields.one2many('hr.contract', 'employee_id', 'Contracts'),
|
'contract_ids': fields.one2many('hr.contract', 'employee_id', 'Contracts'),
|
||||||
}
|
'contract_id':fields.function(_get_latest_contract, method=True, string='Contract', type='many2one', relation="hr.contract", help='Latest contract of the employee'),
|
||||||
|
}
|
||||||
|
|
||||||
hr_employee()
|
hr_employee()
|
||||||
|
|
||||||
#Contract wage type period name
|
#Contract wage type period name
|
||||||
|
|
|
@ -101,8 +101,8 @@
|
||||||
<field name="model">hr.employee</field>
|
<field name="model">hr.employee</field>
|
||||||
<field name="inherit_id" ref="hr.view_employee_form"/>
|
<field name="inherit_id" ref="hr.view_employee_form"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<notebook position="inside">
|
<page string="Notes" position="before">
|
||||||
<page string="Miscelleanous">
|
<page string="Miscellaneous">
|
||||||
<group colspan="2" col="2">
|
<group colspan="2" col="2">
|
||||||
<separator string="Personal Info" colspan="2"/>
|
<separator string="Personal Info" colspan="2"/>
|
||||||
<field name="bank_account"/>
|
<field name="bank_account"/>
|
||||||
|
@ -120,7 +120,22 @@
|
||||||
<field name="medic_exam" />
|
<field name="medic_exam" />
|
||||||
</group>
|
</group>
|
||||||
</page>
|
</page>
|
||||||
</notebook>
|
<page string="Contracts">
|
||||||
|
<field colspan="4" name="contract_ids" nolabel="1"/>
|
||||||
|
</page>
|
||||||
|
</page>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="hr_employee_view_form3" model="ir.ui.view">
|
||||||
|
<field name="name">hr.employee.view.form3</field>
|
||||||
|
<field name="model">hr.employee</field>
|
||||||
|
<field name="type">form</field>
|
||||||
|
<field name="inherit_id" ref="hr.view_employee_form"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<field name="department_id" position="after">
|
||||||
|
<field name="contract_id"/>
|
||||||
|
</field>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
@ -133,12 +148,14 @@
|
||||||
<group col='15' colspan='4'>
|
<group col='15' colspan='4'>
|
||||||
<field name="name"/>
|
<field name="name"/>
|
||||||
<field name="employee_id"/>
|
<field name="employee_id"/>
|
||||||
|
<field name="working_hours"/>
|
||||||
<field name="date_start"/>
|
<field name="date_start"/>
|
||||||
<field name="date_end"/>
|
<field name="date_end"/>
|
||||||
</group>
|
</group>
|
||||||
<newline/>
|
<newline/>
|
||||||
<group expand="0" string="Group By..." colspan="4" col="20">
|
<group expand="0" string="Group By..." colspan="4" col="20">
|
||||||
<filter string="Wage Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'wage_type_id'}"/>
|
<filter string="Wage Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'wage_type_id'}"/>
|
||||||
|
<filter string="Working Schedule" icon="terp-personal+" domain="[]" context="{'group_by':'working_hours'}"/>
|
||||||
</group>
|
</group>
|
||||||
</search>
|
</search>
|
||||||
</field>
|
</field>
|
||||||
|
@ -159,7 +176,7 @@
|
||||||
<field name="type_id" widget="selection"/>
|
<field name="type_id" widget="selection"/>
|
||||||
</group>
|
</group>
|
||||||
<notebook>
|
<notebook>
|
||||||
<page string="Main Data">
|
<page string="Information">
|
||||||
<group col="2" colspan="2">
|
<group col="2" colspan="2">
|
||||||
<separator colspan="2" string="Duration"/>
|
<separator colspan="2" string="Duration"/>
|
||||||
<field name="date_start" />
|
<field name="date_start" />
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<openerp>
|
<openerp>
|
||||||
<data>
|
<data>
|
||||||
|
|
||||||
<record id="view_hr_evaluation_plan_search" model="ir.ui.view">
|
<record id="view_hr_evaluation_plan_search" model="ir.ui.view">
|
||||||
<field name="name">hr_evaluation.plan.search</field>
|
<field name="name">hr_evaluation.plan.search</field>
|
||||||
<field name="model">hr_evaluation.plan</field>
|
<field name="model">hr_evaluation.plan</field>
|
||||||
<field name="type">search</field>
|
<field name="type">search</field>
|
||||||
|
@ -140,12 +140,12 @@
|
||||||
<field name="model">hr.employee</field>
|
<field name="model">hr.employee</field>
|
||||||
<field name="inherit_id" ref="hr.view_employee_form"/>
|
<field name="inherit_id" ref="hr.view_employee_form"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<notebook position="inside">
|
<page string="Notes" position="before">
|
||||||
<page string="Evaluation">
|
<page string="Evaluation">
|
||||||
<field name="evaluation_plan_id" on_change="onchange_evaluation_plan_id(evaluation_plan_id, evaluation_date)"/>
|
<field name="evaluation_plan_id" on_change="onchange_evaluation_plan_id(evaluation_plan_id, evaluation_date)"/>
|
||||||
<field name="evaluation_date"/>
|
<field name="evaluation_date"/>
|
||||||
</page>
|
</page>
|
||||||
</notebook>
|
</page>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
@ -332,7 +332,8 @@
|
||||||
<newline/>
|
<newline/>
|
||||||
<group expand="0" string="Group By...">
|
<group expand="0" string="Group By...">
|
||||||
<filter string="Survey" icon="terp-personal" domain="[]" context="{'group_by':'survey_id'}"/>
|
<filter string="Survey" icon="terp-personal" domain="[]" context="{'group_by':'survey_id'}"/>
|
||||||
<filter string="User" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
|
<filter string="Interviewer" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
|
||||||
|
<separator orientation="vertical"/>
|
||||||
<filter string="State" name="group_state" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
|
<filter string="State" name="group_state" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
|
||||||
</group>
|
</group>
|
||||||
</search>
|
</search>
|
||||||
|
@ -349,7 +350,7 @@
|
||||||
<field name="search_view_id" ref="view_hr_evaluation_interview_search"/>
|
<field name="search_view_id" ref="view_hr_evaluation_interview_search"/>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<menuitem name="Interview Requests" parent="menu_eval_hr" id="menu_open_hr_evaluation_interview_requests"
|
<menuitem name="Interview Requests" parent="menu_eval_hr" id="menu_open_hr_evaluation_interview_requests"
|
||||||
action="action_hr_evaluation_interview_tree"/>
|
action="action_hr_evaluation_interview_tree"/>
|
||||||
<menuitem name="Evaluation Reminders" parent="menu_eval_hr" id="menu_eval_send_mail"
|
<menuitem name="Evaluation Reminders" parent="menu_eval_hr" id="menu_eval_send_mail"
|
||||||
action="action_hr_evaluation_send_mail" sequence="45"/>
|
action="action_hr_evaluation_send_mail" sequence="45"/>
|
||||||
|
|
|
@ -891,7 +891,6 @@ class hr_payslip(osv.osv):
|
||||||
contract = cr.dictfetchone()
|
contract = cr.dictfetchone()
|
||||||
|
|
||||||
contract = contract and contract or {}
|
contract = contract and contract or {}
|
||||||
|
|
||||||
return contract
|
return contract
|
||||||
|
|
||||||
def _get_leaves(self, cr, user, slip, employee, context=None):
|
def _get_leaves(self, cr, user, slip, employee, context=None):
|
||||||
|
@ -1322,10 +1321,10 @@ class hr_employee(osv.osv):
|
||||||
|
|
||||||
_columns = {
|
_columns = {
|
||||||
'pan_no':fields.char('PAN No', size=64, required=False, readonly=False),
|
'pan_no':fields.char('PAN No', size=64, required=False, readonly=False),
|
||||||
'esp_account':fields.char('EPS Account', size=64, required=False, readonly=False),
|
'esp_account':fields.char('EPS Account', size=64, required=False, readonly=False, help="EPS Account"),
|
||||||
'pf_account':fields.char('PF Account', size=64, required=False, readonly=False),
|
'pf_account':fields.char('PF Account', size=64, required=False, readonly=False, help="Providend Fund Account"),
|
||||||
'pg_joining': fields.date('PF Join Date'),
|
'pg_joining': fields.date('PF Join Date'),
|
||||||
'esi_account':fields.char('ESI Account', size=64, required=False, readonly=False),
|
'esi_account':fields.char('ESI Account', size=64, required=False, readonly=False, help="ESI Account"),
|
||||||
'hospital_id':fields.many2one('res.partner.address', 'ESI Hospital', required=False),
|
'hospital_id':fields.many2one('res.partner.address', 'ESI Hospital', required=False),
|
||||||
'passport_id':fields.many2one('hr.passport', 'Passport', required=False),
|
'passport_id':fields.many2one('hr.passport', 'Passport', required=False),
|
||||||
'otherid':fields.char('Other Id', size=64, required=False),
|
'otherid':fields.char('Other Id', size=64, required=False),
|
||||||
|
|
|
@ -98,7 +98,7 @@
|
||||||
<field name="model">hr.employee</field>
|
<field name="model">hr.employee</field>
|
||||||
<field name="inherit_id" ref="hr.view_employee_form"/>
|
<field name="inherit_id" ref="hr.view_employee_form"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<notebook position="inside">
|
<page string="Notes" position="before">
|
||||||
<page string="Contracts">
|
<page string="Contracts">
|
||||||
<field colspan="4" mode="form,tree" name="contract_ids" nolabel="1">
|
<field colspan="4" mode="form,tree" name="contract_ids" nolabel="1">
|
||||||
<tree string="Contracts">
|
<tree string="Contracts">
|
||||||
|
@ -110,7 +110,7 @@
|
||||||
<field name="wage_type_id"/>
|
<field name="wage_type_id"/>
|
||||||
<field name="wage"/>
|
<field name="wage"/>
|
||||||
</tree>
|
</tree>
|
||||||
<form string="Contract">
|
<form string="Contracts">
|
||||||
<group colspan="4" col="6">
|
<group colspan="4" col="6">
|
||||||
<field name="name" select="1"/>
|
<field name="name" select="1"/>
|
||||||
<field name="job_id"/>
|
<field name="job_id"/>
|
||||||
|
@ -153,7 +153,7 @@
|
||||||
</form>
|
</form>
|
||||||
</field>
|
</field>
|
||||||
</page>
|
</page>
|
||||||
<page string="Miscelleanous">
|
<page string="Miscellaneous">
|
||||||
<group colspan="2" col="2">
|
<group colspan="2" col="2">
|
||||||
<separator string="Personal Info" colspan="2"/>
|
<separator string="Personal Info" colspan="2"/>
|
||||||
<field name="pan_no" select="1"/>
|
<field name="pan_no" select="1"/>
|
||||||
|
@ -167,7 +167,6 @@
|
||||||
<field name="manager" select="1"/>
|
<field name="manager" select="1"/>
|
||||||
<field name="vehicle" select="1"/>
|
<field name="vehicle" select="1"/>
|
||||||
<field name="vehicle_distance" select="1"/>
|
<field name="vehicle_distance" select="1"/>
|
||||||
<field name="medic_exam" select="1"/>
|
|
||||||
</group>
|
</group>
|
||||||
<group col="2" colspan="2">
|
<group col="2" colspan="2">
|
||||||
<separator colspan="2" string="ESI Information"/>
|
<separator colspan="2" string="ESI Information"/>
|
||||||
|
@ -201,10 +200,10 @@
|
||||||
<field name="property_bank_account"/>
|
<field name="property_bank_account"/>
|
||||||
<field name="salary_account"/>
|
<field name="salary_account"/>
|
||||||
<field name="employee_account"/>
|
<field name="employee_account"/>
|
||||||
<field name="analytic_account"/>
|
<field name="analytic_account" groups="base.group_extended"/>
|
||||||
<field name="slip_ids" colspan="4" nolabel="1"/>
|
<field name="slip_ids" colspan="4" nolabel="1"/>
|
||||||
</page>
|
</page>
|
||||||
</notebook>
|
</page>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
@ -523,7 +522,8 @@
|
||||||
<filter icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft Slip"/>
|
<filter icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft Slip"/>
|
||||||
<filter icon="terp-camera_test" string="Posted" domain="[('state','=','posted')]" help="Posted Slip"/>
|
<filter icon="terp-camera_test" string="Posted" domain="[('state','=','posted')]" help="Posted Slip"/>
|
||||||
<separator orientation="vertical"/>
|
<separator orientation="vertical"/>
|
||||||
<filter icon="terp-account" string="Paid" domain="[('state','=','done'),('paid','=',True)]" help="Paid Slip"/>
|
<filter icon="terp-dolar_ok!" string="Paid" domain="[('state','=','done'),('paid','=',True)]" help="Paid Slip"/>
|
||||||
|
<separator orientation="vertical"/>
|
||||||
<field name="name"/>
|
<field name="name"/>
|
||||||
<field name="employee_id"/>
|
<field name="employee_id"/>
|
||||||
<field name="number"/>
|
<field name="number"/>
|
||||||
|
@ -531,9 +531,12 @@
|
||||||
</group>
|
</group>
|
||||||
<newline/>
|
<newline/>
|
||||||
<group col="8" colspan="4" expand="0" string="Group By...">
|
<group col="8" colspan="4" expand="0" string="Group By...">
|
||||||
|
<filter string="Employees" icon="terp-personal" name="employee_id" context="{'group_by':'employee_id'}"/>
|
||||||
|
<separator orientation="vertical"/>
|
||||||
<filter string="Register" icon="terp-folder-yellow" name="register_id" context="{'group_by':'register_id'}"/>
|
<filter string="Register" icon="terp-folder-yellow" name="register_id" context="{'group_by':'register_id'}"/>
|
||||||
<filter string="Employees" icon="terp-partner" name="employee_id" context="{'group_by':'employee_id'}"/>
|
<separator orientation="vertical"/>
|
||||||
<filter string="Companies" name="company_id" icon="terp-go-month" context="{'group_by':'company_id'}"/>
|
<filter string="Companies" name="company_id" icon="terp-go-home" context="{'group_by':'company_id'}"/>
|
||||||
|
<separator orientation="vertical"/>
|
||||||
<filter string="States" name="state" icon="terp-stock_effects-object-colorize" context="{'group_by':'state'}"/>
|
<filter string="States" name="state" icon="terp-stock_effects-object-colorize" context="{'group_by':'state'}"/>
|
||||||
</group>
|
</group>
|
||||||
</search>
|
</search>
|
||||||
|
|
|
@ -143,9 +143,6 @@
|
||||||
<button name="case_reset" string="Reset to New" states="done,cancel" type="object" icon="gtk-convert"/>
|
<button name="case_reset" string="Reset to New" states="done,cancel" type="object" icon="gtk-convert"/>
|
||||||
</group>
|
</group>
|
||||||
</page>
|
</page>
|
||||||
<page string="Notes">
|
|
||||||
<field name="description" nolabel="1" colspan="4"/>
|
|
||||||
</page>
|
|
||||||
<!-- <page string="History" groups="base.group_extended">
|
<!-- <page string="History" groups="base.group_extended">
|
||||||
<field name="id"/>
|
<field name="id"/>
|
||||||
<field name="active"/>
|
<field name="active"/>
|
||||||
|
@ -200,6 +197,9 @@
|
||||||
name="%(crm.crm_lead_forward_to_partner_act)d"
|
name="%(crm.crm_lead_forward_to_partner_act)d"
|
||||||
icon="terp-mail-forward" type="action" />
|
icon="terp-mail-forward" type="action" />
|
||||||
</page>
|
</page>
|
||||||
|
<page string="Notes">
|
||||||
|
<field name="description" nolabel="1" colspan="4"/>
|
||||||
|
</page>
|
||||||
</notebook>
|
</notebook>
|
||||||
</form>
|
</form>
|
||||||
</field>
|
</field>
|
||||||
|
@ -244,7 +244,7 @@
|
||||||
help="Pending Jobs"
|
help="Pending Jobs"
|
||||||
/>
|
/>
|
||||||
<separator orientation="vertical"/>
|
<separator orientation="vertical"/>
|
||||||
<filter icon="terp-check" string="Next Actions"
|
<filter icon="terp-gtk-jump-to-ltr" string="Next Actions"
|
||||||
context="{'invisible_next_action':False, 'invisible_next_date':False}"
|
context="{'invisible_next_action':False, 'invisible_next_date':False}"
|
||||||
domain="[]"
|
domain="[]"
|
||||||
help="View Next Action and Date"/>
|
help="View Next Action and Date"/>
|
||||||
|
@ -262,18 +262,18 @@
|
||||||
</field>
|
</field>
|
||||||
<newline/>
|
<newline/>
|
||||||
<group expand="0" string="Group By..." colspan="11" col="20">
|
<group expand="0" string="Group By..." colspan="11" col="20">
|
||||||
<filter string="Department" icon="terp-personal+" domain="[]" context="{'group_by':'department_id'}"/>
|
|
||||||
<filter string="Responsible" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
|
<filter string="Responsible" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
|
||||||
|
<filter string="Department" icon="terp-personal+" domain="[]" context="{'group_by':'department_id'}"/>
|
||||||
<separator orientation="vertical"/>
|
<separator orientation="vertical"/>
|
||||||
<filter string="Job" icon="terp-gtk-select-all" domain="[]" context="{'group_by':'job_id'}"/>
|
<filter string="Job" icon="terp-gtk-select-all" domain="[]" context="{'group_by':'job_id'}"/>
|
||||||
<filter string="Stage" icon="terp-stage" domain="[]" context="{'group_by':'stage_id'}"/>
|
|
||||||
<filter string="Degree" icon="terp-gtk-select-all" domain="[]" context="{'group_by':'type_id'}"/>
|
<filter string="Degree" icon="terp-gtk-select-all" domain="[]" context="{'group_by':'type_id'}"/>
|
||||||
<filter string="Availability" icon="terp-camera_test" domain="[]" context="{'group_by':'availability'}"/>
|
<filter string="Availability" icon="terp-camera_test" domain="[]" context="{'group_by':'availability'}"/>
|
||||||
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
|
|
||||||
<separator orientation="vertical"/>
|
<separator orientation="vertical"/>
|
||||||
<filter string="Appreciation" icon="terp-face-plain" domain="[]" context="{'group_by':'priority'}"/>
|
<filter string="Appreciation" icon="terp-face-plain" domain="[]" context="{'group_by':'priority'}"/>
|
||||||
|
<filter string="Stage" icon="terp-stage" domain="[]" context="{'group_by':'stage_id'}"/>
|
||||||
|
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
|
||||||
<separator orientation="vertical"/>
|
<separator orientation="vertical"/>
|
||||||
<filter string="Date" icon="terp-go-month" domain="[]" context="{'group_by':'create_date'}"/>
|
<filter string="Creation Date" icon="terp-go-month" domain="[]" context="{'group_by':'create_date'}"/>
|
||||||
</group>
|
</group>
|
||||||
</search>
|
</search>
|
||||||
</field>
|
</field>
|
||||||
|
|
|
@ -60,11 +60,18 @@ class hr_analytic_timesheet(osv.osv):
|
||||||
def on_change_unit_amount(self, cr, uid, id, prod_id, unit_amount, unit, context=None):
|
def on_change_unit_amount(self, cr, uid, id, prod_id, unit_amount, unit, context=None):
|
||||||
if context is None:
|
if context is None:
|
||||||
context = {}
|
context = {}
|
||||||
res = {}
|
res = {'value':{}}
|
||||||
if prod_id and unit_amount:
|
if prod_id and unit_amount:
|
||||||
# find company
|
# find company
|
||||||
company_id = self.pool.get('res.company')._company_default_get(cr, uid, 'account.analytic.line', context=context)
|
company_id = self.pool.get('res.company')._company_default_get(cr, uid, 'account.analytic.line', context=context)
|
||||||
res = self.pool.get('account.analytic.line').on_change_unit_amount(cr, uid, id, prod_id, unit_amount, company_id, unit, context=context)
|
res = self.pool.get('account.analytic.line').on_change_unit_amount(cr, uid, id, prod_id, unit_amount, company_id, unit, context=context)
|
||||||
|
# update unit of measurement
|
||||||
|
if prod_id:
|
||||||
|
uom = self.pool.get('product.product').browse(cr, uid, prod_id, context=context)
|
||||||
|
if uom.uom_id:
|
||||||
|
res['value'].update({'product_uom_id': uom.uom_id.id})
|
||||||
|
else:
|
||||||
|
res['value'].update({'product_uom_id': False})
|
||||||
return res
|
return res
|
||||||
|
|
||||||
def _getEmployeeProduct(self, cr, uid, context=None):
|
def _getEmployeeProduct(self, cr, uid, context=None):
|
||||||
|
|
|
@ -1,7 +1,11 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<openerp>
|
<openerp>
|
||||||
|
|
||||||
<data>
|
<data>
|
||||||
|
<menuitem icon="terp-project" id="base.menu_main_pm" name="Project" sequence="10"/>
|
||||||
|
<menuitem id="base.menu_project_management_time_tracking" name="Time Tracking"
|
||||||
|
parent="base.menu_main_pm" sequence="3"/>
|
||||||
|
|
||||||
|
|
||||||
<record id="hr_timesheet_line_tree" model="ir.ui.view">
|
<record id="hr_timesheet_line_tree" model="ir.ui.view">
|
||||||
<field name="name">hr.analytic.timesheet.tree</field>
|
<field name="name">hr.analytic.timesheet.tree</field>
|
||||||
<field name="model">hr.analytic.timesheet</field>
|
<field name="model">hr.analytic.timesheet</field>
|
||||||
|
@ -96,12 +100,12 @@
|
||||||
<field name="model">hr.employee</field>
|
<field name="model">hr.employee</field>
|
||||||
<field name="inherit_id" ref="hr.view_employee_form"/>
|
<field name="inherit_id" ref="hr.view_employee_form"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<notebook position="inside">
|
<page string="Notes" position="before">
|
||||||
<page string="Timesheets">
|
<page string="Timesheets">
|
||||||
<field name="product_id" domain="[('type','=','service')]"/>
|
<field name="product_id" domain="[('type','=','service')]"/>
|
||||||
<field name="journal_id"/>
|
<field name="journal_id"/>
|
||||||
</page>
|
</page>
|
||||||
</notebook>
|
</page>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
|
|
@ -28,8 +28,8 @@ class hr_timesheet_invoice_factor(osv.osv):
|
||||||
_description = "Invoice Rate"
|
_description = "Invoice Rate"
|
||||||
_columns = {
|
_columns = {
|
||||||
'name': fields.char('Internal name', size=128, required=True),
|
'name': fields.char('Internal name', size=128, required=True),
|
||||||
'customer_name': fields.char('Name', size=128),
|
'customer_name': fields.char('Name', size=128, help="Name of the customer"),
|
||||||
'factor': fields.float('Discount (%)', required=True),
|
'factor': fields.float('Discount (%)', required=True, help="Discount in percentage"),
|
||||||
}
|
}
|
||||||
_defaults = {
|
_defaults = {
|
||||||
'factor': lambda *a: 0.0,
|
'factor': lambda *a: 0.0,
|
||||||
|
|
Loading…
Reference in New Issue