Hardik Sanchawat (OpenERP) has proposed merging
lp:~openerp-commiter/openobject-addons/trunk-leave-req-imp-dbr-hr-leave-hsa
into lp:~openerp-dev/openobject-addons/trunk-leave-req-imp-dbr.
Requested reviews:
Devishree Brahmbhatt (OpenERP) (dbr-openerp)
For more details, see:
https://code.launchpad.net/~openerp-commiter/openobject-addons/trunk-leave-req-imp-dbr-hr-leave-hsa/+merge/113905
Hello,
I improved view of hr_holidays
as per requirement remove "notes" field.
Thanks
-hsa
--
https://code.launchpad.net/~openerp-commiter/openobject-addons/trunk-leave-req-imp-dbr-hr-leave-hsa/+merge/113905
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-leave-req-imp-dbr.
=== modified file 'hr_holidays/hr_holidays.py'
--- hr_holidays/hr_holidays.py 2012-07-02 14:57:47 +0000
+++ hr_holidays/hr_holidays.py 2012-07-09 05:55:33 +0000
@@ -111,7 +111,7 @@
return result
_columns = {
- 'name': fields.char('Description', required=True, size=64),
+ 'name': fields.text('Description'),
'state': fields.selection([('draft', 'To Submit'), ('cancel', 'Cancelled'),('confirm', 'To Approve'), ('refuse', 'Refused'), ('validate1', 'Second Approval'), ('validate', 'Approved')],
'State', readonly=True, help='The state is set to \'To Submit\', when a holiday request is created.\
\nThe state is \'To Approve\', when holiday request is confirmed by user.\
@@ -125,7 +125,6 @@
#'manager_id': fields.many2one('hr.employee', 'Leave Manager', invisible=False, readonly=True, help='This area is automatically filled by the user who validate the leave'),
#'notes': fields.text('Notes',readonly=True, states={'draft':[('readonly',False)]}),
'manager_id': fields.many2one('hr.employee', 'First Approval', invisible=False, readonly=True, help='This area is automatically filled by the user who validate the leave'),
- 'notes': fields.text('Reasons',readonly=True, states={'draft':[('readonly',False)], 'confirm':[('readonly',False)]}),
'number_of_days_temp': fields.float('Number of Days', readonly=True, states={'draft':[('readonly',False)], 'confirm':[('readonly',False)]}),
'number_of_days': fields.function(_compute_number_of_days, string='Number of Days', store=True),
'case_id': fields.many2one('crm.meeting', 'Meeting'),
@@ -275,7 +274,7 @@
'name': record.name,
'categ_id': record.holiday_status_id.categ_id.id,
'duration': record.number_of_days_temp * 8,
- 'description': record.notes,
+ 'description': record.name,
'user_id': record.user_id.id,
'date': record.date_from,
'end_date': record.date_to,
=== modified file 'hr_holidays/hr_holidays_view.xml'
--- hr_holidays/hr_holidays_view.xml 2012-07-05 09:29:21 +0000
+++ hr_holidays/hr_holidays_view.xml 2012-07-09 05:55:33 +0000
@@ -112,39 +112,35 @@
<sheet string="Leave Request">
<group>
<group>
- <field name="name" attrs="{'readonly':[('state','!=','draft'),('state','!=','confirm')]}"/>
+ <field name="holiday_status_id" on_change="onchange_sec_id(holiday_status_id)" context="{'employee_id':employee_id}"/>
+ <label for="number_of_days_temp" string="Duration"/>
+ <group col="3">
+ <field name="date_from" on_change="onchange_date_from(date_to, date_from)" required="1" nolabel="1" class="oe_online"/>
+ <label string="-"/>
+ <field name="date_to" on_change="onchange_date_from(date_to, date_from)" required="1" nolabel="1" class="oe_online"/>
+ <div>
+ <field name="number_of_days_temp" nolabel="1" class="oe_inline"/>
+ <label string="days" class="oe_inline"/>
+ </div>
+ </group>
+ </group>
+ <group>
<field name="holiday_type" on_change="onchange_type(holiday_type)" attrs="{'readonly':[('state','!=','draft')]}" width="130" string="Mode" groups="base.group_hr_user"/>
<field name="employee_id" attrs="{'required':[('holiday_type','=','employee')],'invisible':[('holiday_type','=','category')]}" groups="base.group_hr_user"/>
<field name="category_id" attrs="{'required':[('holiday_type','=','category')], 'invisible':[('holiday_type','=','employee')], 'readonly':[('state','!=','draft'), ('state','!=','confirm')]}"/>
<field name="department_id" attrs="{'readonly':[('holiday_type','=','category')]}" groups="base.group_hr_user"/>
</group>
- <group>
- <field name="holiday_status_id" on_change="onchange_sec_id(holiday_status_id)" context="{'employee_id':employee_id}"/>
- <label for="number_of_days_temp" string="Duration"/>
- <div>
- <field name="date_from" on_change="onchange_date_from(date_to, date_from)" required="1" class="oe_inline"/> -
- <field name="date_to" on_change="onchange_date_from(date_to, date_from)" required="1" class="oe_inline"/>
- <div>
- <field name="number_of_days_temp" class="oe_inline"/> days
- </div>
- </div>
- </group>
- </group>
- <notebook colspan="4">
- <page string="General">
- <group>
- <group>
- <field name="manager_id" groups="base.group_no_one"/>
- <field name="double_validation" invisible="1"/>
- </group>
- <group>
- <field name="manager_id2" attrs="{'invisible':[('double_validation', '!=', True)]}" groups="base.group_no_one"/>
- </group>
- </group>
- <newline/>
- <field name="notes" nolabel="1" colspan="4" placeholder="Add a reason..."/>
- </page>
- </notebook>
+ </group>
+ <group>
+ <group>
+ <field name="double_validation" invisible="1"/>
+ </group>
+ <group>
+ <field name="manager_id2" attrs="{'invisible':[('double_validation', '!=', True)]}" groups="base.group_no_one"/>
+ </group>
+ </group>
+ <newline/>
+ <field name="name" attrs="{'readonly':[('state','!=','draft'),('state','!=','confirm')]}"/>
</sheet>
<footer>
<field name="message_ids" colspan="4" widget="mail_thread" nolabel="1"/>
@@ -171,27 +167,21 @@
<sheet>
<group>
<group>
- <field name="name"/>
+ <field name="holiday_status_id" on_change="onchange_sec_id(holiday_status_id)" context="{'employee_id':employee_id}"/>
+ <field name="number_of_days_temp"/>
+ </group>
+ <group>
<field name="holiday_type" on_change="onchange_type(holiday_type)" attrs="{'readonly':[('state','!=','draft')]}" string="Allocation Mode" groups="base.group_hr_manager"/>
<field name="employee_id" attrs="{'required':[('holiday_type','=','employee')], 'invisible':[('holiday_type','=','category')]}"/>
<field name="category_id" attrs="{'required':[('holiday_type','=','category')], 'readonly':[('state','!=','draft')], 'invisible':[('holiday_type','=','employee')]}"/>
<field name="department_id" attrs="{'readonly':['|', ('holiday_type','=','category'), ('state','not in' ,('draft', 'confirm'))]}"/>
</group>
- <group>
- <field name="holiday_status_id" on_change="onchange_sec_id(holiday_status_id)" context="{'employee_id':employee_id}"/>
- <field name="number_of_days_temp"/>
- </group>
- </group>
- <notebook>
- <page string="General">
- <group col="4">
- <field name="double_validation" invisible="1"/>
- <field name="manager_id"/>
- <field name="manager_id2" attrs="{'invisible':[('double_validation', '!=', True)]}"/>
- </group>
- <field name="notes" placeholder="Add a reason..."/>
- </page>
- </notebook>
+ </group>
+ <group>
+ <field name="double_validation" invisible="1"/>
+ <field name="manager_id2" attrs="{'invisible':[('double_validation', '!=', True)]}"/>
+ </group>
+ <field name="name"/>
</sheet>
<footer>
<field name="message_ids" colspan="4" widget="mail_thread" nolabel="1"/>
@@ -237,7 +227,6 @@
<field name="state"/>
</header>
<group col="4">
- <field name="name"/>
<field name="holiday_status_id"/>
<field name="type"/>
<field name="date_from" on_change="onchange_date_from(date_to, date_from)" attrs="{'readonly':[('type','=','add')], 'required':[('type','=','remove')]}"/>
@@ -245,7 +234,7 @@
<field name="number_of_days_temp"/>
<field name="manager_id"/>
</group>
- <field name="notes"/>
+ <field name="name"/>
</form>
</field>
</record>
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp