Bỏ qua để đến Nội dung
Odoo Menu
  • Đăng nhập
  • Dùng thử miễn phí
  • Ứng dụng
    Tài chính
    • Kế toán
    • Hóa đơn
    • Chi phí
    • Bảng tính (BI)
    • Tài liệu
    • Ký tên
    Bán hàng
    • CRM
    • Bán hàng
    • POS Cửa hàng
    • POS Nhà hàng
    • Đăng ký
    • Cho thuê
    Trang web
    • Trình tạo trang web
    • Thương mại điện tử
    • Blog
    • Diễn đàn
    • Trò chuyện trực tiếp
    • Học trực tuyến
    Chuỗi cung ứng
    • Tồn kho
    • Sản xuất
    • PLM
    • Mua hàng
    • Bảo dưỡng
    • Chất lượng
    Nhân sự
    • Nhân viên
    • Tuyển dụng
    • Ngày nghỉ
    • Đánh giá
    • Giới thiệu
    • Đội xe
    Marketing
    • Marketing trên MXH
    • Marketing qua email
    • Marketing qua SMS
    • Sự kiện
    • Tự động hóa Marketing
    • Khảo sát
    Dịch vụ
    • Dự án
    • Bảng chấm công
    • Dịch vụ hiện trường
    • Hỗ trợ
    • Kế hoạch
    • Lịch hẹn
    Năng suất
    • Thảo luận
    • Phê duyệt
    • IoT
    • VoIP
    • Kiến thức
    • WhatsApp
    Ứng dụng của bên thứ ba Studio Odoo Nền tảng Đám mây Odoo
  • Ngành
    Bán lẻ
    • Nhà sách
    • Cửa hàng quần áo
    • Cửa hàng nội thất
    • Cửa hàng tạp hóa
    • Cửa hàng đồ kim khí
    • Cửa hàng đồ chơi
    Ẩm thực & Dịch vụ lưu trú
    • Bar và quán rượu
    • Nhà hàng
    • Đồ ăn nhanh
    • Guest house
    • Nhà phân phối đồ uống
    • Khách sạn
    Bất động sản
    • Công ty môi giới bất động sản
    • Công ty kiến trúc
    • Xây dựng
    • Quản lý bất động sản
    • Làm vườn
    • Hiệp hội chủ sở hữu bất động sản
    Tư vấn
    • Công ty kế toán
    • Đối tác Odoo
    • Công ty marketing
    • Công ty luật
    • Tuyển dụng
    • Thanh tra & chứng nhận
    Sản xuất
    • Dệt may
    • Kim loại
    • Nội thất
    • Ẩm thực
    • Nhà máy bia
    • Quà tặng doanh nghiệp
    Sức khoẻ & fitness
    • CLB thể thao
    • Cửa hàng kính mắt
    • Trung tâm fitness
    • Chuyên gia chăm sóc sức khỏe
    • Hiệu thuốc
    • Tiệm làm tóc
    Thương mại
    • Dịch vụ sửa chữa
    • Phần cứng CNTT & Hỗ trợ
    • Hệ thống năng lượng mặt trời
    • Công ty sản xuất giày
    • Dịch vụ vệ sinh
    • Dịch vụ HVAC
    Khác
    • Tổ chức phi lợi nhuận
    • Cơ quan môi trường
    • Cho thuê biển quảng cáo
    • Nhiếp ảnh
    • Cho thuê xe đạp
    • Đại lý phần mềm
    Xem tất cả ngành
  • Cộng đồng
    Học tập
    • Khóa học
    • Tài liệu
    • Chứng chỉ
    • Đào tạo
    • Blog
    • Podcast
    Thúc đẩy đào tạo
    • Chương trình đào tạo
    • Trò chơi kinh doanh Scale Up!
    • Tham quan Odoo
    Nhận phần mềm
    • Tải xuống
    • So sánh các phiên bản
    • Phiên bản
    Hợp tác
    • Github
    • Diễn đàn
    • Sự kiện
    • Dịch thuật
    • Trở thành đối tác
    • Dịch vụ dành cho Đối tác
    • Đăng ký công ty kế toán của bạn
    Nhận dịch vụ
    • Tìm đối tác
    • Tìm kế toán
    • Gặp chuyên gia hỗ trợ
    • Dịch vụ Triển khai
    • Khách hàng tham khảo
    • Hỗ trợ
    • Nâng cấp
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Nhận một buổi demo
  • Bảng giá
  • Trợ giúp

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Kế toán
  • Tồn kho
  • PoS
  • Dự án
  • MRP
All apps
Bạn cần phải đăng ký để tương tác với cộng đồng.
Tất cả bài viết Người Huy hiệu
Thẻ (Xem tất cả)
odoo accounting v14 pos v15
Về diễn đàn này
Bạn cần phải đăng ký để tương tác với cộng đồng.
Tất cả bài viết Người Huy hiệu
Thẻ (Xem tất cả)
odoo accounting v14 pos v15
Về diễn đàn này
Hỗ trợ

Unexpected behaviour when installing custom module with reports

Đăng ký nhận tin

Nhận thông báo khi có hoạt động trên bài viết này

Câu hỏi này đã bị gắn cờ
errorqwebtemplatesreportqweb template view
3218 Lượt xem
Ảnh đại diện
Adrian Schultze

Hey there,


I have a functioning custom module with a bunch of different reports, depending on a specific condition. All reports are identical, except for the name, id, string, file. Each report has it's own template. Here is one example report:


<?xml version="1.0" encoding="utf-8"?>

<odoo>


  <report

    id="report_licence_certificate_ecovin"

    model="res.partner"

    report_type="qweb-pdf"

    string="Licence Certificate Ecovin"

    name="vlabel.report_licence_certificate_ecovin"

    file="vlabel.report_licence_certificate_ecovin"

    paperformat="vlabel.paperformat_licence_certificate"

  />


  <template id="report_licence_certificate_ecovin">

    <t t-call="web.html_container">

      <t t-foreach="docs" t-as="o">

        <t t-call="web.external_layout">

          <div class="page remove-margins">

            <div class="certificate-header"></div>

            <img src='/vlabel/static/src/img/index.png' class="vegan-img" />

            <div class="body body-margins text-center">

              <t t-if="o">

                <div>

                  <h1 class="vlabel-g-text">LICENCE CERTIFICATE</h1>

                  <p>The following Products by</p>

                  <h2><span t-field="o.name"/></h2>

                  <p>are offically licenced according to V-Label</p>

                </div>

                <div>

                  <table class="table table-bordered" style="font-size:11px !important;">

                    <thead class="font-weight-bold">

                      <td>Name</td>

                      <td>GTIN</td>

                      <td>Article Nr</td>

                      <td>Recipe Nr</td>

                      <td>Licence Nr</td>

                      <td>Category</td>

                      <td>Customer</td>

                      <td>Valid until</td>

                    </thead>

                    <t t-foreach="o.products" t-as="field">

                      <t t-if="(field.state == 'layout_done' or

                              field.state == 'certificate_send')">

                        <t t-if="(field.retailer_new.name == 'Ecovin')">

                          <tr>

                            <td><span t-field="field.name"/></td>

                            <td><span t-field="field.gtin"/></td>

                            <td><span t-field="field.article_number"/></td>

                            <td><span t-field="field.recipe_number"/></td>

                            <td><span t-field="field.licence_number"/></td>

                            <td><span t-field="field.veg_category"/></td>

                            <t t-if="field.retailer_new">

                              <td><span t-field="field.retailer_new"/></td>

                            </t>

                            <t t-else="">

                              <td><span t-field="field.related_company"/></td>

                            </t>

                            <td><span t-field="field.licence_valid_until"/></td>

                          </tr>

                        </t>

                      </t>

                    </t>

                  </table>

                </div>

              </t>

            </div>

            <div class="footer remove-margins d-flex justify-content-between certificate-footer">

              <div>

                <ul class="list-unstyled p-3" style="margin-right:250px;margin-left:100px;">

                  <li>ProVeg e. V.</li>

                  <li>Sebastian Joy, Vorsitzender</li>

                  <li>Thomas Schönberger, Stellv. Vorsitzender</li>

                </ul>

              </div>

              <div>

                <ul class="list-unstyled p-3 link">

                  <li>Fon +49 30303030</li>

                  <li>Fax</li>

                  <li>www.v-label.eu/de</li>

                </ul>

              </div>

            </div>

          </div>

        </t>

      </t>

    </t>

  </template>


</odoo>


When installing my module, I call all the reports in my manifest file:

'data': [

        # 'security/account_security.xml',

        'security/ir.model.access.csv',

        'wizards/offer_rejected_views.xml',

        'wizards/product_unlisted_views.xml',

        'wizards/create_certificate_views.xml',

        'reports/licence_certificate_paperformat.xml',

        'reports/new_header.xml',

        'data/send_reminder.xml',

        'data/licence_number_sequence.xml',

        'data/production_site_sequence.xml',

        'data/audit_sequence.xml',

        'data/mail_checking_questions.xml',

        'views/vlabel.xml',

        'views/dashboard.xml',

        'views/company.xml',

        'views/product.xml',

        'views/audit.xml',

        'views/production_site.xml',

        'views/ingredient.xml',

        # 'views/invoice.xml',

        'views/retailer.xml',

        'views/supplier.xml',

        'reports/licence_certificate_from_products.xml',

        'reports/licence_offer.xml',

        'reports/licence_certificate.xml',

        'data/mail_send_offer.xml',

        'data/mail_licencing_finalized.xml',

        'reports/licence_certificate_budni.xml',

        'reports/licence_certificate_kaufland.xml',

        'reports/licence_certificate_norma.xml',

        'reports/licence_certificate_lidl.xml',

        'reports/licence_certificate_penny.xml',

        'reports/licence_certificate_netto_md.xml',

        'reports/licence_certificate_edeka.xml',

        'reports/licence_certificate_rewe.xml',

        'reports/licence_certificate_dm_bio.xml',

        # 'reports/licence_certificate_ecovin.xml',

        # 'reports/licence_certificate_aldi_nord.xml',

        # 'reports/licence_certificate_aldi_sued.xml',

    ],


Now, for some reason, I can not for the life of me install the last three reports. I get different errors, for example:


2020-12-22 16:49:56,267 11858 INFO 000011111000 odoo.addons.base.models.ir_ui_view: Element '<field name="groups_id">' cannot be located in parent view

Error context:

View `res.users.groups`

[view_id: 160, xml_id: base.user_groups_view, model: res.users, parent_id: 156] 

2020-12-22 16:49:56,270 11858 WARNING 000011111000 odoo.modules.loading: Transient module states were reset 

2020-12-22 16:49:56,281 11858 ERROR 000011111000 odoo.modules.registry: Failed to load registry 

Traceback (most recent call last):

  File "/opt/odoo/odoo13/odoo/addons/base/models/ir_ui_view.py", line 664, in apply_inheritance_specs

    pre_locate=pre_locate)

  File "/opt/odoo/odoo13/odoo/tools/template_inheritance.py", line 230, in apply_inheritance_specs

    _("Element '%s' cannot be located in parent view") % tag

ValueError: Element '<field name="groups_id">' cannot be located in parent view


or this one:
2020-12-22 16:51:30,232 12124 INFO 000011111000 odoo.addons.base.models.ir_ui_view: Element '<xpath expr="//tree">' cannot be located in parent view

Error context:
View `res.users.tree.inherit`
[view_id: 337, xml_id: auth_signup.view_users_state_tree, model: res.users, parent_id: 157] 
2020-12-22 16:51:30,235 12124 WARNING 000011111000 odoo.modules.loading: Transient module states were reset 
2020-12-22 16:51:30,237 12124 ERROR 000011111000 odoo.modules.registry: Failed to load registry 
Traceback (most recent call last):
  File "/opt/odoo/odoo13/odoo/addons/base/models/ir_ui_view.py", line 664, in apply_inheritance_specs
    pre_locate=pre_locate)
  File "/opt/odoo/odoo13/odoo/tools/template_inheritance.py", line 230, in apply_inheritance_specs
    _("Element '%s' cannot be located in parent view") % tag
ValueError: Element '<xpath expr="//tree">' cannot be located in parent view

or this one


2020-12-22 16:55:45,515 12728 INFO 00220022 odoo.addons.base.models.ir_ui_view: Element '<t t-name="vlabel.report_licence_certificate">' cannot be located in parent view


Error context:

View `res.company.form`

[view_id: 109, xml_id: base.view_company_form, model: res.company, parent_id: n/a] 

2020-12-22 16:55:45,524 12728 WARNING 00220022 odoo.modules.loading: Transient module states were reset 

2020-12-22 16:55:45,526 12728 ERROR 00220022 odoo.modules.registry: Failed to load registry 

Traceback (most recent call last):

  File "/opt/odoo/odoo13/odoo/addons/base/models/ir_ui_view.py", line 664, in apply_inheritance_specs

    pre_locate=pre_locate)

  File "/opt/odoo/odoo13/odoo/tools/template_inheritance.py", line 230, in apply_inheritance_specs

    _("Element '%s' cannot be located in parent view") % tag

ValueError: Element '<t t-name="vlabel.report_licence_certificate">' cannot be located in parent view


I am really lost, all reports are as I said identical except for the if clause in the template id and the before mentioned fields. Any help is appreciated, maybe I can call the templates differently all together?



0
Ảnh đại diện
Huỷ bỏ
Bạn có hứng thú với cuộc thảo luận không? Đừng chỉ đọc, hãy tham gia nhé!

Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!

Đăng ký
Bài viết liên quan Trả lời Lượt xem Hoạt động
QWeb format text and field in same line Đã xử lý
qweb templates report odooV8
Ảnh đại diện
Ảnh đại diện
1
thg 12 23
19877
Error in creating a custom paperformat Đã xử lý
qweb templates report paperformat
Ảnh đại diện
Ảnh đại diện
1
thg 8 17
7597
Insert a pdf file/page into the qweb report view template
pdf view qweb templates report
Ảnh đại diện
Ảnh đại diện
Ảnh đại diện
3
thg 4 25
3340
How to set a page in landscape orientation in a portrait report template? (Odoo 16)
qweb templates report landscape odoo16
Ảnh đại diện
Ảnh đại diện
Ảnh đại diện
2
thg 5 24
3768
How to set a page in landscape orientation in a portrait report template? (Odoo 16)
qweb templates report landscape odoo16features
Ảnh đại diện
0
thg 5 24
55
Cộng đồng
  • Khóa học
  • Tài liệu
  • Diễn đàn
Open source
  • Tải xuống
  • Github
  • Runbot
  • Dịch thuật
Dịch vụ
  • Lưu trữ Odoo.sh
  • Hỗ trợ
  • Nâng cấp
  • Phát triển tùy chỉnh
  • Đào tạo
  • Tìm kế toán
  • Tìm đối tác
  • Trở thành đối tác
Giới thiệu công ty
  • Công ty của chúng tôi
  • Tài sản thương hiệu
  • Liên hệ
  • Việc làm
  • Sự kiện
  • Podcast
  • Blog
  • Khách hàng
  • Pháp lý • Riêng tư
  • Bảo mật
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo là bộ ứng dụng kinh doanh có open source đáp ứng tất cả các nhu cầu của công ty bạn: CRM, thương mại điện tử, kế toán, tồn kho, POS, quản lý dự án, v.v.

Định hướng giá trị riêng biệt của Odoo là tích hợp hoàn toàn và dễ dàng sử dụng.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now