Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
3333 Переглядів

Hello everybody!!!!!!

I am creating a new report to print in odoo9.

In fact, i want to print the payslip for a group of employees.

The problem is that the loop that i have maid is browsing the data of the employees and showing them in the same time.

which means that in the payslip of the first employee i found all the data of the other employees.

SO that, i  want to correct the loop. 

here is the function:

def get_payslip_lines(self, obj):

payslip_line = self.pool.get('hr.payslip.line')

res = []

ids = []

for id in range(len(obj)):

if obj[id].appears_on_payslip is True:

ids.append(obj[id].id)

if ids:

res = payslip_line.browse(self.cr, self.uid, ids)

return res

And the xml:

           <tr t-foreach="get_payslip_lines(o.line_ids)" t-as="p">


Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
0
січ. 25
1379
1
бер. 25
652
1
вер. 23
2634
Favorite filter Odoo 10 Вирішено
2
серп. 22
7762
8
черв. 20
21861