[IMP] hr_attendance: added missing action in the wizard for 'Weekly Attendance Report'
bzr revid: mtr@mtr-20110210110735-4wqqa0p42q0ylq57
This commit is contained in:
parent
e45a9dfb4e
commit
ffd85dccc6
|
@ -28,6 +28,8 @@ import pooler
|
||||||
from report.interface import report_rml
|
from report.interface import report_rml
|
||||||
from report.interface import toxml
|
from report.interface import toxml
|
||||||
|
|
||||||
|
import tools
|
||||||
|
|
||||||
one_week = relativedelta(days=7)
|
one_week = relativedelta(days=7)
|
||||||
num2day = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday']
|
num2day = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday']
|
||||||
|
|
||||||
|
@ -58,7 +60,7 @@ class report_custom(report_rml):
|
||||||
<name>%s</name>
|
<name>%s</name>
|
||||||
%%s
|
%%s
|
||||||
</user>
|
</user>
|
||||||
''' % ustr(toxml(emp['name']))
|
''' % tools.ustr(toxml(emp['name']))
|
||||||
while monday != last_monday:
|
while monday != last_monday:
|
||||||
#### Work hour calculation
|
#### Work hour calculation
|
||||||
sql = '''
|
sql = '''
|
||||||
|
|
|
@ -1,6 +1,40 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<openerp>
|
<openerp>
|
||||||
<data>
|
<data>
|
||||||
|
<record id="view_hr_attendance_week" model="ir.ui.view">
|
||||||
|
<field name="name">Attendances Report Weekly</field>
|
||||||
|
<field name="model">hr.attendance.week</field>
|
||||||
|
<field name="type">form</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<form string="Print Attendance Report Weekly">
|
||||||
|
<field name="init_date"/>
|
||||||
|
<field name="end_date"/>
|
||||||
|
<newline/>
|
||||||
|
<separator colspan="4"/>
|
||||||
|
<button special="cancel" string="Cancel" icon='gtk-cancel'/>
|
||||||
|
<button name="print_report" string="Print" type="object" icon="gtk-print"/>
|
||||||
|
</form>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="action_hr_attendance_week" model="ir.actions.act_window">
|
||||||
|
<field name="name">Attendances By Week</field>
|
||||||
|
<field name="type">ir.actions.act_window</field>
|
||||||
|
<field name="res_model">hr.attendance.week</field>
|
||||||
|
<field name="view_type">form</field>
|
||||||
|
<field name="view_mode">form</field>
|
||||||
|
<field name="target">new</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record model="ir.values" id="hr_attendance_week_values">
|
||||||
|
<field name="model_id" ref="hr.model_hr_employee" />
|
||||||
|
<field name="object" eval="1" />
|
||||||
|
<field name="name">Attendances By Week</field>
|
||||||
|
<field name="key2">client_print_multi</field>
|
||||||
|
<field name="value" eval="'ir.actions.act_window,' + str(ref('action_hr_attendance_week'))" />
|
||||||
|
<field name="key">action</field>
|
||||||
|
<field name="model">hr.employee</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
</data>
|
</data>
|
||||||
</openerp>
|
</openerp>
|
||||||
|
|
Loading…
Reference in New Issue