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

Horizontal Table XML

Tilmeld

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

Dette spørgsmål er blevet anmeldt
xmlreportstablexmlviewodooV13
5155 Visninger
Avatar
Marco Vogels

Hi Odoo Users,

For one of the new reports, a Rough Order of Magnitude (ROM), I need to change the tables sideways, so rotate them 90 degrees. A small example is given above. Currently, the 'normal' table in Odoo Reports like report_saleorder_document are vertical, with a continuous line being added once a product is added. I want the exact same, just to the side. The new report is already in landscape and it will never be more than 5 products, thus it will easily fit.

The best would be an upgraded version of the already existing code within the report_saleorder_document as that is already taken valuable data from the order, I want to continue from that information.

Could anyone help me with the necessary code? You would help me so much! Thank you advance for your help.



Line Nr.Item Ref.DescriptionQuantity
1BM-001BETA Machine1,00
2BM-002ALPHA Machine1,00

to

Item Nr.12
Item Ref.BM-001BM-002
DescriptionBETA MachineALPHA Machine
Quantity1,001,00

Kind regards,

Marco


0
Avatar
Kassér
Marco Vogels
Forfatter

<table class="table table-sm o_main_table">
<thead style="color: rgb(277,277,277);background-color: rgb(0, 0, 0)">
<tr>

<th name="th_line" class="text-left">Line nr.</th>
<th name="th_item_number" class="text-left">Item nr.</th>
<t t-set="line_no" t-value="0"/>
<th name="th_description" class="text-left o_bold">Description</th>
<th name="th_quantity" class="text-right">Quantity</th>
<th name="th_unit" class="text-left">Unit</th>

<th name="th_priceunit" class="text-right">Unit Price</th>
<th name="th_discount" t-if="display_discount" class="text-right" groups="product.group_discount_per_so_line">
<span>Disc.%</span>
</th>
<th name="th_taxes" class="text-right">Taxes</th>
<th name="th_subtotal" class="text-right">
<t groups="account.group_show_line_subtotals_tax_excluded">Amount</t>
<t groups="account.group_show_line_subtotals_tax_included">Total Price</t>
</th>
</tr>
</thead>
<tbody class="sale_tbody">

<t t-set="current_subtotal" t-value="0"/>

<t t-foreach="doc.order_line" t-as="line">

<t t-set="current_subtotal" t-value="current_subtotal + line.price_subtotal" groups="account.group_show_line_subtotals_tax_excluded"/>
<t t-set="current_subtotal" t-value="current_subtotal + line.price_total" groups="account.group_show_line_subtotals_tax_included"/>

<tr t-att-class="'bg-200 font-weight-bold o_line_section' if line.display_type == 'line_section' else 'font-italic o_line_note' if line.display_type == 'line_note' else ''">
<t t-if="not line.display_type">

<t t-set="line_no" t-value="line_no + 1"/>
<td name="td_name"><span t-esc="line_no"/></td>
<td name="td_item_number"><span t-esc="line.product_id.default_code"/></td>
<td name="td_name"><span t-field="line.product_id.name"/>
</td>
<td name="td_quantity" class="text-right">
<span t-field="line.product_uom_qty"/>
</td>
<td name="td_uom" class="text-right">
<span t-field="line.product_uom" groups="uom.group_uom"/>
</td>

<td name="td_priceunit" class="text-right">
<span t-field="line.price_unit" t-options-widget="&quot;monetary&quot;"/>
</td>
<td t-if="display_discount" class="text-right" groups="product.group_discount_per_so_line">
<span t-field="line.discount" t-options-widget="&quot;integer&quot;"/>
</td>
<td name="td_taxes" class="text-right">
<span t-esc="', '.join(map(lambda x: (x.description or x.name), line.tax_id))">
<p></p>
</span>
</td>
<td name="td_subtotal" class="text-right o_price_total">
<span t-field="line.price_subtotal" groups="account.group_show_line_subtotals_tax_excluded"/>
<span t-field="line.price_total" groups="account.group_show_line_subtotals_tax_included"/>
</td>
</t>
<t t-if="line.display_type == 'line_section'">
<td name="td_section_line" colspan="99">
<span t-field="line.name"/>
</td>
<t t-set="current_section" t-value="line"/>
<t t-set="current_subtotal" t-value="0"/>
</t>
<t t-if="line.display_type == 'line_note'">
<td name="td_note_line" colspan="99">
<span t-field="line.name"/>
</td>
</t>
</tr>

<t t-if="current_section and (line_last or doc.order_line[line_index+1].display_type == 'line_section')">
<tr class="is-subtotal text-right">
<td name="td_section_subtotal" colspan="99">
<strong class="mr16">Subtotal</strong>
<span t-esc="current_subtotal" t-options="{&quot;widget&quot;: &quot;monetary&quot;, &quot;display_currency&quot;: doc.pricelist_id.currency_id}"/>
</td>
</tr>
</t>
</t>
</tbody>
</table>

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
Fields from QWeb Report Shifted/Move upon updating from another version
xml qweb reports
Avatar
0
jan. 25
2108
How to hide reports from print menu in odoo 14 ? Løst
xml reports v14
Avatar
Avatar
2
jan. 23
12829
XML code on Report won't appear when you print
reports xmlview OdooV13
Avatar
0
jan. 22
20
KeyError: 'account.partner.ledger'
account reports odooV13
Avatar
0
jun. 21
3087
Two different reports for different companies
xml reports multicompany
Avatar
0
maj 21
2550
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