Community mailing list archives

community@mail.odoo.com

Avatar

Re: Type Error while working with report_xlsx module in Odoo10

by
CodeCrax
- 02/12/2017 03:25:33
Hey, Odoo!

Here is another strange thing that I'm encountering when I run a report out in excel using report_xlsx and this is happening only with the report I,e., hr_payroll.report_contributionregister (Payslip Lines by Contribution Register) I mean it's happening for all the reports that are having wizards. And for the reports that are not having any wizards, this is working like a charm.
The error is as follows:

Inline image 1

When I hit the Payslip Lines report, it takes me to a wizard:

Inline image 2

After setting the Date from & Date to and hitting that print button gives me an error like this:

Inline image 3

I'm also putting my code here:

addons/hr_payroll/views/hr_payroll_report.xml

Inline image 1

custom_module/report/xls_report.py

Inline image 2

I'm unable to figure out what's going wrong there. Kindly, please let me know where am I making the mistake. Thanks in advance. In love with report_xlsx

On Wed, Nov 22, 2017 at 11:51 PM, Chowderpally Saiteja <chowderpally.saiteja@gmail.com> wrote:
Hello,

Perfecto! Yes, that solved the problem. I have one last doubt. For every report that I want to print out in .xlsx format I must write code for its formatting on .xlsx report? Or is there any way that I send my report directly to some function which can automatically make formatting ready for xlsx file? Thank you! once again. report_xlsx is one wonderful module that is very much helpful and I appreciate your contribution.

On Wed, Nov 22, 2017 at 8:35 PM, Peiffer, Adrien <adrien.peiffer@acsone.eu> wrote:
Hello,

it seems to come from here:


Can you try to change the name given to the add_worksheet method like 'test' or without name if you have this fix locally

Thanks,

Adrien

Adrien PEIFFER,

Software Engineer

Tel : +352 20 21 10 20
Mobile: +352 691 506 100

Acsone sa/nv
22, Zone Industrielle | L-8287 KEHLEN  | Luxembourg
www.acsone.eu



2017-11-22 15:51 GMT+01:00 Chowderpally Saiteja <chowderpally.saiteja@gmail.com>:
???

On Wed, Nov 22, 2017 at 7:45 PM, Andrew Delve <adelve@rayoman.com> wrote:

On 22 Nov 2017 13:12, "Chowderpally Saiteja" <chowderpally.saiteja@gmail.com> wrote:

Hey, Odoo Community!

This is the issue that I'm facing while I print the report out of Odoo in .xlsx format using the report_xlsx module. Here are the screens showing error.

image

And here is the detailed server log:

image

Here is my code for reference:

my_module/report/file_name.py :
image

my_module/views/templates.xml :

image

Help Needed! Thanks in advance.


--
Thanks & Regards -
Saiteja Chowderpally


_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe




--
Thanks & Regards -
Saiteja Chowderpally


_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe


_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe




--
Thanks & Regards -
Saiteja Chowderpally





--
Thanks & Regards -
Saiteja Chowderpally
Ph: +91 8520830028

Reference