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

Get image of warehouse in qweb report + display shipping and billing address

Tilmeld

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

Dette spørgsmål er blevet anmeldt
invoicedatabaseqwebmodelsreport
2 Besvarelser
4685 Visninger
Avatar
T. Gundacker

Hello odoo Family,



I am really new to odoo and qweb but I have to modify the standard account.invoice report for our company. I am familiar with HTML, so qweb itself is not a problem, however I really struggle with implementing additional data to the report. We use odoo version 9.0e.


This is my situation:

We have several warehouses in odoo. Each of them has a unique image (logo) attached to it's address (res.partner?). This logo should also appear in the account.invoice report when the products of that report are linked to that specific warehouse.

I think I'm doing something terribly wrong here, but this what I have so far:

<img t-if="o.invoice_line_ids[0].product_id.warehouse_id.partner_id.image" t-att-src="'data:image/png;base64,%s' % o.invoice_line_ids[0].product_id.warehouse_id.partner_id.image" align="right" style="max-height: 20px;"/>I don't think that I can load the stock model that easily in qweb's account.invoice model? I am only using the first product of the report to identify the warehouse because this always works in our environment.

So my initial question here is:

How can I get the image of the warehouse of the first product in the report?




The second thing is the following:

How can I get the shipping address and the billing address of the specific order. Everything I tried din't work out as expected and I get despaired of this more and more...


Best reagards,


Timo

0
Avatar
Kassér
Avatar
Art
Bedste svar

I'm using v10 and currently working on creating account_invoice report. Regarding your 2nd question here is a piece of code that puts billing address in my report:

<div class="col-xs-6">        							
    <strong>Billing Address:</strong>
    <div t-if="o.partner_id.parent_id">
        <span t-field="o.partner_id.parent_id"/>
    </div>
    <div t-field="o.partner_id.name"/>
    <div t-field="o.partner_id.street"/>
    <div t-field="o.partner_id.street2"/>  
    <div>
        <span t-field="o.partner_id.city"/><span t-if="o.partner_id.state_id.code">, </span><span t-field="o.partner_id.state_id.code"/> <span t-field="o.partner_id.zip"/>
    </div>
    <div t-if="o.partner_id.country_id.code != 'US'">
        <span t-field="o.partner_id.country_id"/> </div>
    <div t-field="o.partner_id.vat"/>
</div>

it takes address from 'res.partner' form.

But I'm having a problem with the shipping address. For some reason it puts exactly the same info as in Billing address. So my billing address = shipping address now.

However, here is a code that works for the shipping address in v8:

<div class="col-xs-6" t-if="o.address_shipping_id">							
    <strong>Shipped Address:</strong>
    <div t-if="o.address_shipping_id.parent_id">
        <span t-field="o.address_shipping_id.parent_id"/>
    </div>
    <div t-field="o.address_shipping_id.name"/>
    <div t-field="o.address_shipping_id.street"/>
    <div t-field="o.address_shipping_id.street2"/>  
    <div>
        <span t-field="o.address_shipping_id.city"/><span t-if="o.address_shipping_id.state_id.code">, </span><span t-field="o.address_shipping_id.state_id.code"/> <span t-field="o.address_shipping_id.zip"/>
    </div>
    <div t-if="o.address_shipping_id.country_id.code != 'US'">
        <span t-field="o.address_shipping_id.country_id"/>
    </div>
</div>

 double check the IDs, because 'address_shipping_id' doesn't exist in v10 and I'm not sure if it does in v9.

Hope it'll help.

1
Avatar
Kassér
Avatar
T. Gundacker
Forfatter Bedste svar

To be honest I can't find a customer invoice form, I guess you mean the account.invoice form. There doesn't appear anything at all unfortunately :-(.


I am really confused right now...


Best regards,

Timo

0
Avatar
Kassér
Art

I created a custom module just to create this report. For my shipping address I used 'partner_shipping_id', which I guess exists in v9.

<div t-field="o.partner_shipping_id.name"/>

<div t-field="o.partner_shipping_id.street"/>

<div t-field="o.partner_shipping_id.street2"/>

<div t-field="o.partner_shipping_id.street3"/>

<div>

<span t-field="o.partner_shipping_id.city"/><span t-if="o.partner_shipping_id.state_id.code">, </span><span t-field="o.partner_shipping_id.state_id.code"/> <span t-field="o.partner_shipping_id.zip"/>

</div>

But still my both addresses are the same on the report. I think I'm using wrong IDs.

What exactly you don't know how? How to add shipping address to your report or create a module?

Art

So to make things work I went to Sales->Configuration->Settings and in Quotation and Sales I switched from Invoicing and shipping addresses are always the same (Example: services companies) to Display 3 fields on sales orders: customer, invoice address, delivery address

Art

After you made those changes in the sales settings it added a "Delivery Address" to Customer Invoice form. Hover over that field in the developer mode and look at its id. What does it show?

Art

@T. Gundacker, in v10 you can get to this form in several ways: 1) Accounting module -> Sales menu -> Customer invoices -> Create new; 2) in developer mode in the drop-down box click on Open View then in the search box type in "account.invoice.form" and you will see the list of views, click on the one with the "account.invoice_form" external ID and it will open this form for you. After that you'll be able to see the id of "Delivery Address" field.

I'm sure in v9 it's pretty similar.

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
Invoice on basic layout
pdf invoice qweb report
Avatar
0
apr. 24
2497
how to get passed values from qweb report
invoice xml qweb report
Avatar
Avatar
1
aug. 23
7295
How do I replace the <div class="page"> on the Odoo built-in invoice PDF template in Odoo v8? Løst
invoice qweb report customise
Avatar
Avatar
2
apr. 18
20180
QWEB REPORTING : Create a module to replace the invoice report Løst
invoice module qweb report
Avatar
Avatar
Avatar
Avatar
Avatar
4
aug. 17
22808
Print picking reference/movement order in invoice
invoice qweb picking report
Avatar
Avatar
1
okt. 15
7618
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