Unknown report type: xlsx: - Odoo 10











up vote
0
down vote

favorite












I am trying to create an xlsx report. I tried below code but getting an error:




Traceback (most recent call last):
File "/home/shar/Projects/git/odoo/addons/web/controllers/main.py", line 72, in wrap
return f(*args, **kwargs)
File "/home/shar/Projects/git/odoo/addons/web/controllers/main.py", line 1485, in index
request.session.db, request.session.uid, request.session.password, report_id])
File "/home/shar/Projects/git/odoo/odoo/http.py", line 118, in dispatch_rpc
result = dispatch(method, params)
File "/home/shar/Projects/git/odoo/odoo/service/report.py", line 35, in dispatch
res = fn(db, uid, *params)
File "/home/shar/Projects/git/odoo/odoo/service/report.py", line 142, in exp_report_get
return _check_report(report_id)
File "/home/shar/Projects/git/odoo/odoo/service/report.py", line 120, in _check_report
raise UserError('%s: %s' % (exc.message, exc.traceback))
UserError: (u"Unknown report type: xlsx: (, NotImplementedError(u'Unknown report type: xlsx',), )", '')




Here is my code:



*.py



# -*- coding: utf-8 -*-
from odoo.addons.report_xlsx.report.report_xlsx import ReportXlsx

class PartnerXlsx(ReportXlsx):

def generate_xlsx_report(self, workbook, data, partners):
for obj in partners:
report_name = obj.name
# One sheet by partner
sheet = workbook.add_worksheet(report_name[:31])
bold = workbook.add_format({'bold': True})
sheet.write(0, 0, obj.name, bold)


PartnerXlsx('report.module_name.res.partner.xlsx',
'res.partner')


*.xml



  <report
id="partner_xlsx"
model="res.partner"
string="Print to XLSX"
report_type="xlsx"
name="res.partner.xlsx"
file="res.partner.xlsx"
attachment_use="False"
/>









share|improve this question


























    up vote
    0
    down vote

    favorite












    I am trying to create an xlsx report. I tried below code but getting an error:




    Traceback (most recent call last):
    File "/home/shar/Projects/git/odoo/addons/web/controllers/main.py", line 72, in wrap
    return f(*args, **kwargs)
    File "/home/shar/Projects/git/odoo/addons/web/controllers/main.py", line 1485, in index
    request.session.db, request.session.uid, request.session.password, report_id])
    File "/home/shar/Projects/git/odoo/odoo/http.py", line 118, in dispatch_rpc
    result = dispatch(method, params)
    File "/home/shar/Projects/git/odoo/odoo/service/report.py", line 35, in dispatch
    res = fn(db, uid, *params)
    File "/home/shar/Projects/git/odoo/odoo/service/report.py", line 142, in exp_report_get
    return _check_report(report_id)
    File "/home/shar/Projects/git/odoo/odoo/service/report.py", line 120, in _check_report
    raise UserError('%s: %s' % (exc.message, exc.traceback))
    UserError: (u"Unknown report type: xlsx: (, NotImplementedError(u'Unknown report type: xlsx',), )", '')




    Here is my code:



    *.py



    # -*- coding: utf-8 -*-
    from odoo.addons.report_xlsx.report.report_xlsx import ReportXlsx

    class PartnerXlsx(ReportXlsx):

    def generate_xlsx_report(self, workbook, data, partners):
    for obj in partners:
    report_name = obj.name
    # One sheet by partner
    sheet = workbook.add_worksheet(report_name[:31])
    bold = workbook.add_format({'bold': True})
    sheet.write(0, 0, obj.name, bold)


    PartnerXlsx('report.module_name.res.partner.xlsx',
    'res.partner')


    *.xml



      <report
    id="partner_xlsx"
    model="res.partner"
    string="Print to XLSX"
    report_type="xlsx"
    name="res.partner.xlsx"
    file="res.partner.xlsx"
    attachment_use="False"
    />









    share|improve this question
























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I am trying to create an xlsx report. I tried below code but getting an error:




      Traceback (most recent call last):
      File "/home/shar/Projects/git/odoo/addons/web/controllers/main.py", line 72, in wrap
      return f(*args, **kwargs)
      File "/home/shar/Projects/git/odoo/addons/web/controllers/main.py", line 1485, in index
      request.session.db, request.session.uid, request.session.password, report_id])
      File "/home/shar/Projects/git/odoo/odoo/http.py", line 118, in dispatch_rpc
      result = dispatch(method, params)
      File "/home/shar/Projects/git/odoo/odoo/service/report.py", line 35, in dispatch
      res = fn(db, uid, *params)
      File "/home/shar/Projects/git/odoo/odoo/service/report.py", line 142, in exp_report_get
      return _check_report(report_id)
      File "/home/shar/Projects/git/odoo/odoo/service/report.py", line 120, in _check_report
      raise UserError('%s: %s' % (exc.message, exc.traceback))
      UserError: (u"Unknown report type: xlsx: (, NotImplementedError(u'Unknown report type: xlsx',), )", '')




      Here is my code:



      *.py



      # -*- coding: utf-8 -*-
      from odoo.addons.report_xlsx.report.report_xlsx import ReportXlsx

      class PartnerXlsx(ReportXlsx):

      def generate_xlsx_report(self, workbook, data, partners):
      for obj in partners:
      report_name = obj.name
      # One sheet by partner
      sheet = workbook.add_worksheet(report_name[:31])
      bold = workbook.add_format({'bold': True})
      sheet.write(0, 0, obj.name, bold)


      PartnerXlsx('report.module_name.res.partner.xlsx',
      'res.partner')


      *.xml



        <report
      id="partner_xlsx"
      model="res.partner"
      string="Print to XLSX"
      report_type="xlsx"
      name="res.partner.xlsx"
      file="res.partner.xlsx"
      attachment_use="False"
      />









      share|improve this question













      I am trying to create an xlsx report. I tried below code but getting an error:




      Traceback (most recent call last):
      File "/home/shar/Projects/git/odoo/addons/web/controllers/main.py", line 72, in wrap
      return f(*args, **kwargs)
      File "/home/shar/Projects/git/odoo/addons/web/controllers/main.py", line 1485, in index
      request.session.db, request.session.uid, request.session.password, report_id])
      File "/home/shar/Projects/git/odoo/odoo/http.py", line 118, in dispatch_rpc
      result = dispatch(method, params)
      File "/home/shar/Projects/git/odoo/odoo/service/report.py", line 35, in dispatch
      res = fn(db, uid, *params)
      File "/home/shar/Projects/git/odoo/odoo/service/report.py", line 142, in exp_report_get
      return _check_report(report_id)
      File "/home/shar/Projects/git/odoo/odoo/service/report.py", line 120, in _check_report
      raise UserError('%s: %s' % (exc.message, exc.traceback))
      UserError: (u"Unknown report type: xlsx: (, NotImplementedError(u'Unknown report type: xlsx',), )", '')




      Here is my code:



      *.py



      # -*- coding: utf-8 -*-
      from odoo.addons.report_xlsx.report.report_xlsx import ReportXlsx

      class PartnerXlsx(ReportXlsx):

      def generate_xlsx_report(self, workbook, data, partners):
      for obj in partners:
      report_name = obj.name
      # One sheet by partner
      sheet = workbook.add_worksheet(report_name[:31])
      bold = workbook.add_format({'bold': True})
      sheet.write(0, 0, obj.name, bold)


      PartnerXlsx('report.module_name.res.partner.xlsx',
      'res.partner')


      *.xml



        <report
      id="partner_xlsx"
      model="res.partner"
      string="Print to XLSX"
      report_type="xlsx"
      name="res.partner.xlsx"
      file="res.partner.xlsx"
      attachment_use="False"
      />






      odoo xlsx odoo-10






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 7 at 10:54









      KbiR

      2,25411235




      2,25411235
























          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          We don't have a report_type as xlsx format



          we have only qweb-pdf,qweb-html,controller



          report_type will accept anyone of these (qweb-pdf,qweb-html,controller)



          It does not have xlsx as such



          Please refer 'ir.actions.report.xml' class for further reference






          share|improve this answer





















          • Could you check report_xlsx module available in odoo app store?
            – KbiR
            Nov 8 at 6:55










          • Have you given dependency?
            – sfx
            Nov 8 at 7:13












          • Yes, i have added
            – KbiR
            Nov 8 at 8:36











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














           

          draft saved


          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53188069%2funknown-report-type-xlsx-odoo-10%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          0
          down vote













          We don't have a report_type as xlsx format



          we have only qweb-pdf,qweb-html,controller



          report_type will accept anyone of these (qweb-pdf,qweb-html,controller)



          It does not have xlsx as such



          Please refer 'ir.actions.report.xml' class for further reference






          share|improve this answer





















          • Could you check report_xlsx module available in odoo app store?
            – KbiR
            Nov 8 at 6:55










          • Have you given dependency?
            – sfx
            Nov 8 at 7:13












          • Yes, i have added
            – KbiR
            Nov 8 at 8:36















          up vote
          0
          down vote













          We don't have a report_type as xlsx format



          we have only qweb-pdf,qweb-html,controller



          report_type will accept anyone of these (qweb-pdf,qweb-html,controller)



          It does not have xlsx as such



          Please refer 'ir.actions.report.xml' class for further reference






          share|improve this answer





















          • Could you check report_xlsx module available in odoo app store?
            – KbiR
            Nov 8 at 6:55










          • Have you given dependency?
            – sfx
            Nov 8 at 7:13












          • Yes, i have added
            – KbiR
            Nov 8 at 8:36













          up vote
          0
          down vote










          up vote
          0
          down vote









          We don't have a report_type as xlsx format



          we have only qweb-pdf,qweb-html,controller



          report_type will accept anyone of these (qweb-pdf,qweb-html,controller)



          It does not have xlsx as such



          Please refer 'ir.actions.report.xml' class for further reference






          share|improve this answer












          We don't have a report_type as xlsx format



          we have only qweb-pdf,qweb-html,controller



          report_type will accept anyone of these (qweb-pdf,qweb-html,controller)



          It does not have xlsx as such



          Please refer 'ir.actions.report.xml' class for further reference







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 8 at 6:41









          sfx

          1,235816




          1,235816












          • Could you check report_xlsx module available in odoo app store?
            – KbiR
            Nov 8 at 6:55










          • Have you given dependency?
            – sfx
            Nov 8 at 7:13












          • Yes, i have added
            – KbiR
            Nov 8 at 8:36


















          • Could you check report_xlsx module available in odoo app store?
            – KbiR
            Nov 8 at 6:55










          • Have you given dependency?
            – sfx
            Nov 8 at 7:13












          • Yes, i have added
            – KbiR
            Nov 8 at 8:36
















          Could you check report_xlsx module available in odoo app store?
          – KbiR
          Nov 8 at 6:55




          Could you check report_xlsx module available in odoo app store?
          – KbiR
          Nov 8 at 6:55












          Have you given dependency?
          – sfx
          Nov 8 at 7:13






          Have you given dependency?
          – sfx
          Nov 8 at 7:13














          Yes, i have added
          – KbiR
          Nov 8 at 8:36




          Yes, i have added
          – KbiR
          Nov 8 at 8:36


















           

          draft saved


          draft discarded



















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53188069%2funknown-report-type-xlsx-odoo-10%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          這個網誌中的熱門文章

          Xamarin.form Move up view when keyboard appear

          Post-Redirect-Get with Spring WebFlux and Thymeleaf

          Anylogic : not able to use stopDelay()