openerp-dev-web team mailing list archive
-
openerp-dev-web team
-
Mailing list archive
-
Message #07607
lp:~openerp-dev/openobject-addons/trunk-configuration-rework-holidays-imprv-aag into lp:~openerp-dev/openobject-addons/trunk-configuration-rework
Atik Agewan(OpenERP) has proposed merging lp:~openerp-dev/openobject-addons/trunk-configuration-rework-holidays-imprv-aag into lp:~openerp-dev/openobject-addons/trunk-configuration-rework.
Requested reviews:
Rucha (Open ERP) (rpa-openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-configuration-rework-holidays-imprv-aag/+merge/62663
Hello
hr_holiday:rename column "remaining leaves" into "remaining legal leaves",
raise an error if there is not 1 leave type with "allow to override limit" = False
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-configuration-rework-holidays-imprv-aag/+merge/62663
Your team OpenERP R&D Team is subscribed to branch lp:~openerp-dev/openobject-addons/trunk-configuration-rework.
=== modified file 'hr_holidays/hr_holidays.py'
--- hr_holidays/hr_holidays.py 2011-05-12 12:39:20 +0000
+++ hr_holidays/hr_holidays.py 2011-05-27 12:34:21 +0000
@@ -333,6 +333,8 @@
holiday_obj = self.pool.get('hr.holidays')
# Find for holidays status
status_ids = type_obj.search(cr, uid, [('limit', '=', False)], context=context)
+ if len(status_ids) != 1 :
+ raise osv.except_osv(('warning !'),_("You should have only one leave type without allowing override limit, %s Found !") % (len(status_ids)))
status_id = status_ids and status_ids[0] or False
if not status_id or diff <= 0:
return False
=== modified file 'hr_holidays/hr_holidays_data.xml'
--- hr_holidays/hr_holidays_data.xml 2011-04-07 09:27:30 +0000
+++ hr_holidays/hr_holidays_data.xml 2011-05-27 12:34:21 +0000
@@ -5,7 +5,6 @@
<!-- Casual leave -->
<record model="hr.holidays.status" id="holiday_status_cl">
<field name="name">Legal Leaves</field>
- <field name="limit">False</field>
<field name="color_name">black</field>
</record>
@@ -20,7 +19,7 @@
<!-- Compensatory Days -->
<record model="hr.holidays.status" id="holiday_status_comp">
<field name="name">Compensatory Days</field>
- <field name="limit">False</field>
+ <field name="limit">True</field>
<field name="color_name">brown</field>
</record>
=== modified file 'hr_holidays/hr_holidays_view.xml'
--- hr_holidays/hr_holidays_view.xml 2011-05-12 12:39:20 +0000
+++ hr_holidays/hr_holidays_view.xml 2011-05-27 12:34:21 +0000
@@ -451,7 +451,7 @@
<field name="arch" type="xml">
<tree string="Assign Leaves" editable="top">
<field name="name" string="Employee"/>
- <field name="remaining_leaves"/>
+ <field name="remaining_leaves" string="Remaining Legal Leaves"/>
</tree>
</field>
</record>
Follow ups