Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
3218 Lượt xem

I am using Openoffice+ base_report_designer module for printing this requirement.

But i dont know how to implement this.. Can any one help me ?

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

In python create function using current date to calculate End of the Current month.

The below link may be useful to Create function in python report file and call in Openoffice

https://accounts.openerp.com/forum/Help-1/question/24462

report \attendance_errors.py

def __init__(self, cr, uid, name, context):
    super(attendance_print, self).__init__(cr, uid, name, context=context)
    self.localcontext.update({
        'time': time,
        'lst': self._lst,
        'total': self._lst_total,
        'get_employees':self._get_employees,
    })

def _get_employees(self, emp_ids):
    emp_obj_list = self.pool.get('hr.employee').browse(self.cr, self.uid, emp_ids)
    return emp_obj_list

report \attendance_errors.sxw file open with openoffice

[[ repeatIn(get_employees(data['form']['emp_ids']),'employee') ]]
Ảnh đại diện
Huỷ bỏ
Tác giả

How can we connect this code to our reports.

Tác giả

eg: get_periods function is defined in the py file for getting the month and call this functin in report like this. [[get_periods(o.value)]] But Error message like this " name 'get_periods' is not defined " (I manually send the report to server.) Place the .rml and .py file in the report folder of hr_attendance module . Then upgrade the module.

Example given in the report/attendance_errors.py updated the code

Tác giả

Or Without using python code. How can we implement this.

Tác giả

report in .ODT format