Overslaan naar inhoud
Odoo Menu
  • Aanmelden
  • Probeer het gratis
  • Apps
    Financiën
    • Boekhouding
    • Facturatie
    • Onkosten
    • Spreadsheet (BI)
    • Documenten
    • Ondertekenen
    Verkoop
    • CRM
    • Verkoop
    • Kassasysteem winkel
    • Kassasysteem Restaurant
    • Abonnementen
    • Verhuur
    Websites
    • Websitebouwer
    • E-commerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Bevoorradingsketen
    • Voorraad
    • Productie
    • PLM
    • Inkoop
    • Onderhoud
    • Kwaliteit
    Personeelsbeheer
    • Werknemers
    • Werving & Selectie
    • Verlof
    • Evaluaties
    • Aanbevelingen
    • Wagenpark
    Marketing
    • Social media Marketing
    • E-mailmarketing
    • SMS Marketing
    • Evenementen
    • Marketingautomatisering
    • Enquêtes
    Diensten
    • Project
    • Urenstaten
    • Buitendienst
    • Helpdesk
    • Planning
    • Afspraken
    Productiviteit
    • Chat
    • Goedkeuringen
    • IoT
    • VoIP
    • Kennis
    • WhatsApp
    Apps van derden Odoo Studio Odoo Cloud Platform
  • Bedrijfstakken
    Detailhandel
    • Boekhandel
    • kledingwinkel
    • Meubelzaak
    • Supermarkt
    • Bouwmarkt
    • Speelgoedwinkel
    Food & Hospitality
    • Bar en Pub
    • Restaurant
    • Fastfood
    • Gastenverblijf
    • Drankenhandelaar
    • Hotel
    Vastgoed
    • Makelaarskantoor
    • Architectenbureau
    • Bouw
    • Vastgoedbeheer
    • Tuinieren
    • Vereniging van eigenaren
    Consulting
    • Accountantskantoor
    • Odoo Partner
    • Marketingbureau
    • Advocatenkantoor
    • Talentenwerving
    • Audit & Certificering
    Productie
    • Textiel
    • Metaal
    • Meubels
    • Eten
    • Brewery
    • Relatiegeschenken
    Gezondheid & Fitness
    • Sportclub
    • Opticien
    • Fitnesscentrum
    • Wellness-medewerkers
    • Apotheek
    • Kapper
    Trades
    • Klusjesman
    • IT-hardware & support
    • Zonne-energiesystemen
    • Schoenmaker
    • Schoonmaakdiensten
    • HVAC-diensten
    Andere
    • Non-profitorganisatie
    • Milieuagentschap
    • Verhuur van Billboards
    • Fotograaf
    • Fietsleasing
    • Softwareverkoper
    Browse all Industries
  • Community
    Leren
    • Tutorials
    • Documentatie
    • Certificeringen
    • Training
    • Blog
    • Podcast
    Versterk het onderwijs
    • Onderwijs- programma
    • Scale Up! Business Game
    • Bezoek Odoo
    Download de Software
    • Downloaden
    • Vergelijk edities
    • Releases
    Werk samen
    • Github
    • Forum
    • Evenementen
    • Vertalingen
    • Word een Partner
    • Services for Partners
    • Registreer je accountantskantoor
    Diensten
    • Vind een partner
    • Vind een boekhouder
    • Een adviseur ontmoeten
    • Implementatiediensten
    • Klantreferenties
    • Ondersteuning
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Vraag een demo aan
  • Prijzen
  • Help

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

  • CRM
  • e-Commerce
  • Boekhouding
  • Voorraad
  • PoS
  • Project
  • MRP
All apps
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Alle posts Personen Badges
Labels (Bekijk alle)
odoo accounting v14 pos v15
Over dit forum
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Alle posts Personen Badges
Labels (Bekijk alle)
odoo accounting v14 pos v15
Over dit forum
Help

OpenERP 7: How can I add images in sale.oder.line generally?

Inschrijven

Ontvang een bericht wanneer er activiteit is op deze post

Deze vraag is gerapporteerd
imagereportsale.order
4 Antwoorden
8740 Weergaven
Avatar
Kris Krnacs

I am having problems with adding images in reports(sxw). I add a new column in to my sale.order report /.sxw/ and put the already showing context like: [[ format(line.name) ]] or [[ formatLang(o.amount_untaxed, dp='Account', currency_obj=o.pricelist_id.currency_id) ]] it is working and showing on the printed .pdf file and/or e-mail. In other case if I put the [[product_id.product_image]] it is not showing up, it is only gives some nothing or alphanumeric values. It seem it is not the problem with the .sxw file, but the product image location pathname. Can anyone tell how to put the product image on place?

1
Avatar
Annuleer
Luke Branch

Hi Kris, Are you using v8 (ie. master) or v7? I have figured out a way to do this for v8 (master) using this post: https://www.odoo.com/forum/Help-1/question/Is-there-any-way-to-preview-WebKit-report-layout-while-coding-maybe-WYSIWYG-Editor-52307 Specifically the post from Fabrice. Please let me know if you are using v8 and I will post back with an answer for you.

Avatar
Ghanshyam Prajapati
Beste antwoord

Hey Kris, Please see following link,

insert image / field in a report

Hope it works for you.

1
Avatar
Annuleer
Kris Krnacs
Auteur

Thank you! Yes it is the "old way" it is not working in openerp 7. Or you have some ideas?

Luke Branch

Hi Kris, i'm also interested in implementing this in v8, did you figure out a way to implement this either by customising RML files or via a module?

Avatar
jamesbale
Beste antwoord

I think this link will helpful to you:

https://accounts.openerp.com/forum/Help-1/question/483#501

1
Avatar
Annuleer
Kris Krnacs
Auteur

Thank you! As you see it is only for tree view... My post is on the page already, down under the solution section, my post is the last one... Thank you anyhow

Avatar
Luke Branch
Beste antwoord

If you are looking to add a product image to a printed report (ie. PDF or HTML) sales order, purchase order, invoice, or any other report with product order lines I believe I have figured out a solution thanks to Fabrice Henrion's post here: https://www.odoo.com/forum/Help-1/question/Is-there-any-way-to-preview-WebKit-report-layout-while-coding-maybe-WYSIWYG-Editor-52307.

Simply follow Fabrice's instructions as follows (preferably use latest v8 master branch version):

  1. First you have to know that the new QWeb engine allows to output PDF or HTML. It is only when the output is HTML that it can be modified in a WYSIWYG fashion.
  2. Let's assume the Sales module is installed on a fresh Odoo instance. By default, the output of a quotation document is PDF, you can test that by printing a quotation. We want to change this.
  3. Make sure your user has the technical feature checkbox checked. Then go to Settings > Technical > Reports > Reports, then search "sale.order" and enter the record.
  4. Edit the Report Type from PDF to HTML, then Save.
  5. Go back to the Sales app and print a quotation.
  6. A popup appear (or your popup-blocker will notify you). You will see the quotation in that popup and a black bar at the top with the Edit button. You need to make sure you have the access right to edit this so I recommend you do this test as an admin.
  7. From there, it's pretty straightforward. You edit whatever you want. You have to realize that there are 2 types of edition on a record like this: editing this particular record, or editing the quotation template which will have an impact on all records. For example, if you edit a header, it will be a template edition.

If you want to add an image to an order line simply edit the HTML in the HTML editor found in the top navigation menu under Customize >> HTML Editor and find the place in the HTML/QWeb template that you would like to edit. I simply added an extra set of <th></th> tags as follows for a order line header (in the appropriate section of html/qweb that is):

<th class="text-left"><strong>Picture</strong></th>

and then added the following line for the sales order line product picture column:

                                <td class="text-center">
                                   <span t-field="line.product_id.image_small" t-field-options="{&quot;widget&quot;: &quot;image&quot;, &quot;class&quot;: &quot;img-rounded&quot;}"/>
                                </td>

The contents of the <span> tag pull the product image into the sales order line in the column that you want and when you save your html your report will display the appropriate product picture in 64px x 64px.

There may be a better way to do this and I welcome any comments on how this process might be improved.

1
Avatar
Annuleer
DOMALYS

Dear Luke, I'm trying to do just that (inserting pictures in each line of a quotation). I've run through the 7 steps with no problem. But when I click on Customize → HTML editor, I can see several templates (web_layout, (...) report_saleorder) but no one (not even report_saleorder) won't give me a lot of code to play with. Here is the html code I have for report_saleorder. As you can see, no place to add a relevant

or section :
DOMALYS

http://imageshack.com/a/img908/9149/CrGO9e.png

Luke Branch

@Naoli, I think some of the templates have changed since the time I wrote this post originally. Could you tell me what version of Odoo you are running and whether you are running on a local install or on Odoo's hosted option (ie. *.odoo.com)? I've built a basic module that adds this functionality that I can provide a github link to if you are running on a local instance. What custom fields do you need on your quotation? I've currently added fields for product image, stock code/internal_reference, customer(s) stock codes and a few other fields for my own requirements, but I can provide some basic instructions on how to add further custom fields if needed.

DOMALYS

Dear Luke, I'm running a local instance of Odoo v8 on my own server. I am not familiar with github but if you can provide me the link, that would be wonderful. I'll try to manage it. I just need to add the product image in the first column Many many thanks

OdooBot
Dear Luke,
 I'm running a local instance of Odoo v8 on my own server. I am not familiar with github but if you can provide me the link, that would be wonderful. I'll try to manage it. I just need to add the product image in the first column 
Many many thanks

2014-11-22 4:57 GMT+01:00 Luke <luke-weairsoft-com@mail.odoo.com>:

@Naoli, I think some of the templates have changed since the time I wrote this post originally. Could you tell me what version of Odoo you are running and whether you are running on a local install or on Odoo's hosted option (ie. *.odoo.com)? I've built a basic module that adds this functionality that I can provide a github link to if you are running on a local instance. What custom fields do you need on your quotation? I've currently added fields for product image, stock code/internal_reference, customer(s) stock codes and a few other fields for my own requirements, but I can provide some basic instructions on how to add further custom fields if needed.

--
Luke
Sent by OpenERP S.A. using Odoo about Forum Post False
Luke Branch

@Naoli, I have not created the module yet, however I will throw something basic together tomorrow that will achieve this in this repository: https://github.com/OdooCommunityWidgets/product_image_report_order_lines/tree/8.0 I'd recommend signing up for a github.com account and watching the repository. I'll post back here once it is finished.

DOMALYS

@Luke hello, did you finished to code the module ? Many thanks

Avatar
Kris Krnacs
Auteur Beste antwoord

Hi!

The method is working on V8?

0
Avatar
Annuleer
Luke Branch

@Kris,

Which method are you referring to? I've got my method working for me own instances in printed reports, and have another method from Stefan's module here:

https://github.com/OCA/web/tree/8.0/web_tree_image

for live tree view.

Kris Krnacs
Auteur

Hi! Wil try out and see. Thank you!

Geniet je van het gesprek? Blijf niet alleen lezen, doe ook mee!

Maak vandaag nog een account aan om te profiteren van exclusieve functies en deel uit te maken van onze geweldige community!

Aanmelden
Gerelateerde posts Antwoorden Weergaven Activiteit
Picture in report Opgelost
image report
Avatar
Avatar
1
feb. 16
3961
Image from file in report pageGraphics section
image report
Avatar
Avatar
1
mrt. 15
5618
add image source in rml report
image report
Avatar
0
mrt. 15
4882
Product Image resize in PDF report in sale.order.document view Opgelost
image report size
Avatar
Avatar
1
mei 22
6580
image on sale.order model ?
image sale.order odoo8.0
Avatar
0
mrt. 16
3603
Community
  • Tutorials
  • Documentatie
  • Forum
Open Source
  • Downloaden
  • Github
  • Runbot
  • Vertalingen
Diensten
  • Odoo.sh Hosting
  • Ondersteuning
  • Upgrade
  • Gepersonaliseerde ontwikkelingen
  • Onderwijs
  • Vind een boekhouder
  • Vind een partner
  • Word een Partner
Over ons
  • Ons bedrijf
  • Merkelementen
  • Neem contact met ons op
  • Vacatures
  • Evenementen
  • Podcast
  • Blog
  • Klanten
  • Juridisch • Privacy
  • Beveiliging
الْعَرَبيّة 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 is een suite van open source zakelijke apps die aan al je bedrijfsbehoeften voldoet: CRM, E-commerce, boekhouding, inventaris, kassasysteem, projectbeheer, enz.

Odoo's unieke waardepropositie is om tegelijkertijd zeer gebruiksvriendelijk en volledig geïntegreerd te zijn.

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