Skip to Content
Odoo Menu
  • Log ind
  • Prøv gratis
  • Apps
    Økonomi
    • Bogføring
    • Fakturering
    • Udgifter
    • Regneark (BI)
    • Dokumenter
    • e-Signatur
    Salg
    • CRM
    • Salg
    • POS Butik
    • POS Restaurant
    • Abonnementer
    • Udlejning
    Hjemmeside
    • Hjemmesidebygger
    • e-Handel
    • Blog
    • Forum
    • LiveChat
    • e-Læring
    Forsyningskæde
    • Lagerbeholdning
    • Produktion
    • PLM
    • Indkøb
    • Vedligeholdelse
    • Kvalitet
    HR
    • Medarbejdere
    • Rekruttering
    • Fravær
    • Medarbejdersamtaler
    • Anbefalinger
    • Flåde
    Marketing
    • Markedsføring på sociale medier
    • E-mailmarketing
    • SMS-marketing
    • Arrangementer
    • Automatiseret marketing
    • Spørgeundersøgelser
    Tjenester
    • Projekt
    • Timesedler
    • Udkørende Service
    • Kundeservice
    • Planlægning
    • Aftaler
    Produktivitet
    • Dialog
    • Godkendelser
    • IoT
    • VoIP
    • Vidensdeling
    • WhatsApp
    Tredjepartsapps Odoo Studio Odoo Cloud-platform
  • Brancher
    Detailhandel
    • Boghandel
    • Tøjforretning
    • Møbelforretning
    • Dagligvarebutik
    • Byggemarked
    • Legetøjsforretning
    Mad og værtsskab
    • Bar og pub
    • Restaurant
    • Fastfood
    • Gæstehus
    • Drikkevareforhandler
    • Hotel
    Ejendom
    • Ejendomsmægler
    • Arkitektfirma
    • Byggeri
    • Ejendomsadministration
    • Havearbejde
    • Boligejerforening
    Rådgivning
    • Regnskabsfirma
    • Odoo-partner
    • Marketingbureau
    • Advokatfirma
    • Rekruttering
    • Audit & certificering
    Produktion
    • Tekstil
    • Metal
    • Møbler
    • Fødevareproduktion
    • Bryggeri
    • Firmagave
    Heldbred & Fitness
    • Sportsklub
    • Optiker
    • Fitnesscenter
    • Kosmetolog
    • Apotek
    • Frisør
    Håndværk
    • Handyman
    • IT-hardware og support
    • Solenergisystemer
    • Skomager
    • Rengøringsservicer
    • VVS- og ventilationsservice
    Andet
    • Nonprofitorganisation
    • Miljøagentur
    • Udlejning af billboards
    • Fotografi
    • Cykeludlejning
    • Softwareforhandler
    Gennemse alle brancher
  • Community
    Få mere at vide
    • Tutorials
    • Dokumentation
    • Certificeringer
    • Oplæring
    • Blog
    • Podcast
    Bliv klogere
    • Udannelselsesprogram
    • Scale Up!-virksomhedsspillet
    • Besøg Odoo
    Få softwaren
    • Download
    • Sammenlign versioner
    • Udgaver
    Samarbejde
    • Github
    • Forum
    • Arrangementer
    • Oversættelser
    • Bliv partner
    • Tjenester til partnere
    • Registrér dit regnskabsfirma
    Modtag tjenester
    • Find en partner
    • Find en bogholder
    • Kontakt en rådgiver
    • Implementeringstjenester
    • Kundereferencer
    • Support
    • Opgraderinger
    Github Youtube Twitter LinkedIn Instagram Facebook Spotify
    +1 (650) 691-3277
    Få en demo
  • Prissætning
  • Hjælp

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

  • CRM
  • e-Commerce
  • Bogføring
  • Lager
  • PoS
  • Projekt
  • MRP
All apps
Du skal være registreret for at interagere med fællesskabet.
All Posts People Emblemer
Tags (View all)
odoo accounting v14 pos v15
Om dette forum
Du skal være registreret for at interagere med fællesskabet.
All Posts People Emblemer
Tags (View all)
odoo accounting v14 pos v15
Om dette forum
Hjælp

[v18] multiple report sheets for one project

Tilmeld

Få besked, når der er aktivitet på dette indlæg

Dette spørgsmål er blevet anmeldt
developmentconfigurationservicev18
1 Svar
792 Visninger
Avatar
hzlh

Hello!

I'm taking over this already started project which has v18, I'm pretty new to Odoo and would love some help figuring out how to do what I have in mind:

We have a modified on field module which creates on site projects linked to a sales (one sale one project). It has the client, dates, etc, and then a tab component with a couple useful things like timesheets and notes. Among those tabs, we have one to file a report that the client can sign and where you can put details on what you've done and seen on site, and add pictures.

The issue is: we need to be able to file several reports, one for each day, for cases when the project lasts more than one day.

Right now, when you click on the tab, it directly shows a form which you can file and edit.

I thought of adding a button on top to create a new report if needed:

  • if there's only one, keep the current display
  • if there are multiples, display them in a list which you can toggle (date, who went, is the report signed or not) to avoid having a very long page

Another point is that we need to be able to print those individually, so having the option to choose which ones to print is needed.

Is this something I can do? If yes, how can I go about it?

I've read documentation about the in field module and have a good general understanding of the tool, and a web dev background.

Thanks a lot!

0
Avatar
Kassér
Avatar
Cybrosys Techno Solutions Pvt.Ltd
Bedste svar

Hi,


In Odoo 18, your current setup allows only a single on-site report per project, which makes it hard to handle projects lasting multiple days. The clean solution is to create a dedicated Daily Report model and link it to your project with a one-to-many relation. This lets you add as many daily reports as needed, display them in a list if there are several, and still print each report individually.


The first step is to define a new model for daily reports. This model will store the project reference, date, technician, signed status, notes, and any attached photos:


class OnFieldReport(models.Model):

    _name = 'onfield.report'

    _description = 'On Field Daily Report'


    project_id = fields.Many2one('onfield.project', string="Project", required=True, ondelete='cascade')

    date = fields.Date(default=fields.Date.context_today, required=True)

    user_id = fields.Many2one('res.users', string="Technician", default=lambda self: self.env.user)

    signed = fields.Boolean("Signed by Client")

    notes = fields.Text("Report Notes")

    image_ids = fields.Many2many('ir.attachment', string="Photos")


Next, you extend your existing project model with a one-to-many field pointing to the reports:


class OnFieldProject(models.Model):

    _inherit = 'onfield.project'


    report_ids = fields.One2many('onfield.report', 'project_id', string="Daily Reports")



On the project form view, you add a new tab that displays the reports in both list and form view. This allows users to create new reports, quickly see existing ones, and open them individually:


<page string="Daily Reports">

    <field name="report_ids" context="{'default_project_id': active_id}">

        <tree editable="bottom">

            <field name="date"/>

            <field name="user_id"/>

            <field name="signed"/>

        </tree>

        <form>

            <sheet>

                <group>

                    <field name="date"/>

                    <field name="user_id"/>

                    <field name="signed"/>

                </group>

                <group>

                    <field name="notes"/>

                    <field name="image_ids" widget="many2many_binary"/>

                </group>

            </sheet>

        </form>

    </field>

</page>


Finally, you add a QWeb report definition so each daily report can be printed individually:


<report

    id="action_report_onfield_report"

    model="onfield.report"

    string="Daily Report"

    report_type="qweb-pdf"

    name="your_module.onfield_report_template"

    file="your_module.onfield_report_template"

/>



By moving the daily report into its own model and linking it to projects with a one-to-many relation, you can easily support multiple reports per project, keep the project form neat, and allow reports to be printed individually. This design scales well, stays user-friendly, and aligns with Odoo’s best practices for modularity and extensibility.


Hope it helps

0
Avatar
Kassér
Enjoying the discussion? Don't just read, join in!

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

Tilmeld dig
Related Posts Besvarelser Visninger Aktivitet
Override price list with quote
development configuration v18
Avatar
Avatar
Avatar
Avatar
3
maj 25
1330
Dynamic Dashboard Background and Text on Dark/Light Theme Switch in Odoo 16 sh
development configuration
Avatar
Avatar
1
nov. 25
214
Bulk PDF download error
development configuration
Avatar
0
okt. 25
517
I am trying to set up a mass BOM edit. My Python code is giving forbidden opcode(s) error. Odoo 18
development configuration
Avatar
Avatar
Avatar
2
sep. 25
1029
Google Calendar Sync - Odoo Calendar
development configuration
Avatar
Avatar
Avatar
3
aug. 25
1954
Community
  • Tutorials
  • Dokumentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Oversættelser
Tjenester
  • Odoo.sh-hosting
  • Support
  • Opgradere
  • Individuelt tilpasset udvikling
  • Uddannelse
  • Find en bogholder
  • Find en partner
  • Bliv partner
Om os
  • Vores virksomhed
  • Brandaktiver
  • Kontakt os
  • Stillinger
  • Arrangementer
  • Podcast
  • Blog
  • Kunder
  • Juridiske dokumenter • Privatlivspolitik
  • Sikkerhedspolitik
الْعَرَبيّة 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 er en samling open source-forretningsapps, der dækker alle dine virksomhedsbehov – lige fra CRM, e-handel og bogføring til lagerstyring, POS, projektledelse og meget mere.

Det unikke ved Odoo er, at systemet både er brugervenligt og fuldt integreret.

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