Skip to Content
Odoo Menú
  • Registra entrada
  • Prova-ho gratis
  • Aplicacions
    Finances
    • Comptabilitat
    • Facturació
    • Despeses
    • Full de càlcul (IA)
    • Documents
    • Signatura
    Vendes
    • CRM
    • Vendes
    • Punt de venda per a botigues
    • Punt de venda per a restaurants
    • Subscripcions
    • Lloguer
    Imatges de llocs web
    • Creació de llocs web
    • Comerç electrònic
    • Blog
    • Fòrum
    • Xat en directe
    • Aprenentatge en línia
    Cadena de subministrament
    • Inventari
    • Fabricació
    • PLM
    • Compres
    • Manteniment
    • Qualitat
    Recursos humans
    • Empleats
    • Reclutament
    • Absències
    • Avaluacions
    • Recomanacions
    • Flota
    Màrqueting
    • Màrqueting Social
    • Màrqueting per correu electrònic
    • Màrqueting per SMS
    • Esdeveniments
    • Automatització del màrqueting
    • Enquestes
    Serveis
    • Projectes
    • Fulls d'hores
    • Servei de camp
    • Suport
    • Planificació
    • Cites
    Productivitat
    • Converses
    • Validacions
    • IoT
    • VoIP
    • Coneixements
    • WhatsApp
    Aplicacions de tercers Odoo Studio Plataforma d'Odoo al núvol
  • Sectors
    Comerç al detall
    • Llibreria
    • Botiga de roba
    • Botiga de mobles
    • Botiga d'ultramarins
    • Ferreteria
    • Botiga de joguines
    Food & Hospitality
    • Bar i pub
    • Restaurant
    • Menjar ràpid
    • Guest House
    • Distribuïdor de begudes
    • Hotel
    Immobiliari
    • Agència immobiliària
    • Estudi d'arquitectura
    • Construcció
    • Gestió immobiliària
    • Jardineria
    • Associació de propietaris de béns immobles
    Consultoria
    • Empresa comptable
    • Partner d'Odoo
    • Agència de màrqueting
    • Bufet d'advocats
    • Captació de talent
    • Auditoria i certificació
    Fabricació
    • Textile
    • Metal
    • Mobles
    • Menjar
    • Brewery
    • Regals corporatius
    Salut i fitness
    • Club d'esport
    • Òptica
    • Centre de fitness
    • Especialistes en benestar
    • Farmàcia
    • Perruqueria
    Trades
    • Servei de manteniment
    • Hardware i suport informàtic
    • Sistemes d'energia solar
    • Shoe Maker
    • Serveis de neteja
    • Instal·lacions HVAC
    Altres
    • Nonprofit Organization
    • Agència del medi ambient
    • Lloguer de panells publicitaris
    • Fotografia
    • Lloguer de bicicletes
    • Distribuïdors de programari
    Browse all Industries
  • Comunitat
    Aprèn
    • Tutorials
    • Documentació
    • Certificacions
    • Formació
    • Blog
    • Pòdcast
    Potenciar l'educació
    • Programa educatiu
    • Scale-Up! El joc empresarial
    • Visita Odoo
    Obtindre el programari
    • Descarregar
    • Comparar edicions
    • Novetats de les versions
    Col·laborar
    • GitHub
    • Fòrum
    • Esdeveniments
    • Traduccions
    • Converteix-te en partner
    • Services for Partners
    • Registra la teva empresa comptable
    Obtindre els serveis
    • Troba un partner
    • Troba un comptable
    • Contacta amb un expert
    • Serveis d'implementació
    • Referències del client
    • Suport
    • Actualitzacions
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Programar una demo
  • Preus
  • Ajuda

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

  • CRM
  • e-Commerce
  • Comptabilitat
  • Inventari
  • PoS
  • Projectes
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
Ajuda

Send different Worksheet Report in Field Service

Subscriure's

Get notified when there's activity on this post

This question has been flagged
reportstasksStudio
1 Respondre
3166 Vistes
Avatar
Dave

Hi, 

I have several custom worksheets created in Studio for different maintenance tasks in Field Services. Which all work well apart from when I want to send the field service to the client as it will not include the multi line sections, it just replaces them with :-

Door Units                x_project_task_worksheet_template_16_line_fe9aa(2, 3, 4) 

Inside Units              x_project_task_worksheet_template_16_line_cd368(2, 3, 4)


I have the worksheets in the print option when they are open, but when going to the task I am unable to add them as they are not in the task.project model.

How can I add these  worksheets to the task report.


Many thanks  




2
Avatar
Descartar
Avatar
LandLogic IT s.n.c.
Best Answer

Solution for Including Multiline Sections in Custom Worksheets in Field Services Reports

If you’ve created custom worksheets in Studio for maintenance tasks in Field Services and the multiline sections aren't displaying correctly in reports (replaced with something like x_project_task_worksheet_template_16_line_fe9aa(2, 3, 4)), here's how you can resolve the issue.

Issue

The custom worksheets created in Studio display correctly in the Odoo interface, but when printing or generating reports, the One2many fields (multiline sections) are not rendered properly. Instead, they appear as technical references, e.g., x_project_task_worksheet_template_16_line_cd368(2, 3, 4).

This happens because the automatically generated templates from Studio don't handle One2many fields directly in the QWeb report.

Solution: Customize the QWeb Template

To fix this issue, you need to manually customize the QWeb template that renders the report for the worksheet. Follow these steps:

  1. Identify the QWeb Template:
    • The automatically generated QWeb template for the worksheet can be found under Settings > Technical > User Interface > Views (enable developer mode if needed).
    • Locate the template by its external ID. In this case, it might look like industry_fsm_report.report_custom_x_project_task_worksheet_template_16.
  2. Modify the Template to Handle One2many Fields:
    • Edit the template and replace the default rendering for the One2many field with a loop to display its data.
    • Here's an example of how you can update the template:
      <div t-att-class="('col-5' if report_type == 'pdf' else 'col-lg-3 col-12') + ' fw-bold'">
          Door Units
      </div>
      <div nolabel="1" colspan="2" t-att-class="'col-7' if report_type == 'pdf' else 'col-lg-9 col-12'">
          <table class="table table-sm">
              <thead>
                  <tr>
                      <th>Quantity</th>
                      <th>Sequence</th>
                      <th>Description</th>
                  </tr>
              </thead>
              <tbody>
                  <t t-foreach="worksheet.x_studio_one2many_field" t-as="line">
                      <tr>
                          <td><t t-esc="line.x_studio_qty"/></td>
                          <td><t t-esc="line.x_studio_sequence"/></td>
                          <td><t t-esc="line.x_name"/></td>
                      </tr>
                  </t>
              </tbody>
          </table>
      </div>
      
      Replace x_studio_one2many_field, x_studio_qty, x_studio_sequence, and x_name with the actual technical names of your One2many field and its subfields.
  3. Test the Report:
    • Save the changes and regenerate the report.
    • Check that the multiline sections now display correctly with the expected data.

Explanation

The solution involves manually iterating through the records of the One2many field in the QWeb template using t-foreach. Each row is rendered dynamically based on the values stored in the One2many field, ensuring the data is displayed properly in the report.

Additional Notes

  • If the worksheet isn't linked to the project.task model directly, you might need to add a Many2one relation in Studio or via code to associate the worksheet with the task.
  • This solution is applicable for any module or report in Odoo where Studio-generated One2many fields aren't displaying correctly.
  • For advanced customizations, consider developing a custom Odoo module instead of relying entirely on Studio.

This approach ensures that your custom worksheets will display all multiline sections properly in the reports generated from Field Services tasks. 😊

0
Avatar
Descartar
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Registrar-se
Related Posts Respostes Vistes Activitat
Odoo Studio Issue: Trying to Modify Existing Reports
reports Studio
Avatar
Avatar
1
de gen. 22
5771
Create new Report in Module Employee / Fields not available
employee reports Studio
Avatar
0
de nov. 23
1844
Access rights for report update and creation.
reports access rights Studio
Avatar
Avatar
1
d’ag. 25
1846
How to add a page break on your pdf report using Studio ? Solved
reports customization quickstart Studio
Avatar
Avatar
Avatar
Avatar
Avatar
5
de febr. 24
10496
Snippets of reports in odoo enterprise studio (ODOO15)
designer reports Enterprise Studio
Avatar
0
d’oct. 22
3099
Community
  • Tutorials
  • Documentació
  • Fòrum
Codi obert
  • Descarregar
  • GitHub
  • Runbot
  • Traduccions
Serveis
  • Allotjament a Odoo.sh
  • Suport
  • Actualització
  • Desenvolupaments personalitzats
  • Educació
  • Troba un comptable
  • Troba un partner
  • Converteix-te en partner
Sobre nosaltres
  • La nostra empresa
  • Actius de marca
  • Contacta amb nosaltres
  • Llocs de treball
  • Esdeveniments
  • Pòdcast
  • Blog
  • Clients
  • Informació legal • Privacitat
  • Seguretat
الْعَرَبيّة 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 és un conjunt d'aplicacions empresarials de codi obert que cobreix totes les necessitats de la teva empresa: CRM, comerç electrònic, comptabilitat, inventari, punt de venda, gestió de projectes, etc.

La proposta única de valor d'Odoo és ser molt fàcil d'utilitzar i estar totalment integrat, ambdues alhora.

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