Saurang Suthar(OpenERP) has proposed merging lp:~openerp-dev/openobject-addons/trunk-addons21_hr_imp-ssu into lp:openobject-addons.
Requested reviews: Atul Patel(OpenERP) (atp-openerp) For more details, see: https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-addons21_hr_imp-ssu/+merge/133877 Hello sir, I have improved code for Human Resources as follows: - replaced filter Start Date by Description - overwrite copy() to avoid duplicating o2m field in Appraisal Form - changed sequence of fields in tree view of Timesheet Activities Kindly review it. Thank you. Saurang Suthar -- https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-addons21_hr_imp-ssu/+merge/133877 Your team OpenERP R&D Team is subscribed to branch lp:~openerp-dev/openobject-addons/trunk-addons21_hr_imp-ssu.
=== modified file 'hr_evaluation/hr_evaluation.py' --- hr_evaluation/hr_evaluation.py 2012-11-29 22:26:45 +0000 +++ hr_evaluation/hr_evaluation.py 2012-12-04 11:28:27 +0000 @@ -265,6 +265,15 @@ 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) === modified file 'hr_holidays/hr_holidays_view.xml' --- hr_holidays/hr_holidays_view.xml 2012-11-29 22:26:45 +0000 +++ hr_holidays/hr_holidays_view.xml 2012-12-04 11:28:27 +0000 @@ -43,7 +43,8 @@ <field name="model">hr.holidays</field> <field name="arch" type="xml"> <search string="Search Leave"> - <field name="date_from"/> + <field name="date_from" filter_domain="[('date_from', '>=', self)]"/> + <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"/> @@ -58,6 +59,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'}"/> === modified file 'hr_timesheet/hr_timesheet_view.xml' --- hr_timesheet/hr_timesheet_view.xml 2012-11-29 22:26:45 +0000 +++ hr_timesheet/hr_timesheet_view.xml 2012-12-04 11:28:27 +0000 @@ -7,13 +7,13 @@ <field name="model">hr.analytic.timesheet</field> <field name="arch" type="xml"> <tree editable="bottom" string="Timesheet Activities"> + <field name="name"/> + <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 domain="[('type','=','normal'),('use_timesheets','=',1)]" name="account_id" context="{'default_use_timesheets': 1, 'default_type': 'contract'}"/> <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="amount" sum="Total cost" invisible="1"/> <field name="general_account_id" invisible="1"/>
_______________________________________________ Mailing list: https://launchpad.net/~openerp-dev-gtk Post to : openerp-dev-gtk@lists.launchpad.net Unsubscribe : https://launchpad.net/~openerp-dev-gtk More help : https://help.launchpad.net/ListHelp