Перейти к содержимому
Odoo Меню
  • Войти
  • Попробовать бесплатно
  • Модули
    Финансы
    • Бухгалтерия
    • Выставление счетов
    • Расходы
    • Таблицы
    • Документооборот
    • Подпись
    Продажи
    • CRM
    • Продажи
    • POS Магазин
    • POS Ресторан
    • Подписки
    • Аренда
    Вебсайты
    • Конструктор вебсайтов
    • eCommerce
    • Блог
    • Форум
    • Онлайн-чат
    • Электронное обучение
    Логистика
    • Склад
    • Производство
    • PLM
    • Закупки
    • Обслуживание
    • Качество
    Отдел кадров
    • Сотрудники
    • Подбор персонала
    • Отпуска
    • Оценка персонала
    • Реферальная программа
    • Автопарк
    Маркетинг
    • SMM
    • E-mail рассылки
    • СМС рассылки
    • Мероприятия
    • Автоматизация маркетинга
    • Опросы
    Услуги
    • Проекты
    • Табели
    • Выездной сервис
    • Поддержка
    • Планирование
    • Встречи
    Продуктивность
    • Обсуждения
    • Согласование
    • IoT
    • VoIP-телефония
    • Knowledge
    • WhatsApp
    Сторонние приложения Модуль Студия Odoo Платформа Odoo Cloud
  • Индустрии
    Розничная торговля
    • Книжный магазин
    • Магазин одежды
    • Мебельный магазин
    • Продуктовый магазин
    • Строительный магазин
    • Магазин игрушек
    Гостинично-ресторанный бизнес
    • Бар и паб
    • Ресторан
    • Фастфуд
    • Гостевой дом
    • Дистрибьютор напитков
    • Отель
    Недвижимость
    • Агентство недвижимости
    • Архитектурное бюро
    • Строительство
    • Управление недвижимостью
    • Ландшафтный дизайн
    • Товарищество собственников жилья
    Консалтинг
    • Бухгалтерская фирма
    • Партнер Odoo
    • Маркетинговое агентство
    • Юридическая фирма
    • Подбор персонала
    • Аудиторское бюро
    Производство
    • Текстиль
    • Металл
    • Мебель
    • Продукты питания
    • Пивоварня
    • Корпоративные сувениры
    Здоровье и фитнес
    • Спортивный комплекс
    • Магазин оптики
    • Фитнес-клуб
    • Велнес-центр
    • Аптека
    • Салон красоты
    Услуги
    • Специалист по бытовым услугам
    • Продажа и обслуживание IT-оборудования
    • Солнечные энергосистемы
    • Производство обуви
    • Клининг
    • Системы ОВКВ
    Прочее
    • Некоммерческая организация
    • Консалтинг в сфере устойчивого развития
    • Аренда рекламных щитов
    • Бизнес по фотосъемке
    • Прокат велосипедов
    • Реселлер программного обеспечения
    Все индустрии
  • Community
    Обучение
    • Видео уроки
    • Документация
    • Сертификация
    • Тренинг
    • Блог
    • Подкаст
    Образование и развитие
    • Образовательная программа
    • Деловая игра Scale Up!
    • Экскурсия в офис Odoo
    ПО
    • Скачать
    • Сравнить версии
    • Релизы
    Сотрудничество
    • Github
    • Форум
    • Мероприятия
    • Перевод
    • Стать партнером
    • Услуги для партнеров
    • Зарегистрировать бухгалтерскую фирму
    Услуги
    • Найти партнера
    • Найти бухгалтера
    • Встреча с экспертом
    • Услуги по внедрению
    • Отзывы клиентов
    • Поддержка
    • Обновления
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Заказать демонстрацию
  • Цены
  • Поддержка

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

  • CRM
  • e-Commerce
  • Бухгалтерия
  • Склад
  • PoS
  • Проекты
  • MRP
All apps
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Все посты Люди Значки
Теги (Смотреть все)
odoo accounting v14 pos v15
Об этом форуме
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Все посты Люди Значки
Теги (Смотреть все)
odoo accounting v14 pos v15
Об этом форуме
Помощь

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

Подписаться

Получайте уведомления о появлении активности в этом посте

Этот вопрос был отмечен
imagereportsale.order
4 Ответы
8742 Представления
Аватар
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
Аватар
Отменить
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.

Аватар
Ghanshyam Prajapati
Лучший ответ

Hey Kris, Please see following link,

insert image / field in a report

Hope it works for you.

1
Аватар
Отменить
Kris Krnacs
Автор

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?

Аватар
jamesbale
Лучший ответ

I think this link will helpful to you:

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

1
Аватар
Отменить
Kris Krnacs
Автор

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

Аватар
Luke Branch
Лучший ответ

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
Аватар
Отменить
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

Аватар
Kris Krnacs
Автор Лучший ответ

Hi!

The method is working on V8?

0
Аватар
Отменить
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
Автор

Hi! Wil try out and see. Thank you!

Не оставайтесь в стороне – присоединяйтесь к обсуждению!

Создайте аккаунт сегодня, чтобы получить доступ к эксклюзивным функциям и стать частью нашего замечательного сообщества!

Регистрация
Похожие посты Ответы Просмотры Активность
Picture in report Решено
image report
Аватар
Аватар
1
февр. 16
3961
Image from file in report pageGraphics section
image report
Аватар
Аватар
1
мар. 15
5618
add image source in rml report
image report
Аватар
0
мар. 15
4882
Product Image resize in PDF report in sale.order.document view Решено
image report size
Аватар
Аватар
1
мая 22
6580
image on sale.order model ?
image sale.order odoo8.0
Аватар
0
мар. 16
3603
Сообщество
  • Видео уроки
  • Документация
  • Форум
Открытый исходный код
  • Скачать
  • Github
  • Runbot
  • Перевод
Услуги
  • Хостинг Odoo.sh
  • Поддержка
  • Обновление
  • Индивидуальные решения по доработке
  • Образование
  • Найти бухгалтера
  • Найти партнера
  • Стать партнером
О нас
  • Наша компания
  • Активы бренда
  • Cвяжитесь с нами
  • Вакансии
  • Мероприятия
  • Подкаст
  • Блог
  • Клиенты
  • Правовые документы • Конфиденциальность
  • Безопасность
الْعَرَبيّة 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 – это набор бизнес-модулей с открытым исходным кодом, который закроет все потребности вашей компании: CRM, E-commerce, Бухгалтерия, Склад, POS, управление проектами и др.

Odoo сочетает в себе простоту использования и полную интеграцию всех бизнес-процессов в одной системе.

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