Mua price list template

0
Sửa Đóng Xoá Gắn cờ

V14 - report_action on QWeb Template print a PDF only with one page instead of multiple pages

Sửa Đóng Xoá Gắn cờ
Renaud De Boeck
23 tháng 11 2020
Ngừng theo dõi Đăng ký nhận tin
Thanks for your subscription!
qwebtemplatesreportPDFOdoo14.0

Hey!

In Odoo 14.0, I would like to print a PDF of a qweb template for several models / docs but when I open my PDF, there is only one page with all my docs which are superimposed. I mean, all the content is there but on the same page and not One page for each doc.


datas = {'ids': product_ids}
res = self.env['product.template'].search[[['id', 'in', product_ids]]].read[['name']]
res = res and res[0] or {}
res['template_code'] = code
res['date_start'] = date_start
res['date_end'] = date_end
res['pricelist'] = pricelist
datas['form'] = res
datas['active_model'] = 'product.template'

return self.env.ref[template].report_action[product_ids, data=datas]

This code is called when I press an action and I get a PDF back but as I said, I only get one page with all my products information overlapping each other [5 products names at the same place and so on...]

Do you know how can I print a custom report but with multiple pages?





//Content of my template



Comment Share
Bình luận bài đăng Huỷ bỏ
1 Trả lời
0
Khay Leng
15 tháng 12 2020
Best Answer
I don't know if you got it right. It's because of web.basic_layout. Put it inside *
*.









//Content of my template





Bình luận Share
Bình luận bài đăng Huỷ bỏ

Video liên quan

Chủ Đề