[MERGE]trunk-addons21_hr_imp-ssu

bzr revid: dle@openerp.com-20121214123802-cxax5cqcnw672h2p
This commit is contained in:
dle@openerp.com 2012-12-14 13:38:02 +01:00
commit 804e69fd78
3 changed files with 14 additions and 4 deletions

View File

@ -249,6 +249,15 @@ class hr_evaluation(osv.osv):
self.write(cr, uid, ids,{'state': 'draft'}, context=context)
return True
def copy(self, cr, uid, id, default=None, context=None):
if default is None:
default = {}
if context is None:
context = {}
default = default.copy()
default['survey_request_ids'] = []
return super(hr_evaluation, self).copy(cr, uid, id, default, context=context)
def write(self, cr, uid, ids, vals, context=None):
if vals.get('employee_id'):
employee_id = self.pool.get('hr.employee').browse(cr, uid, vals.get('employee_id'), context=context)

View File

@ -6,7 +6,7 @@
<field name="model">hr.holidays</field>
<field name="arch" type="xml">
<search string="Search Leave">
<field name="date_from"/>
<field name="name"/>
<separator/>
<filter icon="terp-check" domain="[('state','=','draft')]" string="To Confirm"/>
<filter icon="terp-camera_test" domain="[('state','in',('confirm','validate1'))]" string="To Approve" name="approve"/>
@ -21,6 +21,7 @@
<field name="department_id"/>
<field name="holiday_status_id"/>
<group expand="0" string="Group By...">
<filter name="group_name" string="Description" domain="[]" context="{'group_by':'name'}"/>
<filter name="group_date_from" string="Start Date" icon="terp-personal" domain="[]" context="{'group_by':'date_from'}"/>
<filter name="group_employee" string="Employee" icon="terp-personal" domain="[]" context="{'group_by':'employee_id'}"/>
<filter name="group_category" string="Category" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'category_id'}"/>

View File

@ -6,17 +6,17 @@
<field name="name">hr.analytic.timesheet.tree</field>
<field name="model">hr.analytic.timesheet</field>
<field name="arch" type="xml">
<tree editable="top" string="Timesheet Activities">
<tree editable="top" string="Timesheet Activities">
<field name="date" on_change="on_change_date(date)"/>
<field name="user_id" on_change="on_change_user_id(user_id)" required="1" options='{"no_open": True}'/>
<field name="journal_id" invisible="1"/>
<field name="name"/>
<field domain="[('type','=','normal'),('use_timesheets','=',1)]" name="account_id" context="{'default_use_timesheets': 1, 'default_type': 'contract'}"/>
<field name="product_id" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" required="1" domain="[('type','=','service')]" invisible="1"/>
<field name="unit_amount" string="Duration" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" sum="Total time" widget="float_time"/>
<field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" invisible="1"/>
<field name="journal_id" invisible="1"/>
<field name="amount" sum="Total cost" invisible="1"/>
<field name="general_account_id" invisible="1"/>
<field name="product_id" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" required="1" domain="[('type','=','service')]" invisible="1"/>
</tree>
</field>
</record>