Odoo Help

0
2 Answers
1
Avatar

Manish Kumar Bohra

--Manish Kumar Bohra--

1233
| 5 3 8
Bikaner, India
--Manish Kumar Bohra--


Manish Kumar Bohra
12/10/18, 4:22 AM

Hello,

Check below code for how to create xls report

class SalesXlsx(ReportXlsx):

    def generate_xlsx_report(self, workbook, data, sales_order):
        sheet = workbook.add_worksheet('Sales Customer Report')
        bold = workbook.add_format({'bold': True})
        sheet.write(0, 0, 'Customer', bold)
        sheet.write(0, 1, 'Number', bold)
        for index, obj in enumerate(rental):
            index = index+1
            if obj.partner_id:sheet.write(index, 0, obj.partner_id)
            if obj.telephone:sheet.write(index, 1, obj.telephone)
           
RentalXlsx('sale.order.xlsx', 'sale.order')


May Be it's help you.

0
Gagandeep Kaur
12/14/18, 5:19 AM

same error

Error:
TypeError: this.do_execute_action(...) is undefined

http://localhost:8069/web/content/1960-cc3f4ba/web.assets_backend.js:469
Traceback:
execute_action@http://localhost:8069/web/content/1960-cc3f4ba/web.assets_backend.js:469:620
proxy/<@http://localhost:8069/web/content/1723-e9a3b9f/web.assets_common.js:3923:8
trigger@http://localhost:8069/web/content/1723-e9a3b9f/web.assets_common.js:3921:166
_trigger_up@http://localhost:8069/web/content/1723-e9a3b9f/web.assets_common.js:3927:340
_trigger_up@http://localhost:8069/web/content/1723-e9a3b9f/web.assets_common.js:3927:442
trigger_up@http://localhost:8069/web/content/1723-e9a3b9f/web.assets_common.js:3927:275
_callButtonAction@http://localhost:8069/web/content/1960-cc3f4ba/web.assets_backend.js:1310:1689
saveAndExecuteAction/<@http://localhost:8069/web/content/1960-cc3f4ba/web.assets_backend.js:1412:648
then/</</<@http://localhost:8069/web/content/1723-e9a3b9f/web.assets_common.js:802:678
fire@http://localhost:8069/web/content/1723-e9a3b9f/web.assets_common.js:796:281
add@http://localhost:8069/web/content/1723-e9a3b9f/web.assets_common.js:797:467
then/</<@http://localhost:8069/web/content/1723-e9a3b9f/web.assets_common.js:802:649
each@http://localhost:8069/web/content/1723-e9a3b9f/web.assets_common.js:625:758
then/<@http://localhost:8069/web/content/1723-e9a3b9f/web.assets_common.js:802:553
Deferred@http://localhost:8069/web/content/1723-e9a3b9f/web.assets_common.js:803:189
then@http://localhost:8069/web/content/1723-e9a3b9f/web.assets_common.js:802:518
saveAndExecuteAction@http://localhost:8069/web/content/1960-cc3f4ba/web.assets_backend.js:1412:577
_onButtonClicked@http://localhost:8069/web/content/1960-cc3f4ba/web.assets_backend.js:1413:340
proxy/<@http://localhost:8069/web/content/1723-e9a3b9f/web.assets_common.js:3923:8
trigger@http://localhost:8069/web/content/1723-e9a3b9f/web.assets_common.js:3921:166
_trigger_up@http://localhost:8069/web/content/1723-e9a3b9f/web.assets_common.js:3927:340
_trigger_up@http://localhost:8069/web/content/1723-e9a3b9f/web.assets_common.js:3927:442
trigger_up@http://localhost:8069/web/content/1723-e9a3b9f/web.assets_common.js:3927:275
_addOnClickAction/<@http://localhost:8069/web/content/1960-cc3f4ba/web.assets_backend.js:1372:329
dispatch@http://localhost:8069/web/content/1723-e9a3b9f/web.assets_common.js:892:378
add/elemData.handle@http://localhost:8069/web/content/1723-e9a3b9f/web.assets_common.js:865:151

Ask a Question
Keep Informed
1 follower(s)
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register
Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now